Exemple #1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        protected internal void AddAttributes(Func <FieldMember, AttributeWriter> attributeWriterFactory)
        {
            if (attributeWriterFactory != null)
            {
                AttributeWriter.Include(attributeWriterFactory(m_OwnerField));
            }
        }
Exemple #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        protected internal void AddAttributes(Func <MethodMember, AttributeWriter> attributeWriterFactory)
        {
            ValidateNotAnonymousMethod();

            if (attributeWriterFactory != null)
            {
                AttributeWriter.Include(attributeWriterFactory(m_OwnerMethod));
            }
        }
Exemple #3
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        protected MemberWriterBase()
        {
            m_AttributeWriter = new AttributeWriter();
        }
Exemple #4
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        internal void Include(AttributeWriter other)
        {
            m_Attributes.AddRange(other.m_Attributes);
        }
Exemple #5
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public FieldMember Attribute <TAttribute>(Action <AttributeArgumentWriter <TAttribute> > values = null)
            where TAttribute : Attribute
        {
            AttributeWriter.Set <TAttribute>(values);
            return(m_OwnerField);
        }