Commit 03d9e096 authored by Jon Skeet's avatar Jon Skeet Committed by GitHub

Merge pull request #1735 from jskeet/attribute-placement

Change placement of DebuggerNonUserCodeAttribute
parents c850ebca e9a7fc83
This diff is collapsed.
...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic; ...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic;
namespace Google.Protobuf.TestProtos { namespace Google.Protobuf.TestProtos {
/// <summary>Holder for reflection information generated from google/protobuf/unittest_import_proto3.proto</summary> /// <summary>Holder for reflection information generated from google/protobuf/unittest_import_proto3.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class UnittestImportProto3Reflection { public static partial class UnittestImportProto3Reflection {
#region Descriptor #region Descriptor
...@@ -51,29 +50,34 @@ namespace Google.Protobuf.TestProtos { ...@@ -51,29 +50,34 @@ namespace Google.Protobuf.TestProtos {
#endregion #endregion
#region Messages #region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class ImportMessage : pb::IMessage<ImportMessage> { public sealed partial class ImportMessage : pb::IMessage<ImportMessage> {
private static readonly pb::MessageParser<ImportMessage> _parser = new pb::MessageParser<ImportMessage>(() => new ImportMessage()); private static readonly pb::MessageParser<ImportMessage> _parser = new pb::MessageParser<ImportMessage>(() => new ImportMessage());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ImportMessage> Parser { get { return _parser; } } public static pb::MessageParser<ImportMessage> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor.MessageTypes[0]; } get { return global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor.MessageTypes[0]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor { pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; } get { return Descriptor; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ImportMessage() { public ImportMessage() {
OnConstruction(); OnConstruction();
} }
partial void OnConstruction(); partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ImportMessage(ImportMessage other) : this() { public ImportMessage(ImportMessage other) : this() {
d_ = other.d_; d_ = other.d_;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ImportMessage Clone() { public ImportMessage Clone() {
return new ImportMessage(this); return new ImportMessage(this);
} }
...@@ -81,6 +85,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -81,6 +85,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "d" field.</summary> /// <summary>Field number for the "d" field.</summary>
public const int DFieldNumber = 1; public const int DFieldNumber = 1;
private int d_; private int d_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int D { public int D {
get { return d_; } get { return d_; }
set { set {
...@@ -88,10 +93,12 @@ namespace Google.Protobuf.TestProtos { ...@@ -88,10 +93,12 @@ namespace Google.Protobuf.TestProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) { public override bool Equals(object other) {
return Equals(other as ImportMessage); return Equals(other as ImportMessage);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ImportMessage other) { public bool Equals(ImportMessage other) {
if (ReferenceEquals(other, null)) { if (ReferenceEquals(other, null)) {
return false; return false;
...@@ -103,16 +110,19 @@ namespace Google.Protobuf.TestProtos { ...@@ -103,16 +110,19 @@ namespace Google.Protobuf.TestProtos {
return true; return true;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (D != 0) hash ^= D.GetHashCode(); if (D != 0) hash ^= D.GetHashCode();
return hash; return hash;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() { public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this); return pb::JsonFormatter.ToDiagnosticString(this);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (D != 0) { if (D != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
...@@ -120,6 +130,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -120,6 +130,7 @@ namespace Google.Protobuf.TestProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (D != 0) { if (D != 0) {
...@@ -128,6 +139,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -128,6 +139,7 @@ namespace Google.Protobuf.TestProtos {
return size; return size;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ImportMessage other) { public void MergeFrom(ImportMessage other) {
if (other == null) { if (other == null) {
return; return;
...@@ -137,6 +149,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -137,6 +149,7 @@ namespace Google.Protobuf.TestProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) { public void MergeFrom(pb::CodedInputStream input) {
uint tag; uint tag;
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
......
...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic; ...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic;
namespace Google.Protobuf.TestProtos { namespace Google.Protobuf.TestProtos {
/// <summary>Holder for reflection information generated from google/protobuf/unittest_import_public_proto3.proto</summary> /// <summary>Holder for reflection information generated from google/protobuf/unittest_import_public_proto3.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class UnittestImportPublicProto3Reflection { public static partial class UnittestImportPublicProto3Reflection {
#region Descriptor #region Descriptor
...@@ -37,29 +36,34 @@ namespace Google.Protobuf.TestProtos { ...@@ -37,29 +36,34 @@ namespace Google.Protobuf.TestProtos {
} }
#region Messages #region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class PublicImportMessage : pb::IMessage<PublicImportMessage> { public sealed partial class PublicImportMessage : pb::IMessage<PublicImportMessage> {
private static readonly pb::MessageParser<PublicImportMessage> _parser = new pb::MessageParser<PublicImportMessage>(() => new PublicImportMessage()); private static readonly pb::MessageParser<PublicImportMessage> _parser = new pb::MessageParser<PublicImportMessage>(() => new PublicImportMessage());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<PublicImportMessage> Parser { get { return _parser; } } public static pb::MessageParser<PublicImportMessage> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3Reflection.Descriptor.MessageTypes[0]; } get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3Reflection.Descriptor.MessageTypes[0]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor { pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; } get { return Descriptor; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PublicImportMessage() { public PublicImportMessage() {
OnConstruction(); OnConstruction();
} }
partial void OnConstruction(); partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PublicImportMessage(PublicImportMessage other) : this() { public PublicImportMessage(PublicImportMessage other) : this() {
e_ = other.e_; e_ = other.e_;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PublicImportMessage Clone() { public PublicImportMessage Clone() {
return new PublicImportMessage(this); return new PublicImportMessage(this);
} }
...@@ -67,6 +71,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -67,6 +71,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "e" field.</summary> /// <summary>Field number for the "e" field.</summary>
public const int EFieldNumber = 1; public const int EFieldNumber = 1;
private int e_; private int e_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int E { public int E {
get { return e_; } get { return e_; }
set { set {
...@@ -74,10 +79,12 @@ namespace Google.Protobuf.TestProtos { ...@@ -74,10 +79,12 @@ namespace Google.Protobuf.TestProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) { public override bool Equals(object other) {
return Equals(other as PublicImportMessage); return Equals(other as PublicImportMessage);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(PublicImportMessage other) { public bool Equals(PublicImportMessage other) {
if (ReferenceEquals(other, null)) { if (ReferenceEquals(other, null)) {
return false; return false;
...@@ -89,16 +96,19 @@ namespace Google.Protobuf.TestProtos { ...@@ -89,16 +96,19 @@ namespace Google.Protobuf.TestProtos {
return true; return true;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (E != 0) hash ^= E.GetHashCode(); if (E != 0) hash ^= E.GetHashCode();
return hash; return hash;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() { public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this); return pb::JsonFormatter.ToDiagnosticString(this);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (E != 0) { if (E != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
...@@ -106,6 +116,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -106,6 +116,7 @@ namespace Google.Protobuf.TestProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (E != 0) { if (E != 0) {
...@@ -114,6 +125,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -114,6 +125,7 @@ namespace Google.Protobuf.TestProtos {
return size; return size;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(PublicImportMessage other) { public void MergeFrom(PublicImportMessage other) {
if (other == null) { if (other == null) {
return; return;
...@@ -123,6 +135,7 @@ namespace Google.Protobuf.TestProtos { ...@@ -123,6 +135,7 @@ namespace Google.Protobuf.TestProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) { public void MergeFrom(pb::CodedInputStream input) {
uint tag; uint tag;
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
......
...@@ -51,4 +51,4 @@ ...@@ -51,4 +51,4 @@
<file src="bin/ReleaseSigned/Google.Protobuf.xml" target="lib/dotnet" /> <file src="bin/ReleaseSigned/Google.Protobuf.xml" target="lib/dotnet" />
<file src="**\*.cs" target="src" /> <file src="**\*.cs" target="src" />
</files> </files>
</package> </package>
\ No newline at end of file
...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic; ...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes { namespace Google.Protobuf.WellKnownTypes {
/// <summary>Holder for reflection information generated from google/protobuf/any.proto</summary> /// <summary>Holder for reflection information generated from google/protobuf/any.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class AnyReflection { public static partial class AnyReflection {
#region Descriptor #region Descriptor
...@@ -64,6 +63,16 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -64,6 +63,16 @@ namespace Google.Protobuf.WellKnownTypes {
/// foo = any.unpack(Foo.class); /// foo = any.unpack(Foo.class);
/// } /// }
/// ///
/// Example 3: Pack and unpack a message in Python.
///
/// foo = Foo(...)
/// any = Any()
/// any.Pack(foo)
/// ...
/// if any.Is(Foo.DESCRIPTOR):
/// any.Unpack(foo)
/// ...
///
/// The pack methods provided by protobuf library will by default use /// The pack methods provided by protobuf library will by default use
/// 'type.googleapis.com/full.type.name' as the type URL and the unpack /// 'type.googleapis.com/full.type.name' as the type URL and the unpack
/// methods only use the fully qualified type name after the last '/' /// methods only use the fully qualified type name after the last '/'
...@@ -98,30 +107,35 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -98,30 +107,35 @@ namespace Google.Protobuf.WellKnownTypes {
/// "value": "1.212s" /// "value": "1.212s"
/// } /// }
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Any : pb::IMessage<Any> { public sealed partial class Any : pb::IMessage<Any> {
private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any()); private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Any> Parser { get { return _parser; } } public static pb::MessageParser<Any> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor.MessageTypes[0]; } get { return global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor.MessageTypes[0]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor { pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; } get { return Descriptor; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Any() { public Any() {
OnConstruction(); OnConstruction();
} }
partial void OnConstruction(); partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Any(Any other) : this() { public Any(Any other) : this() {
typeUrl_ = other.typeUrl_; typeUrl_ = other.typeUrl_;
value_ = other.value_; value_ = other.value_;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Any Clone() { public Any Clone() {
return new Any(this); return new Any(this);
} }
...@@ -133,10 +147,10 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -133,10 +147,10 @@ namespace Google.Protobuf.WellKnownTypes {
/// A URL/resource name whose content describes the type of the /// A URL/resource name whose content describes the type of the
/// serialized protocol buffer message. /// serialized protocol buffer message.
/// ///
/// For URLs which use the schema `http`, `https`, or no schema, the /// For URLs which use the scheme `http`, `https`, or no scheme, the
/// following restrictions and interpretations apply: /// following restrictions and interpretations apply:
/// ///
/// * If no schema is provided, `https` is assumed. /// * If no scheme is provided, `https` is assumed.
/// * The last segment of the URL's path must represent the fully /// * The last segment of the URL's path must represent the fully
/// qualified name of the type (as in `path/google.protobuf.Duration`). /// qualified name of the type (as in `path/google.protobuf.Duration`).
/// The name should be in a canonical form (e.g., leading "." is /// The name should be in a canonical form (e.g., leading "." is
...@@ -149,9 +163,10 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -149,9 +163,10 @@ namespace Google.Protobuf.WellKnownTypes {
/// on changes to types. (Use versioned type names to manage /// on changes to types. (Use versioned type names to manage
/// breaking changes.) /// breaking changes.)
/// ///
/// Schemas other than `http`, `https` (or the empty schema) might be /// Schemes other than `http`, `https` (or the empty scheme) might be
/// used with implementation specific semantics. /// used with implementation specific semantics.
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string TypeUrl { public string TypeUrl {
get { return typeUrl_; } get { return typeUrl_; }
set { set {
...@@ -165,6 +180,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -165,6 +180,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// <summary> /// <summary>
/// Must be a valid serialized protocol buffer of the above specified type. /// Must be a valid serialized protocol buffer of the above specified type.
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pb::ByteString Value { public pb::ByteString Value {
get { return value_; } get { return value_; }
set { set {
...@@ -172,10 +188,12 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -172,10 +188,12 @@ namespace Google.Protobuf.WellKnownTypes {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) { public override bool Equals(object other) {
return Equals(other as Any); return Equals(other as Any);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Any other) { public bool Equals(Any other) {
if (ReferenceEquals(other, null)) { if (ReferenceEquals(other, null)) {
return false; return false;
...@@ -188,6 +206,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -188,6 +206,7 @@ namespace Google.Protobuf.WellKnownTypes {
return true; return true;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode();
...@@ -195,10 +214,12 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -195,10 +214,12 @@ namespace Google.Protobuf.WellKnownTypes {
return hash; return hash;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() { public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this); return pb::JsonFormatter.ToDiagnosticString(this);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (TypeUrl.Length != 0) { if (TypeUrl.Length != 0) {
output.WriteRawTag(10); output.WriteRawTag(10);
...@@ -210,6 +231,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -210,6 +231,7 @@ namespace Google.Protobuf.WellKnownTypes {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (TypeUrl.Length != 0) { if (TypeUrl.Length != 0) {
...@@ -221,6 +243,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -221,6 +243,7 @@ namespace Google.Protobuf.WellKnownTypes {
return size; return size;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Any other) { public void MergeFrom(Any other) {
if (other == null) { if (other == null) {
return; return;
...@@ -233,6 +256,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -233,6 +256,7 @@ namespace Google.Protobuf.WellKnownTypes {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) { public void MergeFrom(pb::CodedInputStream input) {
uint tag; uint tag;
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
......
...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic; ...@@ -10,7 +10,6 @@ using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes { namespace Google.Protobuf.WellKnownTypes {
/// <summary>Holder for reflection information generated from google/protobuf/duration.proto</summary> /// <summary>Holder for reflection information generated from google/protobuf/duration.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class DurationReflection { public static partial class DurationReflection {
#region Descriptor #region Descriptor
...@@ -81,30 +80,35 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -81,30 +80,35 @@ namespace Google.Protobuf.WellKnownTypes {
/// end.nanos -= 1000000000; /// end.nanos -= 1000000000;
/// } /// }
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Duration : pb::IMessage<Duration> { public sealed partial class Duration : pb::IMessage<Duration> {
private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration()); private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Duration> Parser { get { return _parser; } } public static pb::MessageParser<Duration> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor.MessageTypes[0]; } get { return global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor.MessageTypes[0]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor { pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; } get { return Descriptor; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Duration() { public Duration() {
OnConstruction(); OnConstruction();
} }
partial void OnConstruction(); partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Duration(Duration other) : this() { public Duration(Duration other) : this() {
seconds_ = other.seconds_; seconds_ = other.seconds_;
nanos_ = other.nanos_; nanos_ = other.nanos_;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Duration Clone() { public Duration Clone() {
return new Duration(this); return new Duration(this);
} }
...@@ -116,6 +120,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -116,6 +120,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// Signed seconds of the span of time. Must be from -315,576,000,000 /// Signed seconds of the span of time. Must be from -315,576,000,000
/// to +315,576,000,000 inclusive. /// to +315,576,000,000 inclusive.
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Seconds { public long Seconds {
get { return seconds_; } get { return seconds_; }
set { set {
...@@ -134,6 +139,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -134,6 +139,7 @@ namespace Google.Protobuf.WellKnownTypes {
/// of the same sign as the `seconds` field. Must be from -999,999,999 /// of the same sign as the `seconds` field. Must be from -999,999,999
/// to +999,999,999 inclusive. /// to +999,999,999 inclusive.
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Nanos { public int Nanos {
get { return nanos_; } get { return nanos_; }
set { set {
...@@ -141,10 +147,12 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -141,10 +147,12 @@ namespace Google.Protobuf.WellKnownTypes {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) { public override bool Equals(object other) {
return Equals(other as Duration); return Equals(other as Duration);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Duration other) { public bool Equals(Duration other) {
if (ReferenceEquals(other, null)) { if (ReferenceEquals(other, null)) {
return false; return false;
...@@ -157,6 +165,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -157,6 +165,7 @@ namespace Google.Protobuf.WellKnownTypes {
return true; return true;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (Seconds != 0L) hash ^= Seconds.GetHashCode(); if (Seconds != 0L) hash ^= Seconds.GetHashCode();
...@@ -164,10 +173,12 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -164,10 +173,12 @@ namespace Google.Protobuf.WellKnownTypes {
return hash; return hash;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() { public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this); return pb::JsonFormatter.ToDiagnosticString(this);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (Seconds != 0L) { if (Seconds != 0L) {
output.WriteRawTag(8); output.WriteRawTag(8);
...@@ -179,6 +190,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -179,6 +190,7 @@ namespace Google.Protobuf.WellKnownTypes {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (Seconds != 0L) { if (Seconds != 0L) {
...@@ -190,6 +202,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -190,6 +202,7 @@ namespace Google.Protobuf.WellKnownTypes {
return size; return size;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Duration other) { public void MergeFrom(Duration other) {
if (other == null) { if (other == null) {
return; return;
...@@ -202,6 +215,7 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -202,6 +215,7 @@ namespace Google.Protobuf.WellKnownTypes {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) { public void MergeFrom(pb::CodedInputStream input) {
uint tag; uint tag;
while ((tag = input.ReadTag()) != 0) { while ((tag = input.ReadTag()) != 0) {
......
...@@ -60,7 +60,6 @@ EnumGenerator::~EnumGenerator() { ...@@ -60,7 +60,6 @@ EnumGenerator::~EnumGenerator() {
void EnumGenerator::Generate(io::Printer* printer) { void EnumGenerator::Generate(io::Printer* printer) {
WriteEnumDocComment(printer, descriptor_); WriteEnumDocComment(printer, descriptor_);
WriteGeneratedCodeAttributes(printer);
printer->Print("$access_level$ enum $name$ {\n", printer->Print("$access_level$ enum $name$ {\n",
"access_level", class_access_level(), "access_level", class_access_level(),
"name", descriptor_->name()); "name", descriptor_->name());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment