本文整理汇总了C#中Mono.Debugging.Client.ObjectPath.Join方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectPath.Join方法的具体用法?C# ObjectPath.Join怎么用?C# ObjectPath.Join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Debugging.Client.ObjectPath
的用法示例。
在下文中一共展示了ObjectPath.Join方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetChildren
public ObjectValue[] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options)
{
List<ObjectValue> children = new List<ObjectValue> ();
session.SelectThread (threadId);
NodeCommandResult res = session.RunCommand ("-var-list-children", "2", path.Join ("."));
ResultData cdata = res.GetObject ("children");
// The response may not contain the "children" list at all.
if (cdata == null)
return children.ToArray ();
if (index == -1) {
index = 0;
count = cdata.Count;
}
for (int n=index; n<cdata.Count && n<index+count; n++) {
ResultData data = cdata.GetObject (n);
ResultData child = data.GetObject ("child");
string name = child.GetValue ("exp");
if (name.Length > 0 && char.IsNumber (name [0]))
name = "[" + name + "]";
// C++ structures may contain typeless children named
// "public", "private" and "protected".
if (child.GetValue("type") == null) {
ObjectPath childPath = new ObjectPath (child.GetValue ("name").Split ('.'));
ObjectValue[] subchildren = GetChildren (childPath, -1, -1, options);
children.AddRange(subchildren);
} else {
ObjectValue val = CreateObjectValue (name, child);
children.Add (val);
}
}
return children.ToArray ();
}
示例2: GetChildren
public ObjectValue[] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options)
{
List<ObjectValue> children = new List<ObjectValue>();
session.SelectThread(threadId);
string expression = path.Join(".");
if (expression.Trim().Length == 0)
return children.ToArray();
List<DebugScopedSymbol> childSymbols = this.session.SymbolResolver.GetChildSymbols(expression);
if (childSymbols.Count == 0)
return children.ToArray();
for (int i = 0; i < childSymbols.Count; i++)
{
DebugScopedSymbol child = childSymbols[i];
ObjectValue ov = CreateObjectValue(child);
children.Add(ov);
}
return children.ToArray();
}
示例3: SetValue
public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
{
session.SelectThread (threadId);
session.RunCommand ("-var-assign", path.Join ("."), value);
return new EvaluationResult (value);
}
示例4: HasChildren
public bool HasChildren (ObjectPath path, EvaluationOptions options)
{
session.SelectThread (threadId);
GdbCommandResult res = session.RunCommand ("-var-info-num-children", path.Join ("."));
return res.GetInt ("numchild") > 0;
}