internal Content(string String, Support.Content.ContentType ContentType, IMessageDelimiters CustomDelimiters) : base(CustomDelimiters) { _Temporary = true; _Index = null; _Parent = null; this.ContentType = ContentType; if (ValidateData(String)) { if (String != String.Empty) { _Data = String; if (ContentType == Support.Content.ContentType.Escape) { _EscapeMetaData = new EscapeData(String); } else { _EscapeMetaData = null; } SetParent(); } else { if (ContentType == Support.Content.ContentType.Escape) { throw new PeterPiperException("Attempt to set Content as type 'Escape' yet Content String was empty. Escape type content must have data provided"); } } } }
public static IContent Content(string String, Support.Content.ContentType ContentType, IMessageDelimiters CustomDelimiters) { return(new Content(String, ContentType, CustomDelimiters)); }
public static IContent Content(string String, Support.Content.ContentType ContentType) { return(new Content(String, ContentType)); }