public Invoke ( MethodInfo method, ITypeMapper typeMapper ) : |
||
method | MethodInfo | |
typeMapper | ITypeMapper | |
Результат |
public void InvokeTailCall(Operand destination, string method, params Operand[] args) { Invocation call = destination.Invoke(method, args) as Invocation; call.tailcall = true; BeforeStatement(); call.EmitGet(this); }
public void Invoke(Operand target, string method, params Operand[] args) { if ((object)target == null) { throw new ArgumentNullException("target"); } DoInvoke(target.Invoke(method, args)); }
public void InvokeTailCall(Operand destination, string method, string labelName, params Operand[] args) { Invocation call = destination.Invoke(method, args) as Invocation; call.tailcall = true; BeforeStatement(); call.EmitGet(this); if (labelName != null) { IL.MarkLabel(RecordLabelMarked(LastLabel = labelName, GetNamedLabel(labelName))); } UnequivocableReturn(); }
protected override void EndImpl() { g.il.MarkLabel(lbTest); enumerator.Invoke("MoveNext").EmitGet(g); g.il.Emit(OpCodes.Brtrue, lbLoop); if (endUsed) { g.il.MarkLabel(lbEnd); } g.reachable = true; }
protected override void EndImpl() { G.IL.MarkLabel(_lbTest); _enumerator.Invoke("MoveNext", _typeMapper).EmitGet(G); G.IL.Emit(OpCodes.Brtrue, _lbLoop); if (_endUsed) { G.IL.MarkLabel(_lbEnd); } G._reachable = true; }
protected override void BeginImpl() { g.BeforeStatement(); enumerator = g.Local(); lbLoop = g.il.DefineLabel(); lbTest = g.il.DefineLabel(); if (typeof(IEnumerable).IsAssignableFrom(collection.Type)) { collection = collection.Cast(typeof(IEnumerable)); } g.Assign(enumerator, collection.Invoke("GetEnumerator")); g.il.Emit(OpCodes.Br, lbTest); g.il.MarkLabel(lbLoop); element = g.Local(elementType); g.Assign(element, enumerator.Property("Current"), true); }
protected override void BeginImpl() { G.BeforeStatement(); _enumerator = G.Local(); _lbLoop = G.IL.DefineLabel(); _lbTest = G.IL.DefineLabel(); if (Helpers.IsAssignableFrom(typeof(IEnumerable), _collection.GetReturnType(G.TypeMapper), _typeMapper)) { _collection = _collection.Cast(_typeMapper.MapType(typeof(IEnumerable))); } G.Assign(_enumerator, _collection.Invoke("GetEnumerator", _typeMapper)); G.IL.Emit(OpCodes.Br, _lbTest); G.IL.MarkLabel(_lbLoop); Element = G.Local(_elementType); G.Assign(Element, _enumerator.Property("Current", _typeMapper), true); }
public void Invoke(Operand target, string method, params Operand[] args) { if ((object)target == null) throw new ArgumentNullException("target"); DoInvoke(target.Invoke(method, args)); }
public void Invoke(Operand target, MethodInfo method, params Operand[] args) { DoInvoke(target.Invoke(method, TypeMapper, args)); }