//----------------------------------------------------------------------------------------------------------------------------------------------------- protected internal void AddAttributes(Func <FieldMember, AttributeWriter> attributeWriterFactory) { if (attributeWriterFactory != null) { AttributeWriter.Include(attributeWriterFactory(m_OwnerField)); } }
//----------------------------------------------------------------------------------------------------------------------------------------------------- protected internal void AddAttributes(Func <MethodMember, AttributeWriter> attributeWriterFactory) { ValidateNotAnonymousMethod(); if (attributeWriterFactory != null) { AttributeWriter.Include(attributeWriterFactory(m_OwnerMethod)); } }
//----------------------------------------------------------------------------------------------------------------------------------------------------- protected MemberWriterBase() { m_AttributeWriter = new AttributeWriter(); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- internal void Include(AttributeWriter other) { m_Attributes.AddRange(other.m_Attributes); }
//----------------------------------------------------------------------------------------------------------------------------------------------------- public FieldMember Attribute <TAttribute>(Action <AttributeArgumentWriter <TAttribute> > values = null) where TAttribute : Attribute { AttributeWriter.Set <TAttribute>(values); return(m_OwnerField); }