public static unsafe ValueType Box(RuntimeArgumentHandle arg) { ValueType empty = (ValueType)FormatterServices.GetUninitializedObject(typeof(RuntimeArgumentHandle)); TypedReference innerRef; TypedReferenceTools.MakeTypedReference(&innerRef, empty); __refvalue(innerRef, RuntimeArgumentHandle) = arg; return(empty); }
// A few tests depends on this. Remove this after clearing up the tests. internal static object[] ArgListToParams(RuntimeArgumentHandle handle) { var iter = new ArgIterator(handle); var count = iter.GetRemainingCount(); var args = new object[count]; for (var i = 0; i < count; i++) { args[i] = TypedReference.ToObject(iter.GetNextArg()); } return(args); }
object getInnerHandle(__arglist) { RuntimeArgumentHandle handle = __arglist; ArgIterator args = new ArgIterator(handle); var mi = typeof(ArgIterator).GetMembers(); var meth = typeof(ArgIterator).GetMethod("GetNextArg", Type.EmptyTypes); var il = meth.GetMethodBody().GetILAsByteArray(); //ExecuteTyped(meth, __arglist(handle)); var t = args.GetNextArgType(); TypedReference tr = args.GetNextArg(); var targetType = TypedReference.GetTargetType(tr); var typedObject = TypedReference.ToObject(tr); return(typedObject); }
public void GetArgIterator(object a, __arglist) { RuntimeArgumentHandle handle = __arglist; GetArgIterator(1, __arglist(handle)); ArgIterator args = new ArgIterator(handle); TypedReference tr = args.GetNextArg(); RuntimeTypeHandle runtimeTypeHandle = TypedReference.TargetTypeToken(tr); ModuleHandle mh = runtimeTypeHandle.GetModuleHandle(); IntPtr mhPtr = runtimeTypeHandle.Value; var targetType = TypedReference.GetTargetType(tr); var typedObject = TypedReference.ToObject(tr); args.End(); }
private object[] CreateRefArray(RuntimeArgumentHandle handle) { var iterator = new ArgIterator(handle); var len = iterator.GetRemainingCount(); if ((_format != null && _format.Length != len) || (_format == null && len != 0)) { throw new ArgumentException("Invalid arguments"); } var args = new object[len]; for (var idx = 0; idx < len; idx++) { args[idx] = TypedReference.ToObject(iterator.GetNextArg()); } return(args); }
void ITestClass.Restricted(RuntimeArgumentHandle runtimeArgumentHandle) => Restricted(runtimeArgumentHandle);
// The contents of this class were created by the Mocklis code-generator. // Any changes you make will be overwritten if the contents are re-generated. protected virtual void Restricted(RuntimeArgumentHandle runtimeArgumentHandle) { throw new MockMissingException(MockType.VirtualMethod, "TestClass", "ITestClass", "Restricted", "Restricted"); }
// Must use "__arglist" inside a vararg method. void m2() { RuntimeArgumentHandle handle = __arglist; }
public ArgIterator(RuntimeArgumentHandle arglist, void* ptr) {}
// Constructors public ArgIterator(RuntimeArgumentHandle arglist) {}
// The contents of this class were created by the Mocklis code-generator. // Any changes you make will be overwritten if the contents are re-generated. protected virtual string Concat(string arglist, RuntimeArgumentHandle arglist0) { throw new MockMissingException(MockType.VirtualMethod, "TestClass", "ITestClass", "Concat", "Concat"); }
void m1(__arglist) { RuntimeArgumentHandle handle = __arglist; }
public static IEnumerable Enumerate(this RuntimeArgumentHandle arglist) { return(new ArgIterator(arglist).ToIEnumerable()); }
void m1(String format, __arglist) { RuntimeArgumentHandle handle = __arglist; }
// Constructors public ArgIterator(RuntimeArgumentHandle arglist) { }
static void F(RuntimeArgumentHandle rah) { }
public ArgIterator(RuntimeArgumentHandle arglist, void *ptr) { }
static void F (RuntimeArgumentHandle rah) { }