@@ -173,38 +173,38 @@ public readonly void Write(MemoryAddress data, int byteLength)
173173 }
174174
175175 /// <summary>
176- /// Writes the given character as a UTF-8 character.
176+ /// Writes the given <paramref name=" character"/> as a UTF-8 character.
177177 /// </summary>
178- public void WriteUTF8 ( char value )
178+ public readonly void WriteUTF8 ( char character )
179179 {
180- if ( value < 0x7F )
180+ if ( character < 0x7F )
181181 {
182- WriteValue ( ( byte ) value ) ;
182+ WriteValue ( ( byte ) character ) ;
183183 }
184- else if ( value < 0x7FF )
184+ else if ( character < 0x7FF )
185185 {
186- WriteValue ( ( byte ) ( 0xC0 | ( value >> 6 ) ) ) ;
187- WriteValue ( ( byte ) ( 0x80 | ( value & 0x3F ) ) ) ;
186+ WriteValue ( ( byte ) ( 0xC0 | ( character >> 6 ) ) ) ;
187+ WriteValue ( ( byte ) ( 0x80 | ( character & 0x3F ) ) ) ;
188188 }
189- else if ( value < 0xFFFF )
189+ else if ( character < 0xFFFF )
190190 {
191- WriteValue ( ( byte ) ( 0xE0 | ( value >> 12 ) ) ) ;
192- WriteValue ( ( byte ) ( 0x80 | ( ( value >> 6 ) & 0x3F ) ) ) ;
193- WriteValue ( ( byte ) ( 0x80 | ( value & 0x3F ) ) ) ;
191+ WriteValue ( ( byte ) ( 0xE0 | ( character >> 12 ) ) ) ;
192+ WriteValue ( ( byte ) ( 0x80 | ( ( character >> 6 ) & 0x3F ) ) ) ;
193+ WriteValue ( ( byte ) ( 0x80 | ( character & 0x3F ) ) ) ;
194194 }
195195 else
196196 {
197- WriteValue ( ( byte ) ( 0xF0 | ( value >> 18 ) ) ) ;
198- WriteValue ( ( byte ) ( 0x80 | ( ( value >> 12 ) & 0x3F ) ) ) ;
199- WriteValue ( ( byte ) ( 0x80 | ( ( value >> 6 ) & 0x3F ) ) ) ;
200- WriteValue ( ( byte ) ( 0x80 | ( value & 0x3F ) ) ) ;
197+ WriteValue ( ( byte ) ( 0xF0 | ( character >> 18 ) ) ) ;
198+ WriteValue ( ( byte ) ( 0x80 | ( ( character >> 12 ) & 0x3F ) ) ) ;
199+ WriteValue ( ( byte ) ( 0x80 | ( ( character >> 6 ) & 0x3F ) ) ) ;
200+ WriteValue ( ( byte ) ( 0x80 | ( character & 0x3F ) ) ) ;
201201 }
202202 }
203203
204204 /// <summary>
205- /// Writes only the content of this text, without a terminator.
205+ /// Writes only the content of this <paramref name=" text"/> , without a terminator.
206206 /// </summary>
207- public void WriteUTF8 ( ReadOnlySpan < char > text )
207+ public readonly void WriteUTF8 ( ReadOnlySpan < char > text )
208208 {
209209 for ( int i = 0 ; i < text . Length ; i ++ )
210210 {
@@ -235,7 +235,7 @@ public void WriteUTF8(ReadOnlySpan<char> text)
235235 }
236236
237237 /// <summary>
238- /// Writes only the content of this text, without a terminator.
238+ /// Writes only the content of this <paramref name=" text"/> , without a terminator.
239239 /// </summary>
240240 public void WriteUTF8 ( ASCIIText256 text )
241241 {
@@ -245,7 +245,7 @@ public void WriteUTF8(ASCIIText256 text)
245245 }
246246
247247 /// <summary>
248- /// Writes only the content of this text, without a terminator.
248+ /// Writes only the content of this <paramref name=" text"/> , without a terminator.
249249 /// </summary>
250250 public void WriteUTF8 ( string text )
251251 {
@@ -255,13 +255,21 @@ public void WriteUTF8(string text)
255255 }
256256
257257 /// <summary>
258- /// Writes the given <see cref="ISerializable"/> object to the writer.
258+ /// Writes the given <see cref="ISerializable"/> <paramref name="value"/> to the writer.
259259 /// </summary>
260260 public readonly void WriteObject < T > ( T value ) where T : ISerializable
261261 {
262262 value . Write ( this ) ;
263263 }
264264
265+ /// <summary>
266+ /// Writes the given <see cref="ISerializable"/> <paramref name="value"/> to the writer.
267+ /// </summary>
268+ public readonly void WriteObject ( ISerializable value )
269+ {
270+ value . Write ( this ) ;
271+ }
272+
265273 /// <summary>
266274 /// Disposes the writer and frees all resources.
267275 /// </summary>
0 commit comments