mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Merge pull request #104 from breez/savage-service-status
Update 0.2.10 & add service status page
This commit is contained in:
36
snippets/csharp/ServiceStatus.cs
Normal file
36
snippets/csharp/ServiceStatus.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Breez.Sdk;
|
||||
|
||||
public class ServiceStatusSnippets
|
||||
{
|
||||
public void HealthCheckStatus(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: health-check-status
|
||||
try
|
||||
{
|
||||
var healthCheck = sdk.ServiceHealthCheck();
|
||||
Console.WriteLine($"Current service status is: {healthCheck.status}");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: health-check-status
|
||||
}
|
||||
|
||||
public void ReportPaymentFailure(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: report-payment-failure
|
||||
var paymentHash = "...";
|
||||
try
|
||||
{
|
||||
sdk.ReportIssue(new ReportIssueRequest.PaymentFailure(
|
||||
new ReportPaymentFailureDetails(paymentHash)
|
||||
));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: report-payment-failure
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user