/// <summary>
 /// Constructor, initialises a <see cref="TagInstance"/>
 /// </summary>
 /// <param name="charRange">The range of characters that the tag falls under</param>
 /// <param name="parentDefinition">
 /// The <see cref="ITagDefinition"/> that created this <see cref="ITagInstance"/>
 /// </param>
 /// <param name="rendersToInlineElement">
 /// Whether or not the tag will render to an inline XHTML element (such as a span tag) or not (such as a
 /// blockquote tag).
 /// </param>
 /// <param name="attributes">Any attributes set on the tag (ie. tag metadata)</param>
 protected TagInstance(CharRange charRange, ITagDefinition parentDefinition, bool rendersToInlineElement, IEnumerable <KeyValuePair <string, object> > attributes)
 {
     _CharRange = charRange;
     _RendersToInlineElement = rendersToInlineElement;
     _ParentDefinition       = parentDefinition;
     _Attributes             = new Dictionary <string, object>();
     _Attributes.AddAll(attributes);
     _Attributes = new ReadOnlyDictionary <string, object>(_Attributes);
 }
 /// <summary>
 /// Constructor, creates a <see cref="OpenTagInstance"/>
 /// </summary>
 /// <param name="charRange">The range of characters that the tag falls under</param>
 /// <param name="parentDefinition">
 /// The <see cref="ITagDefinition"/> that created this <see cref="ITagInstance"/>
 /// </param>
 /// <param name="rendersToInlineElement">
 /// Whether or not the tag will render to an inline XHTML element (such as a span tag) or not (such as a
 /// blockquote tag).
 /// </param>
 /// <param name="openTagVetoRulesSet">
 /// Collections of <see cref="IVetoRule"/>s that are used by the <see cref="CheckForVetoAgainstAnotherTag"/>
 /// and <see cref="CheckForSelfVeto"/> methods to determine tag validity.
 /// </param>
 /// <param name="attributes">Any attributes set on the tag (ie. tag metadata)</param>
 public OpenTagInstance(CharRange charRange, ITagDefinition parentDefinition, bool rendersToInlineElement, OpenTagVetoRulesSet openTagVetoRulesSet, IEnumerable <KeyValuePair <string, object> > attributes)
     : base(charRange, parentDefinition, rendersToInlineElement, attributes)
 {
     _OpenTagVetoRulesSet = openTagVetoRulesSet;
 }
Beispiel #3
0
 /// <summary>
 /// Constructor, creates a <see cref="CloseTagInstance"/>
 /// </summary>
 /// <param name="charRange">The range of characters that the tag falls under</param>
 /// <param name="parentDefinition">
 /// The <see cref="ITagDefinition"/> that created this <see cref="ITagInstance"/>
 /// </param>
 /// <param name="rendersToInlineElement">
 /// Whether or not the tag will render to an inline XHTML element (such as a span tag) or not (such as a
 /// blockquote tag).
 /// </param>
 /// <param name="closeTagVetoRules">
 /// A collection of <see cref="IVetoRule"/>s that are used by the <see cref="CheckIfValidClose"/> method to
 /// determine tag validity.
 /// </param>
 /// <param name="attributes">Any attributes set on the tag (ie. tag metadata)</param>
 public CloseTagInstance(CharRange charRange, ITagDefinition parentDefinition, bool rendersToInlineElement, IEnumerable <IVetoRule> closeTagVetoRules, IEnumerable <KeyValuePair <string, object> > attributes)
     : base(charRange, parentDefinition, rendersToInlineElement, attributes)
 {
     _CloseTagVetoRules = closeTagVetoRules;
 }
Beispiel #4
0
 public ListItemTagInstance(CharRange charRange, ITagDefinition parentDefinition)
 {
     _CharRange        = charRange;
     _ParentDefinition = parentDefinition;
     _Attributes       = new ReadOnlyDictionary <string, object>(new Dictionary <string, object>());
 }
Beispiel #5
0
 public void AddRenderLogic(ITagDefinition definition)
 {
     Renderer.RenderRoutine.Add(definition);
 }
Beispiel #6
0
 public void AddUpdateLogic(ITagDefinition definition)
 {
     Renderer.UpdateRoutine.Add(definition);
 }