public override void PostProcessAttributes(AttributeSet holder) { switch (WrapType) { case WrapTypes.NativePtrValueType: case WrapTypes.ValueType: if (!holder.HasAttribute <ValueTypeAttribute>()) { holder.AddAttribute(new ValueTypeAttribute()); } break; } }
/// <summary> /// Adds an attribute to an attribute set and marks the attribute as "not yet processed" so that it can /// be processed later. /// </summary> /// <param name="attributeSet">the set the attribute is to be added to</param> /// <param name="attrib">the attribute to be added</param> /// <param name="unprocessedAttributes">the list of unprocessed attributes</param> private static void AddAttributeToSet(AttributeSet attributeSet, AutoWrapAttribute attrib, List <KeyValuePair <AttributeSet, AutoWrapAttribute> > unprocessedAttributes) { attributeSet.AddAttribute(attrib); unprocessedAttributes.Add(new KeyValuePair <AttributeSet, AutoWrapAttribute>(attributeSet, attrib)); }