public GeneratedParameter(Func <GeneratedField> field, int parameterIndex, BaseTypeGenerationContext context, Func <Func <ILGenerator> > builder) { this.field = field; this.context = context; this.builder = builder; this.LocalIndex = parameterIndex; }
public GeneratedParameter(Type type, int parameterIndex, BaseTypeGenerationContext context, Func <Func <ILGenerator> > builder) { this.context = context; this.builder = builder; this.type = type; this.LocalIndex = parameterIndex; }
public MethodBodyContext(GeneratedMethod method, BaseTypeGenerationContext typeGenerationContext, BaseMethodGenerationContext context) { this.GeneratedMethod = method; this.TypeGenerationContext = typeGenerationContext; this.MethodContext = context; this.generator = new DelegateGenerator(typeGenerationContext); }
public MethodGenerationContext(BaseTypeGenerationContext typeGenerationContext, Action <MethodGenerationContext> closure) : base(typeGenerationContext) { addMethodAction = new AddMethodAction(typeGenerationContext.Builder, () => Name, () => ReturnType, GetParameters, false); typeGenerationContext.TypeGenerationActions.Add(addMethodAction); var method = new GeneratedMethod(() => addMethodAction.MethodBuilder, typeGenerationContext.TypeGenerationActions); SetMethod(method); closure(this); }
public ConstructorGenerationContext(BaseTypeGenerationContext context, Action <ConstructorGenerationContext> closure) { this.Arguments = new List <IGeneratedParameter>(); this.context = context; var action = new AddConstructorAction(context.Builder, () => this.Arguments.Select(arg => arg.Type).ToList()); context.TypeGenerationActions.Add(action); constructorAction = action; closure(this); context.TypeGenerationActions.Add(new ConstructorReturnAction(() => action.Constructor)); }
public DelegateGenerator(BaseTypeGenerationContext context) { argumentTypes = new List <Type>(); this.context = context; }
protected BaseMethodGenerationContext(BaseTypeGenerationContext typeGenerationContext) { this.typeGenerationContext = typeGenerationContext; }
public OverrideMethodContext(MethodInfo info, GeneratedMethod method, BaseTypeGenerationContext typeGenerationContext) : base(typeGenerationContext) { this.info = info; SetMethod(method); }