Example #1
0
 /// <summary>
 /// Called for each new attribute that has been added to the set.
 /// </summary>
 /// <param name="attributes">the set to which the attribute has been added</param>
 public virtual void PostProcessAttributes(AttributeSet attributes)
 {
 }
Example #2
0
 /// <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));
 }
Example #3
0
 /// <summary>
 /// Links the attributes of one type definition to another (newly created) type definition. This
 /// is primarily used for <c>typedef</c> definitions so that the actual/underlying type that is
 /// represented by the typedef gets the same attributes as the typedef itself (and vice versa).
 /// </summary>
 /// <param name="linkedSet">the (original) set that is to be linked to this (new) set. Note that
 /// the attributes on this (new) set are discarded.</param>
 public void LinkAttributes(AttributeSet linkedSet)
 {
     // NOTE: It's not enough to copy the elements. We need to use the same reference (i.e. link it).
     _attributes = linkedSet._attributes;
 }