internal override void AppendTo(PatternBuilder builder) { builder.Append(_contentBefore); builder.Append(_content); builder.Append(_contentAfter); }
protected override void AppendItemContentTo(PatternBuilder builder) { if (builder == null) throw new ArgumentNullException(nameof(builder)); builder.Append(_value, true); }
internal override void AppendTo(PatternBuilder builder) { var values = _content as object[]; if (values != null) { for (int i = 0; i < values.Length; i++) builder.Append(values[i]); } else { var items = _content as IEnumerable; if (items != null) { foreach (var item in items) builder.Append(item); } } }
internal override void AppendTo(PatternBuilder builder) { var values = _content as object[]; if (values != null) { if (values.Length > 0) { builder.Append(values[0]); if (values.Length > 1) { for (int i = 1; i < values.Length; i++) { builder.Append(_separator); builder.Append(values[i]); } } } } else { var items = _content as IEnumerable; IEnumerator en = items.GetEnumerator(); if (en.MoveNext()) { builder.Append(en.Current); if (en.MoveNext()) { builder.Append(_separator); builder.Append(en.Current); while (en.MoveNext()) { builder.Append(_separator); builder.Append(en.Current); } } } } }
internal override void AppendTo(PatternBuilder builder) { builder.AppendBackAssertion(_backAssertion); builder.Append(_content); builder.AppendAssertion(_assertion); }
/// <summary> /// Appends the text representation of the character group containing the current instance to the specified <see cref="PatternBuilder"/>. /// </summary> /// <param name="builder">The builder to use for appending the text.</param> /// <exception cref="ArgumentNullException"></exception> public void AppendExcludedGroupTo(PatternBuilder builder) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } builder.Append(this); }
internal override void AppendTo(PatternBuilder builder) { builder.Append(_value); }
internal override void AppendContentTo(PatternBuilder builder) { if (builder == null) throw new ArgumentNullException(nameof(builder)); builder.Append(_characters, true); }