aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/ICodedOutputStream.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-06-10 01:09:57 -0500
committerrogerk <devnull@localhost>2011-06-10 01:09:57 -0500
commitb00ea13eb1b8055a0cde89d01bbde6d95e5cd1a5 (patch)
tree52fd58c77ff0b54a7a9c6a41e5619a485f54e111 /src/ProtocolBuffers/ICodedOutputStream.cs
parentced18e10ae9ca41f338c9e788642d705dd17f9d4 (diff)
downloadprotobuf-b00ea13eb1b8055a0cde89d01bbde6d95e5cd1a5.tar.gz
protobuf-b00ea13eb1b8055a0cde89d01bbde6d95e5cd1a5.tar.bz2
protobuf-b00ea13eb1b8055a0cde89d01bbde6d95e5cd1a5.zip
Refactoring the ICoded interfaces (again) removing the use of some generic methods.
Diffstat (limited to 'src/ProtocolBuffers/ICodedOutputStream.cs')
-rw-r--r--src/ProtocolBuffers/ICodedOutputStream.cs115
1 files changed, 106 insertions, 9 deletions
diff --git a/src/ProtocolBuffers/ICodedOutputStream.cs b/src/ProtocolBuffers/ICodedOutputStream.cs
index 6408d98c..56ee5b61 100644
--- a/src/ProtocolBuffers/ICodedOutputStream.cs
+++ b/src/ProtocolBuffers/ICodedOutputStream.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using Google.ProtocolBuffers.Descriptors;
//Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
@@ -8,6 +9,15 @@ namespace Google.ProtocolBuffers
{
public interface ICodedOutputStream
{
+ void Flush();
+
+ [Obsolete]
+ void WriteUnknownGroup(int fieldNumber, string fieldName, IMessageLite value);
+ void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
+ void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);
+
+ void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
+
/// <summary>
/// Writes a double field value, including tag, to the stream.
/// </summary>
@@ -61,27 +71,114 @@ namespace Google.ProtocolBuffers
/// </summary>
void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);
- [Obsolete]
- void WriteUnknownGroup(int fieldNumber, string fieldName, IMessageLite value);
-
+ /// <summary>
+ /// Writes a message field value, including tag, to the stream.
+ /// </summary>
void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
+ /// <summary>
+ /// Writes a byte array field value, including tag, to the stream.
+ /// </summary>
void WriteBytes(int fieldNumber, string fieldName, ByteString value);
+ /// <summary>
+ /// Writes a UInt32 field value, including tag, to the stream.
+ /// </summary>
[CLSCompliant(false)]
void WriteUInt32(int fieldNumber, string fieldName, uint value);
+ /// <summary>
+ /// Writes an enum field value, including tag, to the stream.
+ /// </summary>
void WriteEnum(int fieldNumber, string fieldName, int value, object rawValue);
+ /// <summary>
+ /// Writes a fixed 32-bit field value, including tag, to the stream.
+ /// </summary>
void WriteSFixed32(int fieldNumber, string fieldName, int value);
+ /// <summary>
+ /// Writes a signed fixed 64-bit field value, including tag, to the stream.
+ /// </summary>
void WriteSFixed64(int fieldNumber, string fieldName, long value);
+ /// <summary>
+ /// Writes a signed 32-bit field value, including tag, to the stream.
+ /// </summary>
void WriteSInt32(int fieldNumber, string fieldName, int value);
+ /// <summary>
+ /// Writes a signed 64-bit field value, including tag, to the stream.
+ /// </summary>
void WriteSInt64(int fieldNumber, string fieldName, long value);
- void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
- void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);
+
void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
+
+ void WriteGroupArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
+ where T : IMessageLite;
+
+ void WriteMessageArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
+ where T : IMessageLite;
+
+ void WriteStringArray(int fieldNumber, string fieldName, IEnumerable<string> list);
+
+ void WriteBytesArray(int fieldNumber, string fieldName, IEnumerable<ByteString> list);
+
+ void WriteBoolArray(int fieldNumber, string fieldName, IEnumerable<bool> list);
+
+ void WriteInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
+
+ void WriteSInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
+
+ void WriteUInt32Array(int fieldNumber, string fieldName, IEnumerable<uint> list);
+
+ void WriteFixed32Array(int fieldNumber, string fieldName, IEnumerable<uint> list);
+
+ void WriteSFixed32Array(int fieldNumber, string fieldName, IEnumerable<int> list);
+
+ void WriteInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
+
+ void WriteSInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
+
+ void WriteUInt64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list);
+
+ void WriteFixed64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list);
+
+ void WriteSFixed64Array(int fieldNumber, string fieldName, IEnumerable<long> list);
+
+ void WriteDoubleArray(int fieldNumber, string fieldName, IEnumerable<double> list);
+
+ void WriteFloatArray(int fieldNumber, string fieldName, IEnumerable<float> list);
+
+ [CLSCompliant(false)]
+ void WriteEnumArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list)
+ where T : struct, IComparable, IFormattable, IConvertible;
+
void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
- void WriteArray<T>(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.Generic.IEnumerable<T> list);
- void WritePackedArray<T>(FieldType fieldType, int fieldNumber, string fieldName, int calculatedSize, System.Collections.Generic.IEnumerable<T> list);
- void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
- void Flush();
+
+ void WritePackedBoolArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<bool> list);
+
+ void WritePackedInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
+
+ void WritePackedSInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
+
+ void WritePackedUInt32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<uint> list);
+
+ void WritePackedFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<uint> list);
+
+ void WritePackedSFixed32Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<int> list);
+
+ void WritePackedInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
+
+ void WritePackedSInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
+
+ void WritePackedUInt64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<ulong> list);
+
+ void WritePackedFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<ulong> list);
+
+ void WritePackedSFixed64Array(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<long> list);
+
+ void WritePackedDoubleArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<double> list);
+
+ void WritePackedFloatArray(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<float> list);
+
+ [CLSCompliant(false)]
+ void WritePackedEnumArray<T>(int fieldNumber, string fieldName, int calculatedSize, IEnumerable<T> list)
+ where T : struct, IComparable, IFormattable, IConvertible;
}
} \ No newline at end of file