示例#1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public virtual void SetAttributes(HappilAttributes attributes)
        {
            if (attributes != null)
            {
                foreach (var attribute in attributes.GetAttributes())
                {
                    SetCustomAttribute(attribute);
                }
            }
        }
示例#2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        internal void SetAttributes(HappilAttributes attributes)
        {
            if (attributes != null)
            {
                foreach (var attribute in attributes.GetAttributes())
                {
                    m_FieldBuilder.SetCustomAttribute(attribute);
                }
            }
        }
示例#3
0
            //-------------------------------------------------------------------------------------------------------------------------------------------------

            internal void SetAttributes(HappilAttributes attributes)
            {
                if (attributes != null)
                {
                    foreach (var attribute in attributes.GetAttributes())
                    {
                        OwnerProperty.PropertyBuilder.SetCustomAttribute(attribute);
                    }
                }
            }
示例#4
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public override void SetAttributes(HappilAttributes attributes)
        {
            if (attributes != null)
            {
                foreach (var attribute in attributes.GetAttributes())
                {
                    m_ConstructorBuilder.SetCustomAttribute(attribute);
                }
            }
        }
示例#5
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public void DefineReturnAttributes()
        {
            if (m_ReturnAttributes != null && m_MethodBuilder != null && m_Declaration.ReturnParameter != null)
            {
                var returnParameter = m_MethodBuilder.DefineParameter(0, m_Declaration.ReturnParameter.Attributes, m_Declaration.ReturnParameter.Name);

                foreach (var attribute in m_ReturnAttributes.GetAttributes())
                {
                    returnParameter.SetCustomAttribute(attribute);
                }
            }
        }