Exemple #1
0
 //Only internal Constructors
 internal Segment(string StringRaw, MessageDelimiters CustomDelimiters, bool Temporary, int?Index, ModelBase Parent)
     : base(CustomDelimiters)
 {
     _Temporary        = Temporary;
     _Index            = Index;
     _Parent           = Parent;
     StringRaw         = ValidateStringRaw(StringRaw);
     _ElementDictonary = ParseSegmentRawStringToElement(StringRaw);
 }
Exemple #2
0
 //Only internal Constructors
 internal Content(string String, ModelSupport.ContentTypeInternal ContentTypeInternal,
                  MessageDelimiters CustomDelimiters, bool Temporary, int?Index, ModelBase Parent)
     : base(CustomDelimiters)
 {
     _Temporary           = Temporary;
     _Index               = Index;
     _Parent              = Parent;
     _InternalContentType = ContentTypeInternal;
     if (ContentTypeInternal == ModelSupport.ContentTypeInternal.EncodingCharacters)
     {
         SetDataToEncodingCharacters();
         _EscapeMetaData = null;
     }
     else if (ContentTypeInternal == ModelSupport.ContentTypeInternal.MainSeparator)
     {
         SetDataToMainSeparator();
         _EscapeMetaData = null;
     }
     else if (ContentTypeInternal == ModelSupport.ContentTypeInternal.Escape)
     {
         if (String != String.Empty)
         {
             if (ValidateData(String))
             {
                 _Data           = String;
                 _EscapeMetaData = new EscapeData(String);
             }
             SetParent();
         }
         else
         {
             throw new PeterPiperException("Attempt to set Content as Escape Type yet no Content data given, String was empty.");
         }
     }
     else
     {
         if (String != String.Empty)
         {
             if (ValidateData(String))
             {
                 _EscapeMetaData = null;
                 _Data           = String;
             }
             SetParent();
         }
     }
 }
Exemple #3
0
        internal Element(ModelSupport.ContentTypeInternal ContentTypeInternal, MessageDelimiters CustomDelimiters, bool Temporary, int?Index, ModelBase Parent)
            : base(CustomDelimiters)
        {
            _Temporary            = Temporary;
            _Index                = Index;
            _Parent               = Parent;
            _IsMainSeparator      = (ContentTypeInternal == ModelSupport.ContentTypeInternal.MainSeparator);
            _IsEncodingCharacters = (ContentTypeInternal == ModelSupport.ContentTypeInternal.EncodingCharacters);

            _RepeatDictonary = ParseElementRawStringToRepeat(string.Empty, ContentTypeInternal);
        }
Exemple #4
0
        internal Element(string StringRaw, MessageDelimiters CustomDelimiters, bool Temporary, int?Index, ModelBase Parent)
            : base(CustomDelimiters)
        {
            _Temporary = Temporary;
            _Index     = Index;
            _Parent    = Parent;

            if (ValidateStringRaw(StringRaw))
            {
                _RepeatDictonary = ParseElementRawStringToRepeat(StringRaw, ModelSupport.ContentTypeInternal.Unknown);
            }
        }
Exemple #5
0
 //Only internal Constructors
 internal Element(Field Field, MessageDelimiters CustomDelimiters, bool Temporary, int?Index, ModelBase Parent)
     : base(CustomDelimiters)
 {
     ValidateItemNotInUse(Field);
     _Temporary       = Temporary;
     _Index           = Index;
     _Parent          = Parent;
     _RepeatDictonary = new Dictionary <int, Field>();
     Field._Parent    = this;
     _RepeatDictonary.Add(1, Field);
 }
Exemple #6
0
 internal Component(ModelSupport.ContentTypeInternal ContentTypeInternal,
                    MessageDelimiters CustomDelimiters, bool Temporary, int?Index, ModelBase Parent)
     : base(CustomDelimiters)
 {
     _Temporary             = Temporary;
     _Index                 = Index;
     _Parent                = Parent;
     _SubComponentDictonary = ParseComponentRawStringToSubComponent(string.Empty, ContentTypeInternal);
 }