本文整理汇总了C#中ISerializer.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# ISerializer.GetType方法的具体用法?C# ISerializer.GetType怎么用?C# ISerializer.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISerializer
的用法示例。
在下文中一共展示了ISerializer.GetType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisteredSerializer
internal void RegisteredSerializer(string configurationType, ISerializer serializer)
{
if (IsEnabled())
RegisteredSerializer(configurationType, serializer.GetType().ToString(), Thread.CurrentThread.ManagedThreadId, GetTask());
}
示例2: DoDefault
private string DoDefault(ISerializer serializer)
{
if (serializer.GetType() == typeof(HTMLSerializer))
{
return DoComponetsContent(ContextHelper.GetCategory(AppConst.Components), serializer);
}
else
{
return serializer.Serializer(MenusContainer.Current.GetMenus(), Encoding.UTF8);
}
}
示例3: RegisteredSerializer
internal void RegisteredSerializer(string configurationType, ISerializer serializer)
{
if (IsEnabled())
RegisteredSerializer(configurationType, serializer.GetType().Name);
}
示例4: DoHealthCheck
private string DoHealthCheck(string name, ISerializer serializer)
{
var response = HttpContext.Current.Response;
HealthCheckResult result = HealthCheckManager.Current.CheckResult();
if (serializer.GetType() == typeof(HTMLSerializer)) { serializer = new JSONSerializer(); }
response.StatusCode = result.StatusCode;
if (name.ToLower() == "getmessage")
{
response.StatusCode = 200;
}
response.Write(serializer.Serializer(result, response.ContentEncoding));
return string.Empty;
}
示例5: ShowTimeItTakes
private static void ShowTimeItTakes(List<object> events,ISerializer serializer)
{
var startJsonAt = DateTime.Now;
serializer.Serialize(events);
Console.WriteLine(serializer.GetType() + " " + (DateTime.Now - startJsonAt).TotalMilliseconds);
}