本文整理汇总了C#中Mono.Debugging.Client.ObjectValue.GetAllChildren方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectValue.GetAllChildren方法的具体用法?C# ObjectValue.GetAllChildren怎么用?C# ObjectValue.GetAllChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Debugging.Client.ObjectValue
的用法示例。
在下文中一共展示了ObjectValue.GetAllChildren方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateVariable
private Variable CreateVariable(ObjectValue v)
{
var pname = String.Format("{0} {1}", v.TypeName, v.Name);
return new Variable(pname, v.DisplayValue, v.HasChildren ? _variableHandles.Create(v.GetAllChildren()) : 0);
}
示例2: PrintValue
void PrintValue (ObjectValue val)
{
string result = val.Value;
if (string.IsNullOrEmpty (result) || val.IsError || val.IsUnknown || val.IsNotSupported) {
view.WriteOutput (GetErrorText (val));
FinishPrinting ();
} else {
var ops = GetEvaluationOptions ();
var children = val.GetAllChildren (ops);
var hasMore = false;
view.WriteOutput (result);
if (children.Length > 0 && string.Equals (children[0].Name, "[0..99]")) {
// Big Arrays Hack
children = children[0].GetAllChildren ();
hasMore = true;
}
var evaluating = new Dictionary<ObjectValue, bool> ();
foreach (var child in children) {
if (child.IsEvaluating) {
evaluating.Add (child, false);
} else {
PrintChildValue (child);
}
}
if (evaluating.Count > 0) {
foreach (var eval in evaluating)
WaitChildForCompleted (eval.Key, evaluating, hasMore);
} else {
FinishPrinting (hasMore);
}
}
}