aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/ICodedOutputStream.cs
blob: 94aeff0b15281bf4fb06eeb09239c56bdbc00d1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
using System;
using System.Collections.Generic;
using Google.ProtocolBuffers.Descriptors;

//Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
#pragma warning disable 3010

namespace Google.ProtocolBuffers
{
    public interface ICodedOutputStream
    {
        void Flush();

        [Obsolete]
        void WriteUnknownGroup(int fieldNumber, IMessageLite value);
        void WriteUnknownBytes(int fieldNumber, ByteString value);
        [CLSCompliant(false)]
        void WriteUnknownField(int fieldNumber, WireFormat.WireType wireType, ulong 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>
        void WriteDouble(int fieldNumber, string fieldName, double value);

        /// <summary>
        /// Writes a float field value, including tag, to the stream.
        /// </summary>
        void WriteFloat(int fieldNumber, string fieldName, float value);

        /// <summary>
        /// Writes a uint64 field value, including tag, to the stream.
        /// </summary>
        [CLSCompliant(false)]
        void WriteUInt64(int fieldNumber, string fieldName, ulong value);

        /// <summary>
        /// Writes an int64 field value, including tag, to the stream.
        /// </summary>
        void WriteInt64(int fieldNumber, string fieldName, long value);

        /// <summary>
        /// Writes an int32 field value, including tag, to the stream.
        /// </summary>
        void WriteInt32(int fieldNumber, string fieldName, int value);

        /// <summary>
        /// Writes a fixed64 field value, including tag, to the stream.
        /// </summary>
        [CLSCompliant(false)]
        void WriteFixed64(int fieldNumber, string fieldName, ulong value);

        /// <summary>
        /// Writes a fixed32 field value, including tag, to the stream.
        /// </summary>
        [CLSCompliant(false)]
        void WriteFixed32(int fieldNumber, string fieldName, uint value);

        /// <summary>
        /// Writes a bool field value, including tag, to the stream.
        /// </summary>
        void WriteBool(int fieldNumber, string fieldName, bool value);

        /// <summary>
        /// Writes a string field value, including tag, to the stream.
        /// </summary>
        void WriteString(int fieldNumber, string fieldName, string value);

        /// <summary>
        /// Writes a group field value, including tag, to the stream.
        /// </summary>
        void WriteGroup(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 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 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;
    }
}