Ejemplo n.º 1
0
 /// <summary>
 /// Formats a typed message using type-specific formatting, if available; otherwise, renders the message via ToString()
 /// </summary>
 /// <typeparam name="M">The type of the message to format</typeparam>
 /// <param name="message">The message to format</param>
 /// <returns></returns>
 public static string render <M>(M message)
 => TypedMessageFormat.Render(message);
Ejemplo n.º 2
0
 /// <summary>
 /// Defines a typed message format
 /// </summary>
 /// <typeparam name="M">The type of the message with which the format string wil be associated</typeparam>
 /// <param name="template"></param>
 /// <param name="Selectors"></param>
 /// <returns></returns>
 public static TypedMessageFormat defineFormat <M>(string template, params Expression <Func <M, object> >[] Selectors)
 => TypedMessageFormat.Define(template, Selectors);