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