Esempio n. 1
0
        /// <summary>
        /// Replaces the content of the span with that built form the given builder.
        /// </summary>
        /// <param name="builder">The span builder.</param>
        public void ReplaceWith(SpanBuilder builder)
        {
            Collapsed = builder.Collapsed;
            Kind      = builder.Kind;
            Symbols   = builder.Symbols;
            _start    = builder.Start;

            builder.Reset();

            Content = Symbols.Aggregate(
                new StringBuilder(),
                (sb, sym) => sb.Append(sym.Content),
                sb => sb.ToString());
        }
Esempio n. 2
0
		/// <summary>
		/// Replaces the content of the span with that built form the given builder.
		/// </summary>
		/// <param name="builder">The span builder.</param>
		public void ReplaceWith(SpanBuilder builder)
		{
			Collapsed = builder.Collapsed;
			Kind = builder.Kind;
			Symbols = builder.Symbols;
			_start = builder.Start;

			builder.Reset();

			Content = Symbols.Aggregate(
				new StringBuilder(),
				(sb, sym) => sb.Append(sym.Content),
				sb => sb.ToString());
		}