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

19
snippets/csharp/BuyBtc.cs Normal file
View File

@@ -0,0 +1,19 @@
using Breez.Sdk;
public class BuyBtcSnippets
{
public void BuyBtc(BlockingBreezServices sdk)
{
// ANCHOR: buy-btc
try
{
var buyBitcoinResponse = sdk.BuyBitcoin(
new BuyBitcoinRequest(BuyBitcoinProvider.MOONPAY));
}
catch (Exception)
{
// Handle error
}
// ANCHOR_END: buy-btc
}
}