/// <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);
/// <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);