本文整理汇总了C#中JsonObject.Child方法的典型用法代码示例。如果您正苦于以下问题:C# JsonObject.Child方法的具体用法?C# JsonObject.Child怎么用?C# JsonObject.Child使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsonObject
的用法示例。
在下文中一共展示了JsonObject.Child方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseCustomFields
internal SerializableCustomTiming ParseCustomFields(JsonObject customJson)
{
var custom = new SerializableCustomTiming();
custom.DurationMilliseconds = ParseInt64(customJson["duration"]).GetValueOrDefault();
custom.ExecuteType = customJson["executeType"];
custom.Id = ParseGuid(customJson["id"]);
custom.MachineName = customJson["machine"];
custom.StartMilliseconds = ParseInt64(customJson["start"]).GetValueOrDefault();
custom.Sort = ParseInt64(customJson["sort"]).GetValueOrDefault(custom.StartMilliseconds);
custom.Started = ParseDateTime(customJson["started"]);
custom.Name = customJson["name"];
if (customJson.ContainsKey("tags")) custom.Tags = ParseTags(customJson.Child("tags"));
custom.Type = customJson["type"];
custom.ParentId = ParseGuid(customJson["parentId"]);
custom.InputData = customJson["inputData"];
custom.InputSize = ParseInt(customJson["inputSize"]);
custom.OutputSize = ParseInt(customJson["outputSize"]).GetValueOrDefault();
custom.OutputStartMilliseconds = ParseInt64(customJson["outputStartMilliseconds"]).GetValueOrDefault();
return custom;
}
示例2: ParseStepFields
internal SerializableStepTiming ParseStepFields(JsonObject stepJson)
{
var step = new SerializableStepTiming();
step.DurationMilliseconds = ParseInt64(stepJson["duration"]).GetValueOrDefault();
step.ExecuteType = stepJson["executeType"];
step.Id = ParseGuid(stepJson["id"]);
step.MachineName = stepJson["machine"];
step.StartMilliseconds = ParseInt64(stepJson["start"]).GetValueOrDefault();
step.Sort = ParseInt64(stepJson["sort"]).GetValueOrDefault(step.StartMilliseconds);
step.Started = ParseDateTime(stepJson["started"]);
step.Name = stepJson["name"];
if (stepJson.ContainsKey("tags")) step.Tags = ParseTags(stepJson.Child("tags"));
step.Type = stepJson["type"];
step.ParentId = ParseGuid(stepJson["parentId"]);
return step;
}
示例3: ParseSessionFields
internal SerializableProfiler ParseSessionFields(JsonObject sessionJson)
{
var session = new SerializableProfiler();
session.Client = sessionJson["client"];
session.DurationMilliseconds = ParseInt64(sessionJson["duration"]).GetValueOrDefault();
session.MachineName = sessionJson["machine"];
session.StartMilliseconds = ParseInt64(sessionJson["start"]).GetValueOrDefault();
session.Sort = ParseInt64(sessionJson["sort"]).GetValueOrDefault(session.StartMilliseconds);
session.Started = ParseDateTime(sessionJson["started"]);
session.ExecuteType = sessionJson["executeType"];
session.Id = ParseGuid(sessionJson["id"]);
session.LocalAddress = sessionJson["localAddress"];
session.Name = sessionJson["name"];
session.Type = sessionJson["type"];
if (sessionJson.ContainsKey("tags")) session.Tags = ParseTags(sessionJson.Child("tags"));
return session;
}