|
|
|
@ -191,7 +191,7 @@ public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase<CSharpServi |
|
|
|
classTemplateEmptyPart.Replace(NamespacePlaceholder, rootNamespace); |
|
|
|
|
|
|
|
var filePath = Path.Combine(args.WorkDirectory, folder, $"{clientProxyName}.cs"); |
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(filePath)!); |
|
|
|
DirectoryHelper.CreateIfNotExists(Path.GetDirectoryName(filePath)!); |
|
|
|
if (!File.Exists(filePath)) |
|
|
|
{ |
|
|
|
using (var writer = new StreamWriter(filePath)) |
|
|
|
@ -227,7 +227,7 @@ public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase<CSharpServi |
|
|
|
classTemplate.Replace($"{Environment.NewLine}{Environment.NewLine} {MethodPlaceholder}", string.Empty).Replace(MethodPlaceholder, string.Empty); |
|
|
|
|
|
|
|
filePath = Path.Combine(args.WorkDirectory, folder, $"{clientProxyName}.Generated.cs"); |
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(filePath)!); |
|
|
|
DirectoryHelper.CreateIfNotExists(Path.GetDirectoryName(filePath)!); |
|
|
|
using (var writer = new StreamWriter(filePath)) |
|
|
|
{ |
|
|
|
await writer.WriteAsync(classTemplate.ToString()); |
|
|
|
@ -257,7 +257,7 @@ public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase<CSharpServi |
|
|
|
interfaceTemplate.Replace(NamespacePlaceholder, rootNamespace); |
|
|
|
|
|
|
|
filePath = Path.Combine(args.WorkDirectory, folder, $"{appServiceTypeName}.cs"); |
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(filePath)!); |
|
|
|
DirectoryHelper.CreateIfNotExists(Path.GetDirectoryName(filePath)!); |
|
|
|
using (var writer = new StreamWriter(filePath)) |
|
|
|
{ |
|
|
|
await writer.WriteAsync(interfaceTemplate.ToString()); |
|
|
|
|