mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 04:47:21 +00:00
Moved all extension methods into extension blocks (#1155)
This commit is contained in:
1 parent
acc7d09fa2
commit
c0a75f39ac
138 files changed
+5884
-4954
No files matched your search
@@ -11,13 +11,16 @@ internal static class ERIServerFileOutcomeExtensions
|
||||
{
|
||||
private static string TB(string fallbackEN) => Tools.PluginSystem.I18N.I.T(fallbackEN, typeof(ERIServerFileOutcomeExtensions).Namespace, nameof(ERIServerFileOutcomeExtensions));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized message which explains why a file was not written.
|
||||
/// </summary>
|
||||
/// <param name="outcome">What became of the file.</param>
|
||||
/// <param name="file">The path of the file, as the model named it.</param>
|
||||
/// <returns>The localized message.</returns>
|
||||
internal static string ToUserMessage(this ERIServerFileOutcome outcome, string file) => string.Format(ToUserMessageFormat(outcome), file);
|
||||
extension(ERIServerFileOutcome outcome)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the localized message which explains why a file was not written.
|
||||
/// </summary>
|
||||
/// <param name="file">The path of the file, as the model named it.</param>
|
||||
/// <returns>The localized message.</returns>
|
||||
internal string ToUserMessage(string file) => string.Format(ToUserMessageFormat(outcome), file);
|
||||
}
|
||||
|
||||
private static string ToUserMessageFormat(ERIServerFileOutcome outcome) => outcome switch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user