本文整理汇总了C#中Mono.Debugger.Soft.MethodMirror类的典型用法代码示例。如果您正苦于以下问题:C# MethodMirror类的具体用法?C# MethodMirror怎么用?C# MethodMirror使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MethodMirror类属于Mono.Debugger.Soft命名空间,在下文中一共展示了MethodMirror类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PropertyValueReference
public PropertyValueReference (EvaluationContext ctx, PropertyInfoMirror property, object obj, TypeMirror declaringType, MethodMirror getter, Value[] indexerArgs): base (ctx)
{
this.property = property;
this.obj = obj;
this.declaringType = declaringType;
this.indexerArgs = indexerArgs;
flags = ObjectValueFlags.Property;
if (property.GetSetMethod (true) == null)
flags |= ObjectValueFlags.ReadOnly;
if (getter.IsStatic)
flags |= ObjectValueFlags.Global;
if (getter.IsPublic)
flags |= ObjectValueFlags.Public;
else if (getter.IsPrivate)
flags |= ObjectValueFlags.Private;
else if (getter.IsFamily)
flags |= ObjectValueFlags.Protected;
else if (getter.IsFamilyAndAssembly)
flags |= ObjectValueFlags.Internal;
else if (getter.IsFamilyOrAssembly)
flags |= ObjectValueFlags.InternalProtected;
if (property.DeclaringType.IsValueType)
flags |= ObjectValueFlags.ReadOnly; // Setting property values on structs is not supported by sdb
}
示例2: GetFlags
internal static ObjectValueFlags GetFlags (PropertyInfoMirror property, MethodMirror getter)
{
var flags = ObjectValueFlags.Property;
if (property.GetSetMethod (true) == null)
flags |= ObjectValueFlags.ReadOnly;
if (getter.IsStatic)
flags |= ObjectValueFlags.Global;
if (getter.IsPublic)
flags |= ObjectValueFlags.Public;
else if (getter.IsPrivate)
flags |= ObjectValueFlags.Private;
else if (getter.IsFamily)
flags |= ObjectValueFlags.Protected;
else if (getter.IsFamilyAndAssembly)
flags |= ObjectValueFlags.Internal;
else if (getter.IsFamilyOrAssembly)
flags |= ObjectValueFlags.InternalProtected;
if (property.DeclaringType.IsValueType)
flags |= ObjectValueFlags.ReadOnly; // Setting property values on structs is not supported by sdb
return flags;
}
示例3: PropertyInfoMirror
public PropertyInfoMirror (TypeMirror parent, long id, string name, MethodMirror get_method, MethodMirror set_method, PropertyAttributes attrs) : base (parent.VirtualMachine, id) {
this.parent = parent;
this.name = name;
this.attrs = attrs;
this.get_method = get_method;
this.set_method = set_method;
}
示例4: ParameterInfoMirror
internal ParameterInfoMirror (MethodMirror method, int pos, TypeMirror type, string name, ParameterAttributes attrs) : base (method.VirtualMachine, 0) {
this.method = method;
this.pos = pos;
this.type = type;
this.name = name;
this.attrs = attrs;
}
示例5: Location
//int column_number;
internal Location (VirtualMachine vm, MethodMirror method, long native_addr, int il_offset, string source_file, int line_number, int column_number) : base (vm, 0) {
this.method = method;
//this.native_addr = native_addr;
this.il_offset = il_offset;
this.source_file = source_file;
this.line_number = line_number;
//this.column_number = column_number;
}
示例6: StackFrame
/*
* FIXME: Decide on the way to request/handle debugging information:
* - request the info in bulk for all frames/on demand for individual frames
* - request the info from the runtime/request only the il offset, and compute
* everything else based on this info using the method debug info.
*/
internal StackFrame(VirtualMachine vm, long id, ThreadMirror thread, MethodMirror method, int il_offset, StackFrameFlags flags)
: base(vm, id)
{
this.thread = thread;
this.method = method;
this.il_offset = il_offset;
this.flags = flags;
}
示例7: BreakpointEventRequest
internal BreakpointEventRequest (VirtualMachine vm, MethodMirror method, long location) : base (vm, EventType.Breakpoint) {
if (method == null)
throw new ArgumentNullException ("method");
CheckMirror (vm, method);
if (method.Locations.Count > 0 && !method.Locations.Any (l => l.ILOffset == location))
throw new ArgumentException ("A breakpoint can only be set at an IL offset which is equal to the ILOffset property of one of the locations in method.Locations", "location");
this.method = method;
this.location = location;
}
示例8: PropertyValueReference
public PropertyValueReference (EvaluationContext ctx, PropertyInfoMirror property, object obj, TypeMirror declaringType, MethodMirror getter, Value[] indexerArgs): base (ctx)
{
this.property = property;
this.obj = obj;
this.declaringType = declaringType;
this.indexerArgs = indexerArgs;
flags = GetFlags (property, getter);
}
示例9: LocalVariable
internal LocalVariable (VirtualMachine vm, MethodMirror method, int index, long type_id, string name, int live_range_start, int live_range_end, bool is_arg) : base (vm, 0) {
this.method = method;
this.index = index;
this.name = name;
this.type_id = type_id;
this.is_arg = is_arg;
this.live_range_start = live_range_start;
this.live_range_end = live_range_end;
}
示例10: PropertyValueReference
public PropertyValueReference (EvaluationContext ctx, PropertyInfoMirror property, object obj, TypeMirror declaringType, MethodMirror getter, Value[] indexerArgs): base (ctx)
{
this.declaringType = declaringType;
this.indexerArgs = indexerArgs;
this.property = property;
this.getter = getter;
this.obj = obj;
var objectMirror = obj as ObjectMirror;
if (objectMirror != null)
EnsureContextHasDomain (objectMirror.Domain);
flags = GetFlags (property, getter);
}
示例11: GetILOffset
internal static StatementRange GetILOffset(MonoPendingBreakpoint bp, MethodMirror methodMirror, out int ilOffset)
{
List<Mono.Debugger.Soft.Location> locations = methodMirror.Locations.ToList();
foreach (Mono.Debugger.Soft.Location location in locations)
{
int line = location.LineNumber;
int column = location.ColumnNumber;
if (line != bp.StartLine + 1)
continue;
//if (column != bp.StartColumn)
// continue;
ilOffset = location.ILOffset;
Console.WriteLine(location.ColumnNumber);
return null;
}
throw new Exception("Cant bind breakpoint");
}
示例12: InvokeMethod
internal static Value InvokeMethod (VirtualMachine vm, ThreadMirror thread, MethodMirror method, Value this_obj, IList<Value> arguments, InvokeOptions options) {
return EndInvokeMethodInternal (BeginInvokeMethod (vm, thread, method, this_obj, arguments, options, null, null));
}
示例13: BeginInvokeMethod
internal static IInvokeAsyncResult BeginInvokeMethod (VirtualMachine vm, ThreadMirror thread, MethodMirror method, Value this_obj, IList<Value> arguments, InvokeOptions options, AsyncCallback callback, object state) {
if (thread == null)
throw new ArgumentNullException ("thread");
if (method == null)
throw new ArgumentNullException ("method");
if (arguments == null)
arguments = new Value [0];
InvokeFlags f = InvokeFlags.NONE;
if ((options & InvokeOptions.DisableBreakpoints) != 0)
f |= InvokeFlags.DISABLE_BREAKPOINTS;
if ((options & InvokeOptions.SingleThreaded) != 0)
f |= InvokeFlags.SINGLE_THREADED;
if ((options & InvokeOptions.ReturnOutThis) != 0)
f |= InvokeFlags.OUT_THIS;
if ((options & InvokeOptions.ReturnOutArgs) != 0)
f |= InvokeFlags.OUT_ARGS;
InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback };
thread.InvalidateFrames ();
r.ID = vm.conn.VM_BeginInvokeMethod (thread.Id, method.Id, this_obj != null ? vm.EncodeValue (this_obj) : vm.EncodeValue (vm.CreateValue (null)), vm.EncodeValues (arguments), f, InvokeCB, r);
return r;
}
示例14: BeginInvokeMultiple
//
// Invoke the members of METHODS one-by-one, calling CALLBACK after each invoke was finished. The IAsyncResult will be marked as completed after all invokes have
// finished. The callback will be called with a different IAsyncResult that represents one method invocation.
// From protocol version 2.22.
//
public IAsyncResult BeginInvokeMultiple (ThreadMirror thread, MethodMirror[] methods, IList<IList<Value>> arguments, InvokeOptions options, AsyncCallback callback, object state) {
return BeginInvokeMultiple (vm, thread, methods, this, arguments, options, callback, state);
}
示例15: InvokeMethodAsyncWithResult
public Task<InvokeResult> InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<InvokeResult> ();
BeginInvokeMethod (thread, method, arguments, options, iar =>
{
try {
tcs.SetResult (EndInvokeMethodInternalWithResult (iar));
} catch (OperationCanceledException) {
tcs.TrySetCanceled ();
} catch (Exception ex) {
tcs.TrySetException (ex);
}
}, null);
return tcs.Task;
}