add csharp snippets

This commit is contained in:
Jesse de Wit
2023-11-03 15:19:58 +01:00
parent 5ad88cde81
commit 2400d565f4
30 changed files with 1041 additions and 276 deletions

View File

@@ -0,0 +1,33 @@
using Breez.Sdk;
public class ConnectingLspSnippets
{
public void GetLspInfo(BlockingBreezServices sdk)
{
// ANCHOR: get-lsp-info
try
{
var lspId = sdk.LspId();
var lspInfo = sdk.LspInfo();
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: get-lsp-info
}
public void ConnectLsp(BlockingBreezServices sdk, string? lspId)
{
// ANCHOR: connect-lsp
try
{
sdk.ConnectLsp(lspId!);
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: connect-lsp
}
}