コード例 #1
0
        public GeneratedVariable LoadValueAtIndex(Type objectType, MethodBodyContext context, int index)
        {
            var variable = context.CreateVariable(objectType);

            actions.Add(new LoadValueAtIndexAction(method, this, index));
            actions.Add(new VariableAssignmentAction(() => method.MethodBuilder(), variable.LocalIndex));

            return(variable);
        }
コード例 #2
0
        public virtual void WithBody(Action <MethodBodyContext> nestedClosure)
        {
            var context = new MethodBodyContext(GeneratedMethod, typeGenerationContext, this);

            nestedClosure(context);
        }
コード例 #3
0
ファイル: GeneratedDelegate.cs プロジェクト: legendz3/Siege
 public GeneratedDelegate(MethodBodyContext context, GeneratedMethod method, DelegateGenerator generator)
 {
     this.context   = context;
     this.method    = method;
     this.generator = generator;
 }
コード例 #4
0
 public DelegateBodyContext(MethodBodyContext context, DelegateGenerator generator)
 {
     this.context   = context;
     this.generator = generator;
 }