Exemplo n.º 1
0
        /// <summary>
        /// Formats the given string using the variable arguments passed in. The current thread's culture is used for formatting.
        /// </summary>
        /// <remarks>This method is thread-safe.</remarks>
        /// <param name="unformatted">The string to format.</param>
        /// <param name="args">Arguments for formatting.</param>
        /// <returns>The formatted string.</returns>
        internal static string FormatString(string unformatted, params object[] args)
        {
            ErrorUtilities.VerifyThrowArgumentNull(unformatted, "unformatted");

            return(ResourceUtilities.FormatString(unformatted, args));
        }
Exemplo n.º 2
0
 internal static string FormatResourceString(out string code, out string helpKeyword, string resourceName, params object[] args)
 {
     helpKeyword = ResourceUtilities.GetHelpKeyword(resourceName);
     return(ResourceUtilities.ExtractMessageCode(true, ResourceUtilities.FormatString(ResourceUtilities.GetResourceString(resourceName), args), out code));
 }