SR.common.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Globalization;
  5. static partial class SR
  6. {
  7. internal static string Format (string resourceFormat, object? p1)
  8. {
  9. return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1);
  10. }
  11. internal static string Format (string resourceFormat, object p1, object p2)
  12. {
  13. return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1, p2);
  14. }
  15. internal static string Format (CultureInfo ci, string resourceFormat, object p1, object p2)
  16. {
  17. return string.Format (ci, resourceFormat, p1, p2);
  18. }
  19. internal static string Format (string resourceFormat, object p1, object p2, object p3)
  20. {
  21. return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
  22. }
  23. internal static string Format (string resourceFormat, params object[] args)
  24. {
  25. if (args != null)
  26. return string.Format (CultureInfo.InvariantCulture, resourceFormat, args);
  27. return resourceFormat;
  28. }
  29. internal static string GetResourceString (string str) => str;
  30. }