98 references to CborReaderState
System.Formats.Cbor (70)
System\Formats\Cbor\Reader\CborReader.cs (7)
32
private
CborReaderState
_cachedState =
CborReaderState
.Undefined;
106
_cachedState =
CborReaderState
.Undefined;
261
_cachedState =
CborReaderState
.Undefined;
270
_cachedState =
CborReaderState
.Undefined;
333
_cachedState =
CborReaderState
.Undefined;
418
_cachedState =
CborReaderState
.Undefined;
System\Formats\Cbor\Reader\CborReader.PeekState.cs (27)
13
public
CborReaderState
PeekState()
15
if (_cachedState ==
CborReaderState
.Undefined)
23
private
CborReaderState
PeekStateCore()
33
return
CborReaderState
.Finished;
35
case CborMajorType.Array: return
CborReaderState
.EndArray;
36
case CborMajorType.Map: return
CborReaderState
.EndMap;
49
return
CborReaderState
.Finished;
77
case CborMajorType.ByteString: return
CborReaderState
.EndIndefiniteLengthByteString;
78
case CborMajorType.TextString: return
CborReaderState
.EndIndefiniteLengthTextString;
79
case CborMajorType.Array: return
CborReaderState
.EndArray;
80
case CborMajorType.Map when _itemsRead % 2 == 0: return
CborReaderState
.EndMap;
112
case CborMajorType.UnsignedInteger: return
CborReaderState
.UnsignedInteger;
113
case CborMajorType.NegativeInteger: return
CborReaderState
.NegativeInteger;
116
CborReaderState
.StartIndefiniteLengthByteString :
117
CborReaderState
.ByteString;
121
CborReaderState
.StartIndefiniteLengthTextString :
122
CborReaderState
.TextString;
124
case CborMajorType.Array: return
CborReaderState
.StartArray;
125
case CborMajorType.Map: return
CborReaderState
.StartMap;
126
case CborMajorType.Tag: return
CborReaderState
.Tag;
133
static
CborReaderState
MapSimpleValueDataToReaderState(CborAdditionalInfo value)
140
return
CborReaderState
.Null;
143
return
CborReaderState
.Boolean;
145
return
CborReaderState
.HalfPrecisionFloat;
147
return
CborReaderState
.SinglePrecisionFloat;
149
return
CborReaderState
.DoublePrecisionFloat;
151
return
CborReaderState
.SimpleValue;
System\Formats\Cbor\Reader\CborReader.SkipValue.cs (21)
67
CborReaderState
state;
70
while ((state = PeekStateCore()) ==
CborReaderState
.Tag)
77
case
CborReaderState
.UnsignedInteger:
81
case
CborReaderState
.NegativeInteger:
85
case
CborReaderState
.ByteString:
89
case
CborReaderState
.TextString:
93
case
CborReaderState
.StartIndefiniteLengthByteString:
98
case
CborReaderState
.EndIndefiniteLengthByteString:
104
case
CborReaderState
.StartIndefiniteLengthTextString:
109
case
CborReaderState
.EndIndefiniteLengthTextString:
115
case
CborReaderState
.StartArray:
120
case
CborReaderState
.EndArray:
126
case
CborReaderState
.StartMap:
131
case
CborReaderState
.EndMap:
137
case
CborReaderState
.HalfPrecisionFloat:
138
case
CborReaderState
.SinglePrecisionFloat:
139
case
CborReaderState
.DoublePrecisionFloat:
143
case
CborReaderState
.Null:
144
case
CborReaderState
.Boolean:
145
case
CborReaderState
.SimpleValue:
154
static void ValidatePop(
CborReaderState
state, int depth)
System\Formats\Cbor\Reader\CborReader.Tag.cs (15)
65
case
CborReaderState
.TextString:
66
case
CborReaderState
.StartIndefiniteLengthTextString:
113
case
CborReaderState
.UnsignedInteger:
114
case
CborReaderState
.NegativeInteger:
117
case
CborReaderState
.HalfPrecisionFloat:
118
case
CborReaderState
.SinglePrecisionFloat:
119
case
CborReaderState
.DoublePrecisionFloat:
170
case
CborReaderState
.ByteString:
171
case
CborReaderState
.StartIndefiniteLengthByteString:
211
if (PeekState() !=
CborReaderState
.StartArray || ReadStartArray() != 2)
221
case
CborReaderState
.UnsignedInteger:
222
case
CborReaderState
.NegativeInteger:
232
case
CborReaderState
.UnsignedInteger:
236
case
CborReaderState
.NegativeInteger:
240
case
CborReaderState
.Tag:
System.Security.Cryptography.Cose (28)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (12)
256
CborReaderState
initialState = reader.PeekState();
260
if (initialState !=
CborReaderState
.NegativeInteger &&
261
initialState !=
CborReaderState
.UnsignedInteger &&
262
initialState !=
CborReaderState
.TextString)
274
CborReaderState
state = reader.PeekState();
275
if (state ==
CborReaderState
.EndArray)
280
else if (state ==
CborReaderState
.UnsignedInteger || state ==
CborReaderState
.NegativeInteger)
284
else if (state ==
CborReaderState
.TextString)
301
if (initialState !=
CborReaderState
.TextString &&
302
initialState !=
CborReaderState
.UnsignedInteger)
309
if (initialState !=
CborReaderState
.ByteString)
System\Security\Cryptography\Cose\CoseHelpers.cs (4)
218
CborReaderState
state = reader.PeekState();
220
if (state ==
CborReaderState
.UnsignedInteger)
224
else if (state ==
CborReaderState
.NegativeInteger)
244
if (state ==
CborReaderState
.TextString)
System\Security\Cryptography\Cose\CoseMessage.cs (12)
262
CborReaderState
.Tag => reader.ReadTag(),
303
CborReaderState
.UnsignedInteger or
CborReaderState
.NegativeInteger => new CoseHeaderLabel(reader.ReadInt32()),
304
CborReaderState
.TextString => new CoseHeaderLabel(reader.ReadTextString()),
316
CborReaderState
state = reader.PeekState();
317
if (state ==
CborReaderState
.Null)
322
if (state ==
CborReaderState
.ByteString)
340
while (reader.PeekState() ==
CborReaderState
.StartArray)
390
while (reader.PeekState() !=
CborReaderState
.EndArray)
574
CborReaderState
.UnsignedInteger or
CborReaderState
.NegativeInteger => new CoseHeaderLabel(reader.ReadInt32()),
575
CborReaderState
.TextString => new CoseHeaderLabel(reader.ReadTextString()),