diff options
author | Jon Skeet <skeet@pobox.com> | 2010-11-03 11:21:52 +0000 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2010-11-03 11:21:52 +0000 |
commit | 57599ef16daeda48381711dae1600cf0c467689d (patch) | |
tree | 3030080b7b81b64cc1b43f107ad255acad16cbca /src/ProtoGen/DescriptorUtil.cs | |
parent | c58ce5dc0c6dbe792ad53c63926bb3e8facef47b (diff) | |
download | protobuf-57599ef16daeda48381711dae1600cf0c467689d.tar.gz protobuf-57599ef16daeda48381711dae1600cf0c467689d.tar.bz2 protobuf-57599ef16daeda48381711dae1600cf0c467689d.zip |
A few stylistic issues
Diffstat (limited to 'src/ProtoGen/DescriptorUtil.cs')
-rw-r--r-- | src/ProtoGen/DescriptorUtil.cs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/ProtoGen/DescriptorUtil.cs b/src/ProtoGen/DescriptorUtil.cs index f485db6f..af5a2f9a 100644 --- a/src/ProtoGen/DescriptorUtil.cs +++ b/src/ProtoGen/DescriptorUtil.cs @@ -45,24 +45,25 @@ namespace Google.ProtocolBuffers.ProtoGen { internal static string GetFullUmbrellaClassName(IDescriptor descriptor) { CSharpFileOptions options = descriptor.File.CSharpOptions; string result = options.Namespace; - if (result != "") result += '.'; - result += QualifiedUmbrellaClassName(options); + if (result != "") { + result += '.'; + } + result += GetQualifiedUmbrellaClassName(options); return "global::" + result; } /// <summary> - /// ROK 2010-09-03 /// Evaluates the options and returns the qualified name of the umbrella class - /// relative to the descriptor type's namespace. Basically contacts the - /// UmbrellaNamespace + UmbrellaClassname fields. + /// relative to the descriptor type's namespace. Basically concatenates the + /// UmbrellaNamespace + UmbrellaClassname fields. /// </summary> - internal static string QualifiedUmbrellaClassName(CSharpFileOptions options) - { - string fullName = options.UmbrellaClassname; - if (!options.NestClasses && options.UmbrellaNamespace != "") - fullName = String.Format("{0}.{1}", options.UmbrellaNamespace, options.UmbrellaClassname); - return fullName; - } + internal static string GetQualifiedUmbrellaClassName(CSharpFileOptions options) { + string fullName = options.UmbrellaClassname; + if (!options.NestClasses && options.UmbrellaNamespace != "") { + fullName = String.Format("{0}.{1}", options.UmbrellaNamespace, options.UmbrellaClassname); + } + return fullName; + } internal static string GetMappedTypeName(MappedType type) { switch(type) { |