aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-07-15 13:36:56 +0100
committerJon Skeet <jonskeet@google.com>2015-07-15 22:04:45 +0100
commit541b442b99e1e9a1c514e2aacfe1e83561a9ab68 (patch)
treeea2efa102b0c12dc3c6e7ee453bb961682c13d85 /csharp/src/ProtocolBuffers
parentf8281604543697f1543938e4319a7f8cbda6510a (diff)
downloadprotobuf-541b442b99e1e9a1c514e2aacfe1e83561a9ab68.tar.gz
protobuf-541b442b99e1e9a1c514e2aacfe1e83561a9ab68.tar.bz2
protobuf-541b442b99e1e9a1c514e2aacfe1e83561a9ab68.zip
Don't create nested types (or field accessors) for map types.
I'm sure I've implemented this before, but somehow it's been lost in a maze of twisty little branches, all alike.
Diffstat (limited to 'csharp/src/ProtocolBuffers')
-rw-r--r--csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs163
1 files changed, 0 insertions, 163 deletions
diff --git a/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs b/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs
index 98cb8138..99f88a96 100644
--- a/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs
+++ b/csharp/src/ProtocolBuffers/WellKnownTypes/Struct.cs
@@ -16,7 +16,6 @@ namespace Google.Protobuf.WellKnownTypes {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_Struct__FieldAccessorTable;
- internal static pbr::FieldAccessorTable internal__static_google_protobuf_Struct_FieldsEntry__FieldAccessorTable;
internal static pbr::FieldAccessorTable internal__static_google_protobuf_Value__FieldAccessorTable;
internal static pbr::FieldAccessorTable internal__static_google_protobuf_ListValue__FieldAccessorTable;
#endregion
@@ -49,9 +48,6 @@ namespace Google.Protobuf.WellKnownTypes {
internal__static_google_protobuf_Struct__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Struct), descriptor.MessageTypes[0],
new string[] { "Fields", }, new string[] { });
- internal__static_google_protobuf_Struct_FieldsEntry__FieldAccessorTable =
- new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Struct.Types.FieldsEntry), descriptor.MessageTypes[0].NestedTypes[0],
- new string[] { "Key", "Value", }, new string[] { });
internal__static_google_protobuf_Value__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Value), descriptor.MessageTypes[1],
new string[] { "NullValue", "NumberValue", "StringValue", "BoolValue", "StructValue", "ListValue", }, new string[] { "Kind", });
@@ -180,165 +176,6 @@ namespace Google.Protobuf.WellKnownTypes {
}
}
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class FieldsEntry : pb::IMessage<FieldsEntry> {
- private static readonly pb::MessageParser<FieldsEntry> _parser = new pb::MessageParser<FieldsEntry>(() => new FieldsEntry());
- public static pb::MessageParser<FieldsEntry> Parser { get { return _parser; } }
-
- private static readonly string[] _fieldNames = new string[] { "key", "value" };
- private static readonly uint[] _fieldTags = new uint[] { 10, 18 };
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Google.Protobuf.WellKnownTypes.Struct.Descriptor.NestedTypes[0]; }
- }
-
- pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
- get { return global::Google.Protobuf.WellKnownTypes.Proto.Struct.internal__static_google_protobuf_Struct_FieldsEntry__FieldAccessorTable; }
- }
-
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
- public FieldsEntry() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- public FieldsEntry(FieldsEntry other) : this() {
- key_ = other.key_;
- Value = other.value_ != null ? other.Value.Clone() : null;
- }
-
- public FieldsEntry Clone() {
- return new FieldsEntry(this);
- }
-
- public void Freeze() {
- if (IsFrozen) {
- return;
- }
- _frozen = true;
- if (value_ != null) Value.Freeze();
- }
-
- public const int KeyFieldNumber = 1;
- private string key_ = "";
- public string Key {
- get { return key_; }
- set {
- pb::Freezable.CheckMutable(this);
- key_ = value ?? "";
- }
- }
-
- public const int ValueFieldNumber = 2;
- private global::Google.Protobuf.WellKnownTypes.Value value_;
- public global::Google.Protobuf.WellKnownTypes.Value Value {
- get { return value_; }
- set {
- pb::Freezable.CheckMutable(this);
- value_ = value;
- }
- }
-
- public override bool Equals(object other) {
- return Equals(other as FieldsEntry);
- }
-
- public bool Equals(FieldsEntry other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (Key != other.Key) return false;
- if (!object.Equals(Value, other.Value)) return false;
- return true;
- }
-
- public override int GetHashCode() {
- int hash = 1;
- if (Key.Length != 0) hash ^= Key.GetHashCode();
- if (value_ != null) hash ^= Value.GetHashCode();
- return hash;
- }
-
- public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
- }
-
- public void WriteTo(pb::CodedOutputStream output) {
- if (Key.Length != 0) {
- output.WriteRawTag(10);
- output.WriteString(Key);
- }
- if (value_ != null) {
- output.WriteRawTag(18);
- output.WriteMessage(Value);
- }
- }
-
- public int CalculateSize() {
- int size = 0;
- if (Key.Length != 0) {
- size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
- }
- if (value_ != null) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value);
- }
- return size;
- }
-
- public void MergeFrom(FieldsEntry other) {
- if (other == null) {
- return;
- }
- if (other.Key.Length != 0) {
- Key = other.Key;
- }
- if (other.value_ != null) {
- if (value_ == null) {
- value_ = new global::Google.Protobuf.WellKnownTypes.Value();
- }
- Value.MergeFrom(other.Value);
- }
- }
-
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while (input.ReadTag(out tag)) {
- switch(tag) {
- case 0:
- throw pb::InvalidProtocolBufferException.InvalidTag();
- default:
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- return;
- }
- break;
- case 10: {
- Key = input.ReadString();
- break;
- }
- case 18: {
- if (value_ == null) {
- value_ = new global::Google.Protobuf.WellKnownTypes.Value();
- }
- input.ReadMessage(value_);
- break;
- }
- }
- }
- }
-
- }
-
- }
- #endregion
-
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]