private PkgdefTextSegment(int startIndex, string text, PkgdefSegmentType segmentType) { PreCondition.AssertGreaterThanOrEqualTo(startIndex, 0, nameof(startIndex)); PreCondition.AssertNotNullAndNotEmpty(text, nameof(text)); this.startIndex = startIndex; this.text = text; this.segmentType = segmentType; }
public static PkgdefTextSegment Create(int startIndex, string text, PkgdefSegmentType segmentType) { return(new PkgdefTextSegment(startIndex, text, segmentType)); }