Example #1
0
        private ModuleBuilder <T> DefLambda(Symbol name, Delegate lambda)
        {
            var method           = new MethodMetadata(lambda.Method, name.Name, hasInstance: true);
            var delegateMetadata = new DelegateMetadata(lambda, method);

            Module.DefineMethod(new DelegateMethodBinder(name, Module, delegateMetadata));
            return(this);
        }
 private DelegateMethodBinder(Symbol newName, DelegateMethodBinder other)
     : base(newName, other)
 {
     Lambda = other.Lambda;
 }
 public DelegateMethodBinder(Symbol name, Module owner, DelegateMetadata lambda)
     : base(name, owner)
 {
     Lambda = lambda;
 }