コード例 #1
0
 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;
 }
コード例 #2
0
 public GeneratedParameter(Type type, int parameterIndex, BaseTypeGenerationContext context, Func <Func <ILGenerator> > builder)
 {
     this.context    = context;
     this.builder    = builder;
     this.type       = type;
     this.LocalIndex = parameterIndex;
 }
コード例 #3
0
ファイル: MethodBodyContext.cs プロジェクト: legendz3/Siege
 public MethodBodyContext(GeneratedMethod method, BaseTypeGenerationContext typeGenerationContext, BaseMethodGenerationContext context)
 {
     this.GeneratedMethod       = method;
     this.TypeGenerationContext = typeGenerationContext;
     this.MethodContext         = context;
     this.generator             = new DelegateGenerator(typeGenerationContext);
 }
コード例 #4
0
        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);
        }
コード例 #5
0
        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));
        }
コード例 #6
0
ファイル: DelegateGenerator.cs プロジェクト: legendz3/Siege
 public DelegateGenerator(BaseTypeGenerationContext context)
 {
     argumentTypes = new List <Type>();
     this.context  = context;
 }
コード例 #7
0
 protected BaseMethodGenerationContext(BaseTypeGenerationContext typeGenerationContext)
 {
     this.typeGenerationContext = typeGenerationContext;
 }
コード例 #8
0
 public OverrideMethodContext(MethodInfo info, GeneratedMethod method, BaseTypeGenerationContext typeGenerationContext) : base(typeGenerationContext)
 {
     this.info = info;
     SetMethod(method);
 }