Commit f8281604 authored by Jan Tattermusch's avatar Jan Tattermusch

Merge pull request #594 from jskeet/csharp-wellknowntypes

Introduce C# well-known types
parents f30c3d35 62a4aa56
......@@ -42,6 +42,18 @@ $PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffers/Reflection \
src/google/protobuf/descriptor_proto_file.proto
rm src/google/protobuf/descriptor_proto_file.proto
$PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffers/WellKnownTypes \
src/google/protobuf/any.proto \
src/google/protobuf/api.proto \
src/google/protobuf/duration.proto \
src/google/protobuf/empty.proto \
src/google/protobuf/field_mask.proto \
src/google/protobuf/source_context.proto \
src/google/protobuf/struct.proto \
src/google/protobuf/timestamp.proto \
src/google/protobuf/type.proto \
src/google/protobuf/wrappers.proto
$PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffers.Test/TestProtos \
src/google/protobuf/map_unittest_proto3.proto \
src/google/protobuf/unittest_proto3.proto \
......
......@@ -63,7 +63,7 @@ namespace Google.Protobuf.Examples.AddressBook {
get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.Descriptor.MessageTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.internal__static_tutorial_Person__FieldAccessorTable; }
}
......@@ -262,7 +262,7 @@ namespace Google.Protobuf.Examples.AddressBook {
get { return global::Google.Protobuf.Examples.AddressBook.Person.Descriptor.NestedTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.internal__static_tutorial_Person_PhoneNumber__FieldAccessorTable; }
}
......@@ -413,7 +413,7 @@ namespace Google.Protobuf.Examples.AddressBook {
get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.Descriptor.MessageTypes[1]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Examples.AddressBook.Addressbook.internal__static_tutorial_AddressBook__FieldAccessorTable; }
}
......
......@@ -604,7 +604,7 @@ namespace Google.Protobuf
public void Reflection_GetValue()
{
var message = SampleMessages.CreateFullTestAllTypes();
var fields = message.Fields;
var fields = ((IReflectedMessage) message).Fields;
Assert.AreEqual(message.SingleBool, fields[TestAllTypes.SingleBoolFieldNumber].GetValue(message));
Assert.AreEqual(message.SingleBytes, fields[TestAllTypes.SingleBytesFieldNumber].GetValue(message));
Assert.AreEqual(message.SingleDouble, fields[TestAllTypes.SingleDoubleFieldNumber].GetValue(message));
......@@ -639,7 +639,8 @@ namespace Google.Protobuf
// Just a single map field, for the same reason
var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } };
var dictionary = (IDictionary)mapMessage.Fields[TestMap.MapStringStringFieldNumber].GetValue(mapMessage);
fields = ((IReflectedMessage) mapMessage).Fields;
var dictionary = (IDictionary) fields[TestMap.MapStringStringFieldNumber].GetValue(mapMessage);
Assert.AreEqual(mapMessage.MapStringString, dictionary);
Assert.AreEqual("value1", dictionary["key1"]);
}
......@@ -647,7 +648,7 @@ namespace Google.Protobuf
[Test]
public void Reflection_Clear()
{
var message = SampleMessages.CreateFullTestAllTypes();
IReflectedMessage message = SampleMessages.CreateFullTestAllTypes();
var fields = message.Fields;
fields[TestAllTypes.SingleBoolFieldNumber].Clear(message);
fields[TestAllTypes.SingleInt32FieldNumber].Clear(message);
......@@ -672,7 +673,8 @@ namespace Google.Protobuf
// Separately, maps.
var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } };
mapMessage.Fields[TestMap.MapStringStringFieldNumber].Clear(mapMessage);
fields = ((IReflectedMessage) mapMessage).Fields;
fields[TestMap.MapStringStringFieldNumber].Clear(mapMessage);
Assert.AreEqual(0, mapMessage.MapStringString.Count);
}
......@@ -680,7 +682,7 @@ namespace Google.Protobuf
public void Reflection_SetValue_SingleFields()
{
// Just a sample (primitives, messages, enums, strings, byte strings)
var message = SampleMessages.CreateFullTestAllTypes();
IReflectedMessage message = SampleMessages.CreateFullTestAllTypes();
var fields = message.Fields;
fields[TestAllTypes.SingleBoolFieldNumber].SetValue(message, false);
fields[TestAllTypes.SingleInt32FieldNumber].SetValue(message, 500);
......@@ -707,7 +709,7 @@ namespace Google.Protobuf
[Test]
public void Reflection_SetValue_SingleFields_WrongType()
{
var message = SampleMessages.CreateFullTestAllTypes();
IReflectedMessage message = SampleMessages.CreateFullTestAllTypes();
var fields = message.Fields;
Assert.Throws<InvalidCastException>(() => fields[TestAllTypes.SingleBoolFieldNumber].SetValue(message, "This isn't a bool"));
}
......@@ -715,7 +717,7 @@ namespace Google.Protobuf
[Test]
public void Reflection_SetValue_MapFields()
{
var message = new TestMap();
IReflectedMessage message = new TestMap();
var fields = message.Fields;
Assert.Throws<InvalidOperationException>(() => fields[TestMap.MapStringStringFieldNumber].SetValue(message, new Dictionary<string, string>()));
}
......@@ -723,7 +725,7 @@ namespace Google.Protobuf
[Test]
public void Reflection_SetValue_RepeatedFields()
{
var message = SampleMessages.CreateFullTestAllTypes();
IReflectedMessage message = SampleMessages.CreateFullTestAllTypes();
var fields = message.Fields;
Assert.Throws<InvalidOperationException>(() => fields[TestAllTypes.RepeatedDoubleFieldNumber].SetValue(message, new double[10]));
}
......@@ -731,7 +733,7 @@ namespace Google.Protobuf
[Test]
public void Reflection_GetValue_IncorrectType()
{
var message = SampleMessages.CreateFullTestAllTypes();
IReflectedMessage message = SampleMessages.CreateFullTestAllTypes();
Assert.Throws<InvalidCastException>(() => message.Fields[TestAllTypes.SingleBoolFieldNumber].GetValue(new TestMap()));
}
......@@ -739,7 +741,7 @@ namespace Google.Protobuf
public void Reflection_Oneof()
{
var message = new TestAllTypes();
var fields = message.Fields;
var fields = ((IReflectedMessage) message).Fields;
Assert.AreEqual(1, fields.Oneofs.Count);
var oneof = fields.Oneofs[0];
Assert.AreEqual("oneof_field", oneof.Descriptor.Name);
......
......@@ -65,7 +65,7 @@ namespace Google.Protobuf.TestProtos {
get { return global::Google.Protobuf.TestProtos.UnittestImportProto3.Descriptor.MessageTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.TestProtos.UnittestImportProto3.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
}
......
......@@ -50,7 +50,7 @@ namespace Google.Protobuf.TestProtos {
get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3.Descriptor.MessageTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3.internal__static_protobuf_unittest_import_PublicImportMessage__FieldAccessorTable; }
}
......
......@@ -102,7 +102,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307__FieldAccessorTable; }
}
......@@ -195,7 +195,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307_NestedOnce__FieldAccessorTable; }
}
......@@ -288,7 +288,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307_NestedOnce_NestedTwice__FieldAccessorTable; }
}
......@@ -390,7 +390,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[1]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable; }
}
......@@ -547,7 +547,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[2]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; }
}
......@@ -639,7 +639,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[3]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; }
}
......@@ -883,7 +883,7 @@ namespace UnitTest.Issues.TestProtos {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[4]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_ItemField__FieldAccessorTable; }
}
......
......@@ -96,6 +96,16 @@
<Compile Include="Reflection\ServiceDescriptor.cs" />
<Compile Include="Reflection\SingleFieldAccessor.cs" />
<Compile Include="ThrowHelper.cs" />
<Compile Include="WellKnownTypes\Any.cs" />
<Compile Include="WellKnownTypes\Api.cs" />
<Compile Include="WellKnownTypes\Duration.cs" />
<Compile Include="WellKnownTypes\Empty.cs" />
<Compile Include="WellKnownTypes\FieldMask.cs" />
<Compile Include="WellKnownTypes\SourceContext.cs" />
<Compile Include="WellKnownTypes\Struct.cs" />
<Compile Include="WellKnownTypes\Timestamp.cs" />
<Compile Include="WellKnownTypes\Type.cs" />
<Compile Include="WellKnownTypes\Wrappers.cs" />
<Compile Include="WireFormat.cs" />
</ItemGroup>
<ItemGroup>
......
......@@ -241,7 +241,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FileDescriptorSet__FieldAccessorTable; }
}
......@@ -352,7 +352,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[1]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FileDescriptorProto__FieldAccessorTable; }
}
......@@ -728,7 +728,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[2]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto__FieldAccessorTable; }
}
......@@ -1034,7 +1034,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable; }
}
......@@ -1180,7 +1180,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProto.Descriptor.NestedTypes[1]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ReservedRange__FieldAccessorTable; }
}
......@@ -1331,7 +1331,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[3]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable; }
}
......@@ -1706,7 +1706,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[4]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_OneofDescriptorProto__FieldAccessorTable; }
}
......@@ -1825,7 +1825,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[5]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumDescriptorProto__FieldAccessorTable; }
}
......@@ -1997,7 +1997,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[6]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumValueDescriptorProto__FieldAccessorTable; }
}
......@@ -2177,7 +2177,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[7]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_ServiceDescriptorProto__FieldAccessorTable; }
}
......@@ -2349,7 +2349,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[8]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_MethodDescriptorProto__FieldAccessorTable; }
}
......@@ -2610,7 +2610,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[9]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FileOptions__FieldAccessorTable; }
}
......@@ -3111,7 +3111,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[10]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_MessageOptions__FieldAccessorTable; }
}
......@@ -3330,7 +3330,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[11]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_FieldOptions__FieldAccessorTable; }
}
......@@ -3621,7 +3621,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[12]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumOptions__FieldAccessorTable; }
}
......@@ -3786,7 +3786,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[13]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_EnumValueOptions__FieldAccessorTable; }
}
......@@ -3924,7 +3924,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[14]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_ServiceOptions__FieldAccessorTable; }
}
......@@ -4062,7 +4062,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[15]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_MethodOptions__FieldAccessorTable; }
}
......@@ -4200,7 +4200,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[16]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_UninterpretedOption__FieldAccessorTable; }
}
......@@ -4474,7 +4474,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.UninterpretedOption.Descriptor.NestedTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_UninterpretedOption_NamePart__FieldAccessorTable; }
}
......@@ -4625,7 +4625,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.Descriptor.MessageTypes[17]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo__FieldAccessorTable; }
}
......@@ -4737,7 +4737,7 @@ namespace Google.Protobuf.Reflection {
get { return global::Google.Protobuf.Reflection.SourceCodeInfo.Descriptor.NestedTypes[0]; }
}
public pbr::FieldAccessorTable Fields {
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.Reflection.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo_Location__FieldAccessorTable; }
}
......
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/any.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Any {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_Any__FieldAccessorTable;
#endregion
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static Any() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYi",
"JgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQksKE2Nv",
"bS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAGgAQGiAgNHUEKqAh5Hb29n",
"bGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] {
});
internal__static_google_protobuf_Any__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Any), descriptor.MessageTypes[0],
new string[] { "TypeUrl", "Value", }, new string[] { });
}
#endregion
}
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Any : pb::IMessage<Any> {
private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any());
public static pb::MessageParser<Any> Parser { get { return _parser; } }
private static readonly string[] _fieldNames = new string[] { "type_url", "value" };
private static readonly uint[] _fieldTags = new uint[] { 10, 18 };
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Any.Descriptor.MessageTypes[0]; }
}
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Any.internal__static_google_protobuf_Any__FieldAccessorTable; }
}
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public Any() {
OnConstruction();
}
partial void OnConstruction();
public Any(Any other) : this() {
typeUrl_ = other.typeUrl_;
value_ = other.value_;
}
public Any Clone() {
return new Any(this);
}
public void Freeze() {
if (IsFrozen) {
return;
}
_frozen = true;
}
public const int TypeUrlFieldNumber = 1;
private string typeUrl_ = "";
public string TypeUrl {
get { return typeUrl_; }
set {
pb::Freezable.CheckMutable(this);
typeUrl_ = value ?? "";
}
}
public const int ValueFieldNumber = 2;
private pb::ByteString value_ = pb::ByteString.Empty;
public pb::ByteString Value {
get { return value_; }
set {
pb::Freezable.CheckMutable(this);
value_ = value ?? pb::ByteString.Empty;
}
}
public override bool Equals(object other) {
return Equals(other as Any);
}
public bool Equals(Any other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (TypeUrl != other.TypeUrl) return false;
if (Value != other.Value) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode();
if (Value.Length != 0) hash ^= Value.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (TypeUrl.Length != 0) {
output.WriteRawTag(10);
output.WriteString(TypeUrl);
}
if (Value.Length != 0) {
output.WriteRawTag(18);
output.WriteBytes(Value);
}
}
public int CalculateSize() {
int size = 0;
if (TypeUrl.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeUrl);
}
if (Value.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Value);
}
return size;
}
public void MergeFrom(Any other) {
if (other == null) {
return;
}
if (other.TypeUrl.Length != 0) {
TypeUrl = other.TypeUrl;
}
if (other.Value.Length != 0) {
Value = 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: {
TypeUrl = input.ReadString();
break;
}
case 18: {
Value = input.ReadBytes();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
This diff is collapsed.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/duration.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Duration {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_Duration__FieldAccessorTable;
#endregion
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static Duration() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90",
"b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIg",
"ASgFQlAKE2NvbS5nb29nbGUucHJvdG9idWZCDUR1cmF0aW9uUHJvdG9QAaAB",
"AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv",
"dG8z"));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] {
});
internal__static_google_protobuf_Duration__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Duration), descriptor.MessageTypes[0],
new string[] { "Seconds", "Nanos", }, new string[] { });
}
#endregion
}
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Duration : pb::IMessage<Duration> {
private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration());
public static pb::MessageParser<Duration> Parser { get { return _parser; } }
private static readonly string[] _fieldNames = new string[] { "nanos", "seconds" };
private static readonly uint[] _fieldTags = new uint[] { 16, 8 };
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Duration.Descriptor.MessageTypes[0]; }
}
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Duration.internal__static_google_protobuf_Duration__FieldAccessorTable; }
}
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public Duration() {
OnConstruction();
}
partial void OnConstruction();
public Duration(Duration other) : this() {
seconds_ = other.seconds_;
nanos_ = other.nanos_;
}
public Duration Clone() {
return new Duration(this);
}
public void Freeze() {
if (IsFrozen) {
return;
}
_frozen = true;
}
public const int SecondsFieldNumber = 1;
private long seconds_;
public long Seconds {
get { return seconds_; }
set {
pb::Freezable.CheckMutable(this);
seconds_ = value;
}
}
public const int NanosFieldNumber = 2;
private int nanos_;
public int Nanos {
get { return nanos_; }
set {
pb::Freezable.CheckMutable(this);
nanos_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as Duration);
}
public bool Equals(Duration other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Seconds != other.Seconds) return false;
if (Nanos != other.Nanos) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Seconds != 0L) hash ^= Seconds.GetHashCode();
if (Nanos != 0) hash ^= Nanos.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Seconds != 0L) {
output.WriteRawTag(8);
output.WriteInt64(Seconds);
}
if (Nanos != 0) {
output.WriteRawTag(16);
output.WriteInt32(Nanos);
}
}
public int CalculateSize() {
int size = 0;
if (Seconds != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds);
}
if (Nanos != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos);
}
return size;
}
public void MergeFrom(Duration other) {
if (other == null) {
return;
}
if (other.Seconds != 0L) {
Seconds = other.Seconds;
}
if (other.Nanos != 0) {
Nanos = other.Nanos;
}
}
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 8: {
Seconds = input.ReadInt64();
break;
}
case 16: {
Nanos = input.ReadInt32();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Empty {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_Empty__FieldAccessorTable;
#endregion
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static Empty() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Chtnb29nbGUvcHJvdG9idWYvZW1wdHkucHJvdG8SD2dvb2dsZS5wcm90b2J1",
"ZiIHCgVFbXB0eUJKChNjb20uZ29vZ2xlLnByb3RvYnVmQgpFbXB0eVByb3Rv",
"UAGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnBy",
"b3RvMw=="));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] {
});
internal__static_google_protobuf_Empty__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Empty), descriptor.MessageTypes[0],
new string[] { }, new string[] { });
}
#endregion
}
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Empty : pb::IMessage<Empty> {
private static readonly pb::MessageParser<Empty> _parser = new pb::MessageParser<Empty>(() => new Empty());
public static pb::MessageParser<Empty> Parser { get { return _parser; } }
private static readonly string[] _fieldNames = new string[] { };
private static readonly uint[] _fieldTags = new uint[] { };
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Empty.Descriptor.MessageTypes[0]; }
}
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Empty.internal__static_google_protobuf_Empty__FieldAccessorTable; }
}
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public Empty() {
OnConstruction();
}
partial void OnConstruction();
public Empty(Empty other) : this() {
}
public Empty Clone() {
return new Empty(this);
}
public void Freeze() {
if (IsFrozen) {
return;
}
_frozen = true;
}
public override bool Equals(object other) {
return Equals(other as Empty);
}
public bool Equals(Empty other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return true;
}
public override int GetHashCode() {
int hash = 1;
return hash;
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
}
public void WriteTo(pb::CodedOutputStream output) {
}
public int CalculateSize() {
int size = 0;
return size;
}
public void MergeFrom(Empty other) {
if (other == null) {
return;
}
}
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;
}
}
}
}
#endregion
}
#endregion Designer generated code
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/field_mask.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class FieldMask {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_FieldMask__FieldAccessorTable;
#endregion
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static FieldMask() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnBy",
"b3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUJOChNjb20uZ29v",
"Z2xlLnByb3RvYnVmQg5GaWVsZE1hc2tQcm90b1ABogIDR1BCqgIeR29vZ2xl",
"LlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] {
});
internal__static_google_protobuf_FieldMask__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.FieldMask), descriptor.MessageTypes[0],
new string[] { "Paths", }, new string[] { });
}
#endregion
}
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class FieldMask : pb::IMessage<FieldMask> {
private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask());
public static pb::MessageParser<FieldMask> Parser { get { return _parser; } }
private static readonly string[] _fieldNames = new string[] { "paths" };
private static readonly uint[] _fieldTags = new uint[] { 10 };
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.Proto.FieldMask.Descriptor.MessageTypes[0]; }
}
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.WellKnownTypes.Proto.FieldMask.internal__static_google_protobuf_FieldMask__FieldAccessorTable; }
}
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public FieldMask() {
OnConstruction();
}
partial void OnConstruction();
public FieldMask(FieldMask other) : this() {
paths_ = other.paths_.Clone();
}
public FieldMask Clone() {
return new FieldMask(this);
}
public void Freeze() {
if (IsFrozen) {
return;
}
_frozen = true;
paths_.Freeze();
}
public const int PathsFieldNumber = 1;
private static readonly pb::FieldCodec<string> _repeated_paths_codec
= pb::FieldCodec.ForString(10);
private readonly pbc::RepeatedField<string> paths_ = new pbc::RepeatedField<string>();
public pbc::RepeatedField<string> Paths {
get { return paths_; }
}
public override bool Equals(object other) {
return Equals(other as FieldMask);
}
public bool Equals(FieldMask other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!paths_.Equals(other.paths_)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
hash ^= paths_.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
}
public void WriteTo(pb::CodedOutputStream output) {
paths_.WriteTo(output, _repeated_paths_codec);
}
public int CalculateSize() {
int size = 0;
size += paths_.CalculateSize(_repeated_paths_codec);
return size;
}
public void MergeFrom(FieldMask other) {
if (other == null) {
return;
}
paths_.Add(other.paths_);
}
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: {
paths_.AddEntriesFrom(input, _repeated_paths_codec);
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/source_context.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class SourceContext {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_SourceContext__FieldAccessorTable;
#endregion
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static SourceContext() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2ds",
"ZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEo",
"CUJSChNjb20uZ29vZ2xlLnByb3RvYnVmQhJTb3VyY2VDb250ZXh0UHJvdG9Q",
"AaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IGcHJv",
"dG8z"));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] {
});
internal__static_google_protobuf_SourceContext__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.SourceContext), descriptor.MessageTypes[0],
new string[] { "FileName", }, new string[] { });
}
#endregion
}
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class SourceContext : pb::IMessage<SourceContext> {
private static readonly pb::MessageParser<SourceContext> _parser = new pb::MessageParser<SourceContext>(() => new SourceContext());
public static pb::MessageParser<SourceContext> Parser { get { return _parser; } }
private static readonly string[] _fieldNames = new string[] { "file_name" };
private static readonly uint[] _fieldTags = new uint[] { 10 };
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.Descriptor.MessageTypes[0]; }
}
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.WellKnownTypes.Proto.SourceContext.internal__static_google_protobuf_SourceContext__FieldAccessorTable; }
}
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public SourceContext() {
OnConstruction();
}
partial void OnConstruction();
public SourceContext(SourceContext other) : this() {
fileName_ = other.fileName_;
}
public SourceContext Clone() {
return new SourceContext(this);
}
public void Freeze() {
if (IsFrozen) {
return;
}
_frozen = true;
}
public const int FileNameFieldNumber = 1;
private string fileName_ = "";
public string FileName {
get { return fileName_; }
set {
pb::Freezable.CheckMutable(this);
fileName_ = value ?? "";
}
}
public override bool Equals(object other) {
return Equals(other as SourceContext);
}
public bool Equals(SourceContext other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (FileName != other.FileName) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (FileName.Length != 0) hash ^= FileName.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (FileName.Length != 0) {
output.WriteRawTag(10);
output.WriteString(FileName);
}
}
public int CalculateSize() {
int size = 0;
if (FileName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName);
}
return size;
}
public void MergeFrom(SourceContext other) {
if (other == null) {
return;
}
if (other.FileName.Length != 0) {
FileName = other.FileName;
}
}
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: {
FileName = input.ReadString();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
This diff is collapsed.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/timestamp.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Timestamp {
#region Static variables
internal static pbr::FieldAccessorTable internal__static_google_protobuf_Timestamp__FieldAccessorTable;
#endregion
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static Timestamp() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJv",
"dG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MY",
"AiABKAVCUQoTY29tLmdvb2dsZS5wcm90b2J1ZkIOVGltZXN0YW1wUHJvdG9Q",
"AaABAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IG",
"cHJvdG8z"));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] {
});
internal__static_google_protobuf_Timestamp__FieldAccessorTable =
new pbr::FieldAccessorTable(typeof(global::Google.Protobuf.WellKnownTypes.Timestamp), descriptor.MessageTypes[0],
new string[] { "Seconds", "Nanos", }, new string[] { });
}
#endregion
}
}
#region Messages
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Timestamp : pb::IMessage<Timestamp> {
private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp());
public static pb::MessageParser<Timestamp> Parser { get { return _parser; } }
private static readonly string[] _fieldNames = new string[] { "nanos", "seconds" };
private static readonly uint[] _fieldTags = new uint[] { 16, 8 };
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.Descriptor.MessageTypes[0]; }
}
pbr::FieldAccessorTable pb::IReflectedMessage.Fields {
get { return global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.internal__static_google_protobuf_Timestamp__FieldAccessorTable; }
}
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public Timestamp() {
OnConstruction();
}
partial void OnConstruction();
public Timestamp(Timestamp other) : this() {
seconds_ = other.seconds_;
nanos_ = other.nanos_;
}
public Timestamp Clone() {
return new Timestamp(this);
}
public void Freeze() {
if (IsFrozen) {
return;
}
_frozen = true;
}
public const int SecondsFieldNumber = 1;
private long seconds_;
public long Seconds {
get { return seconds_; }
set {
pb::Freezable.CheckMutable(this);
seconds_ = value;
}
}
public const int NanosFieldNumber = 2;
private int nanos_;
public int Nanos {
get { return nanos_; }
set {
pb::Freezable.CheckMutable(this);
nanos_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as Timestamp);
}
public bool Equals(Timestamp other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Seconds != other.Seconds) return false;
if (Nanos != other.Nanos) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Seconds != 0L) hash ^= Seconds.GetHashCode();
if (Nanos != 0) hash ^= Nanos.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Seconds != 0L) {
output.WriteRawTag(8);
output.WriteInt64(Seconds);
}
if (Nanos != 0) {
output.WriteRawTag(16);
output.WriteInt32(Nanos);
}
}
public int CalculateSize() {
int size = 0;
if (Seconds != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds);
}
if (Nanos != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos);
}
return size;
}
public void MergeFrom(Timestamp other) {
if (other == null) {
return;
}
if (other.Seconds != 0L) {
Seconds = other.Seconds;
}
if (other.Nanos != 0) {
Nanos = other.Nanos;
}
}
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 8: {
Seconds = input.ReadInt64();
break;
}
case 16: {
Nanos = input.ReadInt32();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
This diff is collapsed.
This diff is collapsed.
......@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "AnyProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -37,6 +37,7 @@ import "google/protobuf/type.proto";
option java_multiple_files = true;
option java_outer_classname = "ApiProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -215,7 +215,7 @@ void MessageGenerator::Generate(io::Printer* printer) {
" get { return $descriptor_accessor$; }\n"
"}\n"
"\n"
"public pbr::FieldAccessorTable Fields {\n"
"pbr::FieldAccessorTable pb::IReflectedMessage.Fields {\n"
" get { return $umbrella_class_name$.internal__$identifier$__FieldAccessorTable; }\n"
"}\n"
"\n"
......
......@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "DurationProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
// A Duration represents a signed, fixed-length span of time represented
......
......@@ -34,6 +34,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "EmptyProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -34,7 +34,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "FieldMaskProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -34,6 +34,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "SourceContextProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "StructProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "TimestampProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -37,6 +37,7 @@ import "google/protobuf/source_context.proto";
option java_multiple_files = true;
option java_outer_classname = "TypeProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
......@@ -40,7 +40,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "WrappersProto";
option java_package = "com.google.protobuf";
option csharp_namespace = "Google.Protobuf";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
......
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