本文整理汇总了C#中IPluginHost.LogDebug方法的典型用法代码示例。如果您正苦于以下问题:C# IPluginHost.LogDebug方法的具体用法?C# IPluginHost.LogDebug怎么用?C# IPluginHost.LogDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPluginHost
的用法示例。
在下文中一共展示了IPluginHost.LogDebug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupInstance
public override bool SetupInstance(IPluginHost host, Dictionary<string, string> config, out string errorMsg)
{
if (!base.SetupInstance(host, config, out errorMsg))
{
return false;
}
if (config != null && config.ContainsKey(BaseUrlKey))
{
// this.pluginConfig = config;
this.baseUrl = this.GetKeyValue(config, BaseUrlKey);
if (!string.IsNullOrEmpty(this.baseUrl))
{
this.isPersistentFlag = this.GetBoolKeyValue(config, GameIsPersistentKey);
this.hasErrorEvents = this.GetBoolKeyValue(config, GameHasErrorEventsKey);
this.baseUrl = this.baseUrl.Trim();
this.gameCreatedUrl = this.GetUrl(config, GameCreateKey);
this.gameClosedUrl = this.GetUrl(config, GameCloseKey);
this.gameJoinUrl = this.GetUrl(config, GameJoinKey);
this.gameLeaveUrl = this.GetUrl(config, GameLeaveKey);
this.gameLoadUrl = this.GetUrl(config, GameLoadKey);
this.gamePropertiesUrl = this.GetUrl(config, GamePropertiesKey);
this.gameEventUrl = this.GetUrl(config, GameEventKey);
var headers = this.GetKeyValue(config, CustomHttpHeadersKey);
if (!string.IsNullOrEmpty(headers))
{
this.customHttpHeaders = JsonConvert.DeserializeObject<Dictionary<string, string>>(headers);
}
host.LogDebug(this.gameCreatedUrl);
host.LogDebug(this.gameClosedUrl);
host.LogDebug(this.gameEventUrl);
// this.PluginHost.LogDebug("SetupInstance config:" + config.SerializeToString());
return true;
}
}
errorMsg = string.Format("Non null 'config' containing key '{0}' with non empty string value expected.", BaseUrlKey);
return false;
}