added Extend extension methods generation
All checks were successful
.NET Test / test (push) Successful in 1m56s
.NET Publish / publish (push) Successful in 1m6s

This commit is contained in:
2024-04-08 22:46:34 +04:00
parent 9c9b734c51
commit dd81fecdd6
8 changed files with 235 additions and 20 deletions

View File

@@ -50,6 +50,13 @@ internal abstract class ResultExtensionsExecutor : IGeneratorExecutor
1 => $"Result<{string.Join(", ", templateArgNames)}>",
_ => $"Result<({string.Join(", ", templateArgNames)})>",
};
protected static string JoinArguments(string arg1, string arg2) => (arg1, arg2) switch
{
("", "") => "",
(string arg, "") => arg,
("", string arg) => arg,
_ => $"{arg1}, {arg2}"
};
protected static string GenerateResultValueExpansion(ImmutableArray<string> templateArgNames)
{