| OLD | NEW |
| (Empty) |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! | |
| 2 // source: google/protobuf/unittest_import_proto3.proto | |
| 3 #pragma warning disable 1591, 0612, 3021 | |
| 4 #region Designer generated code | |
| 5 | |
| 6 using pb = global::Google.Protobuf; | |
| 7 using pbc = global::Google.Protobuf.Collections; | |
| 8 using pbr = global::Google.Protobuf.Reflection; | |
| 9 using scg = global::System.Collections.Generic; | |
| 10 namespace Google.Protobuf.TestProtos { | |
| 11 | |
| 12 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 13 public static partial class UnittestImportProto3 { | |
| 14 | |
| 15 #region Descriptor | |
| 16 public static pbr::FileDescriptor Descriptor { | |
| 17 get { return descriptor; } | |
| 18 } | |
| 19 private static pbr::FileDescriptor descriptor; | |
| 20 | |
| 21 static UnittestImportProto3() { | |
| 22 byte[] descriptorData = global::System.Convert.FromBase64String( | |
| 23 string.Concat( | |
| 24 "Cixnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0X3Byb3RvMy5wcm90", | |
| 25 "bxIYcHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0GjNnb29nbGUvcHJvdG9idWYv", | |
| 26 "dW5pdHRlc3RfaW1wb3J0X3B1YmxpY19wcm90bzMucHJvdG8iGgoNSW1wb3J0", | |
| 27 "TWVzc2FnZRIJCgFkGAEgASgFKlkKCkltcG9ydEVudW0SGwoXSU1QT1JUX0VO", | |
| 28 "VU1fVU5TUEVDSUZJRUQQABIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JB", | |
| 29 "UhAIEg4KCklNUE9SVF9CQVoQCUI8Chhjb20uZ29vZ2xlLnByb3RvYnVmLnRl", | |
| 30 "c3RIAfgBAaoCGkdvb2dsZS5Qcm90b2J1Zi5UZXN0UHJvdG9zUABiBnByb3Rv", | |
| 31 "Mw==")); | |
| 32 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptor
Data, | |
| 33 new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.Unittes
tImportPublicProto3.Descriptor, }, | |
| 34 new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.TestP
rotos.ImportEnum), }, new pbr::GeneratedCodeInfo[] { | |
| 35 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.ImportMessage), new[]{ "D" }, null, null, null) | |
| 36 })); | |
| 37 } | |
| 38 #endregion | |
| 39 | |
| 40 } | |
| 41 #region Enums | |
| 42 public enum ImportEnum { | |
| 43 IMPORT_ENUM_UNSPECIFIED = 0, | |
| 44 IMPORT_FOO = 7, | |
| 45 IMPORT_BAR = 8, | |
| 46 IMPORT_BAZ = 9, | |
| 47 } | |
| 48 | |
| 49 #endregion | |
| 50 | |
| 51 #region Messages | |
| 52 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 53 public sealed partial class ImportMessage : pb::IMessage<ImportMessage> { | |
| 54 private static readonly pb::MessageParser<ImportMessage> _parser = new pb::M
essageParser<ImportMessage>(() => new ImportMessage()); | |
| 55 public static pb::MessageParser<ImportMessage> Parser { get { return _parser
; } } | |
| 56 | |
| 57 public static pbr::MessageDescriptor Descriptor { | |
| 58 get { return global::Google.Protobuf.TestProtos.UnittestImportProto3.Descr
iptor.MessageTypes[0]; } | |
| 59 } | |
| 60 | |
| 61 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 62 get { return Descriptor; } | |
| 63 } | |
| 64 | |
| 65 public ImportMessage() { | |
| 66 OnConstruction(); | |
| 67 } | |
| 68 | |
| 69 partial void OnConstruction(); | |
| 70 | |
| 71 public ImportMessage(ImportMessage other) : this() { | |
| 72 d_ = other.d_; | |
| 73 } | |
| 74 | |
| 75 public ImportMessage Clone() { | |
| 76 return new ImportMessage(this); | |
| 77 } | |
| 78 | |
| 79 public const int DFieldNumber = 1; | |
| 80 private int d_; | |
| 81 public int D { | |
| 82 get { return d_; } | |
| 83 set { | |
| 84 d_ = value; | |
| 85 } | |
| 86 } | |
| 87 | |
| 88 public override bool Equals(object other) { | |
| 89 return Equals(other as ImportMessage); | |
| 90 } | |
| 91 | |
| 92 public bool Equals(ImportMessage other) { | |
| 93 if (ReferenceEquals(other, null)) { | |
| 94 return false; | |
| 95 } | |
| 96 if (ReferenceEquals(other, this)) { | |
| 97 return true; | |
| 98 } | |
| 99 if (D != other.D) return false; | |
| 100 return true; | |
| 101 } | |
| 102 | |
| 103 public override int GetHashCode() { | |
| 104 int hash = 1; | |
| 105 if (D != 0) hash ^= D.GetHashCode(); | |
| 106 return hash; | |
| 107 } | |
| 108 | |
| 109 public override string ToString() { | |
| 110 return pb::JsonFormatter.Default.Format(this); | |
| 111 } | |
| 112 | |
| 113 public void WriteTo(pb::CodedOutputStream output) { | |
| 114 if (D != 0) { | |
| 115 output.WriteRawTag(8); | |
| 116 output.WriteInt32(D); | |
| 117 } | |
| 118 } | |
| 119 | |
| 120 public int CalculateSize() { | |
| 121 int size = 0; | |
| 122 if (D != 0) { | |
| 123 size += 1 + pb::CodedOutputStream.ComputeInt32Size(D); | |
| 124 } | |
| 125 return size; | |
| 126 } | |
| 127 | |
| 128 public void MergeFrom(ImportMessage other) { | |
| 129 if (other == null) { | |
| 130 return; | |
| 131 } | |
| 132 if (other.D != 0) { | |
| 133 D = other.D; | |
| 134 } | |
| 135 } | |
| 136 | |
| 137 public void MergeFrom(pb::CodedInputStream input) { | |
| 138 uint tag; | |
| 139 while ((tag = input.ReadTag()) != 0) { | |
| 140 switch(tag) { | |
| 141 default: | |
| 142 input.SkipLastField(); | |
| 143 break; | |
| 144 case 8: { | |
| 145 D = input.ReadInt32(); | |
| 146 break; | |
| 147 } | |
| 148 } | |
| 149 } | |
| 150 } | |
| 151 | |
| 152 } | |
| 153 | |
| 154 #endregion | |
| 155 | |
| 156 } | |
| 157 | |
| 158 #endregion Designer generated code | |
| OLD | NEW |