本文整理汇总了C#中Mono.Debugging.Client.EvaluationOptions类的典型用法代码示例。如果您正苦于以下问题:C# EvaluationOptions类的具体用法?C# EvaluationOptions怎么用?C# EvaluationOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EvaluationOptions类属于Mono.Debugging.Client命名空间,在下文中一共展示了EvaluationOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ();
}
示例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();
}
示例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;
}
示例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 ();
}
示例5: GetParameters
public ObjectValue[] GetParameters(int frameIndex, EvaluationOptions options)
{
List<ObjectValue> values = new List<ObjectValue>();
SelectFrame(frameIndex);
return values.ToArray();
}
示例6: GetException
public override ExceptionInfo GetException(int frameIndex, EvaluationOptions options)
{
ObjectValue val = CreateExceptionObject(exceptionRecord);
ExceptionInfo result = new ExceptionInfo(val);
return result;
}
示例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);
}
示例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();
}
示例9: WithOptions
public EvaluationContext WithOptions (EvaluationOptions options)
{
if (options == null || Options == options)
return this;
EvaluationContext clone = Clone ();
clone.Options = options;
return clone;
}
示例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 ();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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 ();
}