Пример #1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public void Attribute <TAttribute>(Action <AttributeArgumentWriter <TAttribute> > values = null)
            where TAttribute : Attribute
        {
            var builder = new AttributeArgumentWriter <TAttribute>(values);

            m_OwnerEvent.EventBuilder.SetCustomAttribute(builder.GetAttributeBuilder());
        }
Пример #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public AttributeWriter Set <TAttribute>(Action <AttributeArgumentWriter <TAttribute> > arguments = null) where TAttribute : Attribute
        {
            var attribute = new AttributeArgumentWriter <TAttribute>(arguments);

            m_Attributes.Add(attribute);
            return(this);
        }
Пример #3
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public ImplementationClassWriter <TBase> Attribute <TAttribute>(Action <AttributeArgumentWriter <TAttribute> > values = null)
            where TAttribute : Attribute
        {
            var writer = new AttributeArgumentWriter <TAttribute>(values);

            OwnerClass.TypeBuilder.SetCustomAttribute(writer.GetAttributeBuilder());
            return(this);
        }
Пример #4
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public void Attribute <TAttribute>(Action <AttributeArgumentWriter <TAttribute> > values = null)
            where TAttribute : Attribute
        {
            ValidateNotAnonymousMethod();

            var builder = new AttributeArgumentWriter <TAttribute>(values);

            m_OwnerMethod.MethodFactory.SetAttribute(builder.GetAttributeBuilder());
        }