/// <summary> /// Append the specified text, within the specified context only. /// </summary> /// <param name="text">The text to append.</param> /// <param name="usage">The context(s) which this string should be appended.</param> /// <returns>Returns a ContextualStringBuilder object.</returns> public ContextualStringBuilder Append(string text, ContextualStringUsage usage) { this.texts.Add(new ContextualString(text, usage)); return(this); }
/// <summary> /// Initializes a new instance of the ContextualString class. /// </summary> /// <param name="text">The string text.</param> /// <param name="usage">The contextual usage of this string.</param> public ContextualString(string text, ContextualStringUsage usage) { this.Text = text; this.Usage = usage; }
/// <summary> /// Append the specified text, within the specified context only. /// </summary> /// <param name="text">The text to append.</param> /// <param name="usage">The context(s) which this string should be appended.</param> /// <returns>Returns a ContextualStringBuilder object.</returns> public ContextualStringBuilder Append(string text, ContextualStringUsage usage) { this.texts.Add(new ContextualString(text, usage)); return this; }
/// <summary>Initializes a new instance of the ContextualString class.</summary> /// <param name="text">The string text.</param> /// <param name="usage">The contextual usage of this string.</param> public ContextualString(string text, ContextualStringUsage usage) { Text = text; Usage = usage; }