From 85f149b697a0bd606350e487a590ee030a17cc20 Mon Sep 17 00:00:00 2001 From: stankovski Date: Fri, 27 May 2016 16:45:43 -0700 Subject: [PATCH] Addressed code review feedback --- AutoRest/Generators/CSharp/CSharp/CSharpCodeNamer.cs | 2 +- .../CSharp/CSharp/SyncMethodsGenerationMode.cs | 9 +++++++++ Documentation/cli.md | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/AutoRest/Generators/CSharp/CSharp/CSharpCodeNamer.cs b/AutoRest/Generators/CSharp/CSharp/CSharpCodeNamer.cs index 3504b01cb57d2..2df4387d5bf2b 100644 --- a/AutoRest/Generators/CSharp/CSharp/CSharpCodeNamer.cs +++ b/AutoRest/Generators/CSharp/CSharp/CSharpCodeNamer.cs @@ -14,7 +14,7 @@ public class CSharpCodeNamer : CodeNamer { private readonly HashSet _normalizedTypes; - [SettingsInfo("Whether to use DateTimeOffset instead of DateTime to model date-time types")] + [SettingsInfo("Indicates whether to use DateTimeOffset instead of DateTime to model date-time types")] public bool UseDateTimeOffset { get; set; } /// diff --git a/AutoRest/Generators/CSharp/CSharp/SyncMethodsGenerationMode.cs b/AutoRest/Generators/CSharp/CSharp/SyncMethodsGenerationMode.cs index f8e3f62082016..b4b75d02acd90 100644 --- a/AutoRest/Generators/CSharp/CSharp/SyncMethodsGenerationMode.cs +++ b/AutoRest/Generators/CSharp/CSharp/SyncMethodsGenerationMode.cs @@ -9,8 +9,17 @@ namespace Microsoft.Rest.Generator.CSharp /// public enum SyncMethodsGenerationMode { + /// + /// Default. Generates only one sync returning body or header. + /// Essential, + /// + /// Generates one sync method for each async method. + /// All, + /// + /// Does not generate any sync methods. + /// None } } diff --git a/Documentation/cli.md b/Documentation/cli.md index bd5f62c602107..6ffe3f7790b80 100644 --- a/Documentation/cli.md +++ b/Documentation/cli.md @@ -46,6 +46,15 @@ **-Azure.Python** Azure specific Python code generator. +##Code Generator Specific Settings +###CSharp + + **-SyncMethods** Specifies mode for generating sync wrappers. Supported value are `Essential` - generates only one sync returning body or header (default), `All` - generates one sync method for each async method, and `None` - does not generate any sync methods + + **-InternalConstructors** Indicates whether ctor needs to be generated with internal protection level. + + **-UseDateTimeOffset** Indicates whether to use DateTimeOffset instead of DateTime to model date-time types. + ##Examples - Generate C# client in MyNamespace from swagger.json input: