Exemple #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);
        }
        public virtual void WithBody(Action <MethodBodyContext> nestedClosure)
        {
            var context = new MethodBodyContext(GeneratedMethod, typeGenerationContext, this);

            nestedClosure(context);
        }
Exemple #3
0
 public GeneratedDelegate(MethodBodyContext context, GeneratedMethod method, DelegateGenerator generator)
 {
     this.context   = context;
     this.method    = method;
     this.generator = generator;
 }
Exemple #4
0
 public DelegateBodyContext(MethodBodyContext context, DelegateGenerator generator)
 {
     this.context   = context;
     this.generator = generator;
 }