Append() private method

private Append ( ) : void
return void
示例#1
0
        internal override void AppendTo(PatternBuilder builder)
        {
            builder.Append(_contentBefore);

            builder.Append(_content);

            builder.Append(_contentAfter);
        }
示例#2
0
            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);
         }
     }
 }
示例#4
0
        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);
                        }
                    }
                }
            }
        }
示例#5
0
 internal override void AppendTo(PatternBuilder builder)
 {
     builder.AppendBackAssertion(_backAssertion);
     builder.Append(_content);
     builder.AppendAssertion(_assertion);
 }
示例#6
0
        /// <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);
        }
示例#7
0
 internal override void AppendTo(PatternBuilder builder)
 {
     builder.Append(_value);
 }
示例#8
0
            internal override void AppendContentTo(PatternBuilder builder)
            {
                if (builder == null)
                    throw new ArgumentNullException(nameof(builder));

                builder.Append(_characters, true);
            }