예제 #1
0
 public EasyEvent(AbstractEasyType maintype, String name, Type eventHandlerType)
 {
     m_name     = name;
     m_maintype = maintype;
     m_builder  = maintype.TypeBuilder.DefineEvent(
         name, EventAttributes.None, eventHandlerType);
 }
예제 #2
0
 internal EasyMethod(AbstractEasyType maintype, String name,
                     ReturnReferenceExpression returnRef, params ArgumentReference[] arguments) :
     this(maintype, name,
          MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.Public,
          returnRef, arguments)
 {
 }
예제 #3
0
		public EasyEvent(AbstractEasyType maintype, String name, Type eventHandlerType)
		{
			m_name = name;
			m_maintype = maintype;
			m_builder = maintype.TypeBuilder.DefineEvent(
				name, EventAttributes.None, eventHandlerType);
		}
예제 #4
0
파일: EasyMethod.cs 프로젝트: atczyc/castle
		internal EasyMethod( AbstractEasyType maintype, String name, 
			ReturnReferenceExpression returnRef, params ArgumentReference[] arguments ) : 
			this(maintype, name, 
			MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.Public, 
			returnRef, arguments)
		{
		}
예제 #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);
        }
예제 #6
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);
        }
예제 #7
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();
 }
		internal EasyConstructor( AbstractEasyType maintype, params ArgumentReference[] arguments )
		{
			_maintype = maintype;

			Type[] args = ArgumentsUtil.InitializeAndConvert( arguments );
			
			_builder = maintype.TypeBuilder.DefineConstructor( 
				 MethodAttributes.Public, CallingConventions.Standard, args );
		}
예제 #9
0
		internal EasyConstructor( AbstractEasyType maintype, params ArgumentReference[] arguments )
		{
			_maintype = maintype;

			Type[] args = ArgumentsUtil.InitializeAndConvert( arguments );
			
			_builder = maintype.TypeBuilder.DefineConstructor( 
				 MethodAttributes.Public, CallingConventions.Standard, args );
		}
예제 #10
0
		public EasyRuntimeMethod(AbstractEasyType maintype, string name, 
			ReturnReferenceExpression returnRef, ArgumentReference[] arguments)
		{
			MethodAttributes atts = MethodAttributes.HideBySig|MethodAttributes.Public|MethodAttributes.Virtual;
			Type[] args = ArgumentsUtil.InitializeAndConvert( arguments );

			_builder = maintype.TypeBuilder.DefineMethod(
				name, atts, returnRef.Type, args);
			_builder.SetImplementationFlags(
				MethodImplAttributes.Runtime|MethodImplAttributes.Managed);
		}
예제 #11
0
 public EasyNested(AbstractEasyType maintype,
                   String name,
                   Type baseType, Type[] interfaces,
                   ReturnReferenceExpression returnType,
                   params ArgumentReference[] args)
 {
     _typebuilder = maintype.TypeBuilder.DefineNestedType(
         name,
         TypeAttributes.Sealed | TypeAttributes.NestedPublic | TypeAttributes.Class,
         baseType, interfaces);
 }
예제 #12
0
		public EasyNested(AbstractEasyType maintype, 
			String name,
			Type baseType, Type[] interfaces, 
			ReturnReferenceExpression returnType, 
			params ArgumentReference[] args)
		{
			_typebuilder = maintype.TypeBuilder.DefineNestedType(
				name, 
				TypeAttributes.Sealed|TypeAttributes.NestedPublic|TypeAttributes.Class, 
				baseType, interfaces);
		}
예제 #13
0
		public EasyRuntimeConstructor(AbstractEasyType maintype, params ArgumentReference[] arguments )
		{
			Type[] args = ArgumentsUtil.InitializeAndConvert( arguments );
			
			_builder = maintype.TypeBuilder.DefineConstructor( 
				MethodAttributes.SpecialName|MethodAttributes.Public|MethodAttributes.HideBySig, 
				CallingConventions.Standard, 
				args );

			_builder.SetImplementationFlags(MethodImplAttributes.Runtime|MethodImplAttributes.Managed);
		}
예제 #14
0
        public EasyRuntimeConstructor(AbstractEasyType maintype, params ArgumentReference[] arguments)
        {
            Type[] args = ArgumentsUtil.InitializeAndConvert(arguments);

            _builder = maintype.TypeBuilder.DefineConstructor(
                MethodAttributes.SpecialName | MethodAttributes.Public | MethodAttributes.HideBySig,
                CallingConventions.Standard,
                args);

            _builder.SetImplementationFlags(MethodImplAttributes.Runtime | MethodImplAttributes.Managed);
        }
예제 #15
0
        public EasyRuntimeMethod(AbstractEasyType maintype, string name,
                                 ReturnReferenceExpression returnRef, ArgumentReference[] arguments)
        {
            MethodAttributes atts = MethodAttributes.HideBySig | MethodAttributes.Public | MethodAttributes.Virtual;

            Type[] args = ArgumentsUtil.InitializeAndConvert(arguments);

            _builder = maintype.TypeBuilder.DefineMethod(
                name, atts, returnRef.Type, args);
            _builder.SetImplementationFlags(
                MethodImplAttributes.Runtime | MethodImplAttributes.Managed);
        }
예제 #16
0
파일: EasyMethod.cs 프로젝트: atczyc/castle
		internal EasyMethod( AbstractEasyType maintype, String name, 
			MethodAttributes attrs, 
			ReturnReferenceExpression returnRef, params ArgumentReference[] arguments )
		{
			_maintype = maintype;
			_arguments = arguments;

			Type returnType = returnRef.Type;
			Type[] args = ArgumentsUtil.InitializeAndConvert( arguments );

			_builder = maintype.TypeBuilder.DefineMethod( name,  attrs, 
				returnType, args );
		}
예제 #17
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)
        {
            _id = id;
            _args = args;
            _returnType = returnType;

            GenerateConstructor();
            GenerateInvoke();
            GenerateCallableImplementation();
        }
예제 #18
0
 public EasyProperty(AbstractEasyType maintype, string name, Type returnType)
 {
     this._maintype = maintype;
     this._builder  = maintype.TypeBuilder.DefineProperty(name, PropertyAttributes.None, returnType, new Type[0]);
 }
예제 #19
0
		internal EasyDefaultConstructor( AbstractEasyType maintype ) : base()
		{
			maintype.TypeBuilder.DefineDefaultConstructor( MethodAttributes.Public );
		}
 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);
 }
예제 #21
0
		public EasyProperty(AbstractEasyType maintype, String name, Type returnType)
		{
			_maintype = maintype;
			_builder = maintype.TypeBuilder.DefineProperty(
				name, PropertyAttributes.None, returnType, new Type[0]);
		}
예제 #22
0
 internal EasyDefaultConstructor(AbstractEasyType maintype) : base()
 {
     maintype.TypeBuilder.DefineDefaultConstructor(MethodAttributes.Public);
 }