예제 #1
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);
        }
예제 #2
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);
        }
예제 #3
0
 internal EasyConstructor(AbstractEasyType maintype, params ArgumentReference[] arguments)
 {
     this._maintype = maintype;
     Type[] parameterTypes = ArgumentsUtil.InitializeAndConvert(arguments);
     this._builder = maintype.TypeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, parameterTypes);
 }
예제 #4
0
 public EasyRuntimeConstructor(AbstractEasyType maintype, params ArgumentReference[] arguments)
 {
     Type[] parameterTypes = ArgumentsUtil.InitializeAndConvert(arguments);
     base._builder = maintype.TypeBuilder.DefineConstructor(MethodAttributes.SpecialName | MethodAttributes.HideBySig | MethodAttributes.Public, CallingConventions.Standard, parameterTypes);
     base._builder.SetImplementationFlags(MethodImplAttributes.CodeTypeMask);
 }