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