本文整理汇总了C#中Mono.Debugging.Client.EvaluationOptions类的典型用法代码示例。如果您正苦于以下问题:C# EvaluationOptions类的具体用法?C# EvaluationOptions怎么用?C# EvaluationOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EvaluationOptions类属于Mono.Debugging.Client命名空间,在下文中一共展示了EvaluationOptions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetChildren
public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
{
EvaluationContext cctx = ctx.WithOptions (options);
var names = new ObjectValueNameTracker (cctx);
object tdataType = null;
TypeDisplayData tdata = null;
List<ObjectValue> list = new List<ObjectValue> ();
foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) {
object decType = val.DeclaringType;
if (decType != null && decType != tdataType) {
tdataType = decType;
tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType);
}
DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
if (state == DebuggerBrowsableState.Never)
continue;
ObjectValue oval = val.CreateObjectValue (options);
names.FixName (val, oval);
list.Add (oval);
}
if ((bindingFlags & BindingFlags.NonPublic) == 0) {
BindingFlags newFlags = bindingFlags | BindingFlags.NonPublic;
newFlags &= ~BindingFlags.Public;
list.Add (CreateNonPublicsNode (cctx, objectSource, type, obj, newFlags));
}
return list.ToArray ();
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:27,代码来源:FilteredMembersSource.cs
示例2: GetLocalVariables
public ObjectValue[] GetLocalVariables(int frameIndex, EvaluationOptions options)
{
List<ObjectValue> values = new List<ObjectValue>();
if (Engine.Symbols.ScopeLocalSymbols == null)
return values.ToArray();
for (uint i = 0; i < Engine.Symbols.ScopeLocalSymbols.Count; i++)
{
if (Engine.Symbols.ScopeLocalSymbols.Symbols[i].Parent != null)
continue;
string name = Engine.Symbols.ScopeLocalSymbols.Symbols[i].Name;
string typename = Engine.Symbols.ScopeLocalSymbols.Symbols[i].TypeName;
string val = Engine.Symbols.ScopeLocalSymbols.Symbols[i].TextValue;
ulong offset = Engine.Symbols.ScopeLocalSymbols.Symbols[i].Offset;
DEW.DebugScopedSymbol parentSymbol = Engine.Symbols.ScopeLocalSymbols.Symbols[i].Parent;
ObjectValue ov = symbolResolver.Resolve(offset, name, typename, val, parentSymbol);
if (ov == null)
{
ObjectValueFlags flags = ObjectValueFlags.Variable;
ov = ObjectValue.CreatePrimitive(this, new ObjectPath(name), typename, new EvaluationResult(val), flags);
}
if (ov != null)
values.Add(ov);
}
return values.ToArray();
}
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:29,代码来源:DDebugBacktrace.cs
示例3: CallMethod
public object CallMethod (string name, object[] parameters, out object[] outArgs, EvaluationOptions options)
{
object[] tempOutArgs = null;
var result = MtaThread.Run (() => source.CallMethod (name, parameters, out tempOutArgs, options));
outArgs = tempOutArgs;
return result;
}
开发者ID:mono,项目名称:monodevelop,代码行数:7,代码来源:MtaRawValue.cs
示例4: GetAllLocals
public ObjectValue[] GetAllLocals(int frameIndex, EvaluationOptions options)
{
List<ObjectValue> locals = new List<ObjectValue> ();
locals.AddRange (GetParameters (frameIndex, options));
locals.AddRange (GetLocalVariables (frameIndex, options));
return locals.ToArray ();
}
开发者ID:atsushieno,项目名称:md-typescript,代码行数:7,代码来源:NodeBacktrace.cs
示例5: GetParameters
public ObjectValue[] GetParameters(int frameIndex, EvaluationOptions options)
{
List<ObjectValue> values = new List<ObjectValue>();
SelectFrame(frameIndex);
return values.ToArray();
}
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:8,代码来源:DDebugBacktrace.cs
示例6: GetException
public override ExceptionInfo GetException(int frameIndex, EvaluationOptions options)
{
ObjectValue val = CreateExceptionObject(exceptionRecord);
ExceptionInfo result = new ExceptionInfo(val);
return result;
}
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:8,代码来源:DDebugBacktrace.cs
示例7: SetMemberValue
public void SetMemberValue (string name, object value, EvaluationOptions options)
{
EvaluationContext localContext = ctx.WithOptions (options);
object type = localContext.Adapter.GetValueType (localContext, targetObject);
ValueReference val = localContext.Adapter.GetMember (localContext, source, type, targetObject, name);
if (val == null)
throw new EvaluatorException ("Member '{0}' not found", name);
val.Value = localContext.Adapter.FromRawValue (localContext, value);
}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:9,代码来源:RemoteRawValue.cs
示例8: GetExpressionValues
public ObjectValue[] GetExpressionValues(int frameIndex, string[] expressions, EvaluationOptions options)
{
List<ObjectValue> values = new List<ObjectValue>();
SelectFrame(frameIndex);
foreach (string exp in expressions)
values.Add(CreateVarObject(exp));
return values.ToArray();
}
开发者ID:DinrusGroup,项目名称:monodevelop-win32-debugger,代码行数:9,代码来源:DDebugBacktrace.cs
示例9: WithOptions
public EvaluationContext WithOptions (EvaluationOptions options)
{
if (options == null || Options == options)
return this;
EvaluationContext clone = Clone ();
clone.Options = options;
return clone;
}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:9,代码来源:EvaluationContext.cs
示例10: GetLocalVariables
public ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options)
{
List<ObjectValue> values = new List<ObjectValue> ();
SelectFrame (frameIndex);
GdbCommandResult res = session.RunCommand ("-stack-list-locals", "0");
foreach (ResultData data in res.GetObject ("locals"))
values.Add (CreateVarObject (data.GetValue ("name")));
return values.ToArray ();
}
开发者ID:kthguru,项目名称:monodevelop,代码行数:11,代码来源:GdbBacktrace.cs
示例11: CreateObjectValue
public ObjectValue CreateObjectValue (bool withTimeout, EvaluationOptions options)
{
if (!CanEvaluate (options))
return DC.ObjectValue.CreateImplicitNotSupported (this, new ObjectPath (Name), ctx.Adapter.GetTypeName (GetContext (options), Type), Flags);
if (withTimeout) {
return ctx.Adapter.CreateObjectValueAsync (Name, Flags, delegate {
return CreateObjectValue (options);
});
} else
return CreateObjectValue (options);
}
开发者ID:teast,项目名称:monodevelop,代码行数:11,代码来源:ValueReference.cs
示例12: GetMemberValue
public object GetMemberValue(string name, EvaluationOptions options)
{
var localContext = ctx.WithOptions (options);
var type = localContext.Adapter.GetValueType (localContext, targetObject);
var val = localContext.Adapter.GetMember (localContext, source, type, targetObject, name);
if (val == null)
throw new EvaluatorException ("Member '{0}' not found", name);
return localContext.Adapter.ToRawValue (localContext, val, val.Value);
}
开发者ID:peterdocter,项目名称:debugger-libs,代码行数:11,代码来源:RemoteRawValue.cs
示例13: GetChild
public override ValueReference GetChild (string name, EvaluationOptions options)
{
string newNs = namspace + "." + name;
var ctx = GetContext (options);
var type = ctx.Adapter.GetType (ctx, newNs);
if (type != null)
return new TypeValueReference (ctx, type);
return new NamespaceValueReference (ctx, newNs);
}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:12,代码来源:NamespaceValueReference.cs
示例14: CallMethod
public object CallMethod (string name, object[] parameters, EvaluationOptions options)
{
EvaluationContext localContext = ctx.WithOptions (options);
object[] argValues = new object [parameters.Length];
object[] argTypes = new object [parameters.Length];
for (int n=0; n<argValues.Length; n++) {
argValues[n] = localContext.Adapter.FromRawValue (localContext, parameters[n]);
argTypes[n] = localContext.Adapter.GetValueType (localContext, argValues[n]);
}
object type = localContext.Adapter.GetValueType (localContext, targetObject);
object res = localContext.Adapter.RuntimeInvoke (localContext, type, targetObject, name, argTypes, argValues);
return localContext.Adapter.ToRawValue (localContext, null, res);
}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:14,代码来源:RemoteRawValue.cs
示例15: GetAllLocals
public ObjectValue[] GetAllLocals(int frameIndex, EvaluationOptions options)
{
session.RunCommand (true, "vars");
List<ObjectValue> locals = new List<ObjectValue> ();
lock (syncLock) {
foreach (string varName in session.lastResult.vars) {
ObjectValue val;
ObjectValueFlags flags = ObjectValueFlags.Variable;
val = ObjectValue.CreatePrimitive (this, new ObjectPath (varName), "dummyInt", new EvaluationResult ("test_val"), flags);
val.Name = varName;
locals.Add (val);
}
}
return locals.ToArray ();
}
开发者ID:profelis,项目名称:md-haxebinding,代码行数:16,代码来源:HxcppBacktrace.cs
示例16: GetChildren
public ObjectValue[] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options)
{
List<ObjectValue> children = new List<ObjectValue>();
session.SelectThread(threadId);
if (Engine.Symbols.ScopeLocalSymbols == null)
return children.ToArray();
DEW.DebugScopedSymbol parent = null;
for (uint i = 0; i < Engine.Symbols.ScopeLocalSymbols.Symbols.Length; i++)
{
DEW.DebugScopedSymbol symbol = Engine.Symbols.ScopeLocalSymbols.Symbols[i];
if (symbol.Name == path.LastName)
{
parent = symbol;
break;
}
}
if (parent == null || parent.ChildrenCount == 0)
return children.ToArray();
for (uint i = 0; i < parent.ChildrenCount; i++)
{
DEW.DebugScopedSymbol child = parent.Children[i];
string name = child.Name;
string typename = child.TypeName;
string val = child.TextValue;
ulong offset = child.Offset;
ObjectValue ov = symbolResolver.Resolve(offset, name, typename, val, child.Parent);
if (ov == null)
{
ObjectValueFlags flags = ObjectValueFlags.Variable;
ov = ObjectValue.CreatePrimitive(this, new ObjectPath(name), typename, new EvaluationResult(val), flags);
}
if (ov != null)
children.Add(ov);
}
return children.ToArray();
}
开发者ID:Kentorix,项目名称:monodevelop-win32-debugger,代码行数:46,代码来源:DDebugBacktrace.cs
示例17: GetParameters
public virtual ObjectValue[] GetParameters (int frameIndex, EvaluationOptions options)
{
List<ObjectValue> vars = new List<ObjectValue> ();
FrameInfo frame = GetFrameInfo (frameIndex, options, false);
if (frame == null) {
ObjectValue val = Adaptor.CreateObjectValueAsync ("Parameters", ObjectValueFlags.EvaluatingGroup, delegate {
frame = GetFrameInfo (frameIndex, options, true);
foreach (ValueReference var in frame.Parameters)
vars.Add (var.CreateObjectValue (false, options));
return ObjectValue.CreateArray (null, new ObjectPath ("Parameters"), "", vars.Count, ObjectValueFlags.EvaluatingGroup, vars.ToArray ());
});
return new ObjectValue [] { val };
}
foreach (ValueReference var in frame.Parameters)
vars.Add (var.CreateObjectValue (true, options));
return vars.ToArray ();
}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:19,代码来源:BaseBacktrace.cs
示例18: GetLocalVariables
public virtual ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options)
{
FrameInfo frame = GetFrameInfo (frameIndex, options, false);
List<ObjectValue> list = new List<ObjectValue> ();
if (frame == null) {
ObjectValue val = Adaptor.CreateObjectValueAsync ("Local Variables", ObjectValueFlags.EvaluatingGroup, delegate {
frame = GetFrameInfo (frameIndex, options, true);
foreach (ValueReference var in frame.LocalVariables)
list.Add (var.CreateObjectValue (false, options));
return ObjectValue.CreateArray (null, new ObjectPath ("Local Variables"), "", list.Count, ObjectValueFlags.EvaluatingGroup, list.ToArray ());
});
return new ObjectValue [] { val };
}
foreach (ValueReference var in frame.LocalVariables)
list.Add (var.CreateObjectValue (true, options));
return list.ToArray ();
}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:19,代码来源:BaseBacktrace.cs
示例19: GetChildren
public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
{
var node = cacheRoot [path];
if(node == null)
return Backtrace.GetChildren(path, index, count, options);
ObjectValue[] children;
var t = node.NodeType;
if (t is ArrayType)
children = GetArrayChildren (node, path, index, count, options);
else if (t is ClassType || t is StructType)
children = GetClassInstanceChildren (node, path, options);
else
children = new ObjectValue[0];
return children;
}
开发者ID:llucenic,项目名称:MonoDevelop.Debugger.Gdb.D,代码行数:19,代码来源:VariableValueExamination.cs
示例20: GetAllLocals
public virtual ObjectValue[] GetAllLocals(int frameIndex, EvaluationOptions options)
{
var locals = new List<ObjectValue> ();
var excObj = GetExceptionInstance (frameIndex, options);
if (excObj != null)
locals.Insert (0, excObj);
locals.AddRange (GetLocalVariables (frameIndex, options));
locals.AddRange (GetParameters (frameIndex, options));
locals.Sort ((v1, v2) => StringComparer.InvariantCulture.Compare (v1.Name, v2.Name));
var thisObj = GetThisReference (frameIndex, options);
if (thisObj != null)
locals.Insert (0, thisObj);
return locals.ToArray ();
}
开发者ID:nerzhulart,项目名称:debugger-libs,代码行数:19,代码来源:BaseBacktrace.cs
注:本文中的Mono.Debugging.Client.EvaluationOptions类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论