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
ec79ca13
Commit
ec79ca13
authored
Dec 14, 2010
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed build for lite runtime
parent
f82a09da
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
157 additions
and
121 deletions
+157
-121
build.csproj
build/build.csproj
+34
-12
UnitTestImportLiteProtoFile.cs
...colBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
+96
-46
ProtocolBuffers.sln
src/ProtocolBuffers.sln
+8
-8
EnumLite.cs
src/ProtocolBuffers/EnumLite.cs
+10
-0
ProtocolBuffers.csproj
src/ProtocolBuffers/ProtocolBuffers.csproj
+9
-10
ProtocolBuffersLite.Test.csproj
src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
+0
-21
ProtocolBuffersLiteMixed.Test.csproj
...ocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
+0
-21
TestLiteByApi.cs
src/ProtocolBuffersLite.Test/TestLiteByApi.cs
+0
-3
No files found.
build/build.csproj
View file @
ec79ca13
...
@@ -31,35 +31,36 @@
...
@@ -31,35 +31,36 @@
<WorkingDirectories
Include=
"$(BuildTempDirectory)"
/>
<WorkingDirectories
Include=
"$(BuildTempDirectory)"
/>
<WorkingDirectories
Include=
"$(BuildOutputDirectory)"
/>
<WorkingDirectories
Include=
"$(BuildOutputDirectory)"
/>
<Protos
Include=
"$(ProtosDirectory)\extest\unittest_extras_full.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\extest\unittest_extras_lite.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\descriptor.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\descriptor.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\csharp_options.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\csharp_options.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_csharp_options.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_csharp_options.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_custom_options.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_custom_options.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_embed_optimize_for.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_embed_optimize_for.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_import.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_empty.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_import.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_import_lite.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_lite_imports_nonlite.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_mset.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_mset.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_no_generic_services.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_optimize_for.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\google\protobuf\unittest_optimize_for.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\tutorial\addressbook.proto"
/>
<Protos
Include=
"$(ProtosDirectory)\tutorial\addressbook.proto"
/>
<!-- Main protos -->
<GeneratedSource
Include=
"$(BuildTempDirectory)\CSharpOptions.cs"
>
<GeneratedSource
Include=
"$(BuildTempDirectory)\CSharpOptions.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers\DescriptorProtos
</TargetDirectory>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers\DescriptorProtos
</TargetDirectory>
</GeneratedSource>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\DescriptorProtoFile.cs"
>
<GeneratedSource
Include=
"$(BuildTempDirectory)\DescriptorProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers\DescriptorProtos
</TargetDirectory>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers\DescriptorProtos
</TargetDirectory>
</GeneratedSource>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestMessageSetProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
<!-- Address book sample -->
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestOptimizeForProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\AddressBookProtos.cs"
>
<GeneratedSource
Include=
"$(BuildTempDirectory)\AddressBookProtos.cs"
>
<TargetDirectory>
$(SourceDirectory)\AddressBook
</TargetDirectory>
<TargetDirectory>
$(SourceDirectory)\AddressBook
</TargetDirectory>
</GeneratedSource>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestCSharpOptionsProtoFile.cs"
>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestCSharpOptionsProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
</GeneratedSource>
...
@@ -69,14 +70,35 @@
...
@@ -69,14 +70,35 @@
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs"
>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestEmptyProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestImportLiteProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestImportProtoFile.cs"
>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestImportProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestMessageSetProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestNoGenericServicesProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestOptimizeForProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<GeneratedSource
Include=
"$(BuildTempDirectory)\UnitTestProtoFile.cs"
>
<TargetDirectory>
$(SourceDirectory)\ProtocolBuffers.Test\TestProtos
</TargetDirectory>
</GeneratedSource>
<TestContainer
Include=
"$(SourceDirectory)\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll"
/>
<TestContainer
Include=
"$(SourceDirectory)\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll"
/>
<TestContainer
Include=
"$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffersLite.Test.dll"
/>
<TestContainer
Include=
"$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffersMixedLite.Test.dll"
/>
<TestContainer
Include=
"$(SourceDirectory)\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll"
/>
<TestContainer
Include=
"$(SourceDirectory)\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffersLite.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\ProtoGen.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\ProtoGen.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtoMunge\bin\$(BuildConfiguration)\ProtoMunge.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtoMunge\bin\$(BuildConfiguration)\ProtoMunge.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtoDump\bin\$(BuildConfiguration)\ProtoDump.*"
/>
<DynamicPackageItem
Include=
"$(SourceDirectory)\ProtoDump\bin\$(BuildConfiguration)\ProtoDump.*"
/>
...
...
src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
View file @
ec79ca13
// Generated by
the protocol buffer compiler
. DO NOT EDIT!
// Generated by
ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd
. DO NOT EDIT!
using
pb
=
global
::
Google
.
ProtocolBuffers
;
using
pb
=
global
::
Google
.
ProtocolBuffers
;
using
pbc
=
global
::
Google
.
ProtocolBuffers
.
Collections
;
using
pbc
=
global
::
Google
.
ProtocolBuffers
.
Collections
;
...
@@ -13,39 +13,11 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -13,39 +13,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
#
endregion
#
endregion
#
region
Static
variables
#
region
Static
variables
internal
static
pbd
::
MessageDescriptor
internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor
;
internal
static
pb
::
FieldAccess
.
FieldAccessorTable
<
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
,
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
.
Builder
>
internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable
;
#
endregion
#
endregion
#
region
Descriptor
#
region
Extensions
public
static
pbd
::
FileDescriptor
Descriptor
{
internal
static
readonly
object
Descriptor
;
get
{
return
descriptor
;
}
}
private
static
pbd
::
FileDescriptor
descriptor
;
static
UnitTestImportLiteProtoFile
()
{
static
UnitTestImportLiteProtoFile
()
{
byte
[]
descriptorData
=
global
::
System
.
Convert
.
FromBase64String
(
Descriptor
=
null
;
"Cipnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0X2xpdGUucHJvdG8S"
+
"GHByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydBokZ29vZ2xlL3Byb3RvYnVmL2Nz"
+
"aGFycF9vcHRpb25zLnByb3RvIh4KEUltcG9ydE1lc3NhZ2VMaXRlEgkKAWQY"
+
"ASABKAUqTwoOSW1wb3J0RW51bUxpdGUSEwoPSU1QT1JUX0xJVEVfRk9PEAcS"
+
"EwoPSU1QT1JUX0xJVEVfQkFSEAgSEwoPSU1QT1JUX0xJVEVfQkFaEAlCWgoT"
+
"Y29tLmdvb2dsZS5wcm90b2J1ZkgDwj5ACiFHb29nbGUuUHJvdG9jb2xCdWZm"
+
"ZXJzLlRlc3RQcm90b3MSG1VuaXRUZXN0SW1wb3J0TGl0ZVByb3RvRmlsZQ=="
);
pbd
::
FileDescriptor
.
InternalDescriptorAssigner
assigner
=
delegate
(
pbd
::
FileDescriptor
root
)
{
descriptor
=
root
;
internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor
=
Descriptor
.
MessageTypes
[
0
];
internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable
=
new
pb
::
FieldAccess
.
FieldAccessorTable
<
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
,
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
.
Builder
>(
internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor
,
new
string
[]
{
"D"
,
});
pb
::
ExtensionRegistry
registry
=
pb
::
ExtensionRegistry
.
CreateInstance
();
RegisterAllExtensions
(
registry
);
global
::
Google
.
ProtocolBuffers
.
DescriptorProtos
.
CSharpOptions
.
RegisterAllExtensions
(
registry
);
return
registry
;
};
pbd
::
FileDescriptor
.
InternalBuildGeneratedFileFrom
(
descriptorData
,
new
pbd
::
FileDescriptor
[]
{
global
::
Google
.
ProtocolBuffers
.
DescriptorProtos
.
CSharpOptions
.
Descriptor
,
},
assigner
);
}
}
#
endregion
#
endregion
...
@@ -60,7 +32,7 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -60,7 +32,7 @@ namespace Google.ProtocolBuffers.TestProtos {
#
endregion
#
endregion
#
region
Messages
#
region
Messages
public
sealed
partial
class
ImportMessageLite
:
pb
::
GeneratedMessage
<
ImportMessageLite
,
ImportMessageLite
.
Builder
>
{
public
sealed
partial
class
ImportMessageLite
:
pb
::
GeneratedMessage
Lite
<
ImportMessageLite
,
ImportMessageLite
.
Builder
>
{
private
static
readonly
ImportMessageLite
defaultInstance
=
new
Builder
().
BuildPartial
();
private
static
readonly
ImportMessageLite
defaultInstance
=
new
Builder
().
BuildPartial
();
public
static
ImportMessageLite
DefaultInstance
{
public
static
ImportMessageLite
DefaultInstance
{
get
{
return
defaultInstance
;
}
get
{
return
defaultInstance
;
}
...
@@ -74,14 +46,6 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -74,14 +46,6 @@ namespace Google.ProtocolBuffers.TestProtos {
get
{
return
this
;
}
get
{
return
this
;
}
}
}
public
static
pbd
::
MessageDescriptor
Descriptor
{
get
{
return
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
UnitTestImportLiteProtoFile
.
internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor
;
}
}
protected
override
pb
::
FieldAccess
.
FieldAccessorTable
<
ImportMessageLite
,
ImportMessageLite
.
Builder
>
InternalFieldAccessors
{
get
{
return
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
UnitTestImportLiteProtoFile
.
internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable
;
}
}
public
const
int
DFieldNumber
=
1
;
public
const
int
DFieldNumber
=
1
;
private
bool
hasD
;
private
bool
hasD
;
private
int
d_
=
0
;
private
int
d_
=
0
;
...
@@ -92,6 +56,53 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -92,6 +56,53 @@ namespace Google.ProtocolBuffers.TestProtos {
get
{
return
d_
;
}
get
{
return
d_
;
}
}
}
public
override
bool
IsInitialized
{
get
{
return
true
;
}
}
public
override
void
WriteTo
(
pb
::
CodedOutputStream
output
)
{
int
size
=
SerializedSize
;
if
(
HasD
)
{
output
.
WriteInt32
(
1
,
D
);
}
}
private
int
memoizedSerializedSize
=
-
1
;
public
override
int
SerializedSize
{
get
{
int
size
=
memoizedSerializedSize
;
if
(
size
!=
-
1
)
return
size
;
size
=
0
;
if
(
HasD
)
{
size
+=
pb
::
CodedOutputStream
.
ComputeInt32Size
(
1
,
D
);
}
memoizedSerializedSize
=
size
;
return
size
;
}
}
#
region
Lite
runtime
methods
public
override
int
GetHashCode
()
{
int
hash
=
GetType
().
GetHashCode
();
if
(
hasD
)
hash
^=
d_
.
GetHashCode
();
return
hash
;
}
public
override
bool
Equals
(
object
obj
)
{
ImportMessageLite
other
=
obj
as
ImportMessageLite
;
if
(
other
==
null
)
return
false
;
if
(
hasD
!=
other
.
hasD
||
(
hasD
&&
!
d_
.
Equals
(
other
.
d_
)))
return
false
;
return
true
;
}
public
override
void
PrintTo
(
global
::
System
.
IO
.
TextWriter
writer
)
{
PrintField
(
"d"
,
hasD
,
d_
,
writer
);
}
#
endregion
public
static
ImportMessageLite
ParseFrom
(
pb
::
ByteString
data
)
{
public
static
ImportMessageLite
ParseFrom
(
pb
::
ByteString
data
)
{
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
data
)).
BuildParsed
();
return
((
Builder
)
CreateBuilder
().
MergeFrom
(
data
)).
BuildParsed
();
}
}
...
@@ -129,7 +140,7 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -129,7 +140,7 @@ namespace Google.ProtocolBuffers.TestProtos {
return
(
Builder
)
new
Builder
().
MergeFrom
(
prototype
);
return
(
Builder
)
new
Builder
().
MergeFrom
(
prototype
);
}
}
public
sealed
partial
class
Builder
:
pb
::
GeneratedBuilder
<
ImportMessageLite
,
Builder
>
{
public
sealed
partial
class
Builder
:
pb
::
GeneratedBuilder
Lite
<
ImportMessageLite
,
Builder
>
{
protected
override
Builder
ThisBuilder
{
protected
override
Builder
ThisBuilder
{
get
{
return
this
;
}
get
{
return
this
;
}
}
}
...
@@ -150,10 +161,6 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -150,10 +161,6 @@ namespace Google.ProtocolBuffers.TestProtos {
return
new
Builder
().
MergeFrom
(
result
);
return
new
Builder
().
MergeFrom
(
result
);
}
}
public
override
pbd
::
MessageDescriptor
DescriptorForType
{
get
{
return
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
.
Descriptor
;
}
}
public
override
ImportMessageLite
DefaultInstanceForType
{
public
override
ImportMessageLite
DefaultInstanceForType
{
get
{
return
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
.
DefaultInstance
;
}
get
{
return
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
.
DefaultInstance
;
}
}
}
...
@@ -167,6 +174,49 @@ namespace Google.ProtocolBuffers.TestProtos {
...
@@ -167,6 +174,49 @@ namespace Google.ProtocolBuffers.TestProtos {
return
returnMe
;
return
returnMe
;
}
}
public
override
Builder
MergeFrom
(
pb
::
IMessageLite
other
)
{
if
(
other
is
ImportMessageLite
)
{
return
MergeFrom
((
ImportMessageLite
)
other
);
}
else
{
base
.
MergeFrom
(
other
);
return
this
;
}
}
public
override
Builder
MergeFrom
(
ImportMessageLite
other
)
{
if
(
other
==
global
::
Google
.
ProtocolBuffers
.
TestProtos
.
ImportMessageLite
.
DefaultInstance
)
return
this
;
if
(
other
.
HasD
)
{
D
=
other
.
D
;
}
return
this
;
}
public
override
Builder
MergeFrom
(
pb
::
CodedInputStream
input
)
{
return
MergeFrom
(
input
,
pb
::
ExtensionRegistry
.
Empty
);
}
public
override
Builder
MergeFrom
(
pb
::
CodedInputStream
input
,
pb
::
ExtensionRegistry
extensionRegistry
)
{
while
(
true
)
{
uint
tag
=
input
.
ReadTag
();
switch
(
tag
)
{
case
0
:
{
return
this
;
}
default
:
{
if
(
pb
::
WireFormat
.
IsEndGroupTag
(
tag
))
{
return
this
;
}
ParseUnknownField
(
input
,
extensionRegistry
,
tag
);
break
;
}
case
8
:
{
D
=
input
.
ReadInt32
();
break
;
}
}
}
}
public
bool
HasD
{
public
bool
HasD
{
get
{
return
result
.
HasD
;
}
get
{
return
result
.
HasD
;
}
...
...
src/ProtocolBuffers.sln
View file @
ec79ca13
...
@@ -131,20 +131,20 @@ Global
...
@@ -131,20 +131,20 @@ Global
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug
_Silverlight2
|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug
_Silverlight2
|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release
_Silverlight2
|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release
_Silverlight2
|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug
_Silverlight2
|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug
_Silverlight2
|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release
_Silverlight2
|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release
_Silverlight2
|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobalSection
...
...
src/ProtocolBuffers/EnumLite.cs
View file @
ec79ca13
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Globalization
;
using
System.Reflection
;
using
System.Text
;
using
System.Text
;
namespace
Google.ProtocolBuffers
{
namespace
Google.ProtocolBuffers
{
...
@@ -86,8 +87,17 @@ namespace Google.ProtocolBuffers {
...
@@ -86,8 +87,17 @@ namespace Google.ProtocolBuffers {
public
EnumLiteMap
()
{
public
EnumLiteMap
()
{
items
=
new
SortedList
<
int
,
IEnumLite
>();
items
=
new
SortedList
<
int
,
IEnumLite
>();
#if SILVERLIGHT2
// Silverlight doesn't support Enum.GetValues
// TODO(jonskeet): Validate that this reflection is permitted, e.g. in Windows Phone 7
foreach
(
FieldInfo
fi
in
typeof
(
TEnum
).
GetFields
(
BindingFlags
.
Static
|
BindingFlags
.
Public
))
{
TEnum
evalue
=
(
TEnum
)
fi
.
GetValue
(
null
);
items
.
Add
(
Convert
.
ToInt32
(
evalue
),
new
EnumValue
(
evalue
));
}
#else
foreach
(
TEnum
evalue
in
Enum
.
GetValues
(
typeof
(
TEnum
)))
foreach
(
TEnum
evalue
in
Enum
.
GetValues
(
typeof
(
TEnum
)))
items
.
Add
(
Convert
.
ToInt32
(
evalue
),
new
EnumValue
(
evalue
));
items
.
Add
(
Convert
.
ToInt32
(
evalue
),
new
EnumValue
(
evalue
));
#endif
}
}
IEnumLite
IEnumLiteMap
.
FindValueByNumber
(
int
number
)
{
IEnumLite
IEnumLiteMap
.
FindValueByNumber
(
int
number
)
{
...
...
src/ProtocolBuffers/ProtocolBuffers.csproj
View file @
ec79ca13
...
@@ -68,19 +68,18 @@
...
@@ -68,19 +68,18 @@
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'"
>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'"
>
<DebugType>
pdbonly
</DebugType>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release_Silverlight2\
</OutputPath>
<OutputPath>
bin\Release_Silverlight2\
</OutputPath>
<DefineConstants>
TRACE;SILVERLIGHT2
</DefineConstants>
<DefineConstants>
TRACE;SILVERLIGHT2
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<NoStdLib>
true
</NoStdLib>
<NoStdLib>
true
</NoStdLib>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"mscorlib"
/>
<Reference
Include=
"mscorlib"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
...
@@ -199,7 +198,7 @@
...
@@ -199,7 +198,7 @@
<Install>
true
</Install>
<Install>
true
</Install>
</BootstrapperPackage>
</BootstrapperPackage>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
Condition=
" '$(Configuration)' == 'Debug' "
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
Condition=
" '$(Configuration)' == 'Debug' "
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
Condition=
" '$(Configuration)' == 'Release' "
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
Condition=
" '$(Configuration)' == 'Release' "
/>
<Import
Project=
"$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets"
Condition=
" '$(Configuration)' == 'Debug_Silverlight2' "
/>
<Import
Project=
"$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets"
Condition=
" '$(Configuration)' == 'Debug_Silverlight2' "
/>
<Import
Project=
"$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets"
Condition=
" '$(Configuration)' == 'Release_Silverlight2' "
/>
<Import
Project=
"$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets"
Condition=
" '$(Configuration)' == 'Release_Silverlight2' "
/>
...
...
src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
View file @
ec79ca13
...
@@ -38,27 +38,6 @@
...
@@ -38,27 +38,6 @@
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<NoStdLib>
true
</NoStdLib>
<NoStdLib>
true
</NoStdLib>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'"
>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug_Silverlight2\
</OutputPath>
<DefineConstants>
DEBUG;TRACE;SILVERLIGHT2
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<NoStdLib>
true
</NoStdLib>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'"
>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release_Silverlight2\
</OutputPath>
<DefineConstants>
TRACE;SILVERLIGHT2
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<NoStdLib>
true
</NoStdLib>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"
>
<Reference
Include=
"nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"
>
<SpecificVersion>
False
</SpecificVersion>
<SpecificVersion>
False
</SpecificVersion>
...
...
src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
View file @
ec79ca13
...
@@ -38,27 +38,6 @@
...
@@ -38,27 +38,6 @@
<NoStdLib>
true
</NoStdLib>
<NoStdLib>
true
</NoStdLib>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'"
>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug_Silverlight2\
</OutputPath>
<DefineConstants>
DEBUG;TRACE;SILVERLIGHT2
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<NoStdLib>
true
</NoStdLib>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'"
>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release_Silverlight2\
</OutputPath>
<DefineConstants>
TRACE;SILVERLIGHT2
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<NoStdLib>
true
</NoStdLib>
<CodeAnalysisRuleSet>
AllRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"
>
<Reference
Include=
"nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"
>
<SpecificVersion>
False
</SpecificVersion>
<SpecificVersion>
False
</SpecificVersion>
...
...
src/ProtocolBuffersLite.Test/TestLiteByApi.cs
View file @
ec79ca13
...
@@ -32,9 +32,6 @@
...
@@ -32,9 +32,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
#endregion
using
System
;
using
System.Collections.Generic
;
using
Google.ProtocolBuffers
;
using
Google.ProtocolBuffers.TestProtos
;
using
Google.ProtocolBuffers.TestProtos
;
using
NUnit.Framework
;
using
NUnit.Framework
;
...
...
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