Commit 367fd277 authored by Sydney Acksman's avatar Sydney Acksman

Rename files and revert changes to generate protos script

parent 34f94971
...@@ -65,12 +65,12 @@ csharp_EXTRA_DIST= \ ...@@ -65,12 +65,12 @@ csharp_EXTRA_DIST= \
csharp/keys/Google.Protobuf.snk \ csharp/keys/Google.Protobuf.snk \
csharp/keys/README.md \ csharp/keys/README.md \
csharp/protos/README.md \ csharp/protos/README.md \
csharp/protos/extensions/extensions_a.proto \
csharp/protos/extensions/extensions_b.proto \
csharp/protos/extensions/extensions_c.proto \
csharp/protos/map_unittest_proto3.proto \ csharp/protos/map_unittest_proto3.proto \
csharp/protos/old_extensions1.proto \ csharp/protos/old_extensions1.proto \
csharp/protos/old_extensions2.proto \ csharp/protos/old_extensions2.proto \
csharp/protos/unittest_issue6936_a.proto \
csharp/protos/unittest_issue6936_b.proto \
csharp/protos/unittest_issue6936_c.proto \
csharp/protos/unittest_custom_options_proto3.proto \ csharp/protos/unittest_custom_options_proto3.proto \
csharp/protos/unittest_import_public_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \
csharp/protos/unittest_import_public.proto \ csharp/protos/unittest_import_public.proto \
...@@ -131,9 +131,9 @@ csharp_EXTRA_DIST= \ ...@@ -131,9 +131,9 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/SampleNaNs.cs \ csharp/src/Google.Protobuf.Test/SampleNaNs.cs \
csharp/src/Google.Protobuf.Test/TestCornerCases.cs \ csharp/src/Google.Protobuf.Test/TestCornerCases.cs \
csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \ csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \
csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsA.cs \ csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs \
csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsB.cs \ csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs \
csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsC.cs \ csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs \
csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \ csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \
csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \ csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \
csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \ csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \
......
...@@ -49,21 +49,21 @@ $PROTOC -Isrc -Icsharp/protos \ ...@@ -49,21 +49,21 @@ $PROTOC -Isrc -Icsharp/protos \
--descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \ --descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \
--include_source_info \ --include_source_info \
--include_imports \ --include_imports \
map_unittest_proto3.proto \ csharp/protos/map_unittest_proto3.proto \
unittest_issues.proto \ csharp/protos/unittest_issues.proto \
unittest_custom_options_proto3.proto \ csharp/protos/unittest_custom_options_proto3.proto \
unittest_proto3.proto \ csharp/protos/unittest_proto3.proto \
unittest_import_proto3.proto \ csharp/protos/unittest_import_proto3.proto \
unittest_import_public_proto3.proto \ csharp/protos/unittest_import_public_proto3.proto \
unittest.proto \ csharp/protos/unittest.proto \
unittest_import.proto \ csharp/protos/unittest_import.proto \
unittest_import_public.proto \ csharp/protos/unittest_import_public.proto \
extensions_issue6936_a.proto \ csharp/protos/unittest_issue6936_a.proto \
extensions_issue6936_b.proto \ csharp/protos/unittest_issue6936_b.proto \
extensions_issue6936_c.proto \ csharp/protos/unittest_issue6936_c.proto \
google/protobuf/unittest_well_known_types.proto \ src/google/protobuf/unittest_well_known_types.proto \
google/protobuf/test_messages_proto3.proto \ src/google/protobuf/test_messages_proto3.proto \
google/protobuf/test_messages_proto2.proto src/google/protobuf/test_messages_proto2.proto
# AddressBook sample protos # AddressBook sample protos
$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \ $PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \
......
syntax = "proto3"; syntax = "proto3";
import "extensions_issue6936_a.proto"; import "unittest_issue6936_a.proto";
package unittest_issues; package unittest_issues;
option csharp_namespace = "UnitTest.Issues.TestProtos"; option csharp_namespace = "UnitTest.Issues.TestProtos";
// This file is used as part of a unit test for issue 6936 // This file is used as part of a unit test for issue 6936
// We don't need to use it, we just have to import it in "extensions_issue6936_c.proto" // We don't need to use it, we just have to import it in "unittest_issue6936_c.proto"
message Foo { message Foo {
option (opt) = "foo"; option (opt) = "foo";
......
syntax = "proto3"; syntax = "proto3";
import "extensions_issue6936_a.proto"; import "unittest_issue6936_a.proto";
import "extensions_issue6936_b.proto"; import "unittest_issue6936_b.proto";
package unittest_issues; package unittest_issues;
......
// <auto-generated> // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions_issue6936_a.proto // source: unittest_issue6936_a.proto
// </auto-generated> // </auto-generated>
#pragma warning disable 1591, 0612, 3021 #pragma warning disable 1591, 0612, 3021
#region Designer generated code #region Designer generated code
...@@ -11,32 +11,32 @@ using pbr = global::Google.Protobuf.Reflection; ...@@ -11,32 +11,32 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos { namespace UnitTest.Issues.TestProtos {
/// <summary>Holder for reflection information generated from extensions_issue6936_a.proto</summary> /// <summary>Holder for reflection information generated from unittest_issue6936_a.proto</summary>
public static partial class ExtensionsIssue6936AReflection { public static partial class UnittestIssue6936AReflection {
#region Descriptor #region Descriptor
/// <summary>File descriptor for extensions_issue6936_a.proto</summary> /// <summary>File descriptor for unittest_issue6936_a.proto</summary>
public static pbr::FileDescriptor Descriptor { public static pbr::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbr::FileDescriptor descriptor; private static pbr::FileDescriptor descriptor;
static ExtensionsIssue6936AReflection() { static UnittestIssue6936AReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"ChxleHRlbnNpb25zX2lzc3VlNjkzNl9hLnByb3RvEg91bml0dGVzdF9pc3N1", "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
"ZXMaIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnByb3RvOi4KA29wdBIf", "GiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bzouCgNvcHQSHy5n",
"Lmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjQhgMgASgJQh2qAhpV", "b29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY0IYDIAEoCUIdqgIaVW5p",
"bml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z")); "dFRlc3QuSXNzdWVzLlRlc3RQcm90b3NiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, }, new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { ExtensionsIssue6936AExtensions.Opt }, null)); new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { UnittestIssue6936AExtensions.Opt }, null));
} }
#endregion #endregion
} }
/// <summary>Holder for extension identifiers generated from the top level of extensions_issue6936_a.proto</summary> /// <summary>Holder for extension identifiers generated from the top level of unittest_issue6936_a.proto</summary>
public static partial class ExtensionsIssue6936AExtensions { public static partial class UnittestIssue6936AExtensions {
public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string> Opt = public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string> Opt =
new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string>(50000, pb::FieldCodec.ForString(400002, "")); new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string>(50000, pb::FieldCodec.ForString(400002, ""));
} }
......
// <auto-generated> // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions_issue6936_b.proto // source: unittest_issue6936_b.proto
// </auto-generated> // </auto-generated>
#pragma warning disable 1591, 0612, 3021 #pragma warning disable 1591, 0612, 3021
#region Designer generated code #region Designer generated code
...@@ -11,24 +11,24 @@ using pbr = global::Google.Protobuf.Reflection; ...@@ -11,24 +11,24 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos { namespace UnitTest.Issues.TestProtos {
/// <summary>Holder for reflection information generated from extensions_issue6936_b.proto</summary> /// <summary>Holder for reflection information generated from unittest_issue6936_b.proto</summary>
public static partial class ExtensionsIssue6936BReflection { public static partial class UnittestIssue6936BReflection {
#region Descriptor #region Descriptor
/// <summary>File descriptor for extensions_issue6936_b.proto</summary> /// <summary>File descriptor for unittest_issue6936_b.proto</summary>
public static pbr::FileDescriptor Descriptor { public static pbr::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbr::FileDescriptor descriptor; private static pbr::FileDescriptor descriptor;
static ExtensionsIssue6936BReflection() { static UnittestIssue6936BReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"ChxleHRlbnNpb25zX2lzc3VlNjkzNl9iLnByb3RvEg91bml0dGVzdF9pc3N1", "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYi5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
"ZXMaHGV4dGVuc2lvbnNfaXNzdWU2OTM2X2EucHJvdG8iDgoDRm9vOgeCtRgD", "Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90byIOCgNGb286B4K1GANmb29C",
"Zm9vQh2qAhpVbml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z")); "HaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.ExtensionsIssue6936AReflection.Descriptor, }, new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Foo), global::UnitTest.Issues.TestProtos.Foo.Parser, null, null, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Foo), global::UnitTest.Issues.TestProtos.Foo.Parser, null, null, null, null, null)
})); }));
...@@ -45,7 +45,7 @@ namespace UnitTest.Issues.TestProtos { ...@@ -45,7 +45,7 @@ namespace UnitTest.Issues.TestProtos {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::UnitTest.Issues.TestProtos.ExtensionsIssue6936BReflection.Descriptor.MessageTypes[0]; } get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor.MessageTypes[0]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
......
// <auto-generated> // <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT! // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions_issue6936_c.proto // source: unittest_issue6936_c.proto
// </auto-generated> // </auto-generated>
#pragma warning disable 1591, 0612, 3021 #pragma warning disable 1591, 0612, 3021
#region Designer generated code #region Designer generated code
...@@ -11,26 +11,26 @@ using pbr = global::Google.Protobuf.Reflection; ...@@ -11,26 +11,26 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos { namespace UnitTest.Issues.TestProtos {
/// <summary>Holder for reflection information generated from extensions_issue6936_c.proto</summary> /// <summary>Holder for reflection information generated from unittest_issue6936_c.proto</summary>
public static partial class ExtensionsIssue6936CReflection { public static partial class UnittestIssue6936CReflection {
#region Descriptor #region Descriptor
/// <summary>File descriptor for extensions_issue6936_c.proto</summary> /// <summary>File descriptor for unittest_issue6936_c.proto</summary>
public static pbr::FileDescriptor Descriptor { public static pbr::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbr::FileDescriptor descriptor; private static pbr::FileDescriptor descriptor;
static ExtensionsIssue6936CReflection() { static UnittestIssue6936CReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat( string.Concat(
"ChxleHRlbnNpb25zX2lzc3VlNjkzNl9jLnByb3RvEg91bml0dGVzdF9pc3N1", "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYy5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
"ZXMaHGV4dGVuc2lvbnNfaXNzdWU2OTM2X2EucHJvdG8aHGV4dGVuc2lvbnNf", "Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxoadW5pdHRlc3RfaXNzdWU2",
"aXNzdWU2OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0", "OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0ZXN0X2lz",
"ZXN0X2lzc3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5U", "c3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJv",
"ZXN0UHJvdG9zYgZwcm90bzM=")); "dG9zYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.ExtensionsIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.ExtensionsIssue6936BReflection.Descriptor, }, new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Bar), global::UnitTest.Issues.TestProtos.Bar.Parser, new[]{ "Foo" }, null, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Bar), global::UnitTest.Issues.TestProtos.Bar.Parser, new[]{ "Foo" }, null, null, null, null)
})); }));
...@@ -47,7 +47,7 @@ namespace UnitTest.Issues.TestProtos { ...@@ -47,7 +47,7 @@ namespace UnitTest.Issues.TestProtos {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::UnitTest.Issues.TestProtos.ExtensionsIssue6936CReflection.Descriptor.MessageTypes[0]; } get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936CReflection.Descriptor.MessageTypes[0]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
......
...@@ -196,11 +196,11 @@ namespace Google.Protobuf.Test.Reflection ...@@ -196,11 +196,11 @@ namespace Google.Protobuf.Test.Reflection
[Test] [Test]
public void MultipleImportOfSameFileWithExtension() public void MultipleImportOfSameFileWithExtension()
{ {
var descriptor = ExtensionsIssue6936CReflection.Descriptor; var descriptor = UnittestIssue6936CReflection.Descriptor;
var foo = Foo.Descriptor; var foo = Foo.Descriptor;
var bar = Bar.Descriptor; var bar = Bar.Descriptor;
AssertOption("foo", foo.CustomOptions.TryGetString, ExtensionsIssue6936AExtensions.Opt, foo.GetOption); AssertOption("foo", foo.CustomOptions.TryGetString, UnittestIssue6936AExtensions.Opt, foo.GetOption);
AssertOption("bar", bar.CustomOptions.TryGetString, ExtensionsIssue6936AExtensions.Opt, bar.GetOption); AssertOption("bar", bar.CustomOptions.TryGetString, UnittestIssue6936AExtensions.Opt, bar.GetOption);
} }
private void AssertOption<T, D>(T expected, OptionFetcher<T> fetcher, Extension<D, T> extension, Func<Extension<D, T>, T> descriptorOptionFetcher) where D : IExtendableMessage<D> private void AssertOption<T, D>(T expected, OptionFetcher<T> fetcher, Extension<D, T> extension, Func<Extension<D, T>, T> descriptorOptionFetcher) where D : IExtendableMessage<D>
......
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