Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: google/protobuf/source_context.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.WellKnownTypes { |
| 11 | |
| 12 | namespace Proto { |
| 13 | |
| 14 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 15 | public static partial class SourceContext { |
| 16 | |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 17 | #region Descriptor |
| 18 | public static pbr::FileDescriptor Descriptor { |
| 19 | get { return descriptor; } |
| 20 | } |
| 21 | private static pbr::FileDescriptor descriptor; |
| 22 | |
| 23 | static SourceContext() { |
| 24 | byte[] descriptorData = global::System.Convert.FromBase64String( |
| 25 | string.Concat( |
| 26 | "CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2ds", |
| 27 | "ZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEo", |
| 28 | "CUJSChNjb20uZ29vZ2xlLnByb3RvYnVmQhJTb3VyY2VDb250ZXh0UHJvdG9Q", |
| 29 | "AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv", |
Jon Skeet | 47bf49b | 2015-07-22 11:39:38 +0100 | [diff] [blame] | 30 | "dG8z")); |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 31 | descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 32 | new pbr::FileDescriptor[] { }, |
Jon Skeet | 47bf49b | 2015-07-22 11:39:38 +0100 | [diff] [blame] | 33 | new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { |
| 34 | new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.SourceContext), new[]{ "FileName" }, null, null, null) |
| 35 | })); |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 36 | } |
| 37 | #endregion |
| 38 | |
| 39 | } |
| 40 | } |
| 41 | #region Messages |
| 42 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 43 | public sealed partial class SourceContext : pb::IMessage<SourceContext> { |
| 44 | private static readonly pb::MessageParser<SourceContext> _parser = new pb::MessageParser<SourceContext>(() => new SourceContext()); |
| 45 | public static pb::MessageParser<SourceContext> Parser { get { return _parser; } } |
| 46 | |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 47 | public static pbr::MessageDescriptor Descriptor { |
| 48 | get { return global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor.MessageTypes[0]; } |
| 49 | } |
| 50 | |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 51 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 52 | get { return Descriptor; } |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 53 | } |
| 54 | |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 55 | public SourceContext() { |
| 56 | OnConstruction(); |
| 57 | } |
| 58 | |
| 59 | partial void OnConstruction(); |
| 60 | |
| 61 | public SourceContext(SourceContext other) : this() { |
| 62 | fileName_ = other.fileName_; |
| 63 | } |
| 64 | |
| 65 | public SourceContext Clone() { |
| 66 | return new SourceContext(this); |
| 67 | } |
| 68 | |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 69 | public const int FileNameFieldNumber = 1; |
| 70 | private string fileName_ = ""; |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 71 | public string FileName { |
| 72 | get { return fileName_; } |
| 73 | set { |
Jon Skeet | d18cc08 | 2015-07-30 13:50:02 +0100 | [diff] [blame] | 74 | fileName_ = pb::Preconditions.CheckNotNull(value, "value"); |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 75 | } |
| 76 | } |
| 77 | |
| 78 | public override bool Equals(object other) { |
| 79 | return Equals(other as SourceContext); |
| 80 | } |
| 81 | |
| 82 | public bool Equals(SourceContext other) { |
| 83 | if (ReferenceEquals(other, null)) { |
| 84 | return false; |
| 85 | } |
| 86 | if (ReferenceEquals(other, this)) { |
| 87 | return true; |
| 88 | } |
| 89 | if (FileName != other.FileName) return false; |
| 90 | return true; |
| 91 | } |
| 92 | |
| 93 | public override int GetHashCode() { |
| 94 | int hash = 1; |
| 95 | if (FileName.Length != 0) hash ^= FileName.GetHashCode(); |
| 96 | return hash; |
| 97 | } |
| 98 | |
| 99 | public override string ToString() { |
| 100 | return pb::JsonFormatter.Default.Format(this); |
| 101 | } |
| 102 | |
| 103 | public void WriteTo(pb::CodedOutputStream output) { |
| 104 | if (FileName.Length != 0) { |
| 105 | output.WriteRawTag(10); |
| 106 | output.WriteString(FileName); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | public int CalculateSize() { |
| 111 | int size = 0; |
| 112 | if (FileName.Length != 0) { |
| 113 | size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); |
| 114 | } |
| 115 | return size; |
| 116 | } |
| 117 | |
| 118 | public void MergeFrom(SourceContext other) { |
| 119 | if (other == null) { |
| 120 | return; |
| 121 | } |
| 122 | if (other.FileName.Length != 0) { |
| 123 | FileName = other.FileName; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | public void MergeFrom(pb::CodedInputStream input) { |
| 128 | uint tag; |
Jon Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 129 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 130 | switch(tag) { |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 131 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame^] | 132 | input.SkipLastField(); |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 133 | break; |
| 134 | case 10: { |
| 135 | FileName = input.ReadString(); |
| 136 | break; |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | } |
| 143 | |
| 144 | #endregion |
| 145 | |
| 146 | } |
| 147 | |
| 148 | #endregion Designer generated code |