Esempio n. 1
0
        public EasyMethod CreateMethod(string name, MethodAttributes attrs, ReturnReferenceExpression returnType, params Type[] args)
        {
            EasyMethod method = new EasyMethod(this, name, attrs, returnType, ArgumentsUtil.ConvertToArgumentReference(args));

            this._methods.Add(method);
            return(method);
        }
Esempio n. 2
0
        public EasyMethod CreateMethod(string name, ReturnReferenceExpression returnType, MethodAttributes attributes, params ArgumentReference[] arguments)
        {
            EasyMethod method = new EasyMethod(this, name, attributes, returnType, arguments);

            this._methods.Add(method);
            return(method);
        }
Esempio n. 3
0
        public EasyRuntimeMethod CreateRuntimeMethod(string name, ReturnReferenceExpression returnType, params ArgumentReference[] arguments)
        {
            EasyRuntimeMethod method = new EasyRuntimeMethod(this, name, returnType, arguments);

            this._methods.Add(method);
            return(method);
        }
Esempio n. 4
0
        public EasyCallable CreateCallable(ReturnReferenceExpression returnType, params ArgumentReference[] args)
        {
            EasyCallable nested = new EasyCallable(this, base.IncrementAndGetCounterValue, returnType, args);

            base._nested.Add(nested);
            return(nested);
        }
Esempio n. 5
0
        public EasyRuntimeMethod(AbstractEasyType maintype, string name, ReturnReferenceExpression returnRef, ArgumentReference[] arguments)
        {
            MethodAttributes attributes = MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.Public;

            Type[] parameterTypes = ArgumentsUtil.InitializeAndConvert(arguments);
            base._builder = maintype.TypeBuilder.DefineMethod(name, attributes, returnRef.Type, parameterTypes);
            base._builder.SetImplementationFlags(MethodImplAttributes.CodeTypeMask);
        }
Esempio n. 6
0
 public EasyCallable(AbstractEasyType type, int id, ReturnReferenceExpression returnType, params ArgumentReference[] args) : base(type, string.Format("__delegate_{0}", id), typeof(MulticastDelegate), new Type[] { typeof(ICallable) }, returnType, args)
 {
     this._id         = id;
     this._args       = args;
     this._returnType = returnType;
     this.GenerateConstructor();
     this.GenerateInvoke();
     this.GenerateCallableImplementation();
 }
Esempio n. 7
0
 public EasyNested(AbstractEasyType maintype, string name, Type baseType, Type[] interfaces, ReturnReferenceExpression returnType, params ArgumentReference[] args)
 {
     base._typebuilder = maintype.TypeBuilder.DefineNestedType(name, TypeAttributes.Sealed | TypeAttributes.NestedPublic, baseType, interfaces);
 }
Esempio n. 8
0
        internal EasyMethod(AbstractEasyType maintype, string name, MethodAttributes attrs, ReturnReferenceExpression returnRef, params ArgumentReference[] arguments)
        {
            this._maintype  = maintype;
            this._arguments = arguments;
            Type returnType = returnRef.Type;

            Type[] parameterTypes = ArgumentsUtil.InitializeAndConvert(arguments);
            this._builder = maintype.TypeBuilder.DefineMethod(name, attrs, returnType, parameterTypes);
        }
Esempio n. 9
0
 internal EasyMethod(AbstractEasyType maintype, string name, ReturnReferenceExpression returnRef, params ArgumentReference[] arguments) : this(maintype, name, MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.Public, returnRef, arguments)
 {
 }