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
10871cc8
Commit
10871cc8
authored
May 20, 2011
by
csharptest
Committed by
rogerk
May 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed more uses of InternalsVisibleTo, made more stuff public :)
parent
51eb1b40
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
36 deletions
+26
-36
CodedInputStream.cs
src/ProtocolBuffers/CodedInputStream.cs
+5
-3
FieldMappingAttribute.cs
src/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs
+5
-4
InvalidProtocolBufferException.cs
src/ProtocolBuffers/InvalidProtocolBufferException.cs
+1
-1
NameHelpers.cs
src/ProtocolBuffers/NameHelpers.cs
+1
-1
AssemblyInfo.cs
src/ProtocolBuffers/Properties/AssemblyInfo.cs
+0
-15
TextFormat.cs
src/ProtocolBuffers/TextFormat.cs
+14
-12
No files found.
src/ProtocolBuffers/CodedInputStream.cs
View file @
10871cc8
...
...
@@ -66,7 +66,7 @@ namespace Google.ProtocolBuffers {
internal
const
int
DefaultRecursionLimit
=
64
;
internal
const
int
DefaultSizeLimit
=
64
<<
20
;
// 64MB
internal
const
int
BufferSize
=
4096
;
public
const
int
BufferSize
=
4096
;
/// <summary>
/// The total number of bytes read before the current buffer. The
...
...
@@ -489,8 +489,10 @@ namespace Google.ProtocolBuffers {
/// CodedInputStream buffers its input.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
internal
static
uint
ReadRawVarint32
(
Stream
input
)
{
/// <returns></returns>
[
CLSCompliant
(
false
)]
public
static
uint
ReadRawVarint32
(
Stream
input
)
{
int
result
=
0
;
int
offset
=
0
;
for
(;
offset
<
32
;
offset
+=
7
)
{
...
...
src/ProtocolBuffers/Descriptors/FieldMappingAttribute.cs
View file @
10871cc8
...
...
@@ -39,15 +39,16 @@ namespace Google.ProtocolBuffers.Descriptors {
/// Defined specifically for the <see cref="FieldType" /> enumeration,
/// this allows each field type to specify the mapped type and wire type.
/// </summary>
[
CLSCompliant
(
false
)]
[
AttributeUsage
(
AttributeTargets
.
Field
)]
internal
sealed
class
FieldMappingAttribute
:
Attribute
{
internal
FieldMappingAttribute
(
MappedType
mappedType
,
WireFormat
.
WireType
wireType
)
{
public
sealed
class
FieldMappingAttribute
:
Attribute
{
public
FieldMappingAttribute
(
MappedType
mappedType
,
WireFormat
.
WireType
wireType
)
{
MappedType
=
mappedType
;
WireType
=
wireType
;
}
internal
MappedType
MappedType
{
get
;
private
set
;
}
internal
WireFormat
.
WireType
WireType
{
get
;
private
set
;
}
public
MappedType
MappedType
{
get
;
private
set
;
}
public
WireFormat
.
WireType
WireType
{
get
;
private
set
;
}
/// <summary>
...
...
src/ProtocolBuffers/InvalidProtocolBufferException.cs
View file @
10871cc8
...
...
@@ -45,7 +45,7 @@ namespace Google.ProtocolBuffers {
:
base
(
message
)
{
}
internal
static
InvalidProtocolBufferException
TruncatedMessage
()
{
public
static
InvalidProtocolBufferException
TruncatedMessage
()
{
return
new
InvalidProtocolBufferException
(
"While parsing a protocol message, the input ended unexpectedly "
+
"in the middle of a field. This could mean either than the "
+
...
...
src/ProtocolBuffers/NameHelpers.cs
View file @
10871cc8
...
...
@@ -100,7 +100,7 @@ namespace Google.ProtocolBuffers {
/// Attempts to strip a suffix from a string, returning whether
/// or not the suffix was actually present.
/// </summary>
internal
static
bool
StripSuffix
(
ref
string
text
,
string
suffix
)
{
public
static
bool
StripSuffix
(
ref
string
text
,
string
suffix
)
{
if
(
text
.
EndsWith
(
suffix
))
{
text
=
text
.
Substring
(
0
,
text
.
Length
-
suffix
.
Length
);
return
true
;
...
...
src/ProtocolBuffers/Properties/AssemblyInfo.cs
View file @
10871cc8
...
...
@@ -68,19 +68,4 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyFileVersion("2.3.0.277")]
#endif
[assembly: InternalsVisibleTo("Google.ProtocolBuffers.Test,PublicKey=" + Google.ProtocolBuffers.Properties.KnownKeys.PublishedKey)]
[assembly: InternalsVisibleTo("Google.ProtocolBuffersLite.Test,PublicKey=" + Google.ProtocolBuffers.Properties.KnownKeys.PublishedKey)]
[assembly: CLSCompliant(true)]
namespace
Google.ProtocolBuffers.Properties
{
class
KnownKeys
{
public
const
string
PublishedKey
=
@"00240000048000009400000006020000002400005253413100040000110000003b4611704c5379"
+
"39c3e0fbe9447dd6fa5462507f9dd4fd9fbf0712457e415b037da6d2c4eb5d2c7d29c86380af68"
+
"7cf400401bb183f2a70bd3b631c1fcb7db8aa66c766694a9fb53fa765df6303104da8c978f3b6d"
+
"53909cd30685b8bc9922c726cd82b5995e9e2cfca6df7a2d189d851492e49f4b76f269ce6dfd08"
+
"c34a7d98"
;
}
}
src/ProtocolBuffers/TextFormat.cs
View file @
10871cc8
...
...
@@ -225,23 +225,25 @@ namespace Google.ProtocolBuffers {
}
}
internal
static
ulong
ParseUInt64
(
string
text
)
{
[
CLSCompliant
(
false
)]
public
static
ulong
ParseUInt64
(
string
text
)
{
return
(
ulong
)
ParseInteger
(
text
,
false
,
true
);
}
internal
static
long
ParseInt64
(
string
text
)
{
public
static
long
ParseInt64
(
string
text
)
{
return
ParseInteger
(
text
,
true
,
true
);
}
internal
static
uint
ParseUInt32
(
string
text
)
{
}
[
CLSCompliant
(
false
)]
public
static
uint
ParseUInt32
(
string
text
)
{
return
(
uint
)
ParseInteger
(
text
,
false
,
false
);
}
internal
static
int
ParseInt32
(
string
text
)
{
public
static
int
ParseInt32
(
string
text
)
{
return
(
int
)
ParseInteger
(
text
,
true
,
false
);
}
internal
static
float
ParseFloat
(
string
text
)
{
public
static
float
ParseFloat
(
string
text
)
{
switch
(
text
)
{
case
"-inf"
:
case
"-infinity"
:
...
...
@@ -261,7 +263,7 @@ namespace Google.ProtocolBuffers {
}
}
internal
static
double
ParseDouble
(
string
text
)
{
public
static
double
ParseDouble
(
string
text
)
{
switch
(
text
)
{
case
"-inf"
:
case
"-infinity"
:
...
...
@@ -363,7 +365,7 @@ namespace Google.ProtocolBuffers {
/// Unescapes a text string as escaped using <see cref="EscapeText(string)" />.
/// Two-digit hex escapes (starting with "\x" are also recognised.
/// </summary>
internal
static
string
UnescapeText
(
string
input
)
{
public
static
string
UnescapeText
(
string
input
)
{
return
UnescapeBytes
(
input
).
ToStringUtf8
();
}
...
...
@@ -372,7 +374,7 @@ namespace Google.ProtocolBuffers {
/// The string is first encoded as UTF-8, then each byte escaped individually.
/// The returned value is guaranteed to be entirely ASCII.
/// </summary>
internal
static
string
EscapeText
(
string
input
)
{
public
static
string
EscapeText
(
string
input
)
{
return
EscapeBytes
(
ByteString
.
CopyFromUtf8
(
input
));
}
...
...
@@ -385,7 +387,7 @@ namespace Google.ProtocolBuffers {
/// using 3-digit octal sequences.
/// The returned value is guaranteed to be entirely ASCII.
/// </summary>
internal
static
String
EscapeBytes
(
ByteString
input
)
{
public
static
String
EscapeBytes
(
ByteString
input
)
{
StringBuilder
builder
=
new
StringBuilder
(
input
.
Length
);
foreach
(
byte
b
in
input
)
{
switch
(
b
)
{
...
...
@@ -418,7 +420,7 @@ namespace Google.ProtocolBuffers {
/// <summary>
/// Performs string unescaping from C style (octal, hex, form feeds, tab etc) into a byte string.
/// </summary>
internal
static
ByteString
UnescapeBytes
(
string
input
)
{
public
static
ByteString
UnescapeBytes
(
string
input
)
{
byte
[]
result
=
new
byte
[
input
.
Length
];
int
pos
=
0
;
for
(
int
i
=
0
;
i
<
input
.
Length
;
i
++)
{
...
...
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