Example #1
0
 /// <summary>
 /// Creates new <see cref="CompositeFormatter"/> with formatters added from <paramref name="formatters"/>.
 /// </summary>
 /// <param name="formatter">Source formatter.</param>
 /// <param name="formatters">Formatters to add.</param>
 /// <returns>New instance of <see cref="CompositeFormatter"/>.</returns>
 public static CompositeFormatter With(this CompositeFormatter formatter, params IValueFormatter[] formatters)
 {
     return(formatter.With((IEnumerable <IValueFormatter>)formatters));
 }
Example #2
0
 /// <summary>
 /// Creates new <see cref="CompositeFormatter"/> with formatters added from <paramref name="formatterProvider"/>.
 /// </summary>
 /// <param name="formatter">Source formatter.</param>
 /// <param name="formatterProvider">Formatters provider to add.</param>
 /// <returns>New instance of <see cref="CompositeFormatter"/>.</returns>
 public static CompositeFormatter With(this CompositeFormatter formatter, IValueFormatterProvider formatterProvider)
 {
     return(formatter.With(formatterProvider.GetFormatters()));
 }