4 writes to ilg
System.ServiceModel (4)
System\ServiceModel\Dispatcher\InvokerUtil.cs (4)
83this.ilg = new CodeGenerator(); 122this.ilg = new CodeGenerator(); 167this.ilg = new CodeGenerator(); 214this.ilg = new CodeGenerator();
66 references to ilg
System.ServiceModel (66)
System\ServiceModel\Dispatcher\InvokerUtil.cs (66)
86ilg.BeginMethod("Create" + type.FullName, typeof(CreateInstanceDelegate), requiresMemberAccess); 106LocalBuilder instanceLocal = ilg.DeclareLocal(type, type.Name + "Instance"); 107ilg.LoadZeroValueIntoLocal(type, instanceLocal); 108ilg.Load(instanceLocal); 112ilg.New(constructor); 114ilg.ConvertValue(type, ilg.CurrentMethod.ReturnType); 115return (CreateInstanceDelegate)ilg.EndMethod(); 125this.ilg.BeginMethod("SyncInvoke" + method.Name, typeof(InvokeDelegate), requiresMemberAccess); 144ArgBuilder targetArg = ilg.GetArg(0); 145ArgBuilder inputParametersArg = ilg.GetArg(1); 146ArgBuilder outputParametersArg = ilg.GetArg(2); 149LocalBuilder returnLocal = ilg.DeclareLocal(ilg.CurrentMethod.ReturnType, "returnParam"); 159ilg.Load(returnLocal); 160return (InvokeDelegate)this.ilg.EndMethod(); 170this.ilg.BeginMethod("AsyncInvokeBegin" + method.Name, typeof(InvokeBeginDelegate), requiresMemberAccess); 189ArgBuilder targetArg = ilg.GetArg(0); 190ArgBuilder inputParametersArg = ilg.GetArg(1); 191ArgBuilder callbackArg = ilg.GetArg(2); 192ArgBuilder stateArg = ilg.GetArg(3); 195LocalBuilder returnLocal = ilg.DeclareLocal(ilg.CurrentMethod.ReturnType, "returnParam"); 202ilg.Load(callbackArg); 203ilg.Load(stateArg); 206ilg.Load(returnLocal); 207return (InvokeBeginDelegate)this.ilg.EndMethod(); 217this.ilg.BeginMethod("AsyncInvokeEnd" + method.Name, typeof(InvokeEndDelegate), requiresMemberAccess); 236ArgBuilder targetArg = ilg.GetArg(0); 237ArgBuilder outputParametersArg = ilg.GetArg(1); 238ArgBuilder resultArg = ilg.GetArg(2); 241LocalBuilder returnLocal = ilg.DeclareLocal(ilg.CurrentMethod.ReturnType, "returnParam"); 248ilg.Load(resultArg); 252ilg.Load(returnLocal); 253return (InvokeEndDelegate)this.ilg.EndMethod(); 260parameterLocals[i] = ilg.DeclareLocal(TypeLoader.GetParameterType(parameters[i]), "param" + i.ToString(CultureInfo.InvariantCulture)); 272ilg.LoadArrayElement(inputParametersArg, inputParameterCount); 275ilg.ConvertValue(TypeOfObject, parameterType); 276ilg.Store(parameterLocals[i]); 280ilg.Dup(); 281ilg.If(); 282ilg.ConvertValue(TypeOfObject, parameterType); 283ilg.Store(parameterLocals[i]); 284ilg.Else(); 285ilg.Pop(); 286ilg.LoadZeroValueIntoLocal(parameterType, parameterLocals[i]); 287ilg.EndIf(); 300ilg.LoadZeroValueIntoLocal(parameterLocals[i].LocalType, parameterLocals[i]); 307ilg.Load(targetArg); 308ilg.ConvertValue(targetArg.ArgType, targetType); 311LocalBuilder targetLocal = ilg.DeclareLocal(targetType, "target"); 312ilg.Store(targetLocal); 313ilg.LoadAddress(targetLocal); 322ilg.Ldloca(parameterLocals[i]); 324ilg.Ldloc(parameterLocals[i]); 330ilg.Call(method); 332ilg.Load(null); 334ilg.ConvertValue(method.ReturnType, ilg.CurrentMethod.ReturnType); 335ilg.Store(returnLocal); 345ilg.Load(outputParametersArg); 346ilg.Load(outputParameterCount); 347ilg.Load(parameterLocals[i]); 348ilg.ConvertValue(parameterLocals[i].LocalType, TypeOfObject); 349ilg.Stelem(TypeOfObject);