| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 0f 81 00 00 8f 10 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe | ....................2019.3.6f1.. |
| 0020 | ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 | ...............f..!..5.9.4.Q...B |
| 0040 | 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 | ...............7................ |
| 0060 | 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 | ................................ |
| 0080 | 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 | ...............E................ |
| 00a0 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 | ...............#................ |
| 00c0 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 | ...............,................ |
| 00e0 | 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 | ...........5...a................ |
| 0100 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 | ...............#................ |
| 0120 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 | ...............,................ |
| 0140 | 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 | ...............r................ |
| 0160 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 | ...............#................ |
| 0180 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 | ...............,................ |
| 01a0 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 | ...........H.................... |
| 01c0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 | ...........1...1............@... |
| 01e0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 | ................................ |
| 0200 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 | ...........Q...j................ |
| 0220 | 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 | ...............J................ |
| 0240 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 | ...........1...1................ |
| 0260 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 | ................................ |
| 0280 | 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 | ...............j................ |
| 02a0 | 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 | ...........\.................... |
| 02c0 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 | ...........H...r................ |
| 02e0 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0300 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 | ................................ |
| 0320 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0340 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 | ...........H...w................ |
| 0360 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0380 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 | ................................ |
| 03a0 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 03c0 | 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 | ...........H.................... |
| 03e0 | 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 | ...........1...1............@... |
| 0400 | 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 | ................................ |
| 0420 | 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0440 | 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 | ...........y.................... |
| 0460 | 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 | ...............#.......!........ |
| 0480 | 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 | ...............,......."........ |
| 04a0 | 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 | .......................#....@... |
| 04c0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 | ...........1...1.......$........ |
| 04e0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 | .......................%........ |
| 0500 | 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 | ...............j.......&........ |
| 0520 | 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 | .......................'........ |
| 0540 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 | ...........1...1.......(........ |
| 0560 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 | .......................)........ |
| 0580 | 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 | ...............j.......*........ |
| 05a0 | 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 | ...........H...........+........ |
| 05c0 | 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 | ...........1...1.......,....@... |
| 05e0 | 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 | .......................-........ |
| 0600 | 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 | ...........Q...j................ |
| 0620 | 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 | ...........y.........../........ |
| 0640 | 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 | ...............#.......0........ |
| 0660 | 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 | ...............,.......1........ |
| 0680 | 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 | .......................2....@... |
| 06a0 | 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 | .......................3....@... |
| 06c0 | 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 | ...............#.......4........ |
| 06e0 | 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 | ...............,.......5........ |
| 0700 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 | ...........H...........6........ |
| 0720 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 | ...........1...1.......7....@... |
| 0740 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 | .......................8........ |
| 0760 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 | ...........Q...j.......9........ |
| 0780 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 | ...........H...........:........ |
| 07a0 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 | ...........1...1.......;....@... |
| 07c0 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 | .......................<........ |
| 07e0 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 | ...........Q...j.......=........ |
| 0800 | 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 | ...........H...........>........ |
| 0820 | 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 | ...........1...1.......?....@... |
| 0840 | 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 | .......................@........ |
| 0860 | 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 | ...........Q...j.......A........ |
| 0880 | 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 | .......MonoImporter.PPtr<EditorE |
| 08a0 | 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 | xtension>.m_FileID.m_PathID.PPtr |
| 08c0 | 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 | <PrefabInstance>.m_ExternalObjec |
| 08e0 | 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 | ts.SourceAssetIdentifier.type.as |
| 0900 | 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 | sembly.name.m_UsedFileIDs.m_Defa |
| 0920 | 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f | ultReferences.executionOrder.ico |
| 0940 | 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d | n.m_UserData.m_AssetBundleName.m |
| 0960 | 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 | _AssetBundleVariant.....s....... |
| 0980 | 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 | G....Z56.:!@i.J*...............7 |
| 09a0 | 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 | ................................ |
| 09c0 | 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 | ...............................E |
| 09e0 | 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0a00 | 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0a20 | 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 | ...........................(...a |
| 0a40 | 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0a60 | 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0a80 | 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 | ...............................r |
| 0aa0 | 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0ac0 | 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0ae0 | 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab | ...........................H.... |
| 0b00 | 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0b20 | 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ............@................... |
| 0b40 | 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | ...........................Q...j |
| 0b60 | 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea | ...........................H.... |
| 0b80 | 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0ba0 | 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ............@................... |
| 0bc0 | 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | ...........................Q...j |
| 0be0 | 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d | ...............................= |
| 0c00 | 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ...........................1...1 |
| 0c20 | 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | ................................ |
| 0c40 | 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a | ...............................j |
| 0c60 | 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b | ...........................H.... |
| 0c80 | 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 | ...........................1...1 |
| 0ca0 | 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b | ............@................... |
| 0cc0 | 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a | ...........................Q...j |
| 0ce0 | 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a | ...........................y.... |
| 0d00 | 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 | ................................ |
| 0d20 | 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f | ................................ |
| 0d40 | 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 | ...........................y...Q |
| 0d60 | 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 | ................................ |
| 0d80 | 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f | ................................ |
| 0da0 | 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 | ...............................X |
| 0dc0 | 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 | .......!...................H...i |
| 0de0 | 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | ......."...................1...1 |
| 0e00 | 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | .......#....@................... |
| 0e20 | 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | .......$...................Q...j |
| 0e40 | 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 | .......%...................H...u |
| 0e60 | 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 | .......&...................1...1 |
| 0e80 | 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b | .......'....@................... |
| 0ea0 | 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a | .......(...................Q...j |
| 0ec0 | 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 | .......)...............PPtr<Edit |
| 0ee0 | 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 | orExtension>.m_FileID.m_PathID.P |
| 0f00 | 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 | Ptr<PrefabInstance>.m_DefaultRef |
| 0f20 | 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 | erences.m_Icon.m_ExecutionOrder. |
| 0f40 | 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 | m_ClassName.m_Namespace......... |
| 0f60 | 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 | ............\........y......`... |
| 0f80 | b0 7e 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .~.............................. |
| 0fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 0fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 | .....................y.......... |
| 1040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 1080 | 00 00 00 00 00 00 00 00 0a 00 00 00 4a 73 6f 6e 50 61 72 73 65 72 00 00 49 7e 00 00 75 73 69 6e | ............JsonParser..I~..usin |
| 10a0 | 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 | g.System;..using.System.Collecti |
| 10c0 | 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 47 6c 6f 62 61 | ons.Generic;..using.System.Globa |
| 10e0 | 6c 69 7a 61 74 69 6f 6e 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 4c 69 6e 71 3b 0d 0a 75 | lization;..using.System.Linq;..u |
| 1100 | 73 69 6e 67 20 53 79 73 74 65 6d 2e 54 65 78 74 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e | sing.System.Text;..using.System. |
| 1120 | 54 65 78 74 2e 52 65 67 75 6c 61 72 45 78 70 72 65 73 73 69 6f 6e 73 3b 0d 0a 0d 0a 6e 61 6d 65 | Text.RegularExpressions;....name |
| 1140 | 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 | space.UnityEngine.InputSystem.Ut |
| 1160 | 69 6c 69 74 69 65 73 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 | ilities..{......///.<summary>... |
| 1180 | 20 20 20 2f 2f 2f 20 41 20 4a 53 4f 4e 20 70 61 72 73 65 72 20 74 68 61 74 20 69 6e 73 74 65 61 | ...///.A.JSON.parser.that.instea |
| 11a0 | 64 20 6f 66 20 74 75 72 6e 69 6e 67 20 61 20 73 74 72 69 6e 67 20 69 6e 20 4a 53 4f 4e 20 66 6f | d.of.turning.a.string.in.JSON.fo |
| 11c0 | 72 6d 61 74 20 69 6e 74 6f 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 43 23 20 6f 62 6a 65 63 74 20 67 | rmat.into.a......///.C#.object.g |
| 11e0 | 72 61 70 68 2c 20 61 6c 6c 6f 77 73 20 6e 61 76 69 67 61 74 69 6e 67 20 74 68 65 20 73 6f 75 72 | raph,.allows.navigating.the.sour |
| 1200 | 63 65 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d | ce.text.directly.......///.</sum |
| 1220 | 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f | mary>......///.<remarks>......// |
| 1240 | 2f 20 54 68 69 73 20 68 65 6c 70 65 72 20 69 73 20 6d 6f 73 74 20 75 73 65 66 75 6c 20 66 6f 72 | /.This.helper.is.most.useful.for |
| 1260 | 20 61 76 6f 69 64 69 6e 67 20 61 20 67 72 65 61 74 20 6d 61 6e 79 20 73 74 72 69 6e 67 20 61 6e | .avoiding.a.great.many.string.an |
| 1280 | 64 20 67 65 6e 65 72 61 6c 20 6f 62 6a 65 63 74 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 0d 0a 20 20 | d.general.object.allocations.... |
| 12a0 | 20 20 2f 2f 2f 20 74 68 61 74 20 77 6f 75 6c 64 20 68 61 70 70 65 6e 20 77 68 65 6e 20 74 75 72 | ..///.that.would.happen.when.tur |
| 12c0 | 6e 69 6e 67 20 61 20 4a 53 4f 4e 20 6f 62 6a 65 63 74 20 69 6e 74 6f 20 61 20 43 23 20 6f 62 6a | ning.a.JSON.object.into.a.C#.obj |
| 12e0 | 65 63 74 20 67 72 61 70 68 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a | ect.graph.......///.</remarks>.. |
| 1300 | 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 75 63 74 20 4a 73 6f 6e 50 61 72 73 65 72 0d 0a | ....internal.struct.JsonParser.. |
| 1320 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4a 73 6f 6e 50 61 72 73 65 72 | ....{..........public.JsonParser |
| 1340 | 28 73 74 72 69 6e 67 20 6a 73 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 74 68 69 | (string.json)..............:.thi |
| 1360 | 73 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | s()..........{..............if.( |
| 1380 | 6a 73 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 | json.==.null)..................t |
| 13a0 | 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e | hrow.new.ArgumentNullException(n |
| 13c0 | 61 6d 65 6f 66 28 6a 73 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 54 | ameof(json));................m_T |
| 13e0 | 65 78 74 20 3d 20 6a 73 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4c 65 6e 67 74 | ext.=.json;..............m_Lengt |
| 1400 | 68 20 3d 20 6a 73 6f 6e 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | h.=.json.Length;..........}..... |
| 1420 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 52 65 73 65 74 28 29 0d 0a 20 20 20 20 | .......public.void.Reset()...... |
| 1440 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 20 | ....{..............m_Position.=. |
| 1460 | 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 61 74 63 68 41 6e 79 45 6c 65 6d 65 6e | 0;..............m_MatchAnyElemen |
| 1480 | 74 49 6e 41 72 72 61 79 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d | tInArray.=.false;..............m |
| 14a0 | 5f 44 72 79 52 75 6e 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | _DryRun.=.false;..........}..... |
| 14c0 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 54 6f | .......public.override.string.To |
| 14e0 | 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | String()..........{............. |
| 1500 | 20 69 66 20 28 6d 5f 54 65 78 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | .if.(m_Text.!=.null)............ |
| 1520 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 22 7b 6d 5f 50 6f 73 69 74 69 6f 6e 7d 3a 20 7b 6d 5f | ......return.$"{m_Position}:.{m_ |
| 1540 | 54 65 78 74 2e 53 75 62 73 74 72 69 6e 67 28 6d 5f 50 6f 73 69 74 69 6f 6e 29 7d 22 3b 0d 0a 20 | Text.Substring(m_Position)}";... |
| 1560 | 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 61 73 65 2e 54 6f 53 74 72 69 6e 67 28 | ...........return.base.ToString( |
| 1580 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 | );..........}............///.<su |
| 15a0 | 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 61 76 69 67 61 74 65 20 74 6f 20 | mmary>..........///.Navigate.to. |
| 15c0 | 74 68 65 20 67 69 76 65 6e 20 70 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | the.given.property.........../// |
| 15e0 | 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 | .</summary>..........///.<param. |
| 1600 | 6e 61 6d 65 3d 22 70 61 74 68 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | name="path"></param>..........// |
| 1620 | 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6e 61 | /.<remarks>..........///.This.na |
| 1640 | 76 69 67 61 74 65 73 20 66 72 6f 6d 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 6f 70 65 72 74 | vigates.from.the.current.propert |
| 1660 | 79 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 | y...........///.</remarks>...... |
| 1680 | 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 4e 61 76 69 67 61 74 65 54 6f 50 72 6f 70 65 72 | ....public.bool.NavigateToProper |
| 16a0 | 74 79 28 73 74 72 69 6e 67 20 70 61 74 68 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | ty(string.path)..........{...... |
| 16c0 | 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 | ........if.(string.IsNullOrEmpty |
| 16e0 | 28 70 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e | (path))..................throw.n |
| 1700 | 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 | ew.ArgumentNullException(nameof( |
| 1720 | 70 61 74 68 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 74 68 4c | path));................var.pathL |
| 1740 | 65 6e 67 74 68 20 3d 20 70 61 74 68 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ength.=.path.Length;............ |
| 1760 | 20 20 76 61 72 20 70 61 74 68 50 6f 73 69 74 69 6f 6e 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 | ..var.pathPosition.=.0;......... |
| 1780 | 20 20 20 20 20 20 20 6d 5f 44 72 79 52 75 6e 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 | .......m_DryRun.=.true;......... |
| 17a0 | 20 20 20 20 20 69 66 20 28 21 50 61 72 73 65 54 6f 6b 65 6e 28 27 7b 27 29 29 0d 0a 20 20 20 20 | .....if.(!ParseToken('{'))...... |
| 17c0 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 | ............return.false;....... |
| 17e0 | 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c | .........while.(m_Position.<.m_L |
| 1800 | 65 6e 67 74 68 20 26 26 20 70 61 74 68 50 6f 73 69 74 69 6f 6e 20 3c 20 70 61 74 68 4c 65 6e 67 | ength.&&.pathPosition.<.pathLeng |
| 1820 | 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | th)..............{.............. |
| 1840 | 20 20 20 20 2f 2f 20 46 69 6e 64 20 73 74 61 72 74 20 6f 66 20 70 72 6f 70 65 72 74 79 20 6e 61 | ....//.Find.start.of.property.na |
| 1860 | 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 | me...................SkipWhitesp |
| 1880 | 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f | ace();..................if.(m_Po |
| 18a0 | 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | sition.==.m_Length)............. |
| 18c0 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 | .........return.false;.......... |
| 18e0 | 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 21 | ........if.(m_Text[m_Position].! |
| 1900 | 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | =.'"')......................retu |
| 1920 | 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 | rn.false;..................++m_P |
| 1940 | 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 | osition;....................//.T |
| 1960 | 72 79 20 74 6f 20 6d 61 74 63 68 20 73 69 6e 67 6c 65 20 70 61 74 68 20 63 6f 6d 70 6f 6e 65 6e | ry.to.match.single.path.componen |
| 1980 | 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 74 68 53 74 61 72 | t...................var.pathStar |
| 19a0 | 74 50 6f 73 69 74 69 6f 6e 20 3d 20 70 61 74 68 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 | tPosition.=.pathPosition;....... |
| 19c0 | 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 70 61 74 68 50 6f 73 69 74 69 6f 6e 20 3c | ...........while.(pathPosition.< |
| 19e0 | 20 70 61 74 68 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | .pathLength)..................{. |
| 1a00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 20 3d 20 70 61 | .....................var.ch.=.pa |
| 1a20 | 74 68 5b 70 61 74 68 50 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | th[pathPosition];............... |
| 1a40 | 20 20 20 20 20 20 20 69 66 20 28 63 68 20 3d 3d 20 27 2f 27 20 7c 7c 20 63 68 20 3d 3d 20 27 5b | .......if.(ch.==.'/'.||.ch.==.'[ |
| 1a60 | 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 | ')..........................brea |
| 1a80 | 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f | k;........................if.(m_ |
| 1aa0 | 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 63 68 29 0d 0a 20 20 20 20 20 20 20 | Text[m_Position].!=.ch)......... |
| 1ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 | .................break;......... |
| 1ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 | ...............++m_Position;.... |
| 1b00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 61 74 68 50 6f 73 69 74 69 6f 6e | ..................++pathPosition |
| 1b20 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | ;..................}............ |
| 1b40 | 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 68 61 76 65 20 61 20 6d 61 74 63 | ........//.See.if.we.have.a.matc |
| 1b60 | 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 | h...................if.(m_Positi |
| 1b80 | 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 | on.<.m_Length.&&.m_Text[m_Positi |
| 1ba0 | 6f 6e 5d 20 3d 3d 20 27 22 27 20 26 26 20 28 70 61 74 68 50 6f 73 69 74 69 6f 6e 20 3e 3d 20 70 | on].==.'"'.&&.(pathPosition.>=.p |
| 1bc0 | 61 74 68 4c 65 6e 67 74 68 20 7c 7c 20 70 61 74 68 5b 70 61 74 68 50 6f 73 69 74 69 6f 6e 5d 20 | athLength.||.path[pathPosition]. |
| 1be0 | 3d 3d 20 27 2f 27 20 7c 7c 20 70 61 74 68 5b 70 61 74 68 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 | ==.'/'.||.path[pathPosition].==. |
| 1c00 | 27 5b 27 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | '['))..................{........ |
| 1c20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 76 65 20 6d 61 74 63 68 65 64 20 61 20 | ..............//.Have.matched.a. |
| 1c40 | 70 72 6f 70 65 72 74 79 20 6e 61 6d 65 2e 20 4e 61 76 69 67 61 74 65 20 74 6f 20 76 61 6c 75 65 | property.name..Navigate.to.value |
| 1c60 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 | .......................++m_Posit |
| 1c80 | 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 53 | ion;......................if.(!S |
| 1ca0 | 6b 69 70 54 6f 56 61 6c 75 65 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | kipToValue())................... |
| 1cc0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | .......return.false;............ |
| 1ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 77 65 20 68 61 76 65 20 | ............//.Check.if.we.have. |
| 1d00 | 6d 61 74 63 68 65 64 20 65 76 65 72 79 74 68 69 6e 67 20 69 6e 20 74 68 65 20 70 61 74 68 2e 0d | matched.everything.in.the.path.. |
| 1d20 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 74 68 50 6f 73 | .....................if.(pathPos |
| 1d40 | 69 74 69 6f 6e 20 3e 3d 20 70 61 74 68 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | ition.>=.pathLength)............ |
| 1d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 | ..............return.true;...... |
| 1d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 74 68 5b 70 61 74 68 50 6f 73 | ................if.(path[pathPos |
| 1da0 | 69 74 69 6f 6e 5d 20 3d 3d 20 27 2f 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ition].==.'/').................. |
| 1dc0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b | ....{..........................+ |
| 1de0 | 2b 70 61 74 68 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | +pathPosition;.................. |
| 1e00 | 20 20 20 20 20 20 20 20 69 66 20 28 21 50 61 72 73 65 54 6f 6b 65 6e 28 27 7b 27 29 29 0d 0a 20 | ........if.(!ParseToken('{'))... |
| 1e20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | ...........................retur |
| 1e40 | 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | n.false;......................}. |
| 1e60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 70 61 | .....................else.if.(pa |
| 1e80 | 74 68 5b 70 61 74 68 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 5b 27 29 0d 0a 20 20 20 20 20 20 | th[pathPosition].==.'[')........ |
| 1ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............{................. |
| 1ec0 | 20 20 20 20 20 20 20 20 20 2b 2b 70 61 74 68 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 | .........++pathPosition;........ |
| 1ee0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 74 68 50 6f 73 69 74 69 | ..................if.(pathPositi |
| 1f00 | 6f 6e 20 3d 3d 20 70 61 74 68 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | on.==.pathLength)............... |
| 1f20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e | ...............throw.new.Argumen |
| 1f40 | 74 45 78 63 65 70 74 69 6f 6e 28 22 4d 61 6c 66 6f 72 6d 65 64 20 4a 53 4f 4e 20 70 72 6f 70 65 | tException("Malformed.JSON.prope |
| 1f60 | 72 74 79 20 70 61 74 68 3a 20 22 20 2b 20 70 61 74 68 2c 20 6e 61 6d 65 6f 66 28 70 61 74 68 29 | rty.path:.".+.path,.nameof(path) |
| 1f80 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | );..........................if.( |
| 1fa0 | 70 61 74 68 5b 70 61 74 68 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 5d 27 29 0d 0a 20 20 20 20 | path[pathPosition].==.']')...... |
| 1fc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | ....................{........... |
| 1fe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 61 74 63 68 41 6e 79 45 6c 65 | ...................m_MatchAnyEle |
| 2000 | 6d 65 6e 74 49 6e 41 72 72 61 79 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | mentInArray.=.true;............. |
| 2020 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 61 74 68 50 6f 73 69 74 69 6f 6e 3b | .................++pathPosition; |
| 2040 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | ..............................if |
| 2060 | 20 28 70 61 74 68 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 70 61 74 68 4c 65 6e 67 74 68 29 0d 0a 20 | .(pathPosition.==.pathLength)... |
| 2080 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | ...............................r |
| 20a0 | 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eturn.true;..................... |
| 20c0 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....}.......................... |
| 20e0 | 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | else............................ |
| 2100 | 20 20 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 | ..throw.new.NotImplementedExcept |
| 2120 | 69 6f 6e 28 22 4e 61 76 69 67 61 74 69 6e 67 20 74 6f 20 73 70 65 63 69 66 69 63 20 61 72 72 61 | ion("Navigating.to.specific.arra |
| 2140 | 79 20 65 6c 65 6d 65 6e 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | y.element");.................... |
| 2160 | 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 | ..}..................}.......... |
| 2180 | 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | ........else..................{. |
| 21a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 70 72 6f | .....................//.This.pro |
| 21c0 | 70 65 72 74 79 20 69 73 6e 27 74 20 69 74 2e 20 53 6b 69 70 20 74 68 65 20 70 72 6f 70 65 72 74 | perty.isn't.it..Skip.the.propert |
| 21e0 | 79 20 61 6e 64 20 69 74 73 20 76 61 6c 75 65 20 61 6e 64 20 72 65 73 65 74 0d 0a 20 20 20 20 20 | y.and.its.value.and.reset....... |
| 2200 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 6f 20 77 68 65 72 65 20 77 65 20 73 74 | ...............//.to.where.we.st |
| 2220 | 61 72 74 65 64 20 69 6e 20 74 68 69 73 20 69 74 65 72 61 74 69 6f 6e 20 69 6e 20 74 68 65 20 70 | arted.in.this.iteration.in.the.p |
| 2240 | 72 6f 70 65 72 74 79 20 70 61 74 68 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | roperty.path.................... |
| 2260 | 20 20 20 20 20 70 61 74 68 50 6f 73 69 74 69 6f 6e 20 3d 20 70 61 74 68 53 74 61 72 74 50 6f 73 | .....pathPosition.=.pathStartPos |
| 2280 | 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c | ition;......................whil |
| 22a0 | 65 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 | e.(m_Position.<.m_Length.&&.m_Te |
| 22c0 | 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 20 20 20 | xt[m_Position].!=.'"').......... |
| 22e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 | ................++m_Position;... |
| 2300 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f | ...................if.(m_Positio |
| 2320 | 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 20 7c 7c 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 | n.==.m_Length.||.m_Text[m_Positi |
| 2340 | 6f 6e 5d 20 21 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | on].!=.'"')..................... |
| 2360 | 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .....return.false;.............. |
| 2380 | 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ........++m_Position;........... |
| 23a0 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 53 6b 69 70 54 6f 56 61 6c 75 65 28 29 20 7c 7c | ...........if.(!SkipToValue().|| |
| 23c0 | 20 21 50 61 72 73 65 56 61 6c 75 65 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .!ParseValue())................. |
| 23e0 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 | .........return.false;.......... |
| 2400 | 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 | ............SkipWhitespace();... |
| 2420 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f | ...................if.(m_Positio |
| 2440 | 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 20 7c 7c 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 | n.==.m_Length.||.m_Text[m_Positi |
| 2460 | 6f 6e 5d 20 3d 3d 20 27 7d 27 20 7c 7c 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d | on].==.'}'.||.m_Text[m_Position] |
| 2480 | 20 21 3d 20 27 2c 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .!=.',')........................ |
| 24a0 | 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..return.false;................. |
| 24c0 | 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .....++m_Position;.............. |
| 24e0 | 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | ....}..............}............ |
| 2500 | 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a | ....return.false;..........}.... |
| 2520 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f | ........///.<summary>........../ |
| 2540 | 2f 2f 20 52 65 74 75 72 6e 20 74 72 75 65 20 69 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 | //.Return.true.if.the.current.pr |
| 2560 | 6f 70 65 72 74 79 20 68 61 73 20 61 20 76 61 6c 75 65 20 6d 61 74 63 68 69 6e 67 20 3c 70 61 72 | operty.has.a.value.matching.<par |
| 2580 | 61 6d 72 65 66 20 6e 61 6d 65 3d 22 65 78 70 65 63 74 65 64 56 61 6c 75 65 22 2f 3e 2e 0d 0a 20 | amref.name="expectedValue"/>.... |
| 25a0 | 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f | .......///.</summary>........../ |
| 25c0 | 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 78 70 65 63 74 65 64 56 61 6c 75 65 22 3e 3c | //.<param.name="expectedValue">< |
| 25e0 | 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f | /param>..........///.<returns></ |
| 2600 | 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 43 75 | returns>..........public.bool.Cu |
| 2620 | 72 72 65 6e 74 50 72 6f 70 65 72 74 79 48 61 73 56 61 6c 75 65 45 71 75 61 6c 54 6f 28 4a 73 6f | rrentPropertyHasValueEqualTo(Jso |
| 2640 | 6e 56 61 6c 75 65 20 65 78 70 65 63 74 65 64 56 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 7b | nValue.expectedValue)..........{ |
| 2660 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 72 61 62 20 70 72 6f 70 65 72 74 79 20 76 | ..............//.Grab.property.v |
| 2680 | 61 6c 75 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 61 76 65 64 50 6f 73 69 | alue...............var.savedPosi |
| 26a0 | 74 69 6f 6e 20 3d 20 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | tion.=.m_Position;.............. |
| 26c0 | 6d 5f 44 72 79 52 75 6e 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | m_DryRun.=.false;..............i |
| 26e0 | 66 20 28 21 50 61 72 73 65 56 61 6c 75 65 28 6f 75 74 20 76 61 72 20 70 72 6f 70 65 72 74 79 56 | f.(!ParseValue(out.var.propertyV |
| 2700 | 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | alue))..............{........... |
| 2720 | 20 20 20 20 20 20 20 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 20 73 61 76 65 64 50 6f 73 69 74 69 6f | .......m_Position.=.savedPositio |
| 2740 | 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 | n;..................return.false |
| 2760 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f | ;..............}..............m_ |
| 2780 | 50 6f 73 69 74 69 6f 6e 20 3d 20 73 61 76 65 64 50 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 | Position.=.savedPosition;....... |
| 27a0 | 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 74 63 68 20 67 69 76 65 6e 20 76 61 6c 75 65 2e 0d 0a | .........//.Match.given.value... |
| 27c0 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 4d 61 74 63 68 20 3d 20 66 61 6c 73 65 3b | ............var.isMatch.=.false; |
| 27e0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 72 6f 70 65 72 74 79 56 61 6c 75 65 2e | ..............if.(propertyValue. |
| 2800 | 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 41 72 72 61 79 20 26 26 20 6d | type.==.JsonValueType.Array.&&.m |
| 2820 | 5f 4d 61 74 63 68 41 6e 79 45 6c 65 6d 65 6e 74 49 6e 41 72 72 61 79 29 0d 0a 20 20 20 20 20 20 | _MatchAnyElementInArray)........ |
| 2840 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 72 72 | ......{..................var.arr |
| 2860 | 61 79 20 3d 20 70 72 6f 70 65 72 74 79 56 61 6c 75 65 2e 61 72 72 61 79 56 61 6c 75 65 3b 0d 0a | ay.=.propertyValue.arrayValue;.. |
| 2880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 | ................for.(var.i.=.0;. |
| 28a0 | 21 69 73 4d 61 74 63 68 20 26 26 20 69 20 3c 20 61 72 72 61 79 2e 43 6f 75 6e 74 3b 20 2b 2b 69 | !isMatch.&&.i.<.array.Count;.++i |
| 28c0 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4d 61 74 63 68 20 3d | )......................isMatch.= |
| 28e0 | 20 61 72 72 61 79 5b 69 5d 20 3d 3d 20 65 78 70 65 63 74 65 64 56 61 6c 75 65 3b 0d 0a 20 20 20 | .array[i].==.expectedValue;..... |
| 2900 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 | .........}..............else.... |
| 2920 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4d | ..........{..................isM |
| 2940 | 61 74 63 68 20 3d 20 70 72 6f 70 65 72 74 79 56 61 6c 75 65 20 3d 3d 20 65 78 70 65 63 74 65 64 | atch.=.propertyValue.==.expected |
| 2960 | 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | Value;..............}........... |
| 2980 | 20 20 20 20 20 72 65 74 75 72 6e 20 69 73 4d 61 74 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d | .....return.isMatch;..........}. |
| 29a0 | 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 50 61 72 73 65 54 6f 6b 65 | ...........public.bool.ParseToke |
| 29c0 | 6e 28 63 68 61 72 20 74 6f 6b 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | n(char.token)..........{........ |
| 29e0 | 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 | ......SkipWhitespace();......... |
| 2a00 | 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 29 | .....if.(m_Position.==.m_Length) |
| 2a20 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d | ..................return.false;. |
| 2a40 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 | ...............if.(m_Text[m_Posi |
| 2a60 | 74 69 6f 6e 5d 20 21 3d 20 74 6f 6b 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tion].!=.token)................. |
| 2a80 | 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b | .return.false;................++ |
| 2aa0 | 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 | m_Position;..............SkipWhi |
| 2ac0 | 74 65 73 70 61 63 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e | tespace();................return |
| 2ae0 | 20 6d 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 | .m_Position.<.m_Length;......... |
| 2b00 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 50 61 72 73 65 56 | .}............public.bool.ParseV |
| 2b20 | 61 6c 75 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 | alue()..........{..............r |
| 2b40 | 65 74 75 72 6e 20 50 61 72 73 65 56 61 6c 75 65 28 6f 75 74 20 76 61 72 20 72 65 73 75 6c 74 29 | eturn.ParseValue(out.var.result) |
| 2b60 | 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 | ;..........}............public.b |
| 2b80 | 6f 6f 6c 20 50 61 72 73 65 56 61 6c 75 65 28 6f 75 74 20 4a 73 6f 6e 56 61 6c 75 65 20 72 65 73 | ool.ParseValue(out.JsonValue.res |
| 2ba0 | 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 | ult)..........{..............res |
| 2bc0 | 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b | ult.=.default;................Sk |
| 2be0 | 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | ipWhitespace();..............if. |
| 2c00 | 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 | (m_Position.==.m_Length)........ |
| 2c20 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 | ..........return.false;......... |
| 2c40 | 20 20 20 20 20 20 20 76 61 72 20 63 68 20 3d 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f | .......var.ch.=.m_Text[m_Positio |
| 2c60 | 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 63 68 29 0d 0a 20 20 | n];..............switch.(ch).... |
| 2c80 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 | ..........{..................cas |
| 2ca0 | 65 20 27 22 27 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | e.'"':......................if.( |
| 2cc0 | 50 61 72 73 65 53 74 72 69 6e 67 56 61 6c 75 65 28 6f 75 74 20 72 65 73 75 6c 74 29 29 0d 0a 20 | ParseStringValue(out.result))... |
| 2ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 | .......................return.tr |
| 2d00 | 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d | ue;......................break;. |
| 2d20 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 27 5b 27 3a 0d 0a 20 20 20 20 | .................case.'[':...... |
| 2d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 61 72 73 65 41 72 72 61 79 56 61 | ................if.(ParseArrayVa |
| 2d60 | 6c 75 65 28 6f 75 74 20 72 65 73 75 6c 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | lue(out.result))................ |
| 2d80 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 | ..........return.true;.......... |
| 2da0 | 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ............break;.............. |
| 2dc0 | 20 20 20 20 63 61 73 65 20 27 7b 27 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ....case.'{':................... |
| 2de0 | 20 20 20 69 66 20 28 50 61 72 73 65 4f 62 6a 65 63 74 56 61 6c 75 65 28 6f 75 74 20 72 65 73 75 | ...if.(ParseObjectValue(out.resu |
| 2e00 | 6c 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | lt))..........................re |
| 2e20 | 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | turn.true;...................... |
| 2e40 | 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 27 74 27 | break;..................case.'t' |
| 2e60 | 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 27 66 27 3a 0d 0a 20 20 | :..................case.'f':.... |
| 2e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 61 72 73 65 42 6f 6f 6c 65 | ..................if.(ParseBoole |
| 2ea0 | 61 6e 56 61 6c 75 65 28 6f 75 74 20 72 65 73 75 6c 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | anValue(out.result))............ |
| 2ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 | ..............return.true;...... |
| 2ee0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 | ................break;.......... |
| 2f00 | 20 20 20 20 20 20 20 20 63 61 73 65 20 27 6e 27 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........case.'n':............... |
| 2f20 | 20 20 20 20 20 20 20 69 66 20 28 50 61 72 73 65 4e 75 6c 6c 56 61 6c 75 65 28 6f 75 74 20 72 65 | .......if.(ParseNullValue(out.re |
| 2f40 | 73 75 6c 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | sult)).......................... |
| 2f60 | 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | return.true;.................... |
| 2f80 | 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66 61 75 6c | ..break;..................defaul |
| 2fa0 | 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 61 72 73 | t:......................if.(Pars |
| 2fc0 | 65 4e 75 6d 62 65 72 28 6f 75 74 20 72 65 73 75 6c 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | eNumber(out.result))............ |
| 2fe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 | ..............return.true;...... |
| 3000 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 | ................break;.......... |
| 3020 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 | ....}................return.fals |
| 3040 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | e;..........}............public. |
| 3060 | 62 6f 6f 6c 20 50 61 72 73 65 53 74 72 69 6e 67 56 61 6c 75 65 28 6f 75 74 20 4a 73 6f 6e 56 61 | bool.ParseStringValue(out.JsonVa |
| 3080 | 6c 75 65 20 72 65 73 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | lue.result)..........{.......... |
| 30a0 | 20 20 20 20 72 65 73 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 | ....result.=.default;........... |
| 30c0 | 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 | .....SkipWhitespace();.......... |
| 30e0 | 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 20 7c | ....if.(m_Position.==.m_Length.| |
| 3100 | 7c 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 27 22 27 29 0d 0a 20 20 | |.m_Text[m_Position].!=.'"').... |
| 3120 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 | ..............return.false;..... |
| 3140 | 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 | .........++m_Position;.......... |
| 3160 | 20 20 20 20 20 20 76 61 72 20 73 74 61 72 74 49 6e 64 65 78 20 3d 20 6d 5f 50 6f 73 69 74 69 6f | ......var.startIndex.=.m_Positio |
| 3180 | 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 61 73 45 73 63 61 70 65 73 20 3d | n;..............var.hasEscapes.= |
| 31a0 | 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f | .false;................while.(m_ |
| 31c0 | 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | Position.<.m_Length)............ |
| 31e0 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 20 3d 20 6d 5f | ..{..................var.ch.=.m_ |
| 3200 | 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Text[m_Position];............... |
| 3220 | 20 20 20 69 66 20 28 63 68 20 3d 3d 20 27 5c 5c 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ...if.(ch.==.'\\').............. |
| 3240 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 | ....{......................++m_P |
| 3260 | 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | osition;......................if |
| 3280 | 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 | .(m_Position.==.m_Length)....... |
| 32a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 | ...................break;....... |
| 32c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 73 45 73 63 61 70 65 73 20 3d 20 74 72 75 65 | ...............hasEscapes.=.true |
| 32e0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 | ;..................}............ |
| 3300 | 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 63 68 20 3d 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 | ......else.if.(ch.==.'"')....... |
| 3320 | 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...........{.................... |
| 3340 | 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..++m_Position;................. |
| 3360 | 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 4a 73 6f 6e 53 74 72 69 6e 67 0d 0a 20 20 | .....result.=.new.JsonString.... |
| 3380 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................{............. |
| 33a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 20 3d 20 6e 65 77 20 53 75 62 73 74 72 69 6e | .............text.=.new.Substrin |
| 33c0 | 67 28 6d 5f 54 65 78 74 2c 20 73 74 61 72 74 49 6e 64 65 78 2c 20 6d 5f 50 6f 73 69 74 69 6f 6e | g(m_Text,.startIndex,.m_Position |
| 33e0 | 20 2d 20 73 74 61 72 74 49 6e 64 65 78 20 2d 20 31 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .-.startIndex.-.1),............. |
| 3400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 73 45 73 63 61 70 65 73 20 3d 20 68 61 73 45 73 63 | .............hasEscapes.=.hasEsc |
| 3420 | 61 70 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 | apes......................};.... |
| 3440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a | ..................return.true;.. |
| 3460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................}............... |
| 3480 | 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | ...++m_Position;..............}. |
| 34a0 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 | ...............return.false;.... |
| 34c0 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 50 | ......}............public.bool.P |
| 34e0 | 61 72 73 65 41 72 72 61 79 56 61 6c 75 65 28 6f 75 74 20 4a 73 6f 6e 56 61 6c 75 65 20 72 65 73 | arseArrayValue(out.JsonValue.res |
| 3500 | 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 | ult)..........{..............res |
| 3520 | 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b | ult.=.default;................Sk |
| 3540 | 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | ipWhitespace();..............if. |
| 3560 | 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 20 7c 7c 20 6d 5f 54 65 78 | (m_Position.==.m_Length.||.m_Tex |
| 3580 | 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 21 3d 20 27 5b 27 29 0d 0a 20 20 20 20 20 20 20 20 20 | t[m_Position].!=.'[')........... |
| 35a0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | .......return.false;............ |
| 35c0 | 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | ..++m_Position;................i |
| 35e0 | 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 | f.(m_Position.==.m_Length)...... |
| 3600 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 | ............return.false;....... |
| 3620 | 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d | .......if.(m_Text[m_Position].== |
| 3640 | 20 27 5d 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | .']')..............{............ |
| 3660 | 20 20 20 20 20 20 2f 2f 20 45 6d 70 74 79 20 61 72 72 61 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 | ......//.Empty.array............ |
| 3680 | 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 20 7b 20 | .......result.=.new.JsonValue.{. |
| 36a0 | 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 41 72 72 61 79 20 7d 3b 0d 0a 20 | type.=.JsonValueType.Array.};... |
| 36c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 | ...............++m_Position;.... |
| 36e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 | ..............return.true;...... |
| 3700 | 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4c 69 73 74 3c 4a 73 | ........}................List<Js |
| 3720 | 6f 6e 56 61 6c 75 65 3e 20 76 61 6c 75 65 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 | onValue>.values.=.null;......... |
| 3740 | 20 20 20 20 20 69 66 20 28 21 6d 5f 44 72 79 52 75 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .....if.(!m_DryRun)............. |
| 3760 | 20 20 20 20 20 76 61 6c 75 65 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 4a 73 6f 6e 56 61 6c 75 65 | .....values.=.new.List<JsonValue |
| 3780 | 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f 50 6f 73 | >();................while.(m_Pos |
| 37a0 | 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | ition.<.m_Length)..............{ |
| 37c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 50 61 72 73 65 56 61 6c 75 | ..................if.(!ParseValu |
| 37e0 | 65 28 6f 75 74 20 76 61 72 20 76 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | e(out.var.value))............... |
| 3800 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | .......return.false;............ |
| 3820 | 20 20 20 20 20 20 69 66 20 28 21 6d 5f 44 72 79 52 75 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | ......if.(!m_DryRun)............ |
| 3840 | 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 73 2e 41 64 64 28 76 61 6c 75 65 29 3b 0d 0a 20 20 | ..........values.Add(value);.... |
| 3860 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d | ..............SkipWhitespace();. |
| 3880 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 | .................if.(m_Position. |
| 38a0 | 3d 3d 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ==.m_Length).................... |
| 38c0 | 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..return.false;................. |
| 38e0 | 20 76 61 72 20 63 68 20 3d 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 | .var.ch.=.m_Text[m_Position];... |
| 3900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 20 3d 3d 20 27 5d 27 29 0d 0a 20 | ...............if.(ch.==.']')... |
| 3920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............{................ |
| 3940 | 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ......++m_Position;............. |
| 3960 | 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 44 72 79 52 75 6e 29 0d 0a 20 20 20 20 20 20 20 | .........if.(!m_DryRun)......... |
| 3980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 76 61 6c 75 65 73 | .................result.=.values |
| 39a0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 | ;......................return.tr |
| 39c0 | 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 | ue;..................}.......... |
| 39e0 | 20 20 20 20 20 20 20 20 69 66 20 28 63 68 20 3d 3d 20 27 2c 27 29 0d 0a 20 20 20 20 20 20 20 20 | ........if.(ch.==.',').......... |
| 3a00 | 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 | ............++m_Position;....... |
| 3a20 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 | .......}................return.f |
| 3a40 | 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c | alse;..........}............publ |
| 3a60 | 69 63 20 62 6f 6f 6c 20 50 61 72 73 65 4f 62 6a 65 63 74 56 61 6c 75 65 28 6f 75 74 20 4a 73 6f | ic.bool.ParseObjectValue(out.Jso |
| 3a80 | 6e 56 61 6c 75 65 20 72 65 73 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | nValue.result)..........{....... |
| 3aa0 | 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 0d 0a 20 20 20 20 | .......result.=.default;........ |
| 3ac0 | 20 20 20 20 20 20 20 20 69 66 20 28 21 50 61 72 73 65 54 6f 6b 65 6e 28 27 7b 27 29 29 0d 0a 20 | ........if.(!ParseToken('{'))... |
| 3ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 | ...............return.false;.... |
| 3b00 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e | ..........if.(m_Position.<.m_Len |
| 3b20 | 67 74 68 20 26 26 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 7d 27 | gth.&&.m_Text[m_Position].==.'}' |
| 3b40 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | )..............{................ |
| 3b60 | 20 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 20 7b 20 74 79 70 65 20 | ..result.=.new.JsonValue.{.type. |
| 3b80 | 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 4f 62 6a 65 63 74 20 7d 3b 0d 0a 20 20 20 20 20 | =.JsonValueType.Object.};....... |
| 3ba0 | 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 | ...........++m_Position;........ |
| 3bc0 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 | ..........return.true;.......... |
| 3be0 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f 50 6f | ....}................while.(m_Po |
| 3c00 | 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | sition.<.m_Length).............. |
| 3c20 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 50 61 72 73 65 53 74 72 | {..................if.(!ParseStr |
| 3c40 | 69 6e 67 56 61 6c 75 65 28 6f 75 74 20 76 61 72 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 0d | ingValue(out.var.propertyName)). |
| 3c60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 | .....................return.fals |
| 3c80 | 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 53 6b 69 70 54 | e;....................if.(!SkipT |
| 3ca0 | 6f 56 61 6c 75 65 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | oValue())......................r |
| 3cc0 | 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eturn.false;.................... |
| 3ce0 | 69 66 20 28 21 50 61 72 73 65 56 61 6c 75 65 28 6f 75 74 20 76 61 72 20 70 72 6f 70 65 72 74 79 | if.(!ParseValue(out.var.property |
| 3d00 | 56 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | Value))......................ret |
| 3d20 | 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | urn.false;....................if |
| 3d40 | 20 28 21 6d 5f 44 72 79 52 75 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .(!m_DryRun).................... |
| 3d60 | 20 20 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 | ..throw.new.NotImplementedExcept |
| 3d80 | 69 6f 6e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 | ion();....................SkipWh |
| 3da0 | 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | itespace();..................if. |
| 3dc0 | 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 78 74 | (m_Position.<.m_Length.&&.m_Text |
| 3de0 | 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 7d 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | [m_Position].==.'}')............ |
| 3e00 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | ......{......................if. |
| 3e20 | 28 21 6d 5f 44 72 79 52 75 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (!m_DryRun)..................... |
| 3e40 | 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 | .....throw.new.NotImplementedExc |
| 3e60 | 65 70 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b | eption();......................+ |
| 3e80 | 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | +m_Position;.................... |
| 3ea0 | 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..return.true;.................. |
| 3ec0 | 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | }..............}................ |
| 3ee0 | 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | return.false;..........}........ |
| 3f00 | 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 50 61 72 73 65 4e 75 6d 62 65 72 28 6f 75 74 20 | ....public.bool.ParseNumber(out. |
| 3f20 | 4a 73 6f 6e 56 61 6c 75 65 20 72 65 73 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | JsonValue.result)..........{.... |
| 3f40 | 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 0d 0a 20 | ..........result.=.default;..... |
| 3f60 | 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 | ...........SkipWhitespace();.... |
| 3f80 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 | ..........if.(m_Position.==.m_Le |
| 3fa0 | 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 | ngth)..................return.fa |
| 3fc0 | 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 67 61 74 69 76 65 | lse;................var.negative |
| 3fe0 | 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 61 76 65 46 | .=.false;..............var.haveF |
| 4000 | 72 61 63 74 69 6f 6e 61 6c 50 61 72 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 | ractionalPart.=.false;.......... |
| 4020 | 20 20 20 20 76 61 72 20 69 6e 74 65 67 72 61 6c 50 61 72 74 20 3d 20 30 4c 3b 0d 0a 20 20 20 20 | ....var.integralPart.=.0L;...... |
| 4040 | 20 20 20 20 20 20 20 20 76 61 72 20 66 72 61 63 74 69 6f 6e 61 6c 50 61 72 74 20 3d 20 30 2e 30 | ........var.fractionalPart.=.0.0 |
| 4060 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 72 61 63 74 69 6f 6e 61 6c 44 69 76 | ;..............var.fractionalDiv |
| 4080 | 69 73 6f 72 20 3d 20 31 30 2e 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 78 | isor.=.10.0;..............var.ex |
| 40a0 | 70 6f 6e 65 6e 74 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 | ponent.=.0;................//.Pa |
| 40c0 | 72 73 65 20 73 69 67 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 | rse.sign...............if.(m_Tex |
| 40e0 | 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 2d 27 29 0d 0a 20 20 20 20 20 20 20 20 20 | t[m_Position].==.'-')........... |
| 4100 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 67 61 74 69 76 65 20 3d | ...{..................negative.= |
| 4120 | 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 | .true;..................++m_Posi |
| 4140 | 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | tion;..............}............ |
| 4160 | 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 20 7c | ....if.(m_Position.==.m_Length.| |
| 4180 | 7c 20 21 63 68 61 72 2e 49 73 44 69 67 69 74 28 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f | |.!char.IsDigit(m_Text[m_Positio |
| 41a0 | 6e 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c | n]))..................return.fal |
| 41c0 | 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 72 73 65 20 69 6e 74 65 | se;................//.Parse.inte |
| 41e0 | 67 72 61 6c 20 70 61 72 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d | gral.part...............while.(m |
| 4200 | 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 | _Position.<.m_Length)........... |
| 4220 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 20 3d 20 6d | ...{..................var.ch.=.m |
| 4240 | 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | _Text[m_Position];.............. |
| 4260 | 20 20 20 20 69 66 20 28 63 68 20 3d 3d 20 27 2e 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ....if.(ch.==.'.').............. |
| 4280 | 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........break;.................. |
| 42a0 | 69 66 20 28 63 68 20 3c 20 27 30 27 20 7c 7c 20 63 68 20 3e 20 27 39 27 29 0d 0a 20 20 20 20 20 | if.(ch.<.'0'.||.ch.>.'9')....... |
| 42c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ...............break;........... |
| 42e0 | 20 20 20 20 20 20 20 69 6e 74 65 67 72 61 6c 50 61 72 74 20 3d 20 69 6e 74 65 67 72 61 6c 50 61 | .......integralPart.=.integralPa |
| 4300 | 72 74 20 2a 20 31 30 20 2b 20 63 68 20 2d 20 27 30 27 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | rt.*.10.+.ch.-.'0';............. |
| 4320 | 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .....++m_Position;.............. |
| 4340 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 72 73 65 20 66 72 61 63 74 69 | }................//.Parse.fracti |
| 4360 | 6f 6e 61 6c 20 70 61 72 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f | onal.part...............if.(m_Po |
| 4380 | 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f | sition.<.m_Length.&&.m_Text[m_Po |
| 43a0 | 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 2e 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | sition].==.'.')..............{.. |
| 43c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 76 65 46 72 61 63 74 69 6f 6e 61 6c 50 61 | ................haveFractionalPa |
| 43e0 | 72 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f | rt.=.true;..................++m_ |
| 4400 | 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d | Position;..................if.(m |
| 4420 | 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 6d 5f 4c 65 6e 67 74 68 20 7c 7c 20 21 63 68 61 72 2e 49 | _Position.==.m_Length.||.!char.I |
| 4440 | 73 44 69 67 69 74 28 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 29 29 0d 0a 20 20 20 | sDigit(m_Text[m_Position]))..... |
| 4460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a | .................return.false;.. |
| 4480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f 50 6f 73 69 74 69 6f | ................while.(m_Positio |
| 44a0 | 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | n.<.m_Length)..................{ |
| 44c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 20 3d 20 6d | ......................var.ch.=.m |
| 44e0 | 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | _Text[m_Position];.............. |
| 4500 | 20 20 20 20 20 20 20 20 69 66 20 28 63 68 20 3c 20 27 30 27 20 7c 7c 20 63 68 20 3e 20 27 39 27 | ........if.(ch.<.'0'.||.ch.>.'9' |
| 4520 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b | )..........................break |
| 4540 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 72 61 63 74 69 6f 6e 61 | ;......................fractiona |
| 4560 | 6c 50 61 72 74 20 3d 20 28 63 68 20 2d 20 27 30 27 29 20 2f 20 66 72 61 63 74 69 6f 6e 61 6c 44 | lPart.=.(ch.-.'0')./.fractionalD |
| 4580 | 69 76 69 73 6f 72 20 2b 20 66 72 61 63 74 69 6f 6e 61 6c 50 61 72 74 3b 0d 0a 20 20 20 20 20 20 | ivisor.+.fractionalPart;........ |
| 45a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 72 61 63 74 69 6f 6e 61 6c 44 69 76 69 73 6f 72 20 | ..............fractionalDivisor. |
| 45c0 | 2a 3d 20 31 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f | *=.10;......................++m_ |
| 45e0 | 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | Position;..................}.... |
| 4600 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d | ..........}................if.(m |
| 4620 | 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 28 6d 5f 54 65 78 74 5b | _Position.<.m_Length.&&.(m_Text[ |
| 4640 | 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 65 27 20 7c 7c 20 6d 5f 54 65 78 74 5b 6d 5f 50 | m_Position].==.'e'.||.m_Text[m_P |
| 4660 | 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 45 27 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | osition].==.'E'))..............{ |
| 4680 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d | ..................++m_Position;. |
| 46a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 4e 65 67 61 74 69 76 65 20 | .................var.isNegative. |
| 46c0 | 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f | =.false;..................if.(m_ |
| 46e0 | 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 78 74 5b 6d 5f | Position.<.m_Length.&&.m_Text[m_ |
| 4700 | 50 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 2d 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Position].==.'-')............... |
| 4720 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4e 65 67 61 | ...{......................isNega |
| 4740 | 74 69 76 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tive.=.true;.................... |
| 4760 | 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..++m_Position;................. |
| 4780 | 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 50 | .}..................else.if.(m_P |
| 47a0 | 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 78 74 5b 6d 5f 50 | osition.<.m_Length.&&.m_Text[m_P |
| 47c0 | 6f 73 69 74 69 6f 6e 5d 20 3d 3d 20 27 2b 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | osition].==.'+')................ |
| 47e0 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 | ..{......................++m_Pos |
| 4800 | 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | ition;..................}....... |
| 4820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 75 6c 74 69 70 6c 69 65 72 20 3d 20 31 3b | .............var.multiplier.=.1; |
| 4840 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f 50 6f 73 69 74 | ..................while.(m_Posit |
| 4860 | 69 6f 6e 20 3c 20 6d 5f 4c 65 6e 67 74 68 20 26 26 20 63 68 61 72 2e 49 73 44 69 67 69 74 28 6d | ion.<.m_Length.&&.char.IsDigit(m |
| 4880 | 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | _Text[m_Position]))............. |
| 48a0 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 | .....{......................var. |
| 48c0 | 64 69 67 69 74 20 3d 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 2d 20 27 30 27 | digit.=.m_Text[m_Position].-.'0' |
| 48e0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 78 70 6f 6e 65 6e 74 20 | ;......................exponent. |
| 4900 | 2a 3d 20 6d 75 6c 74 69 70 6c 69 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | *=.multiplier;.................. |
| 4920 | 20 20 20 20 65 78 70 6f 6e 65 6e 74 20 2b 3d 20 64 69 67 69 74 3b 0d 0a 20 20 20 20 20 20 20 20 | ....exponent.+=.digit;.......... |
| 4940 | 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 6c 74 69 70 6c 69 65 72 20 2a 3d 20 31 30 3b 0d 0a 20 | ............multiplier.*=.10;... |
| 4960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b | ...................++m_Position; |
| 4980 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | ..................}............. |
| 49a0 | 20 20 20 20 20 20 20 69 66 20 28 69 73 4e 65 67 61 74 69 76 65 29 0d 0a 20 20 20 20 20 20 20 20 | .......if.(isNegative).......... |
| 49c0 | 20 20 20 20 20 20 20 20 20 20 20 20 65 78 70 6f 6e 65 6e 74 20 2a 3d 20 2d 31 3b 0d 0a 20 20 20 | ............exponent.*=.-1;..... |
| 49e0 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d | .........}................if.(!m |
| 4a00 | 5f 44 72 79 52 75 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | _DryRun)..............{......... |
| 4a20 | 20 20 20 20 20 20 20 20 20 69 66 20 28 21 68 61 76 65 46 72 61 63 74 69 6f 6e 61 6c 50 61 72 74 | .........if.(!haveFractionalPart |
| 4a40 | 20 26 26 20 65 78 70 6f 6e 65 6e 74 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .&&.exponent.==.0).............. |
| 4a60 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e | ....{......................if.(n |
| 4a80 | 65 67 61 74 69 76 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | egative)........................ |
| 4aa0 | 20 20 72 65 73 75 6c 74 20 3d 20 2d 69 6e 74 65 67 72 61 6c 50 61 72 74 3b 0d 0a 20 20 20 20 20 | ..result.=.-integralPart;....... |
| 4ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ...............else............. |
| 4ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 69 6e 74 65 67 72 61 6c 50 61 | .............result.=.integralPa |
| 4b00 | 72 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 | rt;..................}.......... |
| 4b20 | 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | ........else..................{. |
| 4b40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 76 61 6c 75 65 | .....................float.value |
| 4b60 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 67 61 74 | ;......................if.(negat |
| 4b80 | 69 76 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 | ive)..........................va |
| 4ba0 | 6c 75 65 20 3d 20 28 66 6c 6f 61 74 29 2d 28 69 6e 74 65 67 72 61 6c 50 61 72 74 20 2b 20 66 72 | lue.=.(float)-(integralPart.+.fr |
| 4bc0 | 61 63 74 69 6f 6e 61 6c 50 61 72 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | actionalPart);.................. |
| 4be0 | 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ....else........................ |
| 4c00 | 20 20 76 61 6c 75 65 20 3d 20 28 66 6c 6f 61 74 29 28 69 6e 74 65 67 72 61 6c 50 61 72 74 20 2b | ..value.=.(float)(integralPart.+ |
| 4c20 | 20 66 72 61 63 74 69 6f 6e 61 6c 50 61 72 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .fractionalPart);............... |
| 4c40 | 20 20 20 20 20 20 20 69 66 20 28 65 78 70 6f 6e 65 6e 74 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 | .......if.(exponent.!=.0)....... |
| 4c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 20 2a 3d 20 4d 61 74 68 | ...................value.*=.Math |
| 4c80 | 66 2e 50 6f 77 28 31 30 2c 20 65 78 70 6f 6e 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | f.Pow(10,.exponent);............ |
| 4ca0 | 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 | ..........result.=.value;....... |
| 4cc0 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | ...........}..............}..... |
| 4ce0 | 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 | ...........return.true;......... |
| 4d00 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 50 61 72 73 65 42 | .}............public.bool.ParseB |
| 4d20 | 6f 6f 6c 65 61 6e 56 61 6c 75 65 28 6f 75 74 20 4a 73 6f 6e 56 61 6c 75 65 20 72 65 73 75 6c 74 | ooleanValue(out.JsonValue.result |
| 4d40 | 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 | )..........{..............SkipWh |
| 4d60 | 69 74 65 73 70 61 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 53 6b 69 | itespace();..............if.(Ski |
| 4d80 | 70 53 74 72 69 6e 67 28 22 74 72 75 65 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | pString("true"))..............{. |
| 4da0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 74 72 75 65 3b 0d | .................result.=.true;. |
| 4dc0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 | .................return.true;... |
| 4de0 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | ...........}................if.( |
| 4e00 | 53 6b 69 70 53 74 72 69 6e 67 28 22 66 61 6c 73 65 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | SkipString("false"))............ |
| 4e20 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 66 61 | ..{..................result.=.fa |
| 4e40 | 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 | lse;..................return.tru |
| 4e60 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | e;..............}............... |
| 4e80 | 20 72 65 73 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .result.=.default;.............. |
| 4ea0 | 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | return.false;..........}........ |
| 4ec0 | 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 50 61 72 73 65 4e 75 6c 6c 56 61 6c 75 65 28 6f | ....public.bool.ParseNullValue(o |
| 4ee0 | 75 74 20 4a 73 6f 6e 56 61 6c 75 65 20 72 65 73 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d | ut.JsonValue.result)..........{. |
| 4f00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a | .............result.=.default;.. |
| 4f20 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 6b 69 70 53 74 72 69 6e 67 28 22 6e | ............return.SkipString("n |
| 4f40 | 75 6c 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 | ull");..........}............pub |
| 4f60 | 6c 69 63 20 62 6f 6f 6c 20 53 6b 69 70 54 6f 56 61 6c 75 65 28 29 0d 0a 20 20 20 20 20 20 20 20 | lic.bool.SkipToValue().......... |
| 4f80 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b | {..............SkipWhitespace(); |
| 4fa0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3d 3d 20 | ..............if.(m_Position.==. |
| 4fc0 | 6d 5f 4c 65 6e 67 74 68 20 7c 7c 20 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 20 21 | m_Length.||.m_Text[m_Position].! |
| 4fe0 | 3d 20 27 3a 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 | =.':')..................return.f |
| 5000 | 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b | alse;..............++m_Position; |
| 5020 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d | ..............SkipWhitespace();. |
| 5040 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 | .............return.true;....... |
| 5060 | 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 53 6b 69 | ...}............private.bool.Ski |
| 5080 | 70 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 74 65 78 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d | pString(string.text)..........{. |
| 50a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 3b 0d 0a | .............SkipWhitespace();.. |
| 50c0 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 20 3d 20 74 65 78 74 2e 4c 65 | ............var.length.=.text.Le |
| 50e0 | 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 6f 73 69 74 69 6f | ngth;..............if.(m_Positio |
| 5100 | 6e 20 2b 20 6c 65 6e 67 74 68 20 3e 3d 20 6d 5f 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 | n.+.length.>=.m_Length)......... |
| 5120 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 | .........return.false;.......... |
| 5140 | 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6c 65 6e 67 74 68 3b 20 | ....for.(var.i.=.0;.i.<.length;. |
| 5160 | 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ++i)..............{............. |
| 5180 | 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 20 2b 20 69 5d 20 | .....if.(m_Text[m_Position.+.i]. |
| 51a0 | 21 3d 20 74 65 78 74 5b 69 5d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | !=.text[i])..................... |
| 51c0 | 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d | .return.false;..............}... |
| 51e0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6f 73 69 74 69 6f 6e 20 2b 3d 20 6c 65 6e 67 74 | .............m_Position.+=.lengt |
| 5200 | 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 | h;..............return.true;.... |
| 5220 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 | ......}............private.void. |
| 5240 | 53 6b 69 70 57 68 69 74 65 73 70 61 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | SkipWhitespace()..........{..... |
| 5260 | 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6d 5f 50 6f 73 69 74 69 6f 6e 20 3c 20 6d 5f 4c | .........while.(m_Position.<.m_L |
| 5280 | 65 6e 67 74 68 20 26 26 20 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 6d 5f 54 65 78 | ength.&&.char.IsWhiteSpace(m_Tex |
| 52a0 | 74 5b 6d 5f 50 6f 73 69 74 69 6f 6e 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | t[m_Position]))................. |
| 52c0 | 20 2b 2b 6d 5f 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | .++m_Position;..........}....... |
| 52e0 | 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 41 74 45 6e 64 20 3d 3e 20 6d 5f 50 6f | .....public.bool.isAtEnd.=>.m_Po |
| 5300 | 73 69 74 69 6f 6e 20 3e 3d 20 6d 5f 4c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 | sition.>=.m_Length;............p |
| 5320 | 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 73 74 72 69 6e 67 20 6d 5f 54 65 78 74 3b 0d 0a | rivate.readonly.string.m_Text;.. |
| 5340 | 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 69 6e 74 20 6d 5f 4c | ........private.readonly.int.m_L |
| 5360 | 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 6d 5f 50 6f | ength;..........private.int.m_Po |
| 5380 | 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f | sition;..........private.bool.m_ |
| 53a0 | 4d 61 74 63 68 41 6e 79 45 6c 65 6d 65 6e 74 49 6e 41 72 72 61 79 3b 0d 0a 20 20 20 20 20 20 20 | MatchAnyElementInArray;......... |
| 53c0 | 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 44 72 79 52 75 6e 3b 0d 0a 0d 0a 20 20 20 20 20 | .private.bool.m_DryRun;......... |
| 53e0 | 20 20 20 70 75 62 6c 69 63 20 65 6e 75 6d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 0d 0a 20 20 | ...public.enum.JsonValueType.... |
| 5400 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 6f 6e 65 2c 0d 0a 20 20 20 20 | ......{..............None,...... |
| 5420 | 20 20 20 20 20 20 20 20 42 6f 6f 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 61 6c 2c | ........Bool,..............Real, |
| 5440 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 74 65 67 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 | ..............Integer,.......... |
| 5460 | 20 20 20 20 53 74 72 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 2c 0d | ....String,..............Array,. |
| 5480 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 | .............Object,............ |
| 54a0 | 20 20 41 6e 79 2c 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 | ..Any,..........}............pub |
| 54c0 | 6c 69 63 20 73 74 72 75 63 74 20 4a 73 6f 6e 53 74 72 69 6e 67 20 3a 20 49 45 71 75 61 74 61 62 | lic.struct.JsonString.:.IEquatab |
| 54e0 | 6c 65 3c 4a 73 6f 6e 53 74 72 69 6e 67 3e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | le<JsonString>..........{....... |
| 5500 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 53 75 62 73 74 72 69 6e 67 20 74 65 78 74 3b 0d 0a 20 | .......public.Substring.text;... |
| 5520 | 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 68 61 73 45 73 63 61 70 65 | ...........public.bool.hasEscape |
| 5540 | 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 | s;................public.overrid |
| 5560 | 65 20 73 74 72 69 6e 67 20 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | e.string.ToString()............. |
| 5580 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 68 61 73 45 73 63 61 | .{..................if.(!hasEsca |
| 55a0 | 70 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e | pes)......................return |
| 55c0 | 20 74 65 78 74 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .text.ToString();............... |
| 55e0 | 20 20 20 20 20 76 61 72 20 62 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 75 69 | .....var.builder.=.new.StringBui |
| 5600 | 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e | lder();..................var.len |
| 5620 | 67 74 68 20 3d 20 74 65 78 74 2e 6c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | gth.=.text.length;.............. |
| 5640 | 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6c 65 6e 67 74 68 3b 20 | ....for.(var.i.=.0;.i.<.length;. |
| 5660 | 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | ++i)..................{......... |
| 5680 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 68 20 3d 20 74 65 78 74 5b 69 5d 3b 0d 0a | .............var.ch.=.text[i];.. |
| 56a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 20 3d 3d 20 27 5c | ....................if.(ch.==.'\ |
| 56c0 | 5c 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | \')......................{...... |
| 56e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 69 3b 0d 0a 20 20 20 20 20 20 | ....................++i;........ |
| 5700 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3d 3d 20 6c 65 6e 67 74 | ..................if.(i.==.lengt |
| 5720 | 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | h).............................. |
| 5740 | 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | break;.......................... |
| 5760 | 63 68 20 3d 20 74 65 78 74 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ch.=.text[i];................... |
| 5780 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 | ...}......................builde |
| 57a0 | 72 2e 41 70 70 65 6e 64 28 63 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d | r.Append(ch);..................} |
| 57c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 75 69 6c 64 65 72 | ..................return.builder |
| 57e0 | 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | .ToString();..............}..... |
| 5800 | 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 45 71 75 61 6c 73 28 4a 73 | ...........public.bool.Equals(Js |
| 5820 | 6f 6e 53 74 72 69 6e 67 20 6f 74 68 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | onString.other)..............{.. |
| 5840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 68 61 73 45 73 63 61 70 65 73 20 3d | ................if.(hasEscapes.= |
| 5860 | 3d 20 6f 74 68 65 72 2e 68 61 73 45 73 63 61 70 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | =.other.hasEscapes)............. |
| 5880 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 75 62 73 74 72 69 6e 67 2e 43 6f 6d 70 61 72 | .........return.Substring.Compar |
| 58a0 | 65 28 74 65 78 74 2c 20 6f 74 68 65 72 2e 74 65 78 74 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 | e(text,.other.text,.StringCompar |
| 58c0 | 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 | ison.InvariantCultureIgnoreCase) |
| 58e0 | 20 3d 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 68 | .==.0;....................var.th |
| 5900 | 69 73 4c 65 6e 67 74 68 20 3d 20 74 65 78 74 2e 6c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 | isLength.=.text.length;......... |
| 5920 | 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 74 68 65 72 4c 65 6e 67 74 68 20 3d 20 6f 74 68 65 72 | .........var.otherLength.=.other |
| 5940 | 2e 74 65 78 74 2e 6c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .text.length;................... |
| 5960 | 20 69 6e 74 20 74 68 69 73 49 6e 64 65 78 20 3d 20 30 2c 20 6f 74 68 65 72 49 6e 64 65 78 20 3d | .int.thisIndex.=.0,.otherIndex.= |
| 5980 | 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 3b 20 74 68 69 73 | .0;..................for.(;.this |
| 59a0 | 49 6e 64 65 78 20 3c 20 74 68 69 73 4c 65 6e 67 74 68 20 26 26 20 6f 74 68 65 72 49 6e 64 65 78 | Index.<.thisLength.&&.otherIndex |
| 59c0 | 20 3c 20 6f 74 68 65 72 4c 65 6e 67 74 68 3b 20 2b 2b 74 68 69 73 49 6e 64 65 78 2c 20 2b 2b 6f | .<.otherLength;.++thisIndex,.++o |
| 59e0 | 74 68 65 72 49 6e 64 65 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | therIndex)..................{... |
| 5a00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 68 69 73 43 68 61 72 20 | ...................var.thisChar. |
| 5a20 | 3d 20 74 65 78 74 5b 74 68 69 73 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | =.text[thisIndex];.............. |
| 5a40 | 20 20 20 20 20 20 20 20 76 61 72 20 6f 74 68 65 72 43 68 61 72 20 3d 20 6f 74 68 65 72 2e 74 65 | ........var.otherChar.=.other.te |
| 5a60 | 78 74 5b 6f 74 68 65 72 49 6e 64 65 78 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | xt[otherIndex];................. |
| 5a80 | 20 20 20 20 20 20 20 69 66 20 28 74 68 69 73 43 68 61 72 20 3d 3d 20 27 5c 5c 27 29 0d 0a 20 20 | .......if.(thisChar.==.'\\').... |
| 5aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................{............. |
| 5ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 74 68 69 73 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 | .............++thisIndex;....... |
| 5ae0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 68 69 73 49 6e 64 65 78 | ...................if.(thisIndex |
| 5b00 | 20 3d 3d 20 74 68 69 73 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .==.thisLength)................. |
| 5b20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 | .............return.false;...... |
| 5b40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 43 68 61 72 20 3d 20 74 | ....................thisChar.=.t |
| 5b60 | 65 78 74 5b 74 68 69 73 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ext[thisIndex];................. |
| 5b80 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | .....}........................if |
| 5ba0 | 20 28 6f 74 68 65 72 43 68 61 72 20 3d 3d 20 27 5c 5c 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | .(otherChar.==.'\\')............ |
| 5bc0 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 5be0 | 20 20 20 20 20 2b 2b 6f 74 68 65 72 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .....++otherIndex;.............. |
| 5c00 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 74 68 65 72 49 6e 64 65 78 20 3d 3d 20 6f 74 | ............if.(otherIndex.==.ot |
| 5c20 | 68 65 72 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | herLength)...................... |
| 5c40 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ........return.false;........... |
| 5c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 74 68 65 72 43 68 61 72 20 3d 20 6f 74 68 65 72 | ...............otherChar.=.other |
| 5c80 | 2e 74 65 78 74 5b 6f 74 68 65 72 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .text[otherIndex];.............. |
| 5ca0 | 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........}....................... |
| 5cc0 | 20 69 66 20 28 63 68 61 72 2e 54 6f 55 70 70 65 72 49 6e 76 61 72 69 61 6e 74 28 74 68 69 73 43 | .if.(char.ToUpperInvariant(thisC |
| 5ce0 | 68 61 72 29 20 21 3d 20 63 68 61 72 2e 54 6f 55 70 70 65 72 49 6e 76 61 72 69 61 6e 74 28 6f 74 | har).!=.char.ToUpperInvariant(ot |
| 5d00 | 68 65 72 43 68 61 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | herChar))....................... |
| 5d20 | 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...return.false;................ |
| 5d40 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 | ..}....................return.th |
| 5d60 | 69 73 49 6e 64 65 78 20 3d 3d 20 74 68 69 73 4c 65 6e 67 74 68 20 26 26 20 6f 74 68 65 72 49 6e | isIndex.==.thisLength.&&.otherIn |
| 5d80 | 64 65 78 20 3d 3d 20 6f 74 68 65 72 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | dex.==.otherLength;............. |
| 5da0 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 | .}................public.overrid |
| 5dc0 | 65 20 62 6f 6f 6c 20 45 71 75 61 6c 73 28 6f 62 6a 65 63 74 20 6f 62 6a 29 0d 0a 20 20 20 20 20 | e.bool.Equals(object.obj)....... |
| 5de0 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e | .......{..................return |
| 5e00 | 20 6f 62 6a 20 69 73 20 4a 73 6f 6e 53 74 72 69 6e 67 20 6f 74 68 65 72 20 26 26 20 45 71 75 61 | .obj.is.JsonString.other.&&.Equa |
| 5e20 | 6c 73 28 6f 74 68 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | ls(other);..............}....... |
| 5e40 | 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 69 6e 74 20 47 65 74 | .........public.override.int.Get |
| 5e60 | 48 61 73 68 43 6f 64 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | HashCode()..............{....... |
| 5e80 | 20 20 20 20 20 20 20 20 20 20 20 75 6e 63 68 65 63 6b 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 | ...........unchecked............ |
| 5ea0 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | ......{......................ret |
| 5ec0 | 75 72 6e 20 28 74 65 78 74 2e 47 65 74 48 61 73 68 43 6f 64 65 28 29 20 2a 20 33 39 37 29 20 5e | urn.(text.GetHashCode().*.397).^ |
| 5ee0 | 20 68 61 73 45 73 63 61 70 65 73 2e 47 65 74 48 61 73 68 43 6f 64 65 28 29 3b 0d 0a 20 20 20 20 | .hasEscapes.GetHashCode();...... |
| 5f00 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a | ............}..............}.... |
| 5f20 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 6f | ............public.static.bool.o |
| 5f40 | 70 65 72 61 74 6f 72 3d 3d 28 4a 73 6f 6e 53 74 72 69 6e 67 20 6c 65 66 74 2c 20 4a 73 6f 6e 53 | perator==(JsonString.left,.JsonS |
| 5f60 | 74 72 69 6e 67 20 72 69 67 68 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | tring.right)..............{..... |
| 5f80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 65 66 74 2e 45 71 75 61 6c 73 28 | .............return.left.Equals( |
| 5fa0 | 72 69 67 68 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | right);..............}.......... |
| 5fc0 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 6f 70 65 72 61 74 6f | ......public.static.bool.operato |
| 5fe0 | 72 21 3d 28 4a 73 6f 6e 53 74 72 69 6e 67 20 6c 65 66 74 2c 20 4a 73 6f 6e 53 74 72 69 6e 67 20 | r!=(JsonString.left,.JsonString. |
| 6000 | 72 69 67 68 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | right)..............{........... |
| 6020 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 21 6c 65 66 74 2e 45 71 75 61 6c 73 28 72 69 67 68 74 | .......return.!left.Equals(right |
| 6040 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | );..............}............... |
| 6060 | 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 72 61 74 6f 72 | .public.static.implicit.operator |
| 6080 | 20 4a 73 6f 6e 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 | .JsonString(string.str)......... |
| 60a0 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e | .....{..................return.n |
| 60c0 | 65 77 20 4a 73 6f 6e 53 74 72 69 6e 67 20 7b 20 74 65 78 74 20 3d 20 73 74 72 20 7d 3b 0d 0a 20 | ew.JsonString.{.text.=.str.};... |
| 60e0 | 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 | ...........}..........}......... |
| 6100 | 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 63 74 20 4a 73 6f 6e 56 61 6c 75 65 20 3a 20 49 45 71 | ...public.struct.JsonValue.:.IEq |
| 6120 | 75 61 74 61 62 6c 65 3c 4a 73 6f 6e 56 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 | uatable<JsonValue>..........{... |
| 6140 | 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 20 | ...........public.JsonValueType. |
| 6160 | 74 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 62 | type;..............public.bool.b |
| 6180 | 6f 6f 6c 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 64 6f | oolValue;..............public.do |
| 61a0 | 75 62 6c 65 20 72 65 61 6c 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | uble.realValue;..............pub |
| 61c0 | 6c 69 63 20 6c 6f 6e 67 20 69 6e 74 65 67 65 72 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 | lic.long.integerValue;.......... |
| 61e0 | 20 20 20 20 70 75 62 6c 69 63 20 4a 73 6f 6e 53 74 72 69 6e 67 20 73 74 72 69 6e 67 56 61 6c 75 | ....public.JsonString.stringValu |
| 6200 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4c 69 73 74 3c 4a 73 6f 6e | e;..............public.List<Json |
| 6220 | 56 61 6c 75 65 3e 20 61 72 72 61 79 56 61 6c 75 65 3b 20 2f 2f 20 41 6c 6c 6f 63 61 74 65 73 2e | Value>.arrayValue;.//.Allocates. |
| 6240 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c | ..............public.Dictionary< |
| 6260 | 73 74 72 69 6e 67 2c 20 4a 73 6f 6e 56 61 6c 75 65 3e 20 6f 62 6a 65 63 74 56 61 6c 75 65 3b 20 | string,.JsonValue>.objectValue;. |
| 6280 | 2f 2f 20 41 6c 6c 6f 63 61 74 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | //.Allocates...............publi |
| 62a0 | 63 20 6f 62 6a 65 63 74 20 61 6e 79 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | c.object.anyValue;.............. |
| 62c0 | 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 6f 42 6f 6f 6c 65 61 6e 28 29 0d 0a 20 20 20 20 20 | ..public.bool.ToBoolean()....... |
| 62e0 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 | .......{..................switch |
| 6300 | 20 28 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | .(type)..................{...... |
| 6320 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 | ................case.JsonValueTy |
| 6340 | 70 65 2e 42 6f 6f 6c 3a 20 72 65 74 75 72 6e 20 62 6f 6f 6c 56 61 6c 75 65 3b 0d 0a 20 20 20 20 | pe.Bool:.return.boolValue;...... |
| 6360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 | ................case.JsonValueTy |
| 6380 | 70 65 2e 49 6e 74 65 67 65 72 3a 20 72 65 74 75 72 6e 20 69 6e 74 65 67 65 72 56 61 6c 75 65 20 | pe.Integer:.return.integerValue. |
| 63a0 | 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 | !=.0;......................case. |
| 63c0 | 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 3a 20 72 65 74 75 72 6e 20 4e 75 6d 62 65 | JsonValueType.Real:.return.Numbe |
| 63e0 | 72 48 65 6c 70 65 72 73 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 30 2c 20 72 65 61 6c 56 61 | rHelpers.Approximately(0,.realVa |
| 6400 | 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 | lue);......................case. |
| 6420 | 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 3a 20 72 65 74 75 72 6e 20 43 6f 6e | JsonValueType.String:.return.Con |
| 6440 | 76 65 72 74 2e 54 6f 42 6f 6f 6c 65 61 6e 28 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 | vert.ToBoolean(ToString());..... |
| 6460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............}.................. |
| 6480 | 72 65 74 75 72 6e 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | return.default;..............}.. |
| 64a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6c 6f 6e 67 20 54 6f 49 6e 74 65 | ..............public.long.ToInte |
| 64c0 | 67 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ger()..............{............ |
| 64e0 | 20 20 20 20 20 20 73 77 69 74 63 68 20 28 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ......switch.(type)............. |
| 6500 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 | .....{......................case |
| 6520 | 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 42 6f 6f 6c 3a 20 72 65 74 75 72 6e 20 62 6f 6f 6c | .JsonValueType.Bool:.return.bool |
| 6540 | 56 61 6c 75 65 20 3f 20 31 20 3a 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Value.?.1.:.0;.................. |
| 6560 | 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 67 65 72 3a 20 | ....case.JsonValueType.Integer:. |
| 6580 | 72 65 74 75 72 6e 20 69 6e 74 65 67 65 72 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | return.integerValue;............ |
| 65a0 | 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 | ..........case.JsonValueType.Rea |
| 65c0 | 6c 3a 20 72 65 74 75 72 6e 20 28 6c 6f 6e 67 29 72 65 61 6c 56 61 6c 75 65 3b 0d 0a 20 20 20 20 | l:.return.(long)realValue;...... |
| 65e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 | ................case.JsonValueTy |
| 6600 | 70 65 2e 53 74 72 69 6e 67 3a 20 72 65 74 75 72 6e 20 43 6f 6e 76 65 72 74 2e 54 6f 49 6e 74 36 | pe.String:.return.Convert.ToInt6 |
| 6620 | 34 28 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | 4(ToString());.................. |
| 6640 | 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 64 65 66 61 75 6c | }..................return.defaul |
| 6660 | 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | t;..............}............... |
| 6680 | 20 70 75 62 6c 69 63 20 64 6f 75 62 6c 65 20 54 6f 44 6f 75 62 6c 65 28 29 0d 0a 20 20 20 20 20 | .public.double.ToDouble()....... |
| 66a0 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 | .......{..................switch |
| 66c0 | 20 28 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | .(type)..................{...... |
| 66e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 | ................case.JsonValueTy |
| 6700 | 70 65 2e 42 6f 6f 6c 3a 20 72 65 74 75 72 6e 20 62 6f 6f 6c 56 61 6c 75 65 20 3f 20 31 20 3a 20 | pe.Bool:.return.boolValue.?.1.:. |
| 6720 | 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f | 0;......................case.Jso |
| 6740 | 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 67 65 72 3a 20 72 65 74 75 72 6e 20 69 6e 74 65 67 | nValueType.Integer:.return.integ |
| 6760 | 65 72 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 | erValue;......................ca |
| 6780 | 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 3a 20 72 65 74 75 72 6e 20 72 65 | se.JsonValueType.Real:.return.re |
| 67a0 | 61 6c 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 | alValue;......................ca |
| 67c0 | 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 3a 20 72 65 74 75 72 6e 20 | se.JsonValueType.String:.return. |
| 67e0 | 43 6f 6e 76 65 72 74 2e 54 6f 53 69 6e 67 6c 65 28 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 | Convert.ToSingle(ToString());... |
| 6800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............}................ |
| 6820 | 20 20 72 65 74 75 72 6e 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d | ..return.default;..............} |
| 6840 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 | ................public.override. |
| 6860 | 73 74 72 69 6e 67 20 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | string.ToString()..............{ |
| 6880 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 74 79 70 65 29 0d | ..................switch.(type). |
| 68a0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................{.............. |
| 68c0 | 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 4e 6f 6e 65 3a | ........case.JsonValueType.None: |
| 68e0 | 20 72 65 74 75 72 6e 20 22 6e 75 6c 6c 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .return."null";................. |
| 6900 | 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 42 6f 6f 6c 3a 20 72 65 | .....case.JsonValueType.Bool:.re |
| 6920 | 74 75 72 6e 20 62 6f 6f 6c 56 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 | turn.boolValue.ToString();...... |
| 6940 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 | ................case.JsonValueTy |
| 6960 | 70 65 2e 49 6e 74 65 67 65 72 3a 20 72 65 74 75 72 6e 20 69 6e 74 65 67 65 72 56 61 6c 75 65 2e | pe.Integer:.return.integerValue. |
| 6980 | 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 | ToString(CultureInfo.InvariantCu |
| 69a0 | 6c 74 75 72 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 | lture);......................cas |
| 69c0 | 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 3a 20 72 65 74 75 72 6e 20 72 65 61 | e.JsonValueType.Real:.return.rea |
| 69e0 | 6c 56 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 | lValue.ToString(CultureInfo.Inva |
| 6a00 | 72 69 61 6e 74 43 75 6c 74 75 72 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | riantCulture);.................. |
| 6a20 | 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 3a 20 72 | ....case.JsonValueType.String:.r |
| 6a40 | 65 74 75 72 6e 20 73 74 72 69 6e 67 56 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 | eturn.stringValue.ToString();... |
| 6a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 | ...................case.JsonValu |
| 6a80 | 65 54 79 70 65 2e 41 72 72 61 79 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eType.Array:.................... |
| 6aa0 | 20 20 20 20 20 20 69 66 20 28 61 72 72 61 79 56 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 | ......if.(arrayValue.==.null)... |
| 6ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | ...........................retur |
| 6ae0 | 6e 20 22 5b 5d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | n."[]";......................... |
| 6b00 | 20 72 65 74 75 72 6e 20 24 22 5b 7b 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 22 2c 20 61 72 72 | .return.$"[{string.Join(",",.arr |
| 6b20 | 61 79 56 61 6c 75 65 2e 53 65 6c 65 63 74 28 78 20 3d 3e 20 78 2e 54 6f 53 74 72 69 6e 67 28 29 | ayValue.Select(x.=>.x.ToString() |
| 6b40 | 29 29 7d 5d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 | ))}]";......................case |
| 6b60 | 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 4f 62 6a 65 63 74 3a 0d 0a 20 20 20 20 20 20 20 20 | .JsonValueType.Object:.......... |
| 6b80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 62 6a 65 63 74 56 61 6c 75 65 20 | ................if.(objectValue. |
| 6ba0 | 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ==.null)........................ |
| 6bc0 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 7b 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ......return."{}";.............. |
| 6be0 | 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6c 65 6d 65 6e 74 73 20 3d 20 6f 62 6a 65 63 | ............var.elements.=.objec |
| 6c00 | 74 56 61 6c 75 65 2e 53 65 6c 65 63 74 28 70 61 69 72 20 3d 3e 20 24 22 5c 22 7b 70 61 69 72 2e | tValue.Select(pair.=>.$"\"{pair. |
| 6c20 | 4b 65 79 7d 5c 22 20 3a 20 5c 22 7b 70 61 69 72 2e 56 61 6c 75 65 7d 5c 22 22 29 3b 0d 0a 20 20 | Key}\".:.\"{pair.Value}\"");.... |
| 6c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 22 7b | ......................return.$"{ |
| 6c60 | 7b 7b 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 22 2c 20 65 6c 65 6d 65 6e 74 73 29 7d 7d 7d 22 | {{string.Join(",",.elements)}}}" |
| 6c80 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e | ;......................case.Json |
| 6ca0 | 56 61 6c 75 65 54 79 70 65 2e 41 6e 79 3a 20 72 65 74 75 72 6e 20 61 6e 79 56 61 6c 75 65 2e 54 | ValueType.Any:.return.anyValue.T |
| 6cc0 | 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 | oString();..................}... |
| 6ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 61 73 65 2e 54 6f 53 74 72 | ...............return.base.ToStr |
| 6d00 | 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | ing();..............}........... |
| 6d20 | 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 72 | .....public.static.implicit.oper |
| 6d40 | 61 74 6f 72 20 4a 73 6f 6e 56 61 6c 75 65 28 62 6f 6f 6c 20 76 61 6c 29 0d 0a 20 20 20 20 20 20 | ator.JsonValue(bool.val)........ |
| 6d60 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | ......{..................return. |
| 6d80 | 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | new.JsonValue..................{ |
| 6da0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f | ......................type.=.Jso |
| 6dc0 | 6e 56 61 6c 75 65 54 79 70 65 2e 42 6f 6f 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nValueType.Bool,................ |
| 6de0 | 20 20 20 20 20 20 62 6f 6f 6c 56 61 6c 75 65 20 3d 20 76 61 6c 0d 0a 20 20 20 20 20 20 20 20 20 | ......boolValue.=.val........... |
| 6e00 | 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | .......};..............}........ |
| 6e20 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f | ........public.static.implicit.o |
| 6e40 | 70 65 72 61 74 6f 72 20 4a 73 6f 6e 56 61 6c 75 65 28 6c 6f 6e 67 20 76 61 6c 29 0d 0a 20 20 20 | perator.JsonValue(long.val)..... |
| 6e60 | 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | .........{..................retu |
| 6e80 | 72 6e 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rn.new.JsonValue................ |
| 6ea0 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 | ..{......................type.=. |
| 6ec0 | 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 67 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 | JsonValueType.Integer,.......... |
| 6ee0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 67 65 72 56 61 6c 75 65 20 3d 20 76 61 6c 0d 0a | ............integerValue.=.val.. |
| 6f00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ................};.............. |
| 6f20 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 | }................public.static.i |
| 6f40 | 6d 70 6c 69 63 69 74 20 6f 70 65 72 61 74 6f 72 20 4a 73 6f 6e 56 61 6c 75 65 28 64 6f 75 62 6c | mplicit.operator.JsonValue(doubl |
| 6f60 | 65 20 76 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | e.val)..............{........... |
| 6f80 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 0d 0a 20 20 20 | .......return.new.JsonValue..... |
| 6fa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 6fc0 | 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 2c 0d 0a | ....type.=.JsonValueType.Real,.. |
| 6fe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61 6c 56 61 6c 75 65 20 3d 20 | ....................realValue.=. |
| 7000 | 76 61 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 | val..................};......... |
| 7020 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 | .....}................public.sta |
| 7040 | 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 72 61 74 6f 72 20 4a 73 6f 6e 56 61 6c 75 65 28 | tic.implicit.operator.JsonValue( |
| 7060 | 73 74 72 69 6e 67 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | string.str)..............{...... |
| 7080 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 | ............return.new.JsonValue |
| 70a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................{............. |
| 70c0 | 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 | .........type.=.JsonValueType.St |
| 70e0 | 72 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e | ring,......................strin |
| 7100 | 67 56 61 6c 75 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 53 74 72 69 6e 67 20 7b 20 74 65 78 74 20 3d | gValue.=.new.JsonString.{.text.= |
| 7120 | 20 73 74 72 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 | .str.}..................};...... |
| 7140 | 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ........}................public. |
| 7160 | 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 72 61 74 6f 72 20 4a 73 6f 6e 56 61 6c | static.implicit.operator.JsonVal |
| 7180 | 75 65 28 4a 73 6f 6e 53 74 72 69 6e 67 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ue(JsonString.str).............. |
| 71a0 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4a 73 | {..................return.new.Js |
| 71c0 | 6f 6e 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | onValue..................{...... |
| 71e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 | ................type.=.JsonValue |
| 7200 | 54 79 70 65 2e 53 74 72 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Type.String,.................... |
| 7220 | 20 20 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 20 73 74 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..stringValue.=.str............. |
| 7240 | 20 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | .....};..............}.......... |
| 7260 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 | ......public.static.implicit.ope |
| 7280 | 72 61 74 6f 72 20 4a 73 6f 6e 56 61 6c 75 65 28 4c 69 73 74 3c 4a 73 6f 6e 56 61 6c 75 65 3e 20 | rator.JsonValue(List<JsonValue>. |
| 72a0 | 61 72 72 61 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | array)..............{........... |
| 72c0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 0d 0a 20 20 20 | .......return.new.JsonValue..... |
| 72e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 7300 | 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 41 72 72 61 79 2c 0d | ....type.=.JsonValueType.Array,. |
| 7320 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 56 61 6c 75 65 20 | .....................arrayValue. |
| 7340 | 3d 20 61 72 72 61 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 | =.array..................};..... |
| 7360 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | .........}................public |
| 7380 | 20 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 72 61 74 6f 72 20 4a 73 6f 6e 56 61 | .static.implicit.operator.JsonVa |
| 73a0 | 6c 75 65 28 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 4a 73 6f 6e 56 61 6c 75 65 | lue(Dictionary<string,.JsonValue |
| 73c0 | 3e 20 6f 62 6a 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | >.obj)..............{........... |
| 73e0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 75 65 0d 0a 20 20 20 | .......return.new.JsonValue..... |
| 7400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 7420 | 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 4f 62 6a 65 63 74 2c | ....type.=.JsonValueType.Object, |
| 7440 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 62 6a 65 63 74 56 61 6c 75 | ......................objectValu |
| 7460 | 65 20 3d 20 6f 62 6a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 20 | e.=.obj..................};..... |
| 7480 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 | .........}................public |
| 74a0 | 20 73 74 61 74 69 63 20 69 6d 70 6c 69 63 69 74 20 6f 70 65 72 61 74 6f 72 20 4a 73 6f 6e 56 61 | .static.implicit.operator.JsonVa |
| 74c0 | 6c 75 65 28 45 6e 75 6d 20 76 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | lue(Enum.val)..............{.... |
| 74e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 4a 73 6f 6e 56 61 6c | ..............return.new.JsonVal |
| 7500 | 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | ue..................{........... |
| 7520 | 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 20 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e | ...........type.=.JsonValueType. |
| 7540 | 41 6e 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 79 56 61 6c | Any,......................anyVal |
| 7560 | 75 65 20 3d 20 76 61 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 20 | ue.=.val..................};.... |
| 7580 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ..........}................publi |
| 75a0 | 63 20 62 6f 6f 6c 20 45 71 75 61 6c 73 28 4a 73 6f 6e 56 61 6c 75 65 20 6f 74 68 65 72 29 0d 0a | c.bool.Equals(JsonValue.other).. |
| 75c0 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f | ............{................../ |
| 75e0 | 2f 20 44 65 66 61 75 6c 74 20 63 6f 6d 70 61 72 69 73 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 | /.Default.comparisons........... |
| 7600 | 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 6f 74 68 65 72 2e 74 79 70 65 29 0d | ........if.(type.==.other.type). |
| 7620 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................{.............. |
| 7640 | 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 | ........switch.(type)........... |
| 7660 | 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...........{.................... |
| 7680 | 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 4e 6f 6e 65 3a 20 72 | ......case.JsonValueType.None:.r |
| 76a0 | 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eturn.true;..................... |
| 76c0 | 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 42 6f 6f 6c 3a 20 72 65 | .....case.JsonValueType.Bool:.re |
| 76e0 | 74 75 72 6e 20 62 6f 6f 6c 56 61 6c 75 65 20 3d 3d 20 6f 74 68 65 72 2e 62 6f 6f 6c 56 61 6c 75 | turn.boolValue.==.other.boolValu |
| 7700 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 | e;..........................case |
| 7720 | 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 67 65 72 3a 20 72 65 74 75 72 6e 20 69 | .JsonValueType.Integer:.return.i |
| 7740 | 6e 74 65 67 65 72 56 61 6c 75 65 20 3d 3d 20 6f 74 68 65 72 2e 69 6e 74 65 67 65 72 56 61 6c 75 | ntegerValue.==.other.integerValu |
| 7760 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 | e;..........................case |
| 7780 | 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 3a 20 72 65 74 75 72 6e 20 4e 75 6d 62 | .JsonValueType.Real:.return.Numb |
| 77a0 | 65 72 48 65 6c 70 65 72 73 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 72 65 61 6c 56 61 6c 75 | erHelpers.Approximately(realValu |
| 77c0 | 65 2c 20 6f 74 68 65 72 2e 72 65 61 6c 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | e,.other.realValue);............ |
| 77e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 | ..............case.JsonValueType |
| 7800 | 2e 53 74 72 69 6e 67 3a 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 3d 20 6f | .String:.return.stringValue.==.o |
| 7820 | 74 68 65 72 2e 73 74 72 69 6e 67 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ther.stringValue;............... |
| 7840 | 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 4f 62 | ...........case.JsonValueType.Ob |
| 7860 | 6a 65 63 74 3a 20 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 | ject:.throw.new.NotImplementedEx |
| 7880 | 63 65 70 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ception();...................... |
| 78a0 | 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 41 72 72 61 79 3a 20 74 68 | ....case.JsonValueType.Array:.th |
| 78c0 | 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 69 6f 6e 28 | row.new.NotImplementedException( |
| 78e0 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 | );..........................case |
| 7900 | 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 41 6e 79 3a 20 72 65 74 75 72 6e 20 61 6e 79 56 61 | .JsonValueType.Any:.return.anyVa |
| 7920 | 6c 75 65 2e 45 71 75 61 6c 73 28 6f 74 68 65 72 2e 61 6e 79 56 61 6c 75 65 29 3b 0d 0a 20 20 20 | lue.Equals(other.anyValue);..... |
| 7940 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................}.............. |
| 7960 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ........return.false;........... |
| 7980 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 | .......}....................//.a |
| 79a0 | 6e 79 56 61 6c 75 65 2d 62 61 73 65 64 20 63 6f 6d 70 61 72 69 73 6f 6e 73 2e 0d 0a 20 20 20 20 | nyValue-based.comparisons....... |
| 79c0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 6e 79 56 61 6c 75 65 20 21 3d 20 6e 75 6c 6c | ............if.(anyValue.!=.null |
| 79e0 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 71 | )......................return.Eq |
| 7a00 | 75 61 6c 73 28 61 6e 79 56 61 6c 75 65 2c 20 6f 74 68 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 | uals(anyValue,.other);.......... |
| 7a20 | 20 20 20 20 20 20 20 20 69 66 20 28 6f 74 68 65 72 2e 61 6e 79 56 61 6c 75 65 20 21 3d 20 6e 75 | ........if.(other.anyValue.!=.nu |
| 7a40 | 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | ll)......................return. |
| 7a60 | 45 71 75 61 6c 73 28 6f 74 68 65 72 2e 61 6e 79 56 61 6c 75 65 2c 20 74 68 69 73 29 3b 0d 0a 0d | Equals(other.anyValue,.this);... |
| 7a80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a | .................return.false;.. |
| 7aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 | ............}................pri |
| 7ac0 | 76 61 74 65 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 45 71 75 61 6c 73 28 6f 62 6a 65 63 74 20 6f | vate.static.bool.Equals(object.o |
| 7ae0 | 62 6a 2c 20 4a 73 6f 6e 56 61 6c 75 65 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | bj,.JsonValue.value)............ |
| 7b00 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 62 6a 20 3d 3d 20 | ..{..................if.(obj.==. |
| 7b20 | 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | null)......................retur |
| 7b40 | 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | n.false;....................if.( |
| 7b60 | 6f 62 6a 20 69 73 20 52 65 67 65 78 20 72 65 67 65 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | obj.is.Regex.regex)............. |
| 7b80 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 67 65 78 2e 49 73 4d 61 74 63 68 28 76 61 | .........return.regex.IsMatch(va |
| 7ba0 | 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | lue.ToString());................ |
| 7bc0 | 20 20 69 66 20 28 6f 62 6a 20 69 73 20 73 74 72 69 6e 67 20 73 74 72 29 0d 0a 20 20 20 20 20 20 | ..if.(obj.is.string.str)........ |
| 7be0 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 7c00 | 20 73 77 69 74 63 68 20 28 76 61 6c 75 65 2e 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | .switch.(value.type)............ |
| 7c20 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 7c40 | 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 3a 20 | .....case.JsonValueType.String:. |
| 7c60 | 72 65 74 75 72 6e 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 3d 20 73 74 72 3b | return.value.stringValue.==.str; |
| 7c80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a | ..........................case.J |
| 7ca0 | 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 67 65 72 3a 20 72 65 74 75 72 6e 20 6c 6f 6e | sonValueType.Integer:.return.lon |
| 7cc0 | 67 2e 54 72 79 50 61 72 73 65 28 73 74 72 2c 20 6f 75 74 20 76 61 72 20 73 69 29 20 26 26 20 73 | g.TryParse(str,.out.var.si).&&.s |
| 7ce0 | 69 20 3d 3d 20 76 61 6c 75 65 2e 69 6e 74 65 67 65 72 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 | i.==.value.integerValue;........ |
| 7d00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4a 73 6f 6e 56 61 6c 75 65 | ..................case.JsonValue |
| 7d20 | 54 79 70 65 2e 52 65 61 6c 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Type.Real:...................... |
| 7d40 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 64 6f 75 62 6c 65 2e 54 72 79 50 61 72 73 65 28 73 | ........return.double.TryParse(s |
| 7d60 | 74 72 2c 20 6f 75 74 20 76 61 72 20 73 66 29 20 26 26 20 4e 75 6d 62 65 72 48 65 6c 70 65 72 73 | tr,.out.var.sf).&&.NumberHelpers |
| 7d80 | 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 73 66 2c 20 76 61 6c 75 65 2e 72 65 61 6c 56 61 6c | .Approximately(sf,.value.realVal |
| 7da0 | 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 | ue);..........................ca |
| 7dc0 | 73 65 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 42 6f 6f 6c 3a 0d 0a 20 20 20 20 20 20 20 20 | se.JsonValueType.Bool:.......... |
| 7de0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e 62 6f | ....................if.(value.bo |
| 7e00 | 6f 6c 56 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | olValue)........................ |
| 7e20 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 20 3d 3d 20 22 54 72 75 65 22 20 7c | ..........return.str.==."True".| |
| 7e40 | 7c 20 73 74 72 20 3d 3d 20 22 74 72 75 65 22 20 7c 7c 20 73 74 72 20 3d 3d 20 22 31 22 3b 0d 0a | |.str.==."true".||.str.==."1";.. |
| 7e60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | ............................retu |
| 7e80 | 72 6e 20 73 74 72 20 3d 3d 20 22 46 61 6c 73 65 22 20 7c 7c 20 73 74 72 20 3d 3d 20 22 66 61 6c | rn.str.==."False".||.str.==."fal |
| 7ea0 | 73 65 22 20 7c 7c 20 73 74 72 20 3d 3d 20 22 30 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | se".||.str.==."0";.............. |
| 7ec0 | 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | ........}..................}.... |
| 7ee0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 62 6a 20 69 73 20 66 6c 6f 61 74 20 66 | ..............if.(obj.is.float.f |
| 7f00 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | )..................{............ |
| 7f20 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 6f 6e | ..........if.(value.type.==.Json |
| 7f40 | 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ValueType.Real)................. |
| 7f60 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4e 75 6d 62 65 72 48 65 6c 70 65 72 73 2e 41 70 | .........return.NumberHelpers.Ap |
| 7f80 | 70 72 6f 78 69 6d 61 74 65 6c 79 28 66 2c 20 76 61 6c 75 65 2e 72 65 61 6c 56 61 6c 75 65 29 3b | proximately(f,.value.realValue); |
| 7fa0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e | ......................if.(value. |
| 7fc0 | 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 29 0d 0a 20 | type.==.JsonValueType.String)... |
| 7fe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 6c | .......................return.fl |
| 8000 | 6f 61 74 2e 54 72 79 50 61 72 73 65 28 76 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 2c 20 6f | oat.TryParse(value.ToString(),.o |
| 8020 | 75 74 20 76 61 72 20 6f 74 68 65 72 46 29 20 26 26 20 4d 61 74 68 66 2e 41 70 70 72 6f 78 69 6d | ut.var.otherF).&&.Mathf.Approxim |
| 8040 | 61 74 65 6c 79 28 66 2c 20 6f 74 68 65 72 46 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ately(f,.otherF);............... |
| 8060 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 62 6a 20 69 73 | ...}..................if.(obj.is |
| 8080 | 20 64 6f 75 62 6c 65 20 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | .double.d)..................{... |
| 80a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e 74 79 70 | ...................if.(value.typ |
| 80c0 | 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 52 65 61 6c 29 0d 0a 20 20 20 20 20 20 | e.==.JsonValueType.Real)........ |
| 80e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4e 75 6d 62 65 72 48 | ..................return.NumberH |
| 8100 | 65 6c 70 65 72 73 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 64 2c 20 76 61 6c 75 65 2e 72 65 | elpers.Approximately(d,.value.re |
| 8120 | 61 6c 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | alValue);......................i |
| 8140 | 66 20 28 76 61 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 | f.(value.type.==.JsonValueType.S |
| 8160 | 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tring).......................... |
| 8180 | 72 65 74 75 72 6e 20 64 6f 75 62 6c 65 2e 54 72 79 50 61 72 73 65 28 76 61 6c 75 65 2e 54 6f 53 | return.double.TryParse(value.ToS |
| 81a0 | 74 72 69 6e 67 28 29 2c 20 6f 75 74 20 76 61 72 20 6f 74 68 65 72 44 29 20 26 26 0d 0a 20 20 20 | tring(),.out.var.otherD).&&..... |
| 81c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 75 6d 62 65 72 48 | .........................NumberH |
| 81e0 | 65 6c 70 65 72 73 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 64 2c 20 6f 74 68 65 72 44 29 3b | elpers.Approximately(d,.otherD); |
| 8200 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................}............. |
| 8220 | 20 20 20 20 20 69 66 20 28 6f 62 6a 20 69 73 20 69 6e 74 20 69 29 0d 0a 20 20 20 20 20 20 20 20 | .....if.(obj.is.int.i).......... |
| 8240 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | ........{......................i |
| 8260 | 66 20 28 76 61 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 | f.(value.type.==.JsonValueType.I |
| 8280 | 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nteger)......................... |
| 82a0 | 20 72 65 74 75 72 6e 20 69 20 3d 3d 20 76 61 6c 75 65 2e 69 6e 74 65 67 65 72 56 61 6c 75 65 3b | .return.i.==.value.integerValue; |
| 82c0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e | ......................if.(value. |
| 82e0 | 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 29 0d 0a 20 | type.==.JsonValueType.String)... |
| 8300 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 6e | .......................return.in |
| 8320 | 74 2e 54 72 79 50 61 72 73 65 28 76 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 2c 20 6f 75 74 | t.TryParse(value.ToString(),.out |
| 8340 | 20 76 61 72 20 6f 74 68 65 72 49 29 20 26 26 20 69 20 3d 3d 20 6f 74 68 65 72 49 3b 0d 0a 20 20 | .var.otherI).&&.i.==.otherI;.... |
| 8360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..............}................. |
| 8380 | 20 69 66 20 28 6f 62 6a 20 69 73 20 6c 6f 6e 67 20 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .if.(obj.is.long.l)............. |
| 83a0 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | .....{......................if.( |
| 83c0 | 76 61 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 | value.type.==.JsonValueType.Inte |
| 83e0 | 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | ger)..........................re |
| 8400 | 74 75 72 6e 20 6c 20 3d 3d 20 76 61 6c 75 65 2e 69 6e 74 65 67 65 72 56 61 6c 75 65 3b 0d 0a 20 | turn.l.==.value.integerValue;... |
| 8420 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e 74 79 70 | ...................if.(value.typ |
| 8440 | 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 | e.==.JsonValueType.String)...... |
| 8460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 6f 6e 67 2e | ....................return.long. |
| 8480 | 54 72 79 50 61 72 73 65 28 76 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 2c 20 6f 75 74 20 76 | TryParse(value.ToString(),.out.v |
| 84a0 | 61 72 20 6f 74 68 65 72 4c 29 20 26 26 20 6c 20 3d 3d 20 6f 74 68 65 72 4c 3b 0d 0a 20 20 20 20 | ar.otherL).&&.l.==.otherL;...... |
| 84c0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | ............}..................i |
| 84e0 | 66 20 28 6f 62 6a 20 69 73 20 62 6f 6f 6c 20 62 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | f.(obj.is.bool.b)............... |
| 8500 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 | ...{......................if.(va |
| 8520 | 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 42 6f 6f 6c 29 0d | lue.type.==.JsonValueType.Bool). |
| 8540 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | .........................return. |
| 8560 | 62 20 3d 3d 20 76 61 6c 75 65 2e 62 6f 6f 6c 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 | b.==.value.boolValue;........... |
| 8580 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 6f | ...........if.(value.type.==.Jso |
| 85a0 | 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | nValueType.String).............. |
| 85c0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ........{....................... |
| 85e0 | 20 20 20 69 66 20 28 62 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...if.(b)....................... |
| 8600 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 | .......return.value.stringValue. |
| 8620 | 3d 3d 20 22 74 72 75 65 22 20 7c 7c 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d | ==."true".||.value.stringValue.= |
| 8640 | 3d 20 22 54 72 75 65 22 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | =."True".||..................... |
| 8660 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d | .............value.stringValue.= |
| 8680 | 3d 20 22 31 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | =."1";.......................... |
| 86a0 | 72 65 74 75 72 6e 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 3d 20 22 66 61 6c | return.value.stringValue.==."fal |
| 86c0 | 73 65 22 20 7c 7c 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 3d 20 22 46 61 6c | se".||.value.stringValue.==."Fal |
| 86e0 | 73 65 22 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | se".||.......................... |
| 8700 | 20 20 20 20 76 61 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 3d 20 22 30 22 3b 0d 0a 20 | ....value.stringValue.==."0";... |
| 8720 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 | ...................}............ |
| 8740 | 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 | ......}..................//.NOTE |
| 8760 | 3a 20 54 68 65 20 65 6e 75 6d 2d 62 61 73 65 64 20 63 6f 6d 70 61 72 69 73 6f 6e 73 20 61 6c 6c | :.The.enum-based.comparisons.all |
| 8780 | 6f 63 61 74 65 20 62 6f 74 68 20 6f 6e 20 74 68 65 20 43 6f 6e 76 65 72 74 2e 54 6f 49 6e 74 36 | ocate.both.on.the.Convert.ToInt6 |
| 87a0 | 34 28 29 20 61 6e 64 20 45 6e 75 6d 2e 47 65 74 4e 61 6d 65 28 29 20 70 61 74 68 2e 20 49 27 76 | 4().and.Enum.GetName().path..I'v |
| 87c0 | 65 20 66 6f 75 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 | e.found..................//..... |
| 87e0 | 20 20 6e 6f 20 77 61 79 20 74 6f 20 64 6f 20 65 69 74 68 65 72 20 63 6f 6d 70 61 72 69 73 6f 6e | ..no.way.to.do.either.comparison |
| 8800 | 20 69 6e 20 61 20 77 61 79 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 63 61 74 65 | .in.a.way.that.does.not.allocate |
| 8820 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 62 6a 20 69 73 20 45 6e | ...................if.(obj.is.En |
| 8840 | 75 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | um)..................{.......... |
| 8860 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e 74 79 70 65 20 3d 3d 20 4a 73 | ............if.(value.type.==.Js |
| 8880 | 6f 6e 56 61 6c 75 65 54 79 70 65 2e 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | onValueType.Integer)............ |
| 88a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 43 6f 6e 76 65 72 74 2e 54 6f 49 | ..............return.Convert.ToI |
| 88c0 | 6e 74 36 34 28 6f 62 6a 29 20 3d 3d 20 76 61 6c 75 65 2e 69 6e 74 65 67 65 72 56 61 6c 75 65 3b | nt64(obj).==.value.integerValue; |
| 88e0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 2e | ......................if.(value. |
| 8900 | 74 79 70 65 20 3d 3d 20 4a 73 6f 6e 56 61 6c 75 65 54 79 70 65 2e 53 74 72 69 6e 67 29 0d 0a 20 | type.==.JsonValueType.String)... |
| 8920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 76 61 | .......................return.va |
| 8940 | 6c 75 65 2e 73 74 72 69 6e 67 56 61 6c 75 65 20 3d 3d 20 45 6e 75 6d 2e 47 65 74 4e 61 6d 65 28 | lue.stringValue.==.Enum.GetName( |
| 8960 | 6f 62 6a 2e 47 65 74 54 79 70 65 28 29 2c 20 6f 62 6a 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | obj.GetType(),.obj);............ |
| 8980 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | ......}....................retur |
| 89a0 | 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 | n.false;..............}......... |
| 89c0 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 62 6f 6f 6c 20 45 71 75 61 | .......public.override.bool.Equa |
| 89e0 | 6c 73 28 6f 62 6a 65 63 74 20 6f 62 6a 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 | ls(object.obj)..............{... |
| 8a00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6f 62 6a 20 69 73 20 4a 73 6f | ...............return.obj.is.Jso |
| 8a20 | 6e 56 61 6c 75 65 20 6f 74 68 65 72 20 26 26 20 45 71 75 61 6c 73 28 6f 74 68 65 72 29 3b 0d 0a | nValue.other.&&.Equals(other);.. |
| 8a40 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | ............}................pub |
| 8a60 | 6c 69 63 20 6f 76 65 72 72 69 64 65 20 69 6e 74 20 47 65 74 48 61 73 68 43 6f 64 65 28 29 0d 0a | lic.override.int.GetHashCode().. |
| 8a80 | 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 | ............{..................u |
| 8aa0 | 6e 63 68 65 63 6b 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | nchecked..................{..... |
| 8ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 61 73 68 43 6f 64 65 20 3d 20 | .................var.hashCode.=. |
| 8ae0 | 28 69 6e 74 29 74 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (int)type;...................... |
| 8b00 | 68 61 73 68 43 6f 64 65 20 3d 20 28 68 61 73 68 43 6f 64 65 20 2a 20 33 39 37 29 20 5e 20 62 6f | hashCode.=.(hashCode.*.397).^.bo |
| 8b20 | 6f 6c 56 61 6c 75 65 2e 47 65 74 48 61 73 68 43 6f 64 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 | olValue.GetHashCode();.......... |
| 8b40 | 20 20 20 20 20 20 20 20 20 20 20 20 68 61 73 68 43 6f 64 65 20 3d 20 28 68 61 73 68 43 6f 64 65 | ............hashCode.=.(hashCode |
| 8b60 | 20 2a 20 33 39 37 29 20 5e 20 72 65 61 6c 56 61 6c 75 65 2e 47 65 74 48 61 73 68 43 6f 64 65 28 | .*.397).^.realValue.GetHashCode( |
| 8b80 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 73 68 43 6f 64 65 | );......................hashCode |
| 8ba0 | 20 3d 20 28 68 61 73 68 43 6f 64 65 20 2a 20 33 39 37 29 20 5e 20 69 6e 74 65 67 65 72 56 61 6c | .=.(hashCode.*.397).^.integerVal |
| 8bc0 | 75 65 2e 47 65 74 48 61 73 68 43 6f 64 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ue.GetHashCode();............... |
| 8be0 | 20 20 20 20 20 20 20 68 61 73 68 43 6f 64 65 20 3d 20 28 68 61 73 68 43 6f 64 65 20 2a 20 33 39 | .......hashCode.=.(hashCode.*.39 |
| 8c00 | 37 29 20 5e 20 73 74 72 69 6e 67 56 61 6c 75 65 2e 47 65 74 48 61 73 68 43 6f 64 65 28 29 3b 0d | 7).^.stringValue.GetHashCode();. |
| 8c20 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 73 68 43 6f 64 65 20 3d 20 | .....................hashCode.=. |
| 8c40 | 28 68 61 73 68 43 6f 64 65 20 2a 20 33 39 37 29 20 5e 20 28 61 72 72 61 79 56 61 6c 75 65 20 21 | (hashCode.*.397).^.(arrayValue.! |
| 8c60 | 3d 20 6e 75 6c 6c 20 3f 20 61 72 72 61 79 56 61 6c 75 65 2e 47 65 74 48 61 73 68 43 6f 64 65 28 | =.null.?.arrayValue.GetHashCode( |
| 8c80 | 29 20 3a 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 73 | ).:.0);......................has |
| 8ca0 | 68 43 6f 64 65 20 3d 20 28 68 61 73 68 43 6f 64 65 20 2a 20 33 39 37 29 20 5e 20 28 6f 62 6a 65 | hCode.=.(hashCode.*.397).^.(obje |
| 8cc0 | 63 74 56 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 20 3f 20 6f 62 6a 65 63 74 56 61 6c 75 65 2e 47 65 | ctValue.!=.null.?.objectValue.Ge |
| 8ce0 | 74 48 61 73 68 43 6f 64 65 28 29 20 3a 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | tHashCode().:.0);............... |
| 8d00 | 20 20 20 20 20 20 20 68 61 73 68 43 6f 64 65 20 3d 20 28 68 61 73 68 43 6f 64 65 20 2a 20 33 39 | .......hashCode.=.(hashCode.*.39 |
| 8d20 | 37 29 20 5e 20 28 61 6e 79 56 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 20 3f 20 61 6e 79 56 61 6c 75 | 7).^.(anyValue.!=.null.?.anyValu |
| 8d40 | 65 2e 47 65 74 48 61 73 68 43 6f 64 65 28 29 20 3a 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | e.GetHashCode().:.0);........... |
| 8d60 | 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 68 61 73 68 43 6f 64 65 3b 0d 0a 20 20 20 | ...........return.hashCode;..... |
| 8d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d | .............}..............}... |
| 8da0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 | .............public.static.bool. |
| 8dc0 | 6f 70 65 72 61 74 6f 72 3d 3d 28 4a 73 6f 6e 56 61 6c 75 65 20 6c 65 66 74 2c 20 4a 73 6f 6e 56 | operator==(JsonValue.left,.JsonV |
| 8de0 | 61 6c 75 65 20 72 69 67 68 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | alue.right)..............{...... |
| 8e00 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6c 65 66 74 2e 45 71 75 61 6c 73 28 72 | ............return.left.Equals(r |
| 8e20 | 69 67 68 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | ight);..............}........... |
| 8e40 | 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 6f 70 65 72 61 74 6f 72 | .....public.static.bool.operator |
| 8e60 | 21 3d 28 4a 73 6f 6e 56 61 6c 75 65 20 6c 65 66 74 2c 20 4a 73 6f 6e 56 61 6c 75 65 20 72 69 67 | !=(JsonValue.left,.JsonValue.rig |
| 8e80 | 68 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ht)..............{.............. |
| 8ea0 | 20 20 20 20 72 65 74 75 72 6e 20 21 6c 65 66 74 2e 45 71 75 61 6c 73 28 72 69 67 68 74 29 3b 0d | ....return.!left.Equals(right);. |
| 8ec0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d | .............}..........}......} |
| 8ee0 | 0d 0a 7d 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 00 | ..}............................. |
| 8f00 | 4a 73 6f 6e 50 61 72 73 65 72 00 00 00 00 00 00 | JsonParser...... |