24 writes to _offset
System.Formats.Asn1 (24)
System\Formats\Asn1\AsnWriter.BitString.cs (6)
92
_offset
++;
94
_offset
+= bitString.Length;
171
_offset
++;
177
_offset
+= MaxCERContentSize;
184
_offset
++;
188
_offset
+= remainingData.Length;
System\Formats\Asn1\AsnWriter.Boolean.cs (1)
37
_offset
++;
System\Formats\Asn1\AsnWriter.cs (1)
95
_offset
= 0;
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (3)
136
_offset
+= IntegerPortionLength;
138
_offset
+= fraction.Length;
141
_offset
++;
System\Formats\Asn1\AsnWriter.Integer.cs (6)
164
_offset
+= valueLength;
216
_offset
+= valueLength;
239
_offset
++;
247
_offset
+= value.Length;
275
_offset
+= value.Length;
288
_offset
+= bytesWritten;
System\Formats\Asn1\AsnWriter.OctetString.cs (3)
99
_offset
+= octetString.Length;
153
_offset
+= MaxCERSegmentSize;
161
_offset
+= remainingData.Length;
System\Formats\Asn1\AsnWriter.Oid.cs (2)
70
_offset
+= wellKnownContents.Length;
142
_offset
+= tmpOffset;
System\Formats\Asn1\AsnWriter.Text.cs (1)
113
_offset
+= size;
System\Formats\Asn1\AsnWriter.UtcTime.cs (1)
114
_offset
+= UtcTimeValueLength;
46 references to _offset
System.Formats.Asn1 (46)
System\Formats\Asn1\AsnWriter.BitString.cs (9)
91
_buffer[
_offset
] = (byte)unusedBitCount;
93
bitString.CopyTo(_buffer.AsSpan(
_offset
));
151
int savedOffset =
_offset
;
170
_buffer[
_offset
] = 0;
173
dest = _buffer.AsSpan(
_offset
);
183
_buffer[
_offset
] = (byte)unusedBitCount;
186
dest = _buffer.AsSpan(
_offset
);
192
Debug.Assert(
_offset
- savedOffset == expectedSize, $"expected size was {expectedSize}, actual was {
_offset
- savedOffset}");
System\Formats\Asn1\AsnWriter.Boolean.cs (2)
35
Debug.Assert(
_offset
< _buffer.Length);
36
_buffer[
_offset
] = (byte)(value ? 0xFF : 0x00);
System\Formats\Asn1\AsnWriter.cs (10)
91
if (
_offset
> 0)
94
Array.Clear(_buffer, 0,
_offset
);
119
return
_offset
;
144
if (destination.Length <
_offset
)
150
if (
_offset
== 0)
156
bytesWritten =
_offset
;
157
_buffer.AsSpan(0,
_offset
).CopyTo(destination);
181
Debug.Assert(bytesWritten ==
_offset
);
202
if (
_offset
== 0)
209
return _buffer.AsSpan(0,
_offset
).ToArray();
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (2)
121
Span<byte> baseSpan = _buffer.AsSpan(
_offset
);
140
_buffer[
_offset
] = (byte)'Z';
System\Formats\Asn1\AsnWriter.Integer.cs (12)
146
int idx =
_offset
+ valueLength - 1;
153
} while (idx >=
_offset
);
160
Debug.Assert(_buffer[
_offset
] != 0xFF || _buffer[
_offset
+ 1] < 0x80);
198
int idx =
_offset
+ valueLength - 1;
205
} while (idx >=
_offset
);
212
Debug.Assert(_buffer[
_offset
] != 0 || _buffer[
_offset
+ 1] > 0x7F);
238
_buffer[
_offset
] = 0;
246
value.CopyTo(_buffer.AsSpan(
_offset
));
274
value.CopyTo(_buffer.AsSpan(
_offset
));
287
value.TryWriteBytes(_buffer.AsSpan(
_offset
), out int bytesWritten, isBigEndian: true);
System\Formats\Asn1\AsnWriter.OctetString.cs (6)
98
octetString.CopyTo(_buffer.AsSpan(
_offset
));
138
int savedOffset =
_offset
;
150
dest = _buffer.AsSpan(
_offset
);
159
dest = _buffer.AsSpan(
_offset
);
165
Debug.Assert(
_offset
- savedOffset == expectedSize, $"expected size was {expectedSize}, actual was {
_offset
- savedOffset}");
System\Formats\Asn1\AsnWriter.Oid.cs (2)
69
wellKnownContents.CopyTo(_buffer.AsSpan(
_offset
));
141
Buffer.BlockCopy(tmp, 0, _buffer,
_offset
, tmpOffset);
System\Formats\Asn1\AsnWriter.Text.cs (1)
102
Span<byte> dest = _buffer.AsSpan(
_offset
, size);
System\Formats\Asn1\AsnWriter.UtcTime.cs (2)
98
Span<byte> baseSpan = _buffer.AsSpan(
_offset
);
112
_buffer[
_offset
+ 12] = (byte)'Z';