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