예제 #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());
        }