/// <summary> /// Constructs a new MessageFormat using the given pattern and locale. /// </summary> /// <param name="pattern">Pattern used to construct object. </param> /// <param name="localeId">The locale to use for formatting dates and numbers. </param> /// <param name="parseError">Struct to receive information on the position of an error /// within the pattern. </param> /// <param name="status">Input/output error code. If the pattern cannot be parsed, set /// to failure code. </param> public MessageFormatter(string pattern, string localeId, out ParseError parseError, out ErrorCode status) { _Formatter = NativeMethods.umsg_open(pattern, pattern.Length, localeId, out parseError, out status); }
/// <summary> /// Constructs a new MessageFormat using the given pattern and locale. /// </summary> /// <param name="pattern">Pattern used to construct object. </param> /// <param name="localeId">The locale to use for formatting dates and numbers. </param> /// <remarks>If the pattern cannot be parsed, an exception is thrown.</remarks> public MessageFormatter(string pattern, string localeId) { _Formatter = NativeMethods.umsg_open(pattern, pattern.Length, localeId, out var parseError, out var status); ExceptionFromErrorCode.ThrowIfError(status); }