public ClrmdSegment(ClrHeap clrHeap, ISegmentBuilder builder) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } Heap = clrHeap; LogicalHeap = builder.LogicalHeap; Start = builder.Start; End = builder.End; IsLargeObjectSegment = builder.IsLargeObjectSegment; IsEphemeralSegment = builder.IsEphemeralSegment; ReservedEnd = builder.ReservedEnd; CommittedEnd = builder.CommitedEnd; Gen0Start = builder.Gen0Start; Gen0Length = builder.Gen0Length; Gen1Start = builder.Gen1Start; Gen1Length = builder.Gen1Length; Gen2Start = builder.Gen2Start; Gen2Length = builder.Gen2Length; }
/// <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); }
/// <inheritdoc/> public void AddChild(ISegmentBuilder child) { _children.Add(child); }
/// <inheritdoc/> public void AddChild(ISegmentBuilder child) { }