mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
add csharp snippets
This commit is contained in:
39
snippets/csharp/FiatCurrencies.cs
Normal file
39
snippets/csharp/FiatCurrencies.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Breez.Sdk;
|
||||
|
||||
public class FiatCurrenciesSnippets
|
||||
{
|
||||
public void ListFiatCurrencies(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: list-fiat-currencies
|
||||
try
|
||||
{
|
||||
var fiatCurrencies = sdk.ListFiatCurrencies();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: list-fiat-currencies
|
||||
}
|
||||
|
||||
public void FetchFiatRates(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: fetch-fiat-rates
|
||||
try
|
||||
{
|
||||
var fiatRates = sdk.FetchFiatRates();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: fetch-fiat-rates
|
||||
}
|
||||
|
||||
public void GetFiatCurrenciesAndRates(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: get-fiat-currencies-and-rates
|
||||
// TODO
|
||||
// ANCHOR_END: get-fiat-currencies-and-rates
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user