Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
2e6dc12f
Commit
2e6dc12f
authored
May 29, 2009
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write/Read delimited messages
parent
43da7ae3
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
947 additions
and
12 deletions
+947
-12
AddressBookProtos.cs
src/AddressBook/AddressBookProtos.cs
+27
-0
MessageGenerator.cs
src/ProtoGen/MessageGenerator.cs
+9
-0
UnitTestCustomOptionsProtoFile.cs
...Buffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
+153
-0
UnitTestEmbedOptimizeForProtoFile.cs
...fers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
+9
-0
UnitTestImportProtoFile.cs
...rotocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
+9
-0
UnitTestMessageSetProtoFile.cs
...colBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
+54
-0
UnitTestOptimizeForProtoFile.cs
...olBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
+27
-0
UnitTestProtoFile.cs
src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
+279
-0
WireFormatTest.cs
src/ProtocolBuffers.Test/WireFormatTest.cs
+19
-1
AbstractBuilder.cs
src/ProtocolBuffers/AbstractBuilder.cs
+75
-0
AbstractMessage.cs
src/ProtocolBuffers/AbstractMessage.cs
+7
-0
CodedInputStream.cs
src/ProtocolBuffers/CodedInputStream.cs
+64
-4
CSharpOptions.cs
src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
+18
-0
DescriptorProtoFile.cs
src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
+162
-0
IBuilder.cs
src/ProtocolBuffers/IBuilder.cs
+17
-2
IMessage.cs
src/ProtocolBuffers/IMessage.cs
+18
-1
MessageStreamIterator.cs
src/ProtocolBuffers/MessageStreamIterator.cs
+0
-1
MessageStreamWriter.cs
src/ProtocolBuffers/MessageStreamWriter.cs
+0
-3
No files found.
src/AddressBook/AddressBookProtos.cs
View file @
2e6dc12f
...
@@ -174,6 +174,12 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
...
@@ -174,6 +174,12 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
public
static
PhoneNumber
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
PhoneNumber
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
PhoneNumber
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
PhoneNumber
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
PhoneNumber
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
PhoneNumber
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -217,6 +223,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
...
@@ -217,6 +223,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
}
public
override
PhoneNumber
BuildPartial
()
{
public
override
PhoneNumber
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
PhoneNumber
returnMe
=
result
;
PhoneNumber
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -446,6 +455,12 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
...
@@ -446,6 +455,12 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
public
static
Person
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
Person
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
Person
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
Person
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
Person
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
Person
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -489,6 +504,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
...
@@ -489,6 +504,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
}
public
override
Person
BuildPartial
()
{
public
override
Person
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
phone_
.
MakeReadOnly
();
result
.
phone_
.
MakeReadOnly
();
Person
returnMe
=
result
;
Person
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -753,6 +771,12 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
...
@@ -753,6 +771,12 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
public
static
AddressBook
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
AddressBook
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
AddressBook
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
AddressBook
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
AddressBook
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
AddressBook
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -796,6 +820,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
...
@@ -796,6 +820,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
}
public
override
AddressBook
BuildPartial
()
{
public
override
AddressBook
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
person_
.
MakeReadOnly
();
result
.
person_
.
MakeReadOnly
();
AddressBook
returnMe
=
result
;
AddressBook
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
...
src/ProtoGen/MessageGenerator.cs
View file @
2e6dc12f
...
@@ -218,6 +218,12 @@ namespace Google.ProtocolBuffers.ProtoGen {
...
@@ -218,6 +218,12 @@ namespace Google.ProtocolBuffers.ProtoGen {
writer
.
WriteLine
(
"public static {0} ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {{"
,
ClassName
);
writer
.
WriteLine
(
"public static {0} ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {{"
,
ClassName
);
writer
.
WriteLine
(
" return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();"
);
writer
.
WriteLine
(
" return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();"
);
writer
.
WriteLine
(
"}"
);
writer
.
WriteLine
(
"}"
);
writer
.
WriteLine
(
"public static {0} ParseDelimitedFrom(global::System.IO.Stream input) {{"
,
ClassName
);
writer
.
WriteLine
(
" return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();"
);
writer
.
WriteLine
(
"}"
);
writer
.
WriteLine
(
"public static {0} ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {{"
,
ClassName
);
writer
.
WriteLine
(
" return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();"
);
writer
.
WriteLine
(
"}"
);
writer
.
WriteLine
(
"public static {0} ParseFrom(pb::CodedInputStream input) {{"
,
ClassName
);
writer
.
WriteLine
(
"public static {0} ParseFrom(pb::CodedInputStream input) {{"
,
ClassName
);
writer
.
WriteLine
(
" return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();"
);
writer
.
WriteLine
(
" return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();"
);
writer
.
WriteLine
(
"}"
);
writer
.
WriteLine
(
"}"
);
...
@@ -325,6 +331,9 @@ namespace Google.ProtocolBuffers.ProtoGen {
...
@@ -325,6 +331,9 @@ namespace Google.ProtocolBuffers.ProtoGen {
writer
.
WriteLine
(
"public override {0} BuildPartial() {{"
,
ClassName
);
writer
.
WriteLine
(
"public override {0} BuildPartial() {{"
,
ClassName
);
writer
.
Indent
();
writer
.
Indent
();
writer
.
WriteLine
(
"if (result == null) {"
);
writer
.
WriteLine
(
" throw new global::System.InvalidOperationException(\"build() has already been called on this Builder\");"
);
writer
.
WriteLine
(
"}"
);
foreach
(
FieldDescriptor
field
in
Descriptor
.
Fields
)
{
foreach
(
FieldDescriptor
field
in
Descriptor
.
Fields
)
{
SourceGenerators
.
CreateFieldGenerator
(
field
).
GenerateBuildingCode
(
writer
);
SourceGenerators
.
CreateFieldGenerator
(
field
).
GenerateBuildingCode
(
writer
);
}
}
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
View file @
2e6dc12f
...
@@ -370,6 +370,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -370,6 +370,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMessageWithCustomOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMessageWithCustomOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMessageWithCustomOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMessageWithCustomOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMessageWithCustomOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMessageWithCustomOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -413,6 +419,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -413,6 +419,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMessageWithCustomOptions
BuildPartial
()
{
public
override
TestMessageWithCustomOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMessageWithCustomOptions
returnMe
=
result
;
TestMessageWithCustomOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -480,6 +489,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -480,6 +489,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
CustomOptionFooRequest
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CustomOptionFooRequest
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CustomOptionFooRequest
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CustomOptionFooRequest
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CustomOptionFooRequest
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CustomOptionFooRequest
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -523,6 +538,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -523,6 +538,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
CustomOptionFooRequest
BuildPartial
()
{
public
override
CustomOptionFooRequest
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CustomOptionFooRequest
returnMe
=
result
;
CustomOptionFooRequest
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -571,6 +589,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -571,6 +589,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
CustomOptionFooResponse
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CustomOptionFooResponse
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CustomOptionFooResponse
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CustomOptionFooResponse
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CustomOptionFooResponse
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CustomOptionFooResponse
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -614,6 +638,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -614,6 +638,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
CustomOptionFooResponse
BuildPartial
()
{
public
override
CustomOptionFooResponse
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CustomOptionFooResponse
returnMe
=
result
;
CustomOptionFooResponse
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -672,6 +699,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -672,6 +699,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
DummyMessageContainingEnum
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
DummyMessageContainingEnum
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
DummyMessageContainingEnum
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
DummyMessageContainingEnum
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
DummyMessageContainingEnum
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
DummyMessageContainingEnum
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -715,6 +748,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -715,6 +748,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
DummyMessageContainingEnum
BuildPartial
()
{
public
override
DummyMessageContainingEnum
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
DummyMessageContainingEnum
returnMe
=
result
;
DummyMessageContainingEnum
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -763,6 +799,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -763,6 +799,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
DummyMessageInvalidAsOptionType
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
DummyMessageInvalidAsOptionType
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
DummyMessageInvalidAsOptionType
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
DummyMessageInvalidAsOptionType
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
DummyMessageInvalidAsOptionType
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
DummyMessageInvalidAsOptionType
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -806,6 +848,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -806,6 +848,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
DummyMessageInvalidAsOptionType
BuildPartial
()
{
public
override
DummyMessageInvalidAsOptionType
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
DummyMessageInvalidAsOptionType
returnMe
=
result
;
DummyMessageInvalidAsOptionType
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -854,6 +899,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -854,6 +899,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
CustomOptionMinIntegerValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CustomOptionMinIntegerValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CustomOptionMinIntegerValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CustomOptionMinIntegerValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CustomOptionMinIntegerValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CustomOptionMinIntegerValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -897,6 +948,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -897,6 +948,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
CustomOptionMinIntegerValues
BuildPartial
()
{
public
override
CustomOptionMinIntegerValues
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CustomOptionMinIntegerValues
returnMe
=
result
;
CustomOptionMinIntegerValues
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -945,6 +999,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -945,6 +999,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
CustomOptionMaxIntegerValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CustomOptionMaxIntegerValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CustomOptionMaxIntegerValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CustomOptionMaxIntegerValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CustomOptionMaxIntegerValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CustomOptionMaxIntegerValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -988,6 +1048,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -988,6 +1048,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
CustomOptionMaxIntegerValues
BuildPartial
()
{
public
override
CustomOptionMaxIntegerValues
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CustomOptionMaxIntegerValues
returnMe
=
result
;
CustomOptionMaxIntegerValues
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1036,6 +1099,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1036,6 +1099,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
CustomOptionOtherValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CustomOptionOtherValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CustomOptionOtherValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CustomOptionOtherValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CustomOptionOtherValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CustomOptionOtherValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1079,6 +1148,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1079,6 +1148,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
CustomOptionOtherValues
BuildPartial
()
{
public
override
CustomOptionOtherValues
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CustomOptionOtherValues
returnMe
=
result
;
CustomOptionOtherValues
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1127,6 +1199,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1127,6 +1199,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
SettingRealsFromPositiveInts
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
SettingRealsFromPositiveInts
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
SettingRealsFromPositiveInts
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
SettingRealsFromPositiveInts
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
SettingRealsFromPositiveInts
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
SettingRealsFromPositiveInts
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1170,6 +1248,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1170,6 +1248,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
SettingRealsFromPositiveInts
BuildPartial
()
{
public
override
SettingRealsFromPositiveInts
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
SettingRealsFromPositiveInts
returnMe
=
result
;
SettingRealsFromPositiveInts
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1218,6 +1299,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1218,6 +1299,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
SettingRealsFromNegativeInts
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
SettingRealsFromNegativeInts
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
SettingRealsFromNegativeInts
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
SettingRealsFromNegativeInts
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
SettingRealsFromNegativeInts
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
SettingRealsFromNegativeInts
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1261,6 +1348,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1261,6 +1348,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
SettingRealsFromNegativeInts
BuildPartial
()
{
public
override
SettingRealsFromNegativeInts
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
SettingRealsFromNegativeInts
returnMe
=
result
;
SettingRealsFromNegativeInts
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1319,6 +1409,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1319,6 +1409,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ComplexOptionType1
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ComplexOptionType1
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ComplexOptionType1
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ComplexOptionType1
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ComplexOptionType1
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ComplexOptionType1
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1362,6 +1458,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1362,6 +1458,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ComplexOptionType1
BuildPartial
()
{
public
override
ComplexOptionType1
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ComplexOptionType1
returnMe
=
result
;
ComplexOptionType1
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1465,6 +1564,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1465,6 +1564,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ComplexOptionType4
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ComplexOptionType4
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ComplexOptionType4
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ComplexOptionType4
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ComplexOptionType4
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ComplexOptionType4
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1508,6 +1613,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1508,6 +1613,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ComplexOptionType4
BuildPartial
()
{
public
override
ComplexOptionType4
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ComplexOptionType4
returnMe
=
result
;
ComplexOptionType4
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1585,6 +1693,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1585,6 +1693,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ComplexOptionType2
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ComplexOptionType2
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ComplexOptionType2
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ComplexOptionType2
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ComplexOptionType2
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ComplexOptionType2
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1628,6 +1742,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1628,6 +1742,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ComplexOptionType2
BuildPartial
()
{
public
override
ComplexOptionType2
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ComplexOptionType2
returnMe
=
result
;
ComplexOptionType2
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1800,6 +1917,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1800,6 +1917,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ComplexOptionType5
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ComplexOptionType5
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ComplexOptionType5
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ComplexOptionType5
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ComplexOptionType5
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ComplexOptionType5
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1843,6 +1966,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1843,6 +1966,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ComplexOptionType5
BuildPartial
()
{
public
override
ComplexOptionType5
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ComplexOptionType5
returnMe
=
result
;
ComplexOptionType5
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1910,6 +2036,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1910,6 +2036,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ComplexOptionType3
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ComplexOptionType3
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ComplexOptionType3
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ComplexOptionType3
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ComplexOptionType3
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ComplexOptionType3
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1953,6 +2085,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1953,6 +2085,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ComplexOptionType3
BuildPartial
()
{
public
override
ComplexOptionType3
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ComplexOptionType3
returnMe
=
result
;
ComplexOptionType3
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -2065,6 +2200,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -2065,6 +2200,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ComplexOpt6
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ComplexOpt6
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ComplexOpt6
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ComplexOpt6
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ComplexOpt6
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ComplexOpt6
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -2108,6 +2249,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -2108,6 +2249,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ComplexOpt6
BuildPartial
()
{
public
override
ComplexOpt6
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ComplexOpt6
returnMe
=
result
;
ComplexOpt6
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -2174,6 +2318,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -2174,6 +2318,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
VariousComplexOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
VariousComplexOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
VariousComplexOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
VariousComplexOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
VariousComplexOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
VariousComplexOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -2217,6 +2367,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -2217,6 +2367,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
VariousComplexOptions
BuildPartial
()
{
public
override
VariousComplexOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
VariousComplexOptions
returnMe
=
result
;
VariousComplexOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
View file @
2e6dc12f
...
@@ -141,6 +141,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -141,6 +141,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestEmbedOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestEmbedOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestEmbedOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestEmbedOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestEmbedOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestEmbedOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -184,6 +190,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -184,6 +190,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestEmbedOptimizedForSize
BuildPartial
()
{
public
override
TestEmbedOptimizedForSize
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
repeatedMessage_
.
MakeReadOnly
();
result
.
repeatedMessage_
.
MakeReadOnly
();
TestEmbedOptimizedForSize
returnMe
=
result
;
TestEmbedOptimizedForSize
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
View file @
2e6dc12f
...
@@ -123,6 +123,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -123,6 +123,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ImportMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ImportMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ImportMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ImportMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ImportMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ImportMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -166,6 +172,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -166,6 +172,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ImportMessage
BuildPartial
()
{
public
override
ImportMessage
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ImportMessage
returnMe
=
result
;
ImportMessage
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
View file @
2e6dc12f
...
@@ -136,6 +136,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -136,6 +136,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMessageSet
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMessageSet
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMessageSet
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMessageSet
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMessageSet
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMessageSet
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -179,6 +185,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -179,6 +185,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMessageSet
BuildPartial
()
{
public
override
TestMessageSet
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMessageSet
returnMe
=
result
;
TestMessageSet
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -314,6 +323,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -314,6 +323,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMessageSetContainer
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMessageSetContainer
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMessageSetContainer
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMessageSetContainer
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMessageSetContainer
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMessageSetContainer
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -357,6 +372,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -357,6 +372,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMessageSetContainer
BuildPartial
()
{
public
override
TestMessageSetContainer
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMessageSetContainer
returnMe
=
result
;
TestMessageSetContainer
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -542,6 +560,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -542,6 +560,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMessageSetExtension1
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMessageSetExtension1
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMessageSetExtension1
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMessageSetExtension1
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMessageSetExtension1
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMessageSetExtension1
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -585,6 +609,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -585,6 +609,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMessageSetExtension1
BuildPartial
()
{
public
override
TestMessageSetExtension1
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMessageSetExtension1
returnMe
=
result
;
TestMessageSetExtension1
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -747,6 +774,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -747,6 +774,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMessageSetExtension2
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMessageSetExtension2
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMessageSetExtension2
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMessageSetExtension2
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMessageSetExtension2
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMessageSetExtension2
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -790,6 +823,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -790,6 +823,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMessageSetExtension2
BuildPartial
()
{
public
override
TestMessageSetExtension2
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMessageSetExtension2
returnMe
=
result
;
TestMessageSetExtension2
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -992,6 +1028,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -992,6 +1028,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
Item
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
Item
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
Item
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
Item
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
Item
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
Item
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1035,6 +1077,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1035,6 +1077,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
Item
BuildPartial
()
{
public
override
Item
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
Item
returnMe
=
result
;
Item
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1203,6 +1248,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1203,6 +1248,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
RawMessageSet
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
RawMessageSet
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
RawMessageSet
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
RawMessageSet
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
RawMessageSet
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
RawMessageSet
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1246,6 +1297,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1246,6 +1297,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
RawMessageSet
BuildPartial
()
{
public
override
RawMessageSet
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
item_
.
MakeReadOnly
();
result
.
item_
.
MakeReadOnly
();
RawMessageSet
returnMe
=
result
;
RawMessageSet
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
View file @
2e6dc12f
...
@@ -119,6 +119,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -119,6 +119,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -162,6 +168,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -162,6 +168,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestOptimizedForSize
BuildPartial
()
{
public
override
TestOptimizedForSize
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestOptimizedForSize
returnMe
=
result
;
TestOptimizedForSize
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -274,6 +283,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -274,6 +283,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestRequiredOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestRequiredOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestRequiredOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestRequiredOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestRequiredOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestRequiredOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -317,6 +332,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -317,6 +332,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestRequiredOptimizedForSize
BuildPartial
()
{
public
override
TestRequiredOptimizedForSize
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestRequiredOptimizedForSize
returnMe
=
result
;
TestRequiredOptimizedForSize
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -393,6 +411,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -393,6 +411,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestOptionalOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestOptionalOptimizedForSize
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestOptionalOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestOptionalOptimizedForSize
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestOptionalOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestOptionalOptimizedForSize
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -436,6 +460,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -436,6 +460,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestOptionalOptimizedForSize
BuildPartial
()
{
public
override
TestOptionalOptimizedForSize
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestOptionalOptimizedForSize
returnMe
=
result
;
TestOptionalOptimizedForSize
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
View file @
2e6dc12f
...
@@ -916,6 +916,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -916,6 +916,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
NestedMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
NestedMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
NestedMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
NestedMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
NestedMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
NestedMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -959,6 +965,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -959,6 +965,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
NestedMessage
BuildPartial
()
{
public
override
NestedMessage
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
NestedMessage
returnMe
=
result
;
NestedMessage
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1118,6 +1127,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1118,6 +1127,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
OptionalGroup
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
OptionalGroup
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
OptionalGroup
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
OptionalGroup
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
OptionalGroup
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
OptionalGroup
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1161,6 +1176,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1161,6 +1176,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
OptionalGroup
BuildPartial
()
{
public
override
OptionalGroup
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
OptionalGroup
returnMe
=
result
;
OptionalGroup
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1320,6 +1338,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1320,6 +1338,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
RepeatedGroup
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
RepeatedGroup
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
RepeatedGroup
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
RepeatedGroup
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
RepeatedGroup
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
RepeatedGroup
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1363,6 +1387,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -1363,6 +1387,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
RepeatedGroup
BuildPartial
()
{
public
override
RepeatedGroup
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
RepeatedGroup
returnMe
=
result
;
RepeatedGroup
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -2755,6 +2782,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -2755,6 +2782,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestAllTypes
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestAllTypes
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestAllTypes
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestAllTypes
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestAllTypes
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestAllTypes
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -2798,6 +2831,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -2798,6 +2831,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestAllTypes
BuildPartial
()
{
public
override
TestAllTypes
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
repeatedInt32_
.
MakeReadOnly
();
result
.
repeatedInt32_
.
MakeReadOnly
();
result
.
repeatedInt64_
.
MakeReadOnly
();
result
.
repeatedInt64_
.
MakeReadOnly
();
result
.
repeatedUint32_
.
MakeReadOnly
();
result
.
repeatedUint32_
.
MakeReadOnly
();
...
@@ -5084,6 +5120,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5084,6 +5120,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
ForeignMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ForeignMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ForeignMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ForeignMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ForeignMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ForeignMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5127,6 +5169,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5127,6 +5169,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
ForeignMessage
BuildPartial
()
{
public
override
ForeignMessage
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ForeignMessage
returnMe
=
result
;
ForeignMessage
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -5274,6 +5319,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5274,6 +5319,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestAllExtensions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestAllExtensions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestAllExtensions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestAllExtensions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestAllExtensions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestAllExtensions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5317,6 +5368,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5317,6 +5368,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestAllExtensions
BuildPartial
()
{
public
override
TestAllExtensions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestAllExtensions
returnMe
=
result
;
TestAllExtensions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -5452,6 +5506,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5452,6 +5506,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
OptionalGroup_extension
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
OptionalGroup_extension
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
OptionalGroup_extension
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
OptionalGroup_extension
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
OptionalGroup_extension
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
OptionalGroup_extension
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5495,6 +5555,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5495,6 +5555,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
OptionalGroup_extension
BuildPartial
()
{
public
override
OptionalGroup_extension
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
OptionalGroup_extension
returnMe
=
result
;
OptionalGroup_extension
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -5654,6 +5717,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5654,6 +5717,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
RepeatedGroup_extension
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
RepeatedGroup_extension
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
RepeatedGroup_extension
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
RepeatedGroup_extension
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
RepeatedGroup_extension
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
RepeatedGroup_extension
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5697,6 +5766,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -5697,6 +5766,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
RepeatedGroup_extension
BuildPartial
()
{
public
override
RepeatedGroup_extension
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
RepeatedGroup_extension
returnMe
=
result
;
RepeatedGroup_extension
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -6378,6 +6450,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -6378,6 +6450,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestRequired
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestRequired
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestRequired
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestRequired
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestRequired
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestRequired
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -6421,6 +6499,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -6421,6 +6499,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestRequired
BuildPartial
()
{
public
override
TestRequired
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestRequired
returnMe
=
result
;
TestRequired
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -7420,6 +7501,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -7420,6 +7501,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestRequiredForeign
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestRequiredForeign
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestRequiredForeign
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestRequiredForeign
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestRequiredForeign
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestRequiredForeign
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -7463,6 +7550,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -7463,6 +7550,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestRequiredForeign
BuildPartial
()
{
public
override
TestRequiredForeign
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
repeatedMessage_
.
MakeReadOnly
();
result
.
repeatedMessage_
.
MakeReadOnly
();
TestRequiredForeign
returnMe
=
result
;
TestRequiredForeign
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -7718,6 +7808,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -7718,6 +7808,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestForeignNested
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestForeignNested
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestForeignNested
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestForeignNested
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestForeignNested
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestForeignNested
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -7761,6 +7857,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -7761,6 +7857,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestForeignNested
BuildPartial
()
{
public
override
TestForeignNested
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestForeignNested
returnMe
=
result
;
TestForeignNested
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -7927,6 +8026,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -7927,6 +8026,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestEmptyMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestEmptyMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestEmptyMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestEmptyMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestEmptyMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestEmptyMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -7970,6 +8075,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -7970,6 +8075,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestEmptyMessage
BuildPartial
()
{
public
override
TestEmptyMessage
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestEmptyMessage
returnMe
=
result
;
TestEmptyMessage
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -8092,6 +8200,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8092,6 +8200,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestEmptyMessageWithExtensions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestEmptyMessageWithExtensions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestEmptyMessageWithExtensions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestEmptyMessageWithExtensions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestEmptyMessageWithExtensions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestEmptyMessageWithExtensions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -8135,6 +8249,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8135,6 +8249,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestEmptyMessageWithExtensions
BuildPartial
()
{
public
override
TestEmptyMessageWithExtensions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestEmptyMessageWithExtensions
returnMe
=
result
;
TestEmptyMessageWithExtensions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -8286,6 +8403,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8286,6 +8403,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestReallyLargeTagNumber
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestReallyLargeTagNumber
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestReallyLargeTagNumber
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestReallyLargeTagNumber
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestReallyLargeTagNumber
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestReallyLargeTagNumber
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -8329,6 +8452,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8329,6 +8452,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestReallyLargeTagNumber
BuildPartial
()
{
public
override
TestReallyLargeTagNumber
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestReallyLargeTagNumber
returnMe
=
result
;
TestReallyLargeTagNumber
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -8529,6 +8655,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8529,6 +8655,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestRecursiveMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestRecursiveMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestRecursiveMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestRecursiveMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestRecursiveMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestRecursiveMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -8572,6 +8704,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8572,6 +8704,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestRecursiveMessage
BuildPartial
()
{
public
override
TestRecursiveMessage
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestRecursiveMessage
returnMe
=
result
;
TestRecursiveMessage
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -8779,6 +8914,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8779,6 +8914,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMutualRecursionA
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMutualRecursionA
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMutualRecursionA
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMutualRecursionA
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMutualRecursionA
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMutualRecursionA
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -8822,6 +8963,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -8822,6 +8963,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMutualRecursionA
BuildPartial
()
{
public
override
TestMutualRecursionA
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMutualRecursionA
returnMe
=
result
;
TestMutualRecursionA
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -9020,6 +9164,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9020,6 +9164,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestMutualRecursionB
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestMutualRecursionB
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestMutualRecursionB
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestMutualRecursionB
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestMutualRecursionB
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestMutualRecursionB
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -9063,6 +9213,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9063,6 +9213,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestMutualRecursionB
BuildPartial
()
{
public
override
TestMutualRecursionB
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestMutualRecursionB
returnMe
=
result
;
TestMutualRecursionB
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -9294,6 +9447,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9294,6 +9447,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
Foo
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
Foo
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
Foo
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
Foo
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
Foo
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
Foo
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -9337,6 +9496,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9337,6 +9496,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
Foo
BuildPartial
()
{
public
override
Foo
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
Foo
returnMe
=
result
;
Foo
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -9496,6 +9658,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9496,6 +9658,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
Bar
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
Bar
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
Bar
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
Bar
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
Bar
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
Bar
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -9539,6 +9707,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9539,6 +9707,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
Bar
BuildPartial
()
{
public
override
Bar
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
Bar
returnMe
=
result
;
Bar
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -9711,6 +9882,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9711,6 +9882,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestDupFieldNumber
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestDupFieldNumber
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestDupFieldNumber
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestDupFieldNumber
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestDupFieldNumber
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestDupFieldNumber
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -9754,6 +9931,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -9754,6 +9931,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestDupFieldNumber
BuildPartial
()
{
public
override
TestDupFieldNumber
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestDupFieldNumber
returnMe
=
result
;
TestDupFieldNumber
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -10060,6 +10240,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -10060,6 +10240,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
NestedMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
NestedMessage
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
NestedMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
NestedMessage
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
NestedMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
NestedMessage
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -10103,6 +10289,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -10103,6 +10289,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
NestedMessage
BuildPartial
()
{
public
override
NestedMessage
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
nestedmessageRepeatedInt32_
.
MakeReadOnly
();
result
.
nestedmessageRepeatedInt32_
.
MakeReadOnly
();
result
.
nestedmessageRepeatedForeignmessage_
.
MakeReadOnly
();
result
.
nestedmessageRepeatedForeignmessage_
.
MakeReadOnly
();
NestedMessage
returnMe
=
result
;
NestedMessage
returnMe
=
result
;
...
@@ -10300,6 +10489,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -10300,6 +10489,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestNestedMessageHasBits
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestNestedMessageHasBits
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestNestedMessageHasBits
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestNestedMessageHasBits
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestNestedMessageHasBits
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestNestedMessageHasBits
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -10343,6 +10538,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -10343,6 +10538,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestNestedMessageHasBits
BuildPartial
()
{
public
override
TestNestedMessageHasBits
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestNestedMessageHasBits
returnMe
=
result
;
TestNestedMessageHasBits
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -10750,6 +10948,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -10750,6 +10948,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestCamelCaseFieldNames
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestCamelCaseFieldNames
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestCamelCaseFieldNames
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestCamelCaseFieldNames
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestCamelCaseFieldNames
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestCamelCaseFieldNames
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -10793,6 +10997,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -10793,6 +10997,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestCamelCaseFieldNames
BuildPartial
()
{
public
override
TestCamelCaseFieldNames
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
repeatedPrimitiveField_
.
MakeReadOnly
();
result
.
repeatedPrimitiveField_
.
MakeReadOnly
();
result
.
repeatedStringField_
.
MakeReadOnly
();
result
.
repeatedStringField_
.
MakeReadOnly
();
result
.
repeatedEnumField_
.
MakeReadOnly
();
result
.
repeatedEnumField_
.
MakeReadOnly
();
...
@@ -11380,6 +11587,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -11380,6 +11587,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestFieldOrderings
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestFieldOrderings
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestFieldOrderings
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestFieldOrderings
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestFieldOrderings
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestFieldOrderings
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -11423,6 +11636,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -11423,6 +11636,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestFieldOrderings
BuildPartial
()
{
public
override
TestFieldOrderings
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestFieldOrderings
returnMe
=
result
;
TestFieldOrderings
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -11714,6 +11930,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -11714,6 +11930,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestExtremeDefaultValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestExtremeDefaultValues
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestExtremeDefaultValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestExtremeDefaultValues
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestExtremeDefaultValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestExtremeDefaultValues
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -11757,6 +11979,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -11757,6 +11979,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestExtremeDefaultValues
BuildPartial
()
{
public
override
TestExtremeDefaultValues
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestExtremeDefaultValues
returnMe
=
result
;
TestExtremeDefaultValues
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -12435,6 +12660,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -12435,6 +12660,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestPackedTypes
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestPackedTypes
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestPackedTypes
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestPackedTypes
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestPackedTypes
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestPackedTypes
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -12478,6 +12709,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -12478,6 +12709,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestPackedTypes
BuildPartial
()
{
public
override
TestPackedTypes
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
packedInt32_
.
MakeReadOnly
();
result
.
packedInt32_
.
MakeReadOnly
();
result
.
packedInt64_
.
MakeReadOnly
();
result
.
packedInt64_
.
MakeReadOnly
();
result
.
packedUint32_
.
MakeReadOnly
();
result
.
packedUint32_
.
MakeReadOnly
();
...
@@ -13154,6 +13388,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13154,6 +13388,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
TestPackedExtensions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
TestPackedExtensions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
TestPackedExtensions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
TestPackedExtensions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
TestPackedExtensions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
TestPackedExtensions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -13197,6 +13437,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13197,6 +13437,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
TestPackedExtensions
BuildPartial
()
{
public
override
TestPackedExtensions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
TestPackedExtensions
returnMe
=
result
;
TestPackedExtensions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -13316,6 +13559,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13316,6 +13559,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
FooRequest
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FooRequest
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FooRequest
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FooRequest
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FooRequest
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FooRequest
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -13359,6 +13608,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13359,6 +13608,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
FooRequest
BuildPartial
()
{
public
override
FooRequest
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
FooRequest
returnMe
=
result
;
FooRequest
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -13477,6 +13729,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13477,6 +13729,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
FooResponse
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FooResponse
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FooResponse
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FooResponse
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FooResponse
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FooResponse
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -13520,6 +13778,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13520,6 +13778,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
FooResponse
BuildPartial
()
{
public
override
FooResponse
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
FooResponse
returnMe
=
result
;
FooResponse
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -13638,6 +13899,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13638,6 +13899,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
BarRequest
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
BarRequest
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
BarRequest
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
BarRequest
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
BarRequest
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
BarRequest
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -13681,6 +13948,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13681,6 +13948,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
BarRequest
BuildPartial
()
{
public
override
BarRequest
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
BarRequest
returnMe
=
result
;
BarRequest
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -13799,6 +14069,12 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13799,6 +14069,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public
static
BarResponse
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
BarResponse
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
BarResponse
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
BarResponse
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
BarResponse
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
BarResponse
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -13842,6 +14118,9 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13842,6 +14118,9 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public
override
BarResponse
BuildPartial
()
{
public
override
BarResponse
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
BarResponse
returnMe
=
result
;
BarResponse
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
...
src/ProtocolBuffers.Test/WireFormatTest.cs
View file @
2e6dc12f
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using
System.IO
;
using
System.Reflection
;
using
System.Reflection
;
using
Google.ProtocolBuffers.Descriptors
;
using
Google.ProtocolBuffers.Descriptors
;
using
Google.ProtocolBuffers.TestProtos
;
using
Google.ProtocolBuffers.TestProtos
;
...
@@ -98,6 +99,23 @@ namespace Google.ProtocolBuffers {
...
@@ -98,6 +99,23 @@ namespace Google.ProtocolBuffers {
Assert
.
AreEqual
(
rawBytes
,
rawBytes2
);
Assert
.
AreEqual
(
rawBytes
,
rawBytes2
);
}
}
[
Test
]
public
void
SerializeDelimited
()
{
MemoryStream
stream
=
new
MemoryStream
();
TestUtil
.
GetAllSet
().
WriteDelimitedTo
(
stream
);
stream
.
WriteByte
(
12
);
TestUtil
.
GetPackedSet
().
WriteDelimitedTo
(
stream
);
stream
.
WriteByte
(
34
);
stream
.
Position
=
0
;
TestUtil
.
AssertAllFieldsSet
(
TestAllTypes
.
ParseDelimitedFrom
(
stream
));
Assert
.
AreEqual
(
12
,
stream
.
ReadByte
());
TestUtil
.
AssertPackedFieldsSet
(
TestPackedTypes
.
ParseDelimitedFrom
(
stream
));
Assert
.
AreEqual
(
34
,
stream
.
ReadByte
());
Assert
.
AreEqual
(-
1
,
stream
.
ReadByte
());
}
[
Test
]
[
Test
]
public
void
ParseExtensions
()
{
public
void
ParseExtensions
()
{
// TestAllTypes and TestAllExtensions should have compatible wire formats,
// TestAllTypes and TestAllExtensions should have compatible wire formats,
...
@@ -133,7 +151,7 @@ namespace Google.ProtocolBuffers {
...
@@ -133,7 +151,7 @@ namespace Google.ProtocolBuffers {
Assert
.
AreEqual
(
TestUtil
.
GetAllSet
().
SerializedSize
,
TestUtil
.
GetAllExtensionsSet
().
SerializedSize
);
Assert
.
AreEqual
(
TestUtil
.
GetAllSet
().
SerializedSize
,
TestUtil
.
GetAllExtensionsSet
().
SerializedSize
);
}
}
private
void
AssertFieldsInOrder
(
ByteString
data
)
{
private
static
void
AssertFieldsInOrder
(
ByteString
data
)
{
CodedInputStream
input
=
data
.
CreateCodedInput
();
CodedInputStream
input
=
data
.
CreateCodedInput
();
uint
previousTag
=
0
;
uint
previousTag
=
0
;
...
...
src/ProtocolBuffers/AbstractBuilder.cs
View file @
2e6dc12f
...
@@ -225,6 +225,16 @@ namespace Google.ProtocolBuffers {
...
@@ -225,6 +225,16 @@ namespace Google.ProtocolBuffers {
return
ThisBuilder
;
return
ThisBuilder
;
}
}
public
TBuilder
MergeDelimitedFrom
(
Stream
input
,
ExtensionRegistry
extensionRegistry
)
{
int
size
=
CodedInputStream
.
ReadRawVarint32
(
input
);
Stream
limitedStream
=
new
LimitedInputStream
(
input
,
size
);
return
MergeFrom
(
limitedStream
,
extensionRegistry
);
}
public
TBuilder
MergeDelimitedFrom
(
Stream
input
)
{
return
MergeDelimitedFrom
(
input
,
ExtensionRegistry
.
Empty
);
}
public
virtual
IBuilder
SetField
(
FieldDescriptor
field
,
object
value
)
{
public
virtual
IBuilder
SetField
(
FieldDescriptor
field
,
object
value
)
{
this
[
field
]
=
value
;
this
[
field
]
=
value
;
return
ThisBuilder
;
return
ThisBuilder
;
...
@@ -234,5 +244,70 @@ namespace Google.ProtocolBuffers {
...
@@ -234,5 +244,70 @@ namespace Google.ProtocolBuffers {
this
[
field
,
index
]
=
value
;
this
[
field
,
index
]
=
value
;
return
ThisBuilder
;
return
ThisBuilder
;
}
}
/// <summary>
/// Stream implementation which proxies another stream, only allowing a certain amount
/// of data to be read. Note that this is only used to read delimited streams, so it
/// doesn't attempt to implement everything.
/// </summary>
private
class
LimitedInputStream
:
Stream
{
private
readonly
Stream
proxied
;
private
int
bytesLeft
;
internal
LimitedInputStream
(
Stream
proxied
,
int
size
)
{
this
.
proxied
=
proxied
;
bytesLeft
=
size
;
}
public
override
bool
CanRead
{
get
{
return
true
;
}
}
public
override
bool
CanSeek
{
get
{
return
false
;
}
}
public
override
bool
CanWrite
{
get
{
return
false
;
}
}
public
override
void
Flush
()
{
}
public
override
long
Length
{
get
{
throw
new
NotImplementedException
();
}
}
public
override
long
Position
{
get
{
throw
new
NotImplementedException
();
}
set
{
throw
new
NotImplementedException
();
}
}
public
override
int
Read
(
byte
[]
buffer
,
int
offset
,
int
count
)
{
if
(
bytesLeft
>
0
)
{
int
bytesRead
=
proxied
.
Read
(
buffer
,
offset
,
Math
.
Min
(
bytesLeft
,
count
));
bytesLeft
-=
bytesRead
;
return
bytesRead
;
}
return
0
;
}
public
override
long
Seek
(
long
offset
,
SeekOrigin
origin
)
{
throw
new
NotImplementedException
();
}
public
override
void
SetLength
(
long
value
)
{
throw
new
NotImplementedException
();
}
public
override
void
Write
(
byte
[]
buffer
,
int
offset
,
int
count
)
{
throw
new
NotImplementedException
();
}
}
}
}
}
}
src/ProtocolBuffers/AbstractMessage.cs
View file @
2e6dc12f
...
@@ -205,6 +205,13 @@ namespace Google.ProtocolBuffers {
...
@@ -205,6 +205,13 @@ namespace Google.ProtocolBuffers {
codedOutput
.
Flush
();
codedOutput
.
Flush
();
}
}
public
void
WriteDelimitedTo
(
Stream
output
)
{
CodedOutputStream
codedOutput
=
CodedOutputStream
.
CreateInstance
(
output
);
codedOutput
.
WriteRawVarint32
((
uint
)
SerializedSize
);
WriteTo
(
codedOutput
);
codedOutput
.
Flush
();
}
public
override
bool
Equals
(
object
other
)
{
public
override
bool
Equals
(
object
other
)
{
if
(
other
==
this
)
{
if
(
other
==
this
)
{
return
true
;
return
true
;
...
...
src/ProtocolBuffers/CodedInputStream.cs
View file @
2e6dc12f
...
@@ -141,7 +141,7 @@ namespace Google.ProtocolBuffers {
...
@@ -141,7 +141,7 @@ namespace Google.ProtocolBuffers {
/// zero is not a valid tag number.
/// zero is not a valid tag number.
/// </summary>
/// </summary>
public
uint
ReadTag
()
{
public
uint
ReadTag
()
{
if
(
bufferPos
==
bufferSize
&&
!
RefillBuffer
(
false
)
)
{
if
(
IsAtEnd
)
{
lastTag
=
0
;
lastTag
=
0
;
return
0
;
return
0
;
}
}
...
@@ -457,6 +457,41 @@ namespace Google.ProtocolBuffers {
...
@@ -457,6 +457,41 @@ namespace Google.ProtocolBuffers {
return
(
uint
)
result
;
return
(
uint
)
result
;
}
}
/// <summary>
/// Reads a varint from the input one byte at a time, so that it does not
/// read any bytes after the end of the varint. If you simply wrapped the
/// stream in a CodedInputStream and used ReadRawVarint32(Stream)}
/// then you would probably end up reading past the end of the varint since
/// CodedInputStream buffers its input.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
internal
static
int
ReadRawVarint32
(
Stream
input
)
{
int
result
=
0
;
int
offset
=
0
;
for
(;
offset
<
32
;
offset
+=
7
)
{
int
b
=
input
.
ReadByte
();
if
(
b
==
-
1
)
{
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
}
result
|=
(
b
&
0x7f
)
<<
offset
;
if
((
b
&
0x80
)
==
0
)
{
return
result
;
}
}
// Keep reading up to 64 bits.
for
(;
offset
<
64
;
offset
+=
7
)
{
int
b
=
input
.
ReadByte
();
if
(
b
==
-
1
)
{
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
}
if
((
b
&
0x80
)
==
0
)
{
return
result
;
}
}
throw
InvalidProtocolBufferException
.
MalformedVarint
();
}
/// <summary>
/// <summary>
/// Read a raw varint from the stream.
/// Read a raw varint from the stream.
/// </summary>
/// </summary>
...
@@ -555,6 +590,9 @@ namespace Google.ProtocolBuffers {
...
@@ -555,6 +590,9 @@ namespace Google.ProtocolBuffers {
/// as you can without harming your app's functionality. Note that
/// as you can without harming your app's functionality. Note that
/// size limits only apply when reading from an InputStream, not
/// size limits only apply when reading from an InputStream, not
/// when constructed around a raw byte array (nor with ByteString.NewCodedInput).
/// when constructed around a raw byte array (nor with ByteString.NewCodedInput).
/// If you want to read several messages from a single CodedInputStream, you
/// can call ResetSizeCounter() after each message to avoid hitting the
/// size limit.
/// </remarks>
/// </remarks>
public
int
SetSizeLimit
(
int
limit
)
{
public
int
SetSizeLimit
(
int
limit
)
{
if
(
limit
<
0
)
{
if
(
limit
<
0
)
{
...
@@ -566,6 +604,13 @@ namespace Google.ProtocolBuffers {
...
@@ -566,6 +604,13 @@ namespace Google.ProtocolBuffers {
}
}
#
region
Internal
reading
and
buffer
management
#
region
Internal
reading
and
buffer
management
/// <summary>
/// Resets the current size counter to zero (see SetSizeLimit).
/// </summary>
public
void
ResetSizeCounter
()
{
totalBytesRetired
=
0
;
}
/// <summary>
/// <summary>
/// Sets currentLimit to (current position) + byteLimit. This is called
/// Sets currentLimit to (current position) + byteLimit. This is called
/// when descending into a length-delimited embedded message. The previous
/// when descending into a length-delimited embedded message. The previous
...
@@ -622,6 +667,17 @@ namespace Google.ProtocolBuffers {
...
@@ -622,6 +667,17 @@ namespace Google.ProtocolBuffers {
}
}
}
}
/// <summary>
/// Returns true if the stream has reached the end of the input. This is the
/// case if either the end of the underlying input source has been reached or
/// the stream has reached a limit created using PushLimit.
/// </summary>
public
bool
IsAtEnd
{
get
{
return
bufferPos
==
bufferSize
&&
!
RefillBuffer
(
false
);
}
}
/// <summary>
/// <summary>
/// Called when buffer is empty to read more bytes from the
/// Called when buffer is empty to read more bytes from the
/// input. If <paramref name="mustSucceed"/> is true, RefillBuffer() gurantees that
/// input. If <paramref name="mustSucceed"/> is true, RefillBuffer() gurantees that
...
@@ -649,6 +705,9 @@ namespace Google.ProtocolBuffers {
...
@@ -649,6 +705,9 @@ namespace Google.ProtocolBuffers {
bufferPos
=
0
;
bufferPos
=
0
;
bufferSize
=
(
input
==
null
)
?
0
:
input
.
Read
(
buffer
,
0
,
buffer
.
Length
);
bufferSize
=
(
input
==
null
)
?
0
:
input
.
Read
(
buffer
,
0
,
buffer
.
Length
);
if
(
bufferSize
<
0
)
{
throw
new
InvalidOperationException
(
"Stream.Read returned a negative count"
);
}
if
(
bufferSize
==
0
)
{
if
(
bufferSize
==
0
)
{
if
(
mustSucceed
)
{
if
(
mustSucceed
)
{
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
...
@@ -847,7 +906,7 @@ namespace Google.ProtocolBuffers {
...
@@ -847,7 +906,7 @@ namespace Google.ProtocolBuffers {
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
}
}
if
(
size
<
bufferSize
-
bufferPos
)
{
if
(
size
<
=
bufferSize
-
bufferPos
)
{
// We have all the bytes we need already.
// We have all the bytes we need already.
bufferPos
+=
size
;
bufferPos
+=
size
;
}
else
{
}
else
{
...
@@ -863,8 +922,9 @@ namespace Google.ProtocolBuffers {
...
@@ -863,8 +922,9 @@ namespace Google.ProtocolBuffers {
if
(
input
==
null
)
{
if
(
input
==
null
)
{
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
}
}
input
.
Seek
(
size
-
pos
,
SeekOrigin
.
Current
);
long
previousPosition
=
input
.
Position
;
if
(
input
.
Position
>
input
.
Length
)
{
input
.
Position
+=
size
-
pos
;
if
(
input
.
Position
!=
previousPosition
+
size
-
pos
)
{
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
throw
InvalidProtocolBufferException
.
TruncatedMessage
();
}
}
totalBytesRetired
+=
size
-
pos
;
totalBytesRetired
+=
size
-
pos
;
...
...
src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
View file @
2e6dc12f
...
@@ -143,6 +143,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -143,6 +143,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
CSharpFileOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CSharpFileOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CSharpFileOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CSharpFileOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CSharpFileOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CSharpFileOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -186,6 +192,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -186,6 +192,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
CSharpFileOptions
BuildPartial
()
{
public
override
CSharpFileOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CSharpFileOptions
returnMe
=
result
;
CSharpFileOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -336,6 +345,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -336,6 +345,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
CSharpFieldOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
CSharpFieldOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
CSharpFieldOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
CSharpFieldOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
CSharpFieldOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
CSharpFieldOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -379,6 +394,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -379,6 +394,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
CSharpFieldOptions
BuildPartial
()
{
public
override
CSharpFieldOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
CSharpFieldOptions
returnMe
=
result
;
CSharpFieldOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
...
src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
View file @
2e6dc12f
...
@@ -273,6 +273,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -273,6 +273,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
FileDescriptorSet
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FileDescriptorSet
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FileDescriptorSet
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FileDescriptorSet
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FileDescriptorSet
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FileDescriptorSet
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -316,6 +322,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -316,6 +322,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
FileDescriptorSet
BuildPartial
()
{
public
override
FileDescriptorSet
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
file_
.
MakeReadOnly
();
result
.
file_
.
MakeReadOnly
();
FileDescriptorSet
returnMe
=
result
;
FileDescriptorSet
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -642,6 +651,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -642,6 +651,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
FileDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FileDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FileDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FileDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FileDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FileDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -685,6 +700,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -685,6 +700,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
FileDescriptorProto
BuildPartial
()
{
public
override
FileDescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
dependency_
.
MakeReadOnly
();
result
.
dependency_
.
MakeReadOnly
();
result
.
messageType_
.
MakeReadOnly
();
result
.
messageType_
.
MakeReadOnly
();
result
.
enumType_
.
MakeReadOnly
();
result
.
enumType_
.
MakeReadOnly
();
...
@@ -1187,6 +1205,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -1187,6 +1205,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
ExtensionRange
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ExtensionRange
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ExtensionRange
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ExtensionRange
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ExtensionRange
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ExtensionRange
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1230,6 +1254,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -1230,6 +1254,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
ExtensionRange
BuildPartial
()
{
public
override
ExtensionRange
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
ExtensionRange
returnMe
=
result
;
ExtensionRange
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -1516,6 +1543,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -1516,6 +1543,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
DescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
DescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
DescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
DescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
DescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
DescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -1559,6 +1592,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -1559,6 +1592,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
DescriptorProto
BuildPartial
()
{
public
override
DescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
field_
.
MakeReadOnly
();
result
.
field_
.
MakeReadOnly
();
result
.
extension_
.
MakeReadOnly
();
result
.
extension_
.
MakeReadOnly
();
result
.
nestedType_
.
MakeReadOnly
();
result
.
nestedType_
.
MakeReadOnly
();
...
@@ -2154,6 +2190,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -2154,6 +2190,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
FieldDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FieldDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FieldDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FieldDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FieldDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FieldDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -2197,6 +2239,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -2197,6 +2239,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
FieldDescriptorProto
BuildPartial
()
{
public
override
FieldDescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
FieldDescriptorProto
returnMe
=
result
;
FieldDescriptorProto
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -2614,6 +2659,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -2614,6 +2659,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
EnumDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
EnumDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
EnumDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
EnumDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
EnumDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
EnumDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -2657,6 +2708,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -2657,6 +2708,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
EnumDescriptorProto
BuildPartial
()
{
public
override
EnumDescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
value_
.
MakeReadOnly
();
result
.
value_
.
MakeReadOnly
();
EnumDescriptorProto
returnMe
=
result
;
EnumDescriptorProto
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -2948,6 +3002,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -2948,6 +3002,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
EnumValueDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
EnumValueDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
EnumValueDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
EnumValueDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
EnumValueDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
EnumValueDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -2991,6 +3051,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -2991,6 +3051,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
EnumValueDescriptorProto
BuildPartial
()
{
public
override
EnumValueDescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
EnumValueDescriptorProto
returnMe
=
result
;
EnumValueDescriptorProto
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -3264,6 +3327,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -3264,6 +3327,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
ServiceDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ServiceDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ServiceDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ServiceDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ServiceDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ServiceDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -3307,6 +3376,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -3307,6 +3376,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
ServiceDescriptorProto
BuildPartial
()
{
public
override
ServiceDescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
method_
.
MakeReadOnly
();
result
.
method_
.
MakeReadOnly
();
ServiceDescriptorProto
returnMe
=
result
;
ServiceDescriptorProto
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -3614,6 +3686,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -3614,6 +3686,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
MethodDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
MethodDescriptorProto
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
MethodDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
MethodDescriptorProto
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
MethodDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
MethodDescriptorProto
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -3657,6 +3735,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -3657,6 +3735,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
MethodDescriptorProto
BuildPartial
()
{
public
override
MethodDescriptorProto
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
MethodDescriptorProto
returnMe
=
result
;
MethodDescriptorProto
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -4000,6 +4081,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4000,6 +4081,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
FileOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FileOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FileOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FileOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FileOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FileOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -4043,6 +4130,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4043,6 +4130,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
FileOptions
BuildPartial
()
{
public
override
FileOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
FileOptions
returnMe
=
result
;
FileOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -4361,6 +4451,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4361,6 +4451,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
MessageOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
MessageOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
MessageOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
MessageOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
MessageOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
MessageOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -4404,6 +4500,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4404,6 +4500,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
MessageOptions
BuildPartial
()
{
public
override
MessageOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
MessageOptions
returnMe
=
result
;
MessageOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -4679,6 +4778,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4679,6 +4778,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
FieldOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
FieldOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
FieldOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
FieldOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
FieldOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
FieldOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -4722,6 +4827,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4722,6 +4827,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
FieldOptions
BuildPartial
()
{
public
override
FieldOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
FieldOptions
returnMe
=
result
;
FieldOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -4998,6 +5106,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -4998,6 +5106,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
EnumOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
EnumOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
EnumOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
EnumOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
EnumOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
EnumOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5041,6 +5155,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5041,6 +5155,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
EnumOptions
BuildPartial
()
{
public
override
EnumOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
EnumOptions
returnMe
=
result
;
EnumOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -5233,6 +5350,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5233,6 +5350,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
EnumValueOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
EnumValueOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
EnumValueOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
EnumValueOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
EnumValueOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
EnumValueOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5276,6 +5399,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5276,6 +5399,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
EnumValueOptions
BuildPartial
()
{
public
override
EnumValueOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
EnumValueOptions
returnMe
=
result
;
EnumValueOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -5468,6 +5594,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5468,6 +5594,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
ServiceOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
ServiceOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
ServiceOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
ServiceOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
ServiceOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
ServiceOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5511,6 +5643,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5511,6 +5643,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
ServiceOptions
BuildPartial
()
{
public
override
ServiceOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
ServiceOptions
returnMe
=
result
;
ServiceOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -5703,6 +5838,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5703,6 +5838,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
MethodOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
MethodOptions
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
MethodOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
MethodOptions
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
MethodOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
MethodOptions
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -5746,6 +5887,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5746,6 +5887,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
MethodOptions
BuildPartial
()
{
public
override
MethodOptions
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
uninterpretedOption_
.
MakeReadOnly
();
result
.
uninterpretedOption_
.
MakeReadOnly
();
MethodOptions
returnMe
=
result
;
MethodOptions
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
@@ -5971,6 +6115,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -5971,6 +6115,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
NamePart
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
NamePart
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
NamePart
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
NamePart
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
NamePart
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
NamePart
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -6014,6 +6164,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -6014,6 +6164,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
NamePart
BuildPartial
()
{
public
override
NamePart
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
NamePart
returnMe
=
result
;
NamePart
returnMe
=
result
;
result
=
null
;
result
=
null
;
return
returnMe
;
return
returnMe
;
...
@@ -6265,6 +6418,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -6265,6 +6418,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public
static
UninterpretedOption
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
public
static
UninterpretedOption
ParseFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
,
extensionRegistry
)).
BuildParsed
();
}
}
public
static
UninterpretedOption
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
).
BuildParsed
();
}
public
static
UninterpretedOption
ParseDelimitedFrom
(
global
::
System
.
IO
.
Stream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
return
CreateBuilder
().
MergeDelimitedFrom
(
input
,
extensionRegistry
).
BuildParsed
();
}
public
static
UninterpretedOption
ParseFrom
(
pb
::
CodedInputStream
input
)
{
public
static
UninterpretedOption
ParseFrom
(
pb
::
CodedInputStream
input
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
input
)).
BuildParsed
();
}
}
...
@@ -6308,6 +6467,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
...
@@ -6308,6 +6467,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public
override
UninterpretedOption
BuildPartial
()
{
public
override
UninterpretedOption
BuildPartial
()
{
if
(
result
==
null
)
{
throw
new
global
::
System
.
InvalidOperationException
(
"build() has already been called on this Builder"
);
}
result
.
name_
.
MakeReadOnly
();
result
.
name_
.
MakeReadOnly
();
UninterpretedOption
returnMe
=
result
;
UninterpretedOption
returnMe
=
result
;
result
=
null
;
result
=
null
;
...
...
src/ProtocolBuffers/IBuilder.cs
View file @
2e6dc12f
...
@@ -248,6 +248,20 @@ namespace Google.ProtocolBuffers {
...
@@ -248,6 +248,20 @@ namespace Google.ProtocolBuffers {
/// </summary>
/// </summary>
TBuilder
MergeUnknownFields
(
UnknownFieldSet
unknownFields
);
TBuilder
MergeUnknownFields
(
UnknownFieldSet
unknownFields
);
/// <summary>
/// Like MergeFrom(Stream), but does not read until the end of the file.
/// Instead, the size of the message (encoded as a varint) is read first,
/// then the message data. Use Message.WriteDelimitedTo(Stream) to
/// write messages in this format.
/// </summary>
/// <param name="input"></param>
TBuilder
MergeDelimitedFrom
(
Stream
input
);
/// <summary>
/// Like MergeDelimitedFrom(Stream) but supporting extensions.
/// </summary>
TBuilder
MergeDelimitedFrom
(
Stream
input
,
ExtensionRegistry
extensionRegistry
);
#
region
Convenience
methods
#
region
Convenience
methods
/// <summary>
/// <summary>
/// Parse <paramref name="data"/> as a message of this type and merge
/// Parse <paramref name="data"/> as a message of this type and merge
...
@@ -283,8 +297,9 @@ namespace Google.ProtocolBuffers {
...
@@ -283,8 +297,9 @@ namespace Google.ProtocolBuffers {
/// MergeFrom(CodedInputStream). Note that this method always reads
/// MergeFrom(CodedInputStream). Note that this method always reads
/// the entire input (unless it throws an exception). If you want it to
/// the entire input (unless it throws an exception). If you want it to
/// stop earlier, you will need to wrap the input in a wrapper
/// stop earlier, you will need to wrap the input in a wrapper
/// stream which limits reading. Despite usually reading the entire
/// stream which limits reading. Or, use IMessage.WriteDelimitedTo(Stream)
/// stream, this method never closes the stream.
/// to write your message and MmergeDelimitedFrom(Stream) to read it.
/// Despite usually reading the entire stream, this method never closes the stream.
/// </summary>
/// </summary>
TBuilder
MergeFrom
(
Stream
input
);
TBuilder
MergeFrom
(
Stream
input
);
...
...
src/ProtocolBuffers/IMessage.cs
View file @
2e6dc12f
...
@@ -113,9 +113,26 @@ namespace Google.ProtocolBuffers {
...
@@ -113,9 +113,26 @@ namespace Google.ProtocolBuffers {
/// Serializes the message and writes it to the given output stream.
/// Serializes the message and writes it to the given output stream.
/// This does not flush or close the stream.
/// This does not flush or close the stream.
/// </summary>
/// </summary>
/// <param name="output"></param>
/// <remarks>
/// Protocol Buffers are not self-delimiting. Therefore, if you write
/// any more data to the stream after the message, you must somehow ensure
/// that the parser on the receiving end does not interpret this as being
/// part of the protocol message. One way of doing this is by writing the size
/// of the message before the data, then making sure you limit the input to
/// that size when receiving the data. Alternatively, use WriteDelimitedTo(Stream).
/// </remarks>
void
WriteTo
(
CodedOutputStream
output
);
void
WriteTo
(
CodedOutputStream
output
);
/// <summary>
/// Like WriteTo(Stream) but writes the size of the message as a varint before
/// writing the data. This allows more data to be written to the stream after the
/// message without the need to delimit the message data yourself. Use
/// IBuilder.MergeDelimitedFrom(Stream) or the static method
/// YourMessageType.ParseDelimitedFrom(Stream) to parse messages written by this method.
/// </summary>
/// <param name="output"></param>
void
WriteDelimitedTo
(
Stream
output
);
/// <summary>
/// <summary>
/// Returns the number of bytes required to encode this message.
/// Returns the number of bytes required to encode this message.
/// The result is only computed on the first call and memoized after that.
/// The result is only computed on the first call and memoized after that.
...
...
src/ProtocolBuffers/MessageStreamIterator.cs
View file @
2e6dc12f
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Collections
;
using
System.Collections
;
using
System.IO
;
using
System.IO
;
using
System.Reflection
;
using
System.Reflection
;
...
...
src/ProtocolBuffers/MessageStreamWriter.cs
View file @
2e6dc12f
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.IO
;
using
System.IO
;
namespace
Google.ProtocolBuffers
{
namespace
Google.ProtocolBuffers
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment