/// <summary> /// Initializes a new instance <see cref="FixedStringSegment"/> /// </summary> /// <param name="variableName">The variable name to expect</param> /// <param name="optional">Wether or not if the segment is optional</param> /// <param name="occurrences">Occurrences of the segment</param> /// <param name="parent">Parent <see cref="ISegment"/></param> /// <param name="children"><see cref="IEnumerable{ISegment}">Children</see></param> public VariableStringSegment( string variableName, bool optional, SegmentOccurrence occurrences, ISegment parent, IEnumerable <ISegment> children) { VariableName = variableName; Optional = optional; Occurrences = occurrences; Parent = parent; Children = children; }
/// <summary> /// Initializes a new instance <see cref="FixedStringSegment"/> /// </summary> /// <param name="string">The <see cref="string"/> to expect</param> /// <param name="optional">Wether or not if the segment is optional</param> /// <param name="occurrences">Occurrences of the segment</param> /// <param name="parent">Parent <see cref="ISegment"/></param> /// <param name="children"><see cref="IEnumerable{ISegment}">Children</see></param> public FixedStringSegment( string @string, bool optional, SegmentOccurrence occurrences, ISegment parent, IEnumerable <ISegment> children) { String = @string; Optional = optional; Occurrences = occurrences; Parent = parent; Children = children; }
/// <summary> /// Initializes a new instance of <see cref="FixedStringSegmentBuilder"/> /// </summary> /// <param name="string">Fixed string we're building for</param> /// <param name="parent">Parent <see cref="ISegmentBuilder"/></param> /// <param name="children"><see cref="IEnumerable{ISegmentBuilder}">Children</see></param> /// <param name="optional">Wether or not its optional</param> /// <param name="occurrences">Number of occurrences</param> /// <param name="dependingOnPrevious">Wether or not it depends on previous segment</param> public FixedStringSegmentBuilder( string @string, ISegmentBuilder parent, IEnumerable <ISegmentBuilder> children, bool optional = false, SegmentOccurrence occurrences = SegmentOccurrence.Single, bool dependingOnPrevious = false) { _string = @string; _optional = optional; _occurences = occurrences; _dependingOnPrevious = dependingOnPrevious; _parent = parent; _children = new List <ISegmentBuilder>(children); }
/// <summary> /// Initializes a new instance of <see cref="VariableStringSegmentBuilder"/> /// </summary> /// <param name="variableName">Variable string we're building for</param> /// <param name="parent">Parent <see cref="ISegmentBuilder"/></param> /// <param name="children"><see cref="IEnumerable{ISegmentBuilder}">Children</see></param> /// <param name="optional">Wether or not its optional</param> /// <param name="occurrences">Number of occurrences</param> /// <param name="dependingOnPrevious">Wether or not it depends on previous segment</param> public VariableStringSegmentBuilder( string variableName, ISegmentBuilder parent, IEnumerable <ISegmentBuilder> children, bool optional = false, SegmentOccurrence occurrences = SegmentOccurrence.Single, bool dependingOnPrevious = false) { _variableName = variableName; _optional = optional; _occurences = occurrences; _dependingOnPrevious = dependingOnPrevious; _parent = parent; _children = new List <ISegmentBuilder>(children); }