diff options
author | csharptest <roger@csharptest.net> | 2011-05-20 12:18:14 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2011-05-20 12:18:14 -0500 |
commit | 10871cc8ddbf57dda938c1fd0df012a95f015f4a (patch) | |
tree | 5e14567063916f74e4d5709ea9d3de712ccd1090 /src/ProtocolBuffers/TextFormat.cs | |
parent | 51eb1b405c852d1efc1dd3ca2d7e29fc0a8b67be (diff) | |
download | protobuf-10871cc8ddbf57dda938c1fd0df012a95f015f4a.tar.gz protobuf-10871cc8ddbf57dda938c1fd0df012a95f015f4a.tar.bz2 protobuf-10871cc8ddbf57dda938c1fd0df012a95f015f4a.zip |
Removed more uses of InternalsVisibleTo, made more stuff public :)
Diffstat (limited to 'src/ProtocolBuffers/TextFormat.cs')
-rw-r--r-- | src/ProtocolBuffers/TextFormat.cs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/ProtocolBuffers/TextFormat.cs b/src/ProtocolBuffers/TextFormat.cs index 27bef8f4..885152db 100644 --- a/src/ProtocolBuffers/TextFormat.cs +++ b/src/ProtocolBuffers/TextFormat.cs @@ -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++) { |