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
3bf74a91
Commit
3bf74a91
authored
Jul 16, 2015
by
Jon Skeet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #605 from jtattermusch/csharp_cleanup
Assorted nits from C# code.
parents
19cf9d1e
b4a24aa5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
10 deletions
+5
-10
ByteString.cs
csharp/src/ProtocolBuffers/ByteString.cs
+2
-0
RepeatedField.cs
csharp/src/ProtocolBuffers/Collections/RepeatedField.cs
+1
-2
FrameworkPortability.cs
csharp/src/ProtocolBuffers/FrameworkPortability.cs
+1
-0
InvalidProtocolBufferException.cs
csharp/src/ProtocolBuffers/InvalidProtocolBufferException.cs
+0
-6
ProtocolBuffers.csproj
csharp/src/ProtocolBuffers/ProtocolBuffers.csproj
+0
-1
IFieldAccessor.cs
csharp/src/ProtocolBuffers/Reflection/IFieldAccessor.cs
+1
-1
No files found.
csharp/src/ProtocolBuffers/ByteString.cs
View file @
3bf74a91
...
@@ -134,6 +134,8 @@ namespace Google.Protobuf
...
@@ -134,6 +134,8 @@ namespace Google.Protobuf
/// Constructs a ByteString from the given array. The contents
/// Constructs a ByteString from the given array. The contents
/// are copied, so further modifications to the array will not
/// are copied, so further modifications to the array will not
/// be reflected in the returned ByteString.
/// be reflected in the returned ByteString.
/// This method can also be invoked in <c>ByteString.CopyFrom(0xaa, 0xbb, ...)</c> form
/// which is primarily useful for testing.
/// </summary>
/// </summary>
public
static
ByteString
CopyFrom
(
params
byte
[]
bytes
)
public
static
ByteString
CopyFrom
(
params
byte
[]
bytes
)
{
{
...
...
csharp/src/ProtocolBuffers/Collections/RepeatedField.cs
View file @
3bf74a91
...
@@ -44,9 +44,9 @@ namespace Google.Protobuf.Collections
...
@@ -44,9 +44,9 @@ namespace Google.Protobuf.Collections
public
sealed
class
RepeatedField
<
T
>
:
IList
<
T
>,
IList
,
IDeepCloneable
<
RepeatedField
<
T
>>,
IEquatable
<
RepeatedField
<
T
>>,
IFreezable
public
sealed
class
RepeatedField
<
T
>
:
IList
<
T
>,
IList
,
IDeepCloneable
<
RepeatedField
<
T
>>,
IEquatable
<
RepeatedField
<
T
>>,
IFreezable
{
{
private
static
readonly
T
[]
EmptyArray
=
new
T
[
0
];
private
static
readonly
T
[]
EmptyArray
=
new
T
[
0
];
private
const
int
MinArraySize
=
8
;
private
bool
frozen
;
private
bool
frozen
;
private
const
int
MinArraySize
=
8
;
private
T
[]
array
=
EmptyArray
;
private
T
[]
array
=
EmptyArray
;
private
int
count
=
0
;
private
int
count
=
0
;
...
@@ -259,7 +259,6 @@ namespace Google.Protobuf.Collections
...
@@ -259,7 +259,6 @@ namespace Google.Protobuf.Collections
public
int
Count
{
get
{
return
count
;
}
}
public
int
Count
{
get
{
return
count
;
}
}
// TODO(jonskeet): If we implement freezing, make this reflect it.
public
bool
IsReadOnly
{
get
{
return
IsFrozen
;
}
}
public
bool
IsReadOnly
{
get
{
return
IsFrozen
;
}
}
public
void
Add
(
RepeatedField
<
T
>
values
)
public
void
Add
(
RepeatedField
<
T
>
values
)
...
...
csharp/src/ProtocolBuffers/FrameworkPortability.cs
View file @
3bf74a91
...
@@ -40,6 +40,7 @@ namespace Google.Protobuf
...
@@ -40,6 +40,7 @@ namespace Google.Protobuf
/// </summary>
/// </summary>
internal
static
class
FrameworkPortability
internal
static
class
FrameworkPortability
{
{
// TODO(jtattermusch): is this still a thing?
// The value of RegexOptions.Compiled is 8. We can test for the presence at
// The value of RegexOptions.Compiled is 8. We can test for the presence at
// execution time using Enum.IsDefined, so a single build will do the right thing
// execution time using Enum.IsDefined, so a single build will do the right thing
// on each platform.
// on each platform.
...
...
csharp/src/ProtocolBuffers/InvalidProtocolBufferException.cs
View file @
3bf74a91
...
@@ -79,12 +79,6 @@ namespace Google.Protobuf
...
@@ -79,12 +79,6 @@ namespace Google.Protobuf
"Protocol message end-group tag did not match expected tag."
);
"Protocol message end-group tag did not match expected tag."
);
}
}
internal
static
InvalidProtocolBufferException
InvalidWireType
()
{
return
new
InvalidProtocolBufferException
(
"Protocol message tag had invalid wire type."
);
}
internal
static
InvalidProtocolBufferException
RecursionLimitExceeded
()
internal
static
InvalidProtocolBufferException
RecursionLimitExceeded
()
{
{
return
new
InvalidProtocolBufferException
(
return
new
InvalidProtocolBufferException
(
...
...
csharp/src/ProtocolBuffers/ProtocolBuffers.csproj
View file @
3bf74a91
...
@@ -111,7 +111,6 @@
...
@@ -111,7 +111,6 @@
<ItemGroup>
<ItemGroup>
<None
Include=
"Google.Protobuf.nuspec"
/>
<None
Include=
"Google.Protobuf.nuspec"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup
/>
<Import
Project=
"$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets"
/>
<Import
Project=
"$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Other similar extension points exist, see Microsoft.Common.targets.
...
...
csharp/src/ProtocolBuffers/Reflection/IFieldAccessor.cs
View file @
3bf74a91
...
@@ -42,7 +42,7 @@ namespace Google.Protobuf.Reflection
...
@@ -42,7 +42,7 @@ namespace Google.Protobuf.Reflection
/// </summary>
/// </summary>
FieldDescriptor
Descriptor
{
get
;
}
FieldDescriptor
Descriptor
{
get
;
}
// TODO: Should the argument type for these messages b
y
IReflectedMessage?
// TODO: Should the argument type for these messages b
e
IReflectedMessage?
/// <summary>
/// <summary>
/// Clears the field in the specified message. (For repeated fields,
/// Clears the field in the specified message. (For repeated fields,
...
...
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