Esempio n. 1
0
 internal ElementData(IFluentHelper helper)
 {
     _helper    = helper;
     Attributes = ImmutableDictionary <string, string> .Empty;
     Styles     = ImmutableDictionary <string, string> .Empty;
     Classes    = ImmutableHashSet <string> .Empty;
     Children   = ImmutableList <ElementChild> .Empty;
     Parents    = ImmutableList <IElement> .Empty;
     TagData    = ImmutableDictionary <string, object> .Empty;
 }
Esempio n. 2
0
 internal ElementData(
     ElementData data,
     IImmutableDictionary <string, string> attributes = null,
     IImmutableDictionary <string, string> styles     = null,
     IImmutableSet <string> classes                = null,
     IImmutableList <ElementChild> children        = null,
     IImmutableList <IElement> parents             = null,
     IImmutableDictionary <string, object> tagData = null)
 {
     if (data == null)
     {
         throw new ArgumentNullException(nameof(data));
     }
     _helper    = data._helper;
     Attributes = attributes ?? data.Attributes;
     Styles     = styles ?? data.Styles;
     Classes    = classes ?? data.Classes;
     Children   = children ?? data.Children;
     Parents    = parents ?? data.Parents;
     TagData    = tagData ?? data.TagData;
 }