/// <summary> /// Render the token to the output. /// </summary> /// <param name="properties">Properties that may be represented by the token.</param> /// <param name="output">Output for the rendered string.</param> /// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param> /// <exception cref="ArgumentNullException">When <paramref name="output"/> is <code>null</code></exception> public override void Render(IReadOnlyDictionary <string, string> properties, TextWriter output, IFormatProvider formatProvider = null) { if (output == null) { throw new ArgumentNullException(nameof(output)); } MessageTemplateRenderer.RenderTextToken(this, output); }
/// <summary> /// Render the token to the output. /// </summary> /// <param name="properties">Properties that may be represented by the token.</param> /// <param name="output">Output for the rendered string.</param> /// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param> /// <exception cref="ArgumentNullException">When <paramref name="properties"/> is <code>null</code></exception> /// <exception cref="ArgumentNullException">When <paramref name="output"/> is <code>null</code></exception> public override void Render(IReadOnlyDictionary <string, string> properties, TextWriter output, IFormatProvider formatProvider = null) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (output == null) { throw new ArgumentNullException(nameof(output)); } MessageTemplateRenderer.RenderPropertyToken(this, properties, output, formatProvider, isLiteral: false, isJson: false); }