aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/ByteString.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2010-11-07 16:30:39 -0600
committercsharptest <roger@csharptest.net>2010-11-07 16:30:39 -0600
commit980ba8dcd470ddb964a84da1317028dd81c1d60a (patch)
tree0a442251e67543740202bb6c8d5f373bb960b2c0 /src/ProtocolBuffers/ByteString.cs
parent804b6d842e9202cd79039cd8e7aa899426d37f78 (diff)
downloadprotobuf-980ba8dcd470ddb964a84da1317028dd81c1d60a.tar.gz
protobuf-980ba8dcd470ddb964a84da1317028dd81c1d60a.tar.bz2
protobuf-980ba8dcd470ddb964a84da1317028dd81c1d60a.zip
Full rutime working, Lite generator and runtime building but untested
Diffstat (limited to 'src/ProtocolBuffers/ByteString.cs')
-rw-r--r--src/ProtocolBuffers/ByteString.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ProtocolBuffers/ByteString.cs b/src/ProtocolBuffers/ByteString.cs
index 78b946bb..5add171e 100644
--- a/src/ProtocolBuffers/ByteString.cs
+++ b/src/ProtocolBuffers/ByteString.cs
@@ -79,6 +79,13 @@ namespace Google.ProtocolBuffers {
}
/// <summary>
+ /// Constructs a ByteString from the Base64 Encoded String.
+ /// </summary>
+ public static ByteString FromBase64(string bytes) {
+ return new ByteString(System.Convert.FromBase64String(bytes));
+ }
+
+ /// <summary>
/// Constructs a ByteString from the given array. The contents
/// are copied, so further modifications to the array will not
/// be reflected in the returned ByteString.