public Base_IEnumerator(CLRSharp_Instance inst) { ThreadContext activeContext = ThreadContext.activeContext; this.inst = inst; string[] methodNames = this.inst.type.GetMethodNames(); string[] array = methodNames; for (int i = 0; i < array.Length; i++) { string text = array[i]; bool flag = text.Contains("MoveNext"); if (flag) { this._MoveNext = this.inst.type.GetMethod(text, MethodParamList.constEmpty()); } bool flag2 = text.Contains(".get_Current"); if (flag2) { this._get_Current = this.inst.type.GetMethod(text, MethodParamList.constEmpty()); } bool flag3 = text.Contains(".Reset"); if (flag3) { this._Reset = this.inst.type.GetMethod(text, MethodParamList.constEmpty()); } } }
public Base_IEnumerator(CLRSharp_Instance inst) { var context = ThreadContext.activeContext; this.inst = inst; var ms = this.inst.type.GetMethodNames(); { var __array1 = ms; var __arrayLength1 = __array1.Length; for (int __i1 = 0; __i1 < __arrayLength1; ++__i1) { var name = (string)__array1[__i1]; { if (name.Contains("MoveNext")) { _MoveNext = this.inst.type.GetMethod(name, MethodParamList.constEmpty()); } if (name.Contains(".get_Current")) { _get_Current = this.inst.type.GetMethod(name, MethodParamList.constEmpty()); } if (name.Contains(".Reset")) { _Reset = this.inst.type.GetMethod(name, MethodParamList.constEmpty()); } } } } }
public void Dispose() { var context = ThreadContext.activeContext; var _type = context.environment.GetType(typeof(IDisposable)); var _method = this.inst.type.GetMethod("Dispose", MethodParamList.constEmpty()); object obj = _method.Invoke(context, inst, null); }
public Base_IEnumerator(CLRSharp_Instance inst) { var context = ThreadContext.activeContext; this.inst = inst; var ms = this.inst.type.GetMethodNames(); foreach (string name in ms) { if (name.Contains("MoveNext")) { _MoveNext = this.inst.type.GetMethod(name, MethodParamList.constEmpty()); } if (name.Contains(".get_Current")) { _get_Current = this.inst.type.GetMethod(name, MethodParamList.constEmpty()); } if (name.Contains(".Reset")) { _Reset = this.inst.type.GetMethod(name, MethodParamList.constEmpty()); } } }
public IEnumerator GetEnumerator() { ThreadContext activeContext = ThreadContext.activeContext; ICLRType type = activeContext.environment.GetType(typeof(IEnumerable)); IMethod method = this.inst.type.GetMethod(type.FullName + ".GetEnumerator", MethodParamList.constEmpty()); object obj = method.Invoke(activeContext, this.inst, null); return(obj as IEnumerator); }
public IEnumerator GetEnumerator() { var context = ThreadContext.activeContext; var _type = context.environment.GetType(typeof(IEnumerable)); var _method = this.inst.type.GetMethod(_type.FullName + "." + "GetEnumerator", MethodParamList.constEmpty()); object obj = _method.Invoke(context, inst, null); return(obj as IEnumerator); }
public IEnumerator GetEnumerator() { var context = ThreadContext.activeContext; var _type = context.environment.GetType(typeof(IEnumerable)); var _method = this.inst.type.GetMethod(_type.FullName + "." + "GetEnumerator", MethodParamList.constEmpty()); var obj = _method.Invoke(context, inst, null) as CLRSharp_Instance; return(context.environment.GetCrossBind(typeof(IEnumerator)).CreateBind(obj) as IEnumerator); }
public void Dispose() { ThreadContext activeContext = ThreadContext.activeContext; ICLRType type = activeContext.environment.GetType(typeof(IDisposable)); IMethod method = this.inst.type.GetMethod(type.FullName + ".Dispose", MethodParamList.constEmpty()); object obj = method.Invoke(activeContext, this.inst, null); }