本文整理汇总了C#中IApiContext.GetInfoUrl方法的典型用法代码示例。如果您正苦于以下问题:C# IApiContext.GetInfoUrl方法的具体用法?C# IApiContext.GetInfoUrl怎么用?C# IApiContext.GetInfoUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IApiContext
的用法示例。
在下文中一共展示了IApiContext.GetInfoUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowCoinApiErrorNotification
private void ShowCoinApiErrorNotification(IApiContext apiContext, Exception ex)
{
string siteUrl = apiContext.GetInfoUrl();
string apiUrl = apiContext.GetApiUrl();
string apiName = apiContext.GetApiName();
PostNotification(ex.Message,
String.Format("Error parsing the {0} JSON API", apiName), () =>
{
Process.Start(apiUrl);
},
ToolTipIcon.Warning, siteUrl);
}
示例2: NotifyCoinToMine
private void NotifyCoinToMine(IApiContext apiContext, CoinInformation coin)
{
string value = coin.AverageProfitability.ToString(".#") + "%";
string noun = "average profitability";
switch (engineConfiguration.StrategyConfiguration.MiningBasis)
{
case Strategy.CoinMiningBasis.Difficulty:
value = coin.Difficulty.ToString(".####");
noun = "difficulty";
break;
case Strategy.CoinMiningBasis.Price:
value = coin.Price.ToString(".########");
noun = "price";
break;
}
string infoUrl = apiContext.GetInfoUrl();
PostNotification(coin.Symbol,
String.Format("Consider mining {0} ({1} {2})",
coin.Symbol, value, noun),
() =>
{
Process.Start(String.Format("https://www.google.com/search?q={0}+{1}+mining+pools",
coin.Symbol, coin.Name));
}, ToolTipIcon.Info, infoUrl);
}