diff options
Diffstat (limited to 'csharp/ProtocolBuffers/Descriptors')
18 files changed, 302 insertions, 57 deletions
diff --git a/csharp/ProtocolBuffers/Descriptors/DescriptorBase.cs b/csharp/ProtocolBuffers/Descriptors/DescriptorBase.cs index 0678cb6d..0c1414ae 100644 --- a/csharp/ProtocolBuffers/Descriptors/DescriptorBase.cs +++ b/csharp/ProtocolBuffers/Descriptors/DescriptorBase.cs @@ -1,8 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. using Google.ProtocolBuffers.DescriptorProtos; -using Google.ProtocolBuffers.Collections; namespace Google.ProtocolBuffers.Descriptors { /// <summary> diff --git a/csharp/ProtocolBuffers/Descriptors/DescriptorPool.cs b/csharp/ProtocolBuffers/Descriptors/DescriptorPool.cs index fc30295e..19a5b6a7 100644 --- a/csharp/ProtocolBuffers/Descriptors/DescriptorPool.cs +++ b/csharp/ProtocolBuffers/Descriptors/DescriptorPool.cs @@ -1,4 +1,19 @@ -using System.Collections.Generic; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System.Collections.Generic; using System; using System.Text; using System.Text.RegularExpressions; @@ -7,7 +22,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// <summary> /// Contains lookup tables containing all the descriptors defined in a particular file. /// </summary> - internal class DescriptorPool { + internal sealed class DescriptorPool { private readonly IDictionary<string, IDescriptor> descriptorsByName = new Dictionary<string, IDescriptor>(); diff --git a/csharp/ProtocolBuffers/Descriptors/DescriptorUtil.cs b/csharp/ProtocolBuffers/Descriptors/DescriptorUtil.cs index a75d5f92..c945616d 100644 --- a/csharp/ProtocolBuffers/Descriptors/DescriptorUtil.cs +++ b/csharp/ProtocolBuffers/Descriptors/DescriptorUtil.cs @@ -1,10 +1,26 @@ -using System.Collections.Generic; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System.Collections.Generic; using Google.ProtocolBuffers.Collections; + namespace Google.ProtocolBuffers.Descriptors { /// <summary> /// Internal class containing utility methods when working with descriptors. /// </summary> - static class DescriptorUtil { + internal static class DescriptorUtil { /// <summary> /// Equivalent to Func[TInput, int, TOutput] but usable in .NET 2.0. Only used to convert /// arrays. diff --git a/csharp/ProtocolBuffers/Descriptors/DescriptorValidationException.cs b/csharp/ProtocolBuffers/Descriptors/DescriptorValidationException.cs index bc0c2078..62c723f3 100644 --- a/csharp/ProtocolBuffers/Descriptors/DescriptorValidationException.cs +++ b/csharp/ProtocolBuffers/Descriptors/DescriptorValidationException.cs @@ -1,9 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; namespace Google.ProtocolBuffers.Descriptors { - public class DescriptorValidationException : Exception { + /// <summary> + /// Thrown when building descriptors fails because the source DescriptorProtos + /// are not valid. + /// </summary> + public sealed class DescriptorValidationException : Exception { private readonly String name; private readonly IMessage proto; diff --git a/csharp/ProtocolBuffers/Descriptors/EnumDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/EnumDescriptor.cs index a28efc5f..83090236 100644 --- a/csharp/ProtocolBuffers/Descriptors/EnumDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/EnumDescriptor.cs @@ -1,10 +1,27 @@ - -using System; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. using System.Collections.Generic; using Google.ProtocolBuffers.DescriptorProtos; + namespace Google.ProtocolBuffers.Descriptors { - public class EnumDescriptor : IndexedDescriptorBase<EnumDescriptorProto, EnumOptions> { + /// <summary> + /// Descriptor for an enum type in a .proto file. + /// </summary> + public sealed class EnumDescriptor : IndexedDescriptorBase<EnumDescriptorProto, EnumOptions> { private readonly MessageDescriptor containingType; private readonly IList<EnumValueDescriptor> values; diff --git a/csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs b/csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs index c8d23858..85c814e8 100644 --- a/csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs +++ b/csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs @@ -1,4 +1,19 @@ -using System; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; namespace Google.ProtocolBuffers.Descriptors { /// <summary> diff --git a/csharp/ProtocolBuffers/Descriptors/EnumValueDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/EnumValueDescriptor.cs index 15b901bd..112a7fb6 100644 --- a/csharp/ProtocolBuffers/Descriptors/EnumValueDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/EnumValueDescriptor.cs @@ -1,8 +1,26 @@ -using System; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. using Google.ProtocolBuffers.DescriptorProtos; namespace Google.ProtocolBuffers.Descriptors { - public class EnumValueDescriptor : IndexedDescriptorBase<EnumValueDescriptorProto, EnumValueOptions> { + + /// <summary> + /// Descriptor for a single enum value within an enum in a .proto file. + /// </summary> + public sealed class EnumValueDescriptor : IndexedDescriptorBase<EnumValueDescriptorProto, EnumValueOptions> { private readonly EnumDescriptor enumDescriptor; diff --git a/csharp/ProtocolBuffers/Descriptors/FieldDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/FieldDescriptor.cs index f2f99a38..0cd552e4 100644 --- a/csharp/ProtocolBuffers/Descriptors/FieldDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/FieldDescriptor.cs @@ -1,12 +1,30 @@ -using System; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; using System.Collections.Generic; using System.Reflection; using Google.ProtocolBuffers.Collections; using Google.ProtocolBuffers.DescriptorProtos; -using System.Collections.ObjectModel; namespace Google.ProtocolBuffers.Descriptors { - public class FieldDescriptor : IndexedDescriptorBase<FieldDescriptorProto, FieldOptions>, IComparable<FieldDescriptor> { + + /// <summary> + /// Descriptor for a field or extension within a message in a .proto file. + /// </summary> + public sealed class FieldDescriptor : IndexedDescriptorBase<FieldDescriptorProto, FieldOptions>, IComparable<FieldDescriptor> { private readonly MessageDescriptor extensionScope; private EnumDescriptor enumType; diff --git a/csharp/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs b/csharp/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs index 13e8be1e..18f88a31 100644 --- a/csharp/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs +++ b/csharp/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs @@ -1,6 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; namespace Google.ProtocolBuffers.Descriptors { @@ -9,7 +22,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// this allows each field type to specify the mapped type and wire type. /// </summary> [AttributeUsage(AttributeTargets.Field)] - internal class FieldMappingAttribute : Attribute { + internal sealed class FieldMappingAttribute : Attribute { internal FieldMappingAttribute(MappedType mappedType, WireFormat.WireType wireType) { MappedType = mappedType; WireType = wireType; diff --git a/csharp/ProtocolBuffers/Descriptors/FieldType.cs b/csharp/ProtocolBuffers/Descriptors/FieldType.cs index 30b82d69..7c15c0cc 100644 --- a/csharp/ProtocolBuffers/Descriptors/FieldType.cs +++ b/csharp/ProtocolBuffers/Descriptors/FieldType.cs @@ -1,4 +1,19 @@ - +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + namespace Google.ProtocolBuffers.Descriptors { /// <summary> /// Enumeration of all the possible field types. The odd formatting is to make it very clear diff --git a/csharp/ProtocolBuffers/Descriptors/FileDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/FileDescriptor.cs index 9e065c86..b3beea0b 100644 --- a/csharp/ProtocolBuffers/Descriptors/FileDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/FileDescriptor.cs @@ -1,8 +1,23 @@ -using System; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using Google.ProtocolBuffers.DescriptorProtos; -using System.Collections.Generic; -using Google.ProtocolBuffers.Collections; + namespace Google.ProtocolBuffers.Descriptors { /// <summary> @@ -10,7 +25,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// IDescriptor is implemented such that the File property returns this descriptor, /// and the FullName is the same as the Name. /// </summary> - public class FileDescriptor : IDescriptor<FileDescriptorProto> { + public sealed class FileDescriptor : IDescriptor<FileDescriptorProto> { private readonly FileDescriptorProto proto; private readonly IList<MessageDescriptor> messageTypes; diff --git a/csharp/ProtocolBuffers/Descriptors/IDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/IDescriptor.cs index ff562840..2143f39a 100644 --- a/csharp/ProtocolBuffers/Descriptors/IDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/IDescriptor.cs @@ -1,6 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. namespace Google.ProtocolBuffers.Descriptors { diff --git a/csharp/ProtocolBuffers/Descriptors/IndexedDescriptorBase.cs b/csharp/ProtocolBuffers/Descriptors/IndexedDescriptorBase.cs index 04fd3e62..d04d40db 100644 --- a/csharp/ProtocolBuffers/Descriptors/IndexedDescriptorBase.cs +++ b/csharp/ProtocolBuffers/Descriptors/IndexedDescriptorBase.cs @@ -1,6 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. using Google.ProtocolBuffers.DescriptorProtos; namespace Google.ProtocolBuffers.Descriptors { diff --git a/csharp/ProtocolBuffers/Descriptors/MappedType.cs b/csharp/ProtocolBuffers/Descriptors/MappedType.cs index 8d6c8ced..ca7a7b43 100644 --- a/csharp/ProtocolBuffers/Descriptors/MappedType.cs +++ b/csharp/ProtocolBuffers/Descriptors/MappedType.cs @@ -1,6 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. namespace Google.ProtocolBuffers.Descriptors { /// <summary> diff --git a/csharp/ProtocolBuffers/Descriptors/MessageDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/MessageDescriptor.cs index 02343937..e3df02fe 100644 --- a/csharp/ProtocolBuffers/Descriptors/MessageDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/MessageDescriptor.cs @@ -1,4 +1,19 @@ -using System.Collections.Generic; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System.Collections.Generic; using Google.ProtocolBuffers.DescriptorProtos; namespace Google.ProtocolBuffers.Descriptors { @@ -6,7 +21,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// <summary> /// Describes a message type. /// </summary> - public class MessageDescriptor : IndexedDescriptorBase<DescriptorProto, MessageOptions> { + public sealed class MessageDescriptor : IndexedDescriptorBase<DescriptorProto, MessageOptions> { private readonly MessageDescriptor containingType; private readonly IList<MessageDescriptor> nestedTypes; diff --git a/csharp/ProtocolBuffers/Descriptors/MethodDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/MethodDescriptor.cs index 4b4dc707..13e6d141 100644 --- a/csharp/ProtocolBuffers/Descriptors/MethodDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/MethodDescriptor.cs @@ -1,10 +1,25 @@ -using Google.ProtocolBuffers.DescriptorProtos; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using Google.ProtocolBuffers.DescriptorProtos; namespace Google.ProtocolBuffers.Descriptors { /// <summary> /// Describes a single method in a service. /// </summary> - public class MethodDescriptor : IndexedDescriptorBase<MethodDescriptorProto, MethodOptions> { + public sealed class MethodDescriptor : IndexedDescriptorBase<MethodDescriptorProto, MethodOptions> { private readonly ServiceDescriptor service; private MessageDescriptor inputType; diff --git a/csharp/ProtocolBuffers/Descriptors/PackageDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/PackageDescriptor.cs index acef6200..9884c4a6 100644 --- a/csharp/ProtocolBuffers/Descriptors/PackageDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/PackageDescriptor.cs @@ -3,17 +3,12 @@ using System.Collections.Generic; using System.Text; namespace Google.ProtocolBuffers.Descriptors { - /* - * Represents a package in the symbol table. We use PackageDescriptors - * just as placeholders so that someone cannot define, say, a message type - * that has the same name as an existing package. - */ - /// <summary> - /// Represents a package in the symbol table. We use PackageDescriptors - /// just as placeholders so that someone cannot define, say, a message type - /// that has the same name as an existing package. - /// </summary> - internal class PackageDescriptor : IDescriptor<IMessage> { + /// <summary> + /// Represents a package in the symbol table. We use PackageDescriptors + /// just as placeholders so that someone cannot define, say, a message type + /// that has the same name as an existing package. + /// </summary> + internal sealed class PackageDescriptor : IDescriptor<IMessage> { private readonly string name; private readonly string fullName; diff --git a/csharp/ProtocolBuffers/Descriptors/ServiceDescriptor.cs b/csharp/ProtocolBuffers/Descriptors/ServiceDescriptor.cs index 67ef0418..cb152637 100644 --- a/csharp/ProtocolBuffers/Descriptors/ServiceDescriptor.cs +++ b/csharp/ProtocolBuffers/Descriptors/ServiceDescriptor.cs @@ -1,6 +1,20 @@ -using System; +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. +// http://code.google.com/p/protobuf/ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +using System; using System.Collections.Generic; -using System.Text; using Google.ProtocolBuffers.DescriptorProtos; namespace Google.ProtocolBuffers.Descriptors { @@ -8,7 +22,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// <summary> /// Describes a service type. /// </summary> - public class ServiceDescriptor : IndexedDescriptorBase<ServiceDescriptorProto, ServiceOptions> { + public sealed class ServiceDescriptor : IndexedDescriptorBase<ServiceDescriptorProto, ServiceOptions> { private readonly IList<MethodDescriptor> methods; |