summaryrefslogtreecommitdiff
path: root/Library/Artifacts/40/40d5789e2067427be7bf508437f117e1
blob: cbe57d80fe41265c5802939b1676c8cdd73004a2 (plain)
ofshex dumpascii
0000 00 00 0f 81 00 00 5f 74 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ......_t............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 14 4f 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 .O..............................
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 0d 00 00 00 53 74 72 69 6e 67 48 65 6c 70 65 72 73 00 00 00 82 4e 00 00 ............StringHelpers....N..
10a0 75 73 69 6e 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 using.System;..using.System.Coll
10c0 65 63 74 69 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 52 ections.Generic;..using.System.R
10e0 75 6e 74 69 6d 65 2e 49 6e 74 65 72 6f 70 53 65 72 76 69 63 65 73 3b 0d 0a 75 73 69 6e 67 20 53 untime.InteropServices;..using.S
1100 79 73 74 65 6d 2e 54 65 78 74 3b 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e ystem.Text;....namespace.UnityEn
1120 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 0d 0a 7b 0d 0a 20 gine.InputSystem.Utilities..{...
1140 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 53 74 72 69 6e 67 48 ...internal.static.class.StringH
1160 65 6c 70 65 72 73 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d elpers......{..........///.<summ
1180 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 65 76 65 72 79 20 63 68 61 72 ary>..........///.For.every.char
11a0 61 63 74 65 72 20 69 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 73 74 72 22 2f 3e 20 acter.in.<paramref.name="str"/>.
11c0 74 68 61 74 20 69 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e that.is.contained.in.<paramref.n
11e0 61 6d 65 3d 22 63 68 61 72 73 22 2f 3e 2c 20 72 65 70 6c 61 63 65 20 69 74 0d 0a 20 20 20 20 20 ame="chars"/>,.replace.it.......
1200 20 20 20 2f 2f 2f 20 62 79 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 63 68 61 72 ...///.by.the.corresponding.char
1220 61 63 74 65 72 20 69 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 72 65 70 6c 61 63 65 acter.in.<paramref.name="replace
1240 6d 65 6e 74 73 22 2f 3e 20 70 72 65 63 65 64 65 64 20 62 79 20 61 20 62 61 63 6b 73 6c 61 73 68 ments"/>.preceded.by.a.backslash
1260 2e 0d 0a 20 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 ...........///.</summary>.......
1280 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 74 ...public.static.string.Escape(t
12a0 68 69 73 20 73 74 72 69 6e 67 20 73 74 72 2c 20 73 74 72 69 6e 67 20 63 68 61 72 73 20 3d 20 22 his.string.str,.string.chars.=."
12c0 5c 6e 5c 74 5c 72 5c 5c 5c 22 22 2c 20 73 74 72 69 6e 67 20 72 65 70 6c 61 63 65 6d 65 6e 74 73 \n\t\r\\\"",.string.replacements
12e0 20 3d 20 22 6e 74 72 5c 5c 5c 22 22 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .=."ntr\\\"")..........{........
1300 20 20 20 20 20 20 69 66 20 28 73 74 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 ......if.(str.==.null)..........
1320 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ........return.null;............
1340 20 20 20 20 2f 2f 20 53 63 61 6e 20 66 6f 72 20 63 68 61 72 61 63 74 65 72 73 20 74 68 61 74 20 ....//.Scan.for.characters.that.
1360 6e 65 65 64 20 65 73 63 61 70 69 6e 67 2e 20 49 66 20 74 68 65 72 65 27 73 20 6e 6f 6e 65 2c 20 need.escaping..If.there's.none,.
1380 6a 75 73 74 20 72 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 74 72 69 just.return..............//.stri
13a0 6e 67 20 61 73 20 69 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 61 73 43 68 ng.as.is...............var.hasCh
13c0 61 72 61 63 74 65 72 54 68 61 74 4e 65 65 64 73 45 73 63 61 70 69 6e 67 20 3d 20 66 61 6c 73 65 aracterThatNeedsEscaping.=.false
13e0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 20 69 ;..............foreach.(var.ch.i
1400 6e 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 20 20 20 20 20 n.str)..............{...........
1420 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 73 2e 43 6f 6e 74 61 69 6e 73 28 63 68 29 29 0d 0a .......if.(chars.Contains(ch))..
1440 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 20 ................{...............
1460 20 20 20 20 20 20 20 68 61 73 43 68 61 72 61 63 74 65 72 54 68 61 74 4e 65 65 64 73 45 73 63 61 .......hasCharacterThatNeedsEsca
1480 70 69 6e 67 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 ping.=.true;....................
14a0 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 7d 0d 0a 20 20 20 ..break;..................}.....
14c0 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 68 61 73 .........}..............if.(!has
14e0 43 68 61 72 61 63 74 65 72 54 68 61 74 4e 65 65 64 73 45 73 63 61 70 69 6e 67 29 0d 0a 20 20 20 CharacterThatNeedsEscaping).....
1500 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 3b 0d 0a 0d 0a 20 20 20 20 .............return.str;........
1520 20 20 20 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 ........var.builder.=.new.String
1540 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 Builder();..............foreach.
1560 28 76 61 72 20 63 68 20 69 6e 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a (var.ch.in.str)..............{..
1580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 63 68 61 72 ................var.index.=.char
15a0 73 2e 49 6e 64 65 78 4f 66 28 63 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.IndexOf(ch);..................
15c0 69 66 20 28 69 6e 64 65 78 20 3d 3d 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 if.(index.==.-1)................
15e0 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 62 75 69 6c 64 65 72 ..{......................builder
1600 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 0d .Append(ch);..................}.
1620 0a 20 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 .................else...........
1640 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 62 75 .......{......................bu
1660 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 27 5c 5c 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ilder.Append('\\');.............
1680 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 72 65 70 6c 61 63 65 6d .........builder.Append(replacem
16a0 65 6e 74 73 5b 69 6e 64 65 78 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ents[index]);..................}
16c0 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 72 65 74 ..............}..............ret
16e0 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 urn.builder.ToString();.........
1700 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 .}............public.static.stri
1720 6e 67 20 55 6e 65 73 63 61 70 65 28 74 68 69 73 20 73 74 72 69 6e 67 20 73 74 72 2c 20 73 74 72 ng.Unescape(this.string.str,.str
1740 69 6e 67 20 63 68 61 72 73 20 3d 20 22 6e 74 72 5c 5c 5c 22 22 2c 20 73 74 72 69 6e 67 20 72 65 ing.chars.=."ntr\\\"",.string.re
1760 70 6c 61 63 65 6d 65 6e 74 73 20 3d 20 22 5c 6e 5c 74 5c 72 5c 5c 5c 22 22 29 0d 0a 20 20 20 20 placements.=."\n\t\r\\\"")......
1780 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 20 3d 3d 20 6e 75 ....{..............if.(str.==.nu
17a0 6c 6c 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 73 74 72 3b ll)..................return.str;
17c0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 72 65 27 73 20 6e 6f ................//.If.there's.no
17e0 20 62 61 63 6b 73 6c 61 73 68 65 73 20 69 6e 20 74 68 65 20 73 74 72 69 6e 67 2c 20 74 68 65 72 .backslashes.in.the.string,.ther
1800 65 27 73 20 6e 6f 74 68 69 6e 67 20 74 6f 20 75 6e 65 73 63 61 70 65 2e 0d 0a 20 20 20 20 20 20 e's.nothing.to.unescape.........
1820 20 20 20 20 20 20 69 66 20 28 21 73 74 72 2e 43 6f 6e 74 61 69 6e 73 28 27 5c 5c 27 29 29 0d 0a ......if.(!str.Contains('\\'))..
1840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 3b 0d 0a 0d 0a 20 ................return.str;.....
1860 20 20 20 20 20 20 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 ...........var.builder.=.new.Str
1880 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 ingBuilder();..............for.(
18a0 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 74 72 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d var.i.=.0;.i.<.str.Length;.++i).
18c0 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 20 20 .............{..................
18e0 76 61 72 20 63 68 20 3d 20 73 74 72 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 var.ch.=.str[i];................
1900 20 20 69 66 20 28 63 68 20 3d 3d 20 27 5c 5c 27 20 26 26 20 69 20 3c 20 73 74 72 2e 4c 65 6e 67 ..if.(ch.==.'\\'.&&.i.<.str.Leng
1920 74 68 20 2d 20 32 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 th.-.2)..................{......
1940 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 20 20 20 20 ................++i;............
1960 20 20 20 20 20 20 20 20 20 20 63 68 20 3d 20 73 74 72 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 ..........ch.=.str[i];..........
1980 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 63 68 61 72 73 2e 49 6e ............var.index.=.chars.In
19a0 64 65 78 4f 66 28 63 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dexOf(ch);......................
19c0 69 66 20 28 69 6e 64 65 78 20 21 3d 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 if.(index.!=.-1)................
19e0 20 20 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 72 65 70 6c 61 63 65 ..........builder.Append(replace
1a00 6d 65 6e 74 73 5b 69 6e 64 65 78 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ments[index]);..................
1a20 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........................
1a40 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ..builder.Append(ch);...........
1a60 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 65 6c 73 65 0d 0a .......}..................else..
1a80 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 20 ................{...............
1aa0 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 63 68 29 3b 0d 0a 20 20 20 20 .......builder.Append(ch);......
1ac0 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 20 20 ............}..............}....
1ae0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 6e ..........return.builder.ToStrin
1b00 67 28 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 6c 69 g();..........}............publi
1b20 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 43 6f 6e 74 61 69 6e 73 28 74 68 69 73 20 73 74 72 69 c.static.bool.Contains(this.stri
1b40 6e 67 20 73 74 72 2c 20 63 68 61 72 20 63 68 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ng.str,.char.ch)..........{.....
1b60 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .........if.(str.==.null).......
1b80 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 20 ...........return.false;........
1ba0 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 2e 49 6e 64 65 78 4f 66 28 63 68 29 20 21 3d 20 ......return.str.IndexOf(ch).!=.
1bc0 2d 31 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 -1;..........}............public
1be0 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 43 6f 6e 74 61 69 6e 73 28 74 68 69 73 20 73 74 72 69 6e .static.bool.Contains(this.strin
1c00 67 20 73 74 72 2c 20 73 74 72 69 6e 67 20 74 65 78 74 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 g.str,.string.text,.StringCompar
1c20 69 73 6f 6e 20 63 6f 6d 70 61 72 69 73 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ison.comparison)..........{.....
1c40 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .........if.(str.==.null).......
1c60 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 20 ...........return.false;........
1c80 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 2e 49 6e 64 65 78 4f 66 28 74 65 78 74 2c 20 63 ......return.str.IndexOf(text,.c
1ca0 6f 6d 70 61 72 69 73 6f 6e 29 20 21 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a omparison).!=.-1;..........}....
1cc0 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 ........public.static.string.Get
1ce0 50 6c 75 72 61 6c 28 74 68 69 73 20 73 74 72 69 6e 67 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 Plural(this.string.str).........
1d00 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 20 3d 3d 20 6e 75 6c 6c 29 .{..............if.(str.==.null)
1d20 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 65 77 20 41 72 67 75 ..................throw.new.Argu
1d40 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 73 74 72 29 29 3b 0d mentNullException(nameof(str));.
1d60 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 73 74 72 29 0d 0a 20 20 20 ...............switch.(str).....
1d80 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 65 .........{..................case
1da0 20 22 4d 6f 75 73 65 22 3a 20 72 65 74 75 72 6e 20 22 4d 69 63 65 22 3b 0d 0a 20 20 20 20 20 20 ."Mouse":.return."Mice";........
1dc0 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 22 6d 6f 75 73 65 22 3a 20 72 65 74 75 72 6e 20 22 ..........case."mouse":.return."
1de0 6d 69 63 65 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 22 41 78 mice";..................case."Ax
1e00 69 73 22 3a 20 72 65 74 75 72 6e 20 22 41 78 65 73 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 is":.return."Axes";.............
1e20 20 20 20 20 20 63 61 73 65 20 22 61 78 69 73 22 3a 20 72 65 74 75 72 6e 20 22 61 78 65 73 22 3b .....case."axis":.return."axes";
1e40 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 72 ..............}................r
1e60 65 74 75 72 6e 20 73 74 72 20 2b 20 27 73 27 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 eturn.str.+.'s';..........}.....
1e80 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 4e 69 63 69 .......public.static.string.Nici
1ea0 66 79 4d 65 6d 6f 72 79 53 69 7a 65 28 6c 6f 6e 67 20 6e 75 6d 42 79 74 65 73 29 0d 0a 20 20 20 fyMemorySize(long.numBytes).....
1ec0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 69 67 61 62 79 74 65 73 .....{..............//.Gigabytes
1ee0 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 75 6d 42 79 74 65 73 20 3e 20 31 30 ...............if.(numBytes.>.10
1f00 32 34 20 2a 20 31 30 32 34 20 2a 20 31 30 32 34 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 24.*.1024.*.1024)..............{
1f20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 67 62 20 3d 20 6e 75 6d 42 79 ..................var.gb.=.numBy
1f40 74 65 73 20 2f 20 28 31 30 32 34 20 2a 20 31 30 32 34 20 2a 20 31 30 32 34 29 3b 0d 0a 20 20 20 tes./.(1024.*.1024.*.1024);.....
1f60 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 65 6d 61 69 6e 64 65 72 20 3d 20 28 6e 75 .............var.remainder.=.(nu
1f80 6d 42 79 74 65 73 20 25 20 28 31 30 32 34 20 2a 20 31 30 32 34 20 2a 20 31 30 32 34 29 29 20 2f mBytes.%.(1024.*.1024.*.1024))./
1fa0 20 31 2e 30 66 3b 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 .1.0f;....................return
1fc0 20 24 22 7b 67 62 20 2b 20 72 65 6d 61 69 6e 64 65 72 7d 20 47 42 22 3b 0d 0a 20 20 20 20 20 20 .$"{gb.+.remainder}.GB";........
1fe0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 65 67 61 62 79 ......}................//.Megaby
2000 74 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 75 6d 42 79 74 65 73 20 3e tes...............if.(numBytes.>
2020 20 31 30 32 34 20 2a 20 31 30 32 34 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 .1024.*.1024)..............{....
2040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 62 20 3d 20 6e 75 6d 42 79 74 65 73 20 ..............var.mb.=.numBytes.
2060 2f 20 28 31 30 32 34 20 2a 20 31 30 32 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 /.(1024.*.1024);................
2080 20 20 76 61 72 20 72 65 6d 61 69 6e 64 65 72 20 3d 20 28 6e 75 6d 42 79 74 65 73 20 25 20 28 31 ..var.remainder.=.(numBytes.%.(1
20a0 30 32 34 20 2a 20 31 30 32 34 29 29 20 2f 20 31 2e 30 66 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 024.*.1024))./.1.0f;............
20c0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 22 7b 6d 62 20 2b 20 72 65 6d 61 69 6e 64 65 72 ........return.$"{mb.+.remainder
20e0 7d 20 4d 42 22 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 }.MB";..............}...........
2100 20 20 20 20 20 2f 2f 20 4b 69 6c 6f 62 79 74 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .....//.Kilobytes...............
2120 69 66 20 28 6e 75 6d 42 79 74 65 73 20 3e 20 31 30 32 34 29 0d 0a 20 20 20 20 20 20 20 20 20 20 if.(numBytes.>.1024)............
2140 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 6b 62 20 3d 20 6e 75 ..{..................var.kb.=.nu
2160 6d 42 79 74 65 73 20 2f 20 31 30 32 34 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 mBytes./.1024;..................
2180 76 61 72 20 72 65 6d 61 69 6e 64 65 72 20 3d 20 28 6e 75 6d 42 79 74 65 73 20 25 20 31 30 32 34 var.remainder.=.(numBytes.%.1024
21a0 29 20 2f 20 31 2e 30 66 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 )./.1.0f;....................ret
21c0 75 72 6e 20 24 22 7b 6b 62 20 2b 20 72 65 6d 61 69 6e 64 65 72 7d 20 4b 42 22 3b 0d 0a 20 20 20 urn.$"{kb.+.remainder}.KB";.....
21e0 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 2f 2f 20 42 79 74 .........}................//.Byt
2200 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 22 7b 6e 75 6d 42 79 es...............return.$"{numBy
2220 74 65 73 7d 20 42 79 74 65 73 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 tes}.Bytes";..........}.........
2240 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 46 72 6f 6d 4e 69 63 69 66 69 ...public.static.bool.FromNicifi
2260 65 64 4d 65 6d 6f 72 79 53 69 7a 65 28 73 74 72 69 6e 67 20 74 65 78 74 2c 20 6f 75 74 20 6c 6f edMemorySize(string.text,.out.lo
2280 6e 67 20 72 65 73 75 6c 74 2c 20 6c 6f 6e 67 20 64 65 66 61 75 6c 74 4d 75 6c 74 69 70 6c 69 65 ng.result,.long.defaultMultiplie
22a0 72 20 3d 20 31 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 74 r.=.1)..........{..............t
22c0 65 78 74 20 3d 20 74 65 78 74 2e 54 72 69 6d 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ext.=.text.Trim();..............
22e0 20 20 76 61 72 20 6d 75 6c 74 69 70 6c 69 65 72 20 3d 20 64 65 66 61 75 6c 74 4d 75 6c 74 69 70 ..var.multiplier.=.defaultMultip
2300 6c 69 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 2e 45 6e 64 73 lier;..............if.(text.Ends
2320 57 69 74 68 28 22 4d 42 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 With("MB",.StringComparison.Inva
2340 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 riantCultureIgnoreCase))........
2360 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 6d 75 6c 74 69 70 6c ......{..................multipl
2380 69 65 72 20 3d 20 31 30 32 34 20 2a 20 31 30 32 34 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ier.=.1024.*.1024;..............
23a0 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 53 75 62 73 74 72 69 6e 67 28 30 2c 20 74 65 78 ....text.=.text.Substring(0,.tex
23c0 74 2e 4c 65 6e 67 74 68 20 2d 20 32 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 t.Length.-.2);..............}...
23e0 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 65 78 74 2e 45 6e 64 73 57 69 74 ...........else.if.(text.EndsWit
2400 68 28 22 47 42 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 h("GB",.StringComparison.Invaria
2420 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 ntCultureIgnoreCase))...........
2440 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 6c 74 69 70 6c 69 65 72 ...{..................multiplier
2460 20 3d 20 31 30 32 34 20 2a 20 31 30 32 34 20 2a 20 31 30 32 34 3b 0d 0a 20 20 20 20 20 20 20 20 .=.1024.*.1024.*.1024;..........
2480 20 20 20 20 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 53 75 62 73 74 72 69 6e 67 28 30 2c ........text.=.text.Substring(0,
24a0 20 74 65 78 74 2e 4c 65 6e 67 74 68 20 2d 20 32 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .text.Length.-.2);..............
24c0 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 65 78 74 2e 45 6e 64 }..............else.if.(text.End
24e0 73 57 69 74 68 28 22 4b 42 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 sWith("KB",.StringComparison.Inv
2500 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 ariantCultureIgnoreCase)).......
2520 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 6d 75 6c 74 69 70 .......{..................multip
2540 6c 69 65 72 20 3d 20 31 30 32 34 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 lier.=.1024;..................te
2560 78 74 20 3d 20 74 65 78 74 2e 53 75 62 73 74 72 69 6e 67 28 30 2c 20 74 65 78 74 2e 4c 65 6e 67 xt.=.text.Substring(0,.text.Leng
2580 74 68 20 2d 20 32 29 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 th.-.2);..............}.........
25a0 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 65 78 74 2e 45 6e 64 73 57 69 74 68 28 22 42 79 74 .....else.if.(text.EndsWith("Byt
25c0 65 73 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 es",.StringComparison.InvariantC
25e0 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ultureIgnoreCase))..............
2600 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 6c 74 69 70 6c 69 65 72 20 3d 20 {..................multiplier.=.
2620 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 1;..................text.=.text.
2640 53 75 62 73 74 72 69 6e 67 28 30 2c 20 74 65 78 74 2e 4c 65 6e 67 74 68 20 2d 20 22 42 79 74 65 Substring(0,.text.Length.-."Byte
2660 73 22 2e 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 s".Length);..............}......
2680 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6c 6f 6e 67 2e 54 72 79 50 61 72 73 65 28 74 65 78 ..........if.(!long.TryParse(tex
26a0 74 2c 20 6f 75 74 20 76 61 72 20 6e 75 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d t,.out.var.num))..............{.
26c0 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 64 65 66 61 75 6c .................result.=.defaul
26e0 74 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 t;..................return.false
2700 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 20 ;..............}................
2720 72 65 73 75 6c 74 20 3d 20 6e 75 6d 20 2a 20 6d 75 6c 74 69 70 6c 69 65 72 3b 0d 0a 20 20 20 20 result.=.num.*.multiplier;......
2740 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 7d 0d ........return.true;..........}.
2760 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 6e 74 20 43 6f 75 ...........public.static.int.Cou
2780 6e 74 4f 63 63 75 72 72 65 6e 63 65 73 28 74 68 69 73 20 73 74 72 69 6e 67 20 73 74 72 2c 20 63 ntOccurrences(this.string.str,.c
27a0 68 61 72 20 63 68 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 har.ch)..........{..............
27c0 69 66 20 28 73 74 72 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 if.(str.==.null)................
27e0 20 20 72 65 74 75 72 6e 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c ..return.0;................var.l
2800 65 6e 67 74 68 20 3d 20 73 74 72 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ength.=.str.Length;.............
2820 20 76 61 72 20 69 6e 64 65 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 .var.index.=.0;..............var
2840 20 63 6f 75 6e 74 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 .count.=.0;................while
2860 20 28 69 6e 64 65 78 20 3c 20 6c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b .(index.<.length)..............{
2880 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 78 74 49 6e 64 65 78 20 ..................var.nextIndex.
28a0 3d 20 73 74 72 2e 49 6e 64 65 78 4f 66 28 63 68 2c 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 =.str.IndexOf(ch,.index);.......
28c0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 78 74 49 6e 64 65 78 20 3d 3d 20 2d 31 29 0d ...........if.(nextIndex.==.-1).
28e0 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 0a 0d 0a 20 .....................break;.....
2900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 63 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 ...............++count;.........
2920 20 20 20 20 20 20 20 20 20 69 6e 64 65 78 20 3d 20 6e 65 78 74 49 6e 64 65 78 20 2b 20 31 3b 0d .........index.=.nextIndex.+.1;.
2940 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 72 65 .............}................re
2960 74 75 72 6e 20 63 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 turn.count;..........}..........
2980 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 53 75 62 73 ..public.static.IEnumerable<Subs
29a0 74 72 69 6e 67 3e 20 54 6f 6b 65 6e 69 7a 65 28 74 68 69 73 20 73 74 72 69 6e 67 20 73 74 72 29 tring>.Tokenize(this.string.str)
29c0 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 76 61 72 20 70 6f 73 ..........{..............var.pos
29e0 20 3d 20 30 3b 0d 0a 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 .=.0;..............var.length.=.
2a00 73 74 72 2e 4c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 str.Length;................while
2a20 20 28 70 6f 73 20 3c 20 6c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a .(pos.<.length)..............{..
2a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 70 6f 73 20 3c 20 6c 65 6e ................while.(pos.<.len
2a60 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 73 74 72 5b 70 6f 73 gth.&&.char.IsWhiteSpace(str[pos
2a80 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 3b 0d ]))......................++pos;.
2aa0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6f 73 20 3d 3d 20 6c 65 ...................if.(pos.==.le
2ac0 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 62 72 65 61 6b ngth)......................break
2ae0 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 73 74 72 5b 70 6f 73 ;....................if.(str[pos
2b00 5d 20 3d 3d 20 27 22 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ].==.'"')..................{....
2b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 3b 0d 0a 20 20 20 20 20 20 ..................++pos;........
2b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 64 50 6f 73 20 3d 20 70 6f 73 3b 0d ..............var.endPos.=.pos;.
2b60 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 65 20 28 65 6e 64 50 .....................while.(endP
2b80 6f 73 20 3c 20 6c 65 6e 67 74 68 20 26 26 20 73 74 72 5b 65 6e 64 50 6f 73 5d 20 21 3d 20 27 5c os.<.length.&&.str[endPos].!=.'\
2ba0 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 7b 0d 0a 20 20 20 20 "')......................{......
2bc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 6f 65 73 6e 27 74 20 72 ....................//.Doesn't.r
2be0 65 63 6f 67 6e 69 7a 65 20 63 6f 6e 74 72 6f 6c 20 73 65 71 75 65 6e 63 65 73 20 62 75 74 20 61 ecognize.control.sequences.but.a
2c00 6c 6c 6f 77 73 20 65 73 63 61 70 69 6e 67 20 64 6f 75 62 6c 65 20 71 75 6f 74 65 73 2e 0d 0a 20 llows.escaping.double.quotes....
2c20 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 73 74 72 5b 65 .......................if.(str[e
2c40 6e 64 50 6f 73 5d 20 3d 3d 20 27 5c 5c 27 20 26 26 20 65 6e 64 50 6f 73 20 3c 20 6c 65 6e 67 74 ndPos].==.'\\'.&&.endPos.<.lengt
2c60 68 20 2d 20 31 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 h.-.1)..........................
2c80 20 20 20 20 2b 2b 65 6e 64 50 6f 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....++endPos;...................
2ca0 20 20 20 20 20 20 20 2b 2b 65 6e 64 50 6f 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......++endPos;................
2cc0 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 20 20 20 20 79 69 65 ......}......................yie
2ce0 6c 64 20 72 65 74 75 72 6e 20 6e 65 77 20 53 75 62 73 74 72 69 6e 67 28 73 74 72 2c 20 70 6f 73 ld.return.new.Substring(str,.pos
2d00 2c 20 65 6e 64 50 6f 73 20 2d 20 70 6f 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ,.endPos.-.pos);................
2d20 20 20 20 20 20 20 70 6f 73 20 3d 20 65 6e 64 50 6f 73 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 ......pos.=.endPos.+.1;.........
2d40 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 65 6c 73 65 .........}..................else
2d60 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 ..................{.............
2d80 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 64 50 6f 73 20 3d 20 70 6f 73 3b 0d 0a 20 20 20 20 .........var.endPos.=.pos;......
2da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 65 6e 64 50 6f 73 20 3c 20 ................while.(endPos.<.
2dc0 6c 65 6e 67 74 68 20 26 26 20 21 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 73 74 72 length.&&.!char.IsWhiteSpace(str
2de0 5b 65 6e 64 50 6f 73 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 [endPos]))......................
2e00 20 20 20 20 2b 2b 65 6e 64 50 6f 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....++endPos;...................
2e20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 6e 65 77 20 53 75 62 73 74 72 69 6e 67 28 73 74 ...yield.return.new.Substring(st
2e40 72 2c 20 70 6f 73 2c 20 65 6e 64 50 6f 73 20 2d 20 70 6f 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 r,.pos,.endPos.-.pos);..........
2e60 20 20 20 20 20 20 20 20 20 20 20 20 70 6f 73 20 3d 20 65 6e 64 50 6f 73 3b 0d 0a 20 20 20 20 20 ............pos.=.endPos;.......
2e80 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 20 20 20 ...........}..............}.....
2ea0 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 73 74 61 74 69 63 20 .....}............public.static.
2ec0 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 53 70 6c 69 74 28 74 68 69 73 20 73 IEnumerable<string>.Split(this.s
2ee0 74 72 69 6e 67 20 73 74 72 2c 20 46 75 6e 63 3c 63 68 61 72 2c 20 62 6f 6f 6c 3e 20 70 72 65 64 tring.str,.Func<char,.bool>.pred
2f00 69 63 61 74 65 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 icate)..........{..............i
2f20 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 74 72 29 29 0d 0a 20 f.(string.IsNullOrEmpty(str))...
2f40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 ...............yield.break;.....
2f60 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 20 3d 20 73 74 72 2e 4c 65 6e 67 ...........var.length.=.str.Leng
2f80 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 6f 73 69 74 69 6f 6e 20 3d 20 th;..............var.position.=.
2fa0 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 70 6f 73 69 74 69 6f 0;................while.(positio
2fc0 6e 20 3c 20 6c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 n.<.length)..............{......
2fe0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6b 69 70 20 73 65 70 61 72 61 74 6f 72 2e 0d 0a ............//.Skip.separator...
3000 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 73 74 72 5b 70 6f 73 ................var.ch.=.str[pos
3020 69 74 69 6f 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 72 65 ition];..................if.(pre
3040 64 69 63 61 74 65 28 63 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a dicate(ch))..................{..
3060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 69 74 69 6f 6e 3b 0d ....................++position;.
3080 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a .....................continue;..
30a0 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 20 20 ................}...............
30c0 20 20 20 20 20 2f 2f 20 53 6b 69 70 20 74 6f 20 6e 65 78 74 20 73 65 70 61 72 61 74 6f 72 2e 0d .....//.Skip.to.next.separator..
30e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 72 74 50 6f 73 69 74 69 .................var.startPositi
3100 6f 6e 20 3d 20 70 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 on.=.position;..................
3120 2b 2b 70 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 77 68 69 ++position;..................whi
3140 6c 65 20 28 70 6f 73 69 74 69 6f 6e 20 3c 20 6c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 le.(position.<.length)..........
3160 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 63 ........{......................c
3180 68 20 3d 20 73 74 72 5b 70 6f 73 69 74 69 6f 6e 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 h.=.str[position];..............
31a0 20 20 20 20 20 20 20 20 69 66 20 28 70 72 65 64 69 63 61 74 65 28 63 68 29 29 0d 0a 20 20 20 20 ........if.(predicate(ch))......
31c0 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 0a 20 20 20 20 ....................break;......
31e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 70 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 ................++position;.....
3200 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 .............}..................
3220 76 61 72 20 65 6e 64 50 6f 73 69 74 69 6f 6e 20 3d 20 70 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 var.endPosition.=.position;.....
3240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 73 74 72 2e ...............yield.return.str.
3260 53 75 62 73 74 72 69 6e 67 28 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 2c 20 65 6e 64 50 6f 73 69 Substring(startPosition,.endPosi
3280 74 69 6f 6e 20 2d 20 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 tion.-.startPosition);..........
32a0 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 20 20 20 70 75 62 6c ....}..........}............publ
32c0 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 4a 6f 69 6e 3c 54 56 61 6c 75 65 3e 28 73 74 ic.static.string.Join<TValue>(st
32e0 72 69 6e 67 20 73 65 70 61 72 61 74 6f 72 2c 20 70 61 72 61 6d 73 20 54 56 61 6c 75 65 5b 5d 20 ring.separator,.params.TValue[].
3300 76 61 6c 75 65 73 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 values)..........{..............
3320 72 65 74 75 72 6e 20 4a 6f 69 6e 28 76 61 6c 75 65 73 2c 20 73 65 70 61 72 61 74 6f 72 29 3b 0d return.Join(values,.separator);.
3340 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 73 74 61 .........}............public.sta
3360 74 69 63 20 73 74 72 69 6e 67 20 4a 6f 69 6e 3c 54 56 61 6c 75 65 3e 28 49 45 6e 75 6d 65 72 61 tic.string.Join<TValue>(IEnumera
3380 62 6c 65 3c 54 56 61 6c 75 65 3e 20 76 61 6c 75 65 73 2c 20 73 74 72 69 6e 67 20 73 65 70 61 72 ble<TValue>.values,.string.separ
33a0 61 74 6f 72 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 2f 2f ator)..........{..............//
33c0 20 4f 70 74 69 6d 69 7a 65 20 66 6f 72 20 74 68 65 72 65 20 6e 6f 74 20 62 65 69 6e 67 20 61 6e .Optimize.for.there.not.being.an
33e0 79 20 76 61 6c 75 65 73 20 6f 72 20 6f 6e 6c 79 20 61 20 73 69 6e 67 6c 65 20 6f 6e 65 0d 0a 20 y.values.or.only.a.single.one...
3400 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 61 74 20 6e 65 65 64 73 20 6e 6f 20 63 6f 6e 63 ...........//.that.needs.no.conc
3420 61 74 65 6e 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 69 72 73 atenation...............var.firs
3440 74 56 61 6c 75 65 20 3d 20 64 65 66 61 75 6c 74 28 73 74 72 69 6e 67 29 3b 0d 0a 20 20 20 20 20 tValue.=.default(string);.......
3460 20 20 20 20 20 20 20 76 61 72 20 76 61 6c 75 65 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 .......var.valueCount.=.0;......
3480 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 72 65 73 75 6c 74 20 3d 20 6e ........StringBuilder.result.=.n
34a0 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 ull;................foreach.(var
34c0 20 76 61 6c 75 65 20 69 6e 20 76 61 6c 75 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b .value.in.values)..............{
34e0 0d 0a 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 20 3d 3d 20 6e ..................if.(value.==.n
3500 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 63 6f 6e 74 69 6e ull)......................contin
3520 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 72 20 3d 20 76 ue;..................var.str.=.v
3540 61 6c 75 65 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 20 20 alue.ToString();................
3560 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 28 73 74 72 29 29 ..if.(string.IsNullOrEmpty(str))
3580 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d ......................continue;.
35a0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 76 61 6c 75 65 43 6f 75 6e 74 3b ...................++valueCount;
35c0 0d 0a 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 43 6f 75 6e 74 ..................if.(valueCount
35e0 20 3d 3d 20 31 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 .==.1)..................{.......
3600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 69 72 73 74 56 61 6c 75 65 20 3d 20 73 74 72 3b ...............firstValue.=.str;
3620 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d ......................continue;.
3640 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 20 .................}..............
3660 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 43 6f 75 6e 74 20 3d 3d 20 32 29 0d 0a 20 20 20 20 ......if.(valueCount.==.2)......
3680 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 20 ............{...................
36a0 20 20 20 72 65 73 75 6c 74 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b ...result.=.new.StringBuilder();
36c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 2e 41 70 70 ......................result.App
36e0 65 6e 64 28 66 69 72 73 74 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 end(firstValue);................
3700 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 73 75 6c 74 2e 41 70 ..}....................result.Ap
3720 70 65 6e 64 28 73 65 70 61 72 61 74 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 pend(separator);................
3740 20 20 72 65 73 75 6c 74 2e 41 70 70 65 6e 64 28 73 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ..result.Append(str);...........
3760 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 43 6f 75 ...}................if.(valueCou
3780 6e 74 20 3d 3d 20 30 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 nt.==.0)..................return
37a0 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 43 6f 75 .null;..............if.(valueCou
37c0 6e 74 20 3d 3d 20 31 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 nt.==.1)..................return
37e0 20 66 69 72 73 74 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 .firstValue;................retu
3800 72 6e 20 72 65 73 75 6c 74 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d rn.result.ToString();..........}
3820 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 ............public.static.string
3840 20 4d 61 6b 65 55 6e 69 71 75 65 4e 61 6d 65 3c 54 45 78 69 73 74 69 6e 67 3e 28 73 74 72 69 6e .MakeUniqueName<TExisting>(strin
3860 67 20 62 61 73 65 4e 61 6d 65 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 45 78 69 73 74 69 6e g.baseName,.IEnumerable<TExistin
3880 67 3e 20 65 78 69 73 74 69 6e 67 53 65 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6e g>.existingSet,..............Fun
38a0 63 3c 54 45 78 69 73 74 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 67 65 74 4e 61 6d 65 46 75 6e 63 c<TExisting,.string>.getNameFunc
38c0 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 67 65 )..........{..............if.(ge
38e0 74 4e 61 6d 65 46 75 6e 63 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 tNameFunc.==.null)..............
3900 20 20 20 20 74 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 ....throw.new.ArgumentNullExcept
3920 69 6f 6e 28 6e 61 6d 65 6f 66 28 67 65 74 4e 61 6d 65 46 75 6e 63 29 29 3b 0d 0a 0d 0a 20 20 20 ion(nameof(getNameFunc));.......
3940 20 20 20 20 20 20 20 20 20 69 66 20 28 65 78 69 73 74 69 6e 67 53 65 74 20 3d 3d 20 6e 75 6c 6c .........if.(existingSet.==.null
3960 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 62 61 73 65 4e 61 )..................return.baseNa
3980 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 20 3d 20 62 61 me;................var.name.=.ba
39a0 73 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 4c 6f 77 seName;..............var.nameLow
39c0 65 72 43 61 73 65 20 3d 20 6e 61 6d 65 2e 54 6f 4c 6f 77 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 erCase.=.name.ToLower();........
39e0 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 49 73 55 6e 69 71 75 65 20 3d 20 66 61 6c 73 65 3b 0d ......var.nameIsUnique.=.false;.
3a00 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 61 6d 65 73 54 72 69 65 64 20 3d 20 31 3b .............var.namesTried.=.1;
3a20 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 6e 61 6d 65 20 65 ................//.If.the.name.e
3a40 6e 64 73 20 69 6e 20 64 69 67 69 74 73 2c 20 73 74 61 72 74 20 63 6f 75 6e 74 69 6e 67 20 66 72 nds.in.digits,.start.counting.fr
3a60 6f 6d 20 74 68 65 20 67 69 76 65 6e 20 6e 75 6d 62 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 om.the.given.number.............
3a80 20 20 69 66 20 28 62 61 73 65 4e 61 6d 65 2e 4c 65 6e 67 74 68 20 3e 20 30 29 0d 0a 20 20 20 20 ..if.(baseName.Length.>.0)......
3aa0 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 76 61 72 20 6c ........{..................var.l
3ac0 61 73 74 44 69 67 69 74 20 3d 20 62 61 73 65 4e 61 6d 65 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 astDigit.=.baseName.Length;.....
3ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 61 73 74 44 69 67 69 74 20 3e 20 .............while.(lastDigit.>.
3b00 30 20 26 26 20 63 68 61 72 2e 49 73 44 69 67 69 74 28 62 61 73 65 4e 61 6d 65 5b 6c 61 73 74 44 0.&&.char.IsDigit(baseName[lastD
3b20 69 67 69 74 20 2d 20 31 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 igit.-.1])).....................
3b40 20 2d 2d 6c 61 73 74 44 69 67 69 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 .--lastDigit;..................i
3b60 66 20 28 6c 61 73 74 44 69 67 69 74 20 21 3d 20 62 61 73 65 4e 61 6d 65 2e 4c 65 6e 67 74 68 29 f.(lastDigit.!=.baseName.Length)
3b80 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 ..................{.............
3ba0 20 20 20 20 20 20 20 20 20 6e 61 6d 65 73 54 72 69 65 64 20 3d 20 69 6e 74 2e 50 61 72 73 65 28 .........namesTried.=.int.Parse(
3bc0 62 61 73 65 4e 61 6d 65 2e 53 75 62 73 74 72 69 6e 67 28 6c 61 73 74 44 69 67 69 74 29 29 20 2b baseName.Substring(lastDigit)).+
3be0 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 4e 61 6d .1;......................baseNam
3c00 65 20 3d 20 62 61 73 65 4e 61 6d 65 2e 53 75 62 73 74 72 69 6e 67 28 30 2c 20 6c 61 73 74 44 69 e.=.baseName.Substring(0,.lastDi
3c20 67 69 74 29 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 git);..................}........
3c40 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 75 ......}................//.Find.u
3c60 6e 69 71 75 65 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 nique.name...............while.(
3c80 21 6e 61 6d 65 49 73 55 6e 69 71 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 !nameIsUnique)..............{...
3ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 49 73 55 6e 69 71 75 65 20 3d 20 74 72 ...............nameIsUnique.=.tr
3cc0 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 ue;..................foreach.(va
3ce0 72 20 65 78 69 73 74 69 6e 67 20 69 6e 20 65 78 69 73 74 69 6e 67 53 65 74 29 0d 0a 20 20 20 20 r.existing.in.existingSet)......
3d00 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 20 ............{...................
3d20 20 20 20 76 61 72 20 65 78 69 73 74 69 6e 67 4e 61 6d 65 20 3d 20 67 65 74 4e 61 6d 65 46 75 6e ...var.existingName.=.getNameFun
3d40 63 28 65 78 69 73 74 69 6e 67 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 c(existing);....................
3d60 20 20 69 66 20 28 65 78 69 73 74 69 6e 67 4e 61 6d 65 2e 54 6f 4c 6f 77 65 72 28 29 20 3d 3d 20 ..if.(existingName.ToLower().==.
3d80 6e 61 6d 65 4c 6f 77 65 72 43 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nameLowerCase)..................
3da0 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 6e ....{..........................n
3dc0 61 6d 65 20 3d 20 24 22 7b 62 61 73 65 4e 61 6d 65 7d 7b 6e 61 6d 65 73 54 72 69 65 64 7d 22 3b ame.=.$"{baseName}{namesTried}";
3de0 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 6e 61 6d 65 4c 6f ..........................nameLo
3e00 77 65 72 43 61 73 65 20 3d 20 6e 61 6d 65 2e 54 6f 4c 6f 77 65 72 28 29 3b 0d 0a 20 20 20 20 20 werCase.=.name.ToLower();.......
3e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 49 73 55 6e 69 71 75 65 20 ...................nameIsUnique.
3e40 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 20 20 20 20 20 20 =.false;........................
3e60 20 20 2b 2b 6e 61 6d 65 73 54 72 69 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..++namesTried;.................
3e80 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 20 20 20 .........break;.................
3ea0 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 20 20 20 .....}..................}.......
3ec0 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 6e .......}................return.n
3ee0 61 6d 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 2f 2f 2f 2f 52 ame;..........}............////R
3f00 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 77 65 20 61 6c 6c 6f 77 20 77 68 69 74 65 73 70 61 63 EVIEW:.should.we.allow.whitespac
3f20 65 20 61 6e 64 20 73 6b 69 70 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 3f 0d 0a 20 20 20 20 20 e.and.skip.automatically?.......
3f40 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 43 68 61 72 61 63 74 65 72 53 ...public.static.bool.CharacterS
3f60 65 70 61 72 61 74 65 64 4c 69 73 74 73 48 61 76 65 41 74 4c 65 61 73 74 4f 6e 65 43 6f 6d 6d 6f eparatedListsHaveAtLeastOneCommo
3f80 6e 45 6c 65 6d 65 6e 74 28 73 74 72 69 6e 67 20 66 69 72 73 74 4c 69 73 74 2c 20 73 74 72 69 6e nElement(string.firstList,.strin
3fa0 67 20 73 65 63 6f 6e 64 4c 69 73 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 20 g.secondList,..............char.
3fc0 73 65 70 61 72 61 74 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 separator)..........{...........
3fe0 20 20 20 69 66 20 28 66 69 72 73 74 4c 69 73 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 ...if.(firstList.==.null).......
4000 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 74 4e 75 6c ...........throw.new.ArgumentNul
4020 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 66 69 72 73 74 4c 69 73 74 29 29 3b 0d 0a lException(nameof(firstList));..
4040 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 63 6f 6e 64 4c 69 73 74 20 3d 3d 20 6e 75 ............if.(secondList.==.nu
4060 6c 6c 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 65 77 20 41 ll)..................throw.new.A
4080 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 73 65 63 6f rgumentNullException(nameof(seco
40a0 6e 64 4c 69 73 74 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 6f 20 65 ndList));................//.Go.e
40c0 6c 65 6d 65 6e 74 20 62 79 20 65 6c 65 6d 65 6e 74 20 74 68 72 6f 75 67 68 20 66 69 72 73 74 4c lement.by.element.through.firstL
40e0 69 73 74 20 61 6e 64 20 74 72 79 20 74 6f 20 66 69 6e 64 20 61 20 6d 61 74 63 68 69 6e 67 0d 0a ist.and.try.to.find.a.matching..
4100 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 65 6c 65 6d 65 6e 74 20 69 6e 20 73 65 63 6f 6e 64 ............//.element.in.second
4120 4c 69 73 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 49 6e 46 69 List...............var.indexInFi
4140 72 73 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 rst.=.0;..............var.length
4160 4f 66 46 69 72 73 74 20 3d 20 66 69 72 73 74 4c 69 73 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 OfFirst.=.firstList.Length;.....
4180 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 4f 66 53 65 63 6f 6e 64 20 3d 20 73 65 .........var.lengthOfSecond.=.se
41a0 63 6f 6e 64 4c 69 73 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 condList.Length;..............wh
41c0 69 6c 65 20 28 69 6e 64 65 78 49 6e 46 69 72 73 74 20 3c 20 6c 65 6e 67 74 68 4f 66 46 69 72 73 ile.(indexInFirst.<.lengthOfFirs
41e0 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 20 t)..............{...............
4200 20 20 20 2f 2f 20 53 6b 69 70 20 65 6d 70 74 79 20 65 6c 65 6d 65 6e 74 73 2e 0d 0a 20 20 20 20 ...//.Skip.empty.elements.......
4220 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 69 72 73 74 4c 69 73 74 5b 69 6e 64 65 78 49 ............if.(firstList[indexI
4240 6e 46 69 72 73 74 5d 20 3d 3d 20 73 65 70 61 72 61 74 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 20 nFirst].==.separator)...........
4260 20 20 20 20 20 20 20 20 20 20 20 2b 2b 69 6e 64 65 78 49 6e 46 69 72 73 74 3b 0d 0a 0d 0a 20 20 ...........++indexInFirst;......
4280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 65 6e 64 20 6f 66 20 63 75 72 ..............//.Find.end.of.cur
42a0 72 65 6e 74 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 rent.element...................v
42c0 61 72 20 65 6e 64 49 6e 64 65 78 49 6e 46 69 72 73 74 20 3d 20 69 6e 64 65 78 49 6e 46 69 72 73 ar.endIndexInFirst.=.indexInFirs
42e0 74 20 2b 20 31 3b 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 65 t.+.1;..................while.(e
4300 6e 64 49 6e 64 65 78 49 6e 46 69 72 73 74 20 3c 20 6c 65 6e 67 74 68 4f 66 46 69 72 73 74 20 26 ndIndexInFirst.<.lengthOfFirst.&
4320 26 20 66 69 72 73 74 4c 69 73 74 5b 65 6e 64 49 6e 64 65 78 49 6e 46 69 72 73 74 5d 20 21 3d 20 &.firstList[endIndexInFirst].!=.
4340 73 65 70 61 72 61 74 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 separator)......................
4360 2b 2b 65 6e 64 49 6e 64 65 78 49 6e 46 69 72 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ++endIndexInFirst;..............
4380 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 4f 66 43 75 72 72 65 6e 74 49 6e 46 69 72 73 74 20 3d ....var.lengthOfCurrentInFirst.=
43a0 20 65 6e 64 49 6e 64 65 78 49 6e 46 69 72 73 74 20 2d 20 69 6e 64 65 78 49 6e 46 69 72 73 74 3b .endIndexInFirst.-.indexInFirst;
43c0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 6f 20 74 68 72 6f 75 67 ....................//.Go.throug
43e0 68 20 65 6c 65 6d 65 6e 74 20 69 6e 20 73 65 63 6f 6e 64 4c 69 73 74 20 61 6e 64 20 6d 61 74 63 h.element.in.secondList.and.matc
4400 68 20 69 74 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 h.it.to.the.current.............
4420 20 20 20 20 20 2f 2f 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....//.element.................
4440 20 20 76 61 72 20 69 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 ..var.indexInSecond.=.0;........
4460 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 69 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 3c ..........while.(indexInSecond.<
4480 20 6c 65 6e 67 74 68 4f 66 53 65 63 6f 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .lengthOfSecond)................
44a0 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 2f 2f 20 53 6b 69 70 ..{......................//.Skip
44c0 20 65 6d 70 74 79 20 65 6c 65 6d 65 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .empty.elements.................
44e0 20 20 20 20 20 20 69 66 20 28 73 65 63 6f 6e 64 4c 69 73 74 5b 69 6e 64 65 78 49 6e 53 65 63 6f ......if.(secondList[indexInSeco
4500 6e 64 5d 20 3d 3d 20 73 65 70 61 72 61 74 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nd].==.separator)...............
4520 20 20 20 20 20 20 20 20 20 20 20 2b 2b 69 6e 64 65 78 49 6e 53 65 63 6f 6e 64 3b 0d 0a 0d 0a 20 ...........++indexInSecond;.....
4540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 65 6e 64 20 6f ...................//.Find.end.o
4560 66 20 63 75 72 72 65 6e 74 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 f.current.element...............
4580 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 64 49 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 3d 20 69 ........var.endIndexInSecond.=.i
45a0 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ndexInSecond.+.1;...............
45c0 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 65 6e 64 49 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 3c .......while.(endIndexInSecond.<
45e0 20 6c 65 6e 67 74 68 4f 66 53 65 63 6f 6e 64 20 26 26 20 73 65 63 6f 6e 64 4c 69 73 74 5b 65 6e .lengthOfSecond.&&.secondList[en
4600 64 49 6e 64 65 78 49 6e 53 65 63 6f 6e 64 5d 20 21 3d 20 73 65 70 61 72 61 74 6f 72 29 0d 0a 20 dIndexInSecond].!=.separator)...
4620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 65 6e 64 49 6e 64 65 .......................++endInde
4640 78 49 6e 53 65 63 6f 6e 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 xInSecond;......................
4660 76 61 72 20 6c 65 6e 67 74 68 4f 66 43 75 72 72 65 6e 74 49 6e 53 65 63 6f 6e 64 20 3d 20 65 6e var.lengthOfCurrentInSecond.=.en
4680 64 49 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 2d 20 69 6e 64 65 78 49 6e 53 65 63 6f 6e 64 3b 0d dIndexInSecond.-.indexInSecond;.
46a0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 6c 65 6e .......................//.If.len
46c0 67 74 68 20 6d 61 74 63 68 65 73 2c 20 64 6f 20 63 68 61 72 61 63 74 65 72 2d 62 79 2d 63 68 61 gth.matches,.do.character-by-cha
46e0 72 61 63 74 65 72 20 63 6f 6d 70 61 72 69 73 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 racter.comparison...............
4700 20 20 20 20 20 20 20 20 69 66 20 28 6c 65 6e 67 74 68 4f 66 43 75 72 72 65 6e 74 49 6e 46 69 72 ........if.(lengthOfCurrentInFir
4720 73 74 20 3d 3d 20 6c 65 6e 67 74 68 4f 66 43 75 72 72 65 6e 74 49 6e 53 65 63 6f 6e 64 29 0d 0a st.==.lengthOfCurrentInSecond)..
4740 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 ....................{...........
4760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 72 74 49 6e 64 65 78 49 6e 46 ...............var.startIndexInF
4780 69 72 73 74 20 3d 20 69 6e 64 65 78 49 6e 46 69 72 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 irst.=.indexInFirst;............
47a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 72 74 49 6e 64 65 78 49 6e 53 65 ..............var.startIndexInSe
47c0 63 6f 6e 64 20 3d 20 69 6e 64 65 78 49 6e 53 65 63 6f 6e 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 cond.=.indexInSecond;...........
47e0 20 20 20 20 20 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 74 .................var.isMatch.=.t
4800 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 20 20 20 20 66 6f rue;..........................fo
4820 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6c 65 6e 67 74 68 4f 66 43 75 72 72 65 6e r.(var.i.=.0;.i.<.lengthOfCurren
4840 74 49 6e 46 69 72 73 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tInFirst;.++i)..................
4860 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 ........{.......................
4880 20 20 20 20 20 20 20 76 61 72 20 66 69 72 73 74 20 3d 20 66 69 72 73 74 4c 69 73 74 5b 73 74 61 .......var.first.=.firstList[sta
48a0 72 74 49 6e 64 65 78 49 6e 46 69 72 73 74 20 2b 20 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 rtIndexInFirst.+.i];............
48c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 63 6f 6e 64 20 3d 20 73 ..................var.second.=.s
48e0 65 63 6f 6e 64 4c 69 73 74 5b 73 74 61 72 74 49 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 2b 20 69 econdList[startIndexInSecond.+.i
4900 5d 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 20 20 20 20 20 20 ];..............................
4920 20 20 69 66 20 28 63 68 61 72 2e 54 6f 4c 6f 77 65 72 28 66 69 72 73 74 29 20 21 3d 20 63 68 61 ..if.(char.ToLower(first).!=.cha
4940 72 2e 54 6f 4c 6f 77 65 72 28 73 65 63 6f 6e 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 r.ToLower(second))..............
4960 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 20 ................{...............
4980 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 20 66 61 6c ...................isMatch.=.fal
49a0 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 20 20 20 20 20 20 20 se;.............................
49c0 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 20 20 20 .....break;.....................
49e0 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 20 20 20 20 .........}......................
4a00 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 20 20 20 ....}...........................
4a20 20 69 66 20 28 69 73 4d 61 74 63 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .if.(isMatch)...................
4a40 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;.........
4a60 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 20 20 20 20 20 .............}..................
4a80 20 20 20 20 20 20 2f 2f 20 4e 6f 74 20 61 20 6d 61 74 63 68 20 73 6f 20 67 6f 20 74 6f 20 6e 65 ......//.Not.a.match.so.go.to.ne
4aa0 78 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 64 65 78 49 6e xt.......................indexIn
4ac0 53 65 63 6f 6e 64 20 3d 20 65 6e 64 49 6e 64 65 78 49 6e 53 65 63 6f 6e 64 20 2b 20 31 3b 0d 0a Second.=.endIndexInSecond.+.1;..
4ae0 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 20 20 ................}...............
4b00 20 20 20 20 20 2f 2f 20 47 6f 20 74 6f 20 6e 65 78 74 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 .....//.Go.to.next.element......
4b20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 64 65 78 49 6e 46 69 72 73 74 20 3d 20 65 6e 64 49 .............indexInFirst.=.endI
4b40 6e 64 65 78 49 6e 46 69 72 73 74 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ndexInFirst.+.1;..............}.
4b60 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;....
4b80 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 50 61 72 73 65 20 61 6e 20 69 ......}............//.Parse.an.i
4ba0 6e 74 20 61 74 20 74 68 65 20 67 69 76 65 6e 20 70 6f 73 69 74 69 6f 6e 20 69 6e 20 74 68 65 20 nt.at.the.given.position.in.the.
4bc0 73 74 72 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 55 6e 6c 69 6b 65 20 69 6e 74 2e 50 string...........//.Unlike.int.P
4be0 61 72 73 65 28 29 2c 20 64 6f 65 73 20 6e 6f 74 20 72 65 71 75 69 72 65 20 61 6c 6c 6f 63 61 74 arse(),.does.not.require.allocat
4c00 69 6e 67 20 61 20 6e 65 77 20 73 74 72 69 6e 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 6f 6e 6c 79 ing.a.new.string.containing.only
4c20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 73 75 62 73 74 72 69 6e 67 20 77 69 74 68 20 ..........//.the.substring.with.
4c40 74 68 65 20 6e 75 6d 62 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 the.number...........public.stat
4c60 69 63 20 69 6e 74 20 50 61 72 73 65 49 6e 74 28 73 74 72 69 6e 67 20 73 74 72 2c 20 69 6e 74 20 ic.int.ParseInt(string.str,.int.
4c80 70 6f 73 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 76 61 72 pos)..........{..............var
4ca0 20 6d 75 6c 74 69 70 6c 79 20 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 .multiply.=.1;..............var.
4cc0 72 65 73 75 6c 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e result.=.0;..............var.len
4ce0 67 74 68 20 3d 20 73 74 72 2e 4c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 gth.=.str.Length;...............
4d00 20 77 68 69 6c 65 20 28 70 6f 73 20 3c 20 6c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 .while.(pos.<.length)...........
4d20 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 73 ...{..................var.ch.=.s
4d40 74 72 5b 70 6f 73 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 69 tr[pos];..................var.di
4d60 67 69 74 20 3d 20 63 68 20 2d 20 27 30 27 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 git.=.ch.-.'0';.................
4d80 20 69 66 20 28 64 69 67 69 74 20 3c 20 30 20 7c 7c 20 64 69 67 69 74 20 3e 20 39 29 0d 0a 20 20 .if.(digit.<.0.||.digit.>.9)....
4da0 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 0d 0a 20 20 20 20 ..................break;........
4dc0 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 72 65 73 75 6c 74 20 2a 20 6d 75 ............result.=.result.*.mu
4de0 6c 74 69 70 6c 79 20 2b 20 64 69 67 69 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ltiply.+.digit;.................
4e00 20 20 20 6d 75 6c 74 69 70 6c 79 20 2a 3d 20 31 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...multiply.*=.10;..............
4e20 20 20 20 20 2b 2b 70 6f 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 ....++pos;..............}.......
4e40 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 .........return.result;.........
4e60 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 74 68 69 73 20 73 68 6f .}............////TODO:.this.sho
4e80 75 6c 64 20 75 73 65 20 55 54 46 2d 38 20 61 6e 64 20 6e 6f 74 20 55 54 46 2d 31 36 0d 0a 0d 0a uld.use.UTF-8.and.not.UTF-16....
4ea0 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 57 72 69 74 65 ........public.static.bool.Write
4ec0 53 74 72 69 6e 67 54 6f 42 75 66 66 65 72 28 73 74 72 69 6e 67 20 74 65 78 74 2c 20 49 6e 74 50 StringToBuffer(string.text,.IntP
4ee0 74 72 20 62 75 66 66 65 72 2c 20 69 6e 74 20 62 75 66 66 65 72 53 69 7a 65 49 6e 43 68 61 72 61 tr.buffer,.int.bufferSizeInChara
4f00 63 74 65 72 73 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 75 cters)..........{..............u
4f20 69 6e 74 20 6f 66 66 73 65 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 int.offset.=.0;..............ret
4f40 75 72 6e 20 57 72 69 74 65 53 74 72 69 6e 67 54 6f 42 75 66 66 65 72 28 74 65 78 74 2c 20 62 75 urn.WriteStringToBuffer(text,.bu
4f60 66 66 65 72 2c 20 62 75 66 66 65 72 53 69 7a 65 49 6e 43 68 61 72 61 63 74 65 72 73 2c 20 72 65 ffer,.bufferSizeInCharacters,.re
4f80 66 20 6f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 f.offset);..........}...........
4fa0 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 75 6e 73 61 66 65 20 62 6f 6f 6c 20 57 72 69 74 65 .public.static.unsafe.bool.Write
4fc0 53 74 72 69 6e 67 54 6f 42 75 66 66 65 72 28 73 74 72 69 6e 67 20 74 65 78 74 2c 20 49 6e 74 50 StringToBuffer(string.text,.IntP
4fe0 74 72 20 62 75 66 66 65 72 2c 20 69 6e 74 20 62 75 66 66 65 72 53 69 7a 65 49 6e 43 68 61 72 61 tr.buffer,.int.bufferSizeInChara
5000 63 74 65 72 73 2c 20 72 65 66 20 75 69 6e 74 20 6f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 cters,.ref.uint.offset).........
5020 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 75 66 66 65 72 20 3d 3d 20 49 6e .{..............if.(buffer.==.In
5040 74 50 74 72 2e 5a 65 72 6f 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f tPtr.Zero)..................thro
5060 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 22 62 75 66 w.new.ArgumentNullException("buf
5080 66 65 72 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 fer");................var.length
50a0 20 3d 20 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 65 78 74 29 20 3f 20 .=.string.IsNullOrEmpty(text).?.
50c0 30 20 3a 20 74 65 78 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 0.:.text.Length;..............if
50e0 20 28 6c 65 6e 67 74 68 20 3e 20 75 73 68 6f 72 74 2e 4d 61 78 56 61 6c 75 65 29 0d 0a 20 20 20 .(length.>.ushort.MaxValue).....
5100 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 74 45 .............throw.new.ArgumentE
5120 78 63 65 70 74 69 6f 6e 28 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 22 53 74 72 69 6e 67 20 65 xception(string.Format("String.e
5140 78 63 65 65 64 73 20 6d 61 78 20 73 69 7a 65 20 6f 66 20 7b 30 7d 20 63 68 61 72 61 63 74 65 72 xceeds.max.size.of.{0}.character
5160 73 22 2c 20 75 73 68 6f 72 74 2e 4d 61 78 56 61 6c 75 65 29 2c 20 22 74 65 78 74 22 29 3b 0d 0a s",.ushort.MaxValue),."text");..
5180 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 64 4f 66 66 73 65 74 20 3d 20 6f 66 ..............var.endOffset.=.of
51a0 66 73 65 74 20 2b 20 73 69 7a 65 6f 66 28 63 68 61 72 29 20 2a 20 6c 65 6e 67 74 68 20 2b 20 73 fset.+.sizeof(char).*.length.+.s
51c0 69 7a 65 6f 66 28 69 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 6e 64 izeof(int);..............if.(end
51e0 4f 66 66 73 65 74 20 3e 20 62 75 66 66 65 72 53 69 7a 65 49 6e 43 68 61 72 61 63 74 65 72 73 29 Offset.>.bufferSizeInCharacters)
5200 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;.
5220 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 74 72 20 3d 20 28 28 62 79 74 65 2a ...............var.ptr.=.((byte*
5240 29 62 75 66 66 65 72 29 20 2b 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 )buffer).+.offset;..............
5260 2a 28 28 75 73 68 6f 72 74 2a 29 70 74 72 29 20 3d 20 28 75 73 68 6f 72 74 29 6c 65 6e 67 74 68 *((ushort*)ptr).=.(ushort)length
5280 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 74 72 20 2b 3d 20 73 69 7a 65 6f 66 28 75 73 68 ;..............ptr.+=.sizeof(ush
52a0 6f 72 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 ort);................for.(var.i.
52c0 3d 20 30 3b 20 69 20 3c 20 6c 65 6e 67 74 68 3b 20 2b 2b 69 2c 20 70 74 72 20 2b 3d 20 73 69 7a =.0;.i.<.length;.++i,.ptr.+=.siz
52e0 65 6f 66 28 63 68 61 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 28 28 63 eof(char))..................*((c
5300 68 61 72 2a 29 70 74 72 29 20 3d 20 74 65 78 74 5b 69 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 har*)ptr).=.text[i];............
5320 20 20 20 20 6f 66 66 73 65 74 20 3d 20 28 75 69 6e 74 29 65 6e 64 4f 66 66 73 65 74 3b 0d 0a 20 ....offset.=.(uint)endOffset;...
5340 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;.........
5360 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 .}............public.static.stri
5380 6e 67 20 52 65 61 64 53 74 72 69 6e 67 46 72 6f 6d 42 75 66 66 65 72 28 49 6e 74 50 74 72 20 62 ng.ReadStringFromBuffer(IntPtr.b
53a0 75 66 66 65 72 2c 20 69 6e 74 20 62 75 66 66 65 72 53 69 7a 65 29 0d 0a 20 20 20 20 20 20 20 20 uffer,.int.bufferSize)..........
53c0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 6f 66 66 73 65 74 20 3d 20 30 3b 0d {..............uint.offset.=.0;.
53e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 52 65 61 64 53 74 72 69 6e 67 46 72 .............return.ReadStringFr
5400 6f 6d 42 75 66 66 65 72 28 62 75 66 66 65 72 2c 20 62 75 66 66 65 72 53 69 7a 65 2c 20 72 65 66 omBuffer(buffer,.bufferSize,.ref
5420 20 6f 66 66 73 65 74 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 .offset);..........}............
5440 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 75 6e 73 61 66 65 20 73 74 72 69 6e 67 20 52 65 61 64 public.static.unsafe.string.Read
5460 53 74 72 69 6e 67 46 72 6f 6d 42 75 66 66 65 72 28 49 6e 74 50 74 72 20 62 75 66 66 65 72 2c 20 StringFromBuffer(IntPtr.buffer,.
5480 69 6e 74 20 62 75 66 66 65 72 53 69 7a 65 2c 20 72 65 66 20 75 69 6e 74 20 6f 66 66 73 65 74 29 int.bufferSize,.ref.uint.offset)
54a0 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 62 75 66 ..........{..............if.(buf
54c0 66 65 72 20 3d 3d 20 49 6e 74 50 74 72 2e 5a 65 72 6f 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 fer.==.IntPtr.Zero).............
54e0 20 20 20 20 20 74 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 .....throw.new.ArgumentNullExcep
5500 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 62 75 66 66 65 72 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 tion(nameof(buffer));...........
5520 20 20 20 20 20 69 66 20 28 6f 66 66 73 65 74 20 2b 20 73 69 7a 65 6f 66 28 69 6e 74 29 20 3e 20 .....if.(offset.+.sizeof(int).>.
5540 62 75 66 66 65 72 53 69 7a 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 bufferSize)..................ret
5560 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 74 72 urn.null;................var.ptr
5580 20 3d 20 28 28 62 79 74 65 2a 29 62 75 66 66 65 72 29 20 2b 20 6f 66 66 73 65 74 3b 0d 0a 20 20 .=.((byte*)buffer).+.offset;....
55a0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 65 6e 67 74 68 20 3d 20 2a 28 28 75 73 68 6f 72 74 ..........var.length.=.*((ushort
55c0 2a 29 70 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 74 72 20 2b 3d 20 73 69 7a 65 *)ptr);..............ptr.+=.size
55e0 6f 66 28 75 73 68 6f 72 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c of(ushort);................if.(l
5600 65 6e 67 74 68 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 ength.==.0)..................ret
5620 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 64 urn.null;................var.end
5640 4f 66 66 73 65 74 20 3d 20 6f 66 66 73 65 74 20 2b 20 73 69 7a 65 6f 66 28 63 68 61 72 29 20 2a Offset.=.offset.+.sizeof(char).*
5660 20 6c 65 6e 67 74 68 20 2b 20 73 69 7a 65 6f 66 28 69 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 .length.+.sizeof(int);..........
5680 20 20 20 20 69 66 20 28 65 6e 64 4f 66 66 73 65 74 20 3e 20 62 75 66 66 65 72 53 69 7a 65 29 0d ....if.(endOffset.>.bufferSize).
56a0 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 75 6c 6c 3b 0d 0a 0d .................return.null;...
56c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 65 78 74 20 3d 20 4d 61 72 73 68 61 6c 2e .............var.text.=.Marshal.
56e0 50 74 72 54 6f 53 74 72 69 6e 67 55 6e 69 28 6e 65 77 20 49 6e 74 50 74 72 28 70 74 72 29 2c 20 PtrToStringUni(new.IntPtr(ptr),.
5700 6c 65 6e 67 74 68 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d length);................offset.=
5720 20 28 75 69 6e 74 29 65 6e 64 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 .(uint)endOffset;..............r
5740 65 74 75 72 6e 20 74 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 eturn.text;..........}..........
5760 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 73 50 72 69 6e 74 61 62 6c 65 ..public.static.bool.IsPrintable
5780 28 74 68 69 73 20 63 68 61 72 20 63 68 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 (this.char.ch)..........{.......
57a0 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 69 73 20 63 72 75 64 65 20 61 6e 64 20 66 61 72 20 .......//.This.is.crude.and.far.
57c0 66 72 6f 6d 20 68 6f 77 20 55 6e 69 63 6f 64 65 20 64 65 66 69 6e 65 73 20 70 72 69 6e 74 61 62 from.how.Unicode.defines.printab
57e0 6c 65 20 62 75 74 20 69 74 20 73 68 6f 75 6c 64 20 73 65 72 76 65 20 61 73 20 61 20 67 6f 6f 64 le.but.it.should.serve.as.a.good
5800 20 65 6e 6f 75 67 68 20 61 70 70 72 6f 78 69 6d 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 .enough.approximation...........
5820 20 20 20 20 72 65 74 75 72 6e 20 21 63 68 61 72 2e 49 73 43 6f 6e 74 72 6f 6c 28 63 68 29 20 26 ....return.!char.IsControl(ch).&
5840 26 20 21 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 63 68 29 3b 0d 0a 20 20 20 20 20 &.!char.IsWhiteSpace(ch);.......
5860 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 ...}............public.static.st
5880 72 69 6e 67 20 57 69 74 68 41 6c 6c 57 68 69 74 65 73 70 61 63 65 53 74 72 69 70 70 65 64 28 74 ring.WithAllWhitespaceStripped(t
58a0 68 69 73 20 73 74 72 69 6e 67 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 his.string.str)..........{......
58c0 20 20 20 20 20 20 20 20 76 61 72 20 62 75 66 66 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 ........var.buffer.=.new.StringB
58e0 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 uilder();..............foreach.(
5900 76 61 72 20 63 68 20 69 6e 20 73 74 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 var.ch.in.str)..................
5920 69 66 20 28 21 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 63 68 29 29 0d 0a 20 20 20 if.(!char.IsWhiteSpace(ch)).....
5940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 2e 41 70 70 65 6e 64 28 63 .................buffer.Append(c
5960 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 75 66 66 65 72 2e 54 h);..............return.buffer.T
5980 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 oString();..........}...........
59a0 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 6e 76 61 72 69 61 6e 74 45 71 75 .public.static.bool.InvariantEqu
59c0 61 6c 73 49 67 6e 6f 72 65 43 61 73 65 28 74 68 69 73 20 73 74 72 69 6e 67 20 6c 65 66 74 2c 20 alsIgnoreCase(this.string.left,.
59e0 73 74 72 69 6e 67 20 72 69 67 68 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 string.right)..........{........
5a00 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 28 6c ......if.(string.IsNullOrEmpty(l
5a20 65 66 74 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 73 74 eft))..................return.st
5a40 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 72 69 67 68 74 29 3b 0d 0a 20 20 20 20 ring.IsNullOrEmpty(right);......
5a60 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 71 75 61 6c 73 28 6c 65 66 ........return.string.Equals(lef
5a80 74 2c 20 72 69 67 68 74 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 t,.right,.StringComparison.Invar
5aa0 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 iantCultureIgnoreCase);.........
5ac0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 .}............public.static.stri
5ae0 6e 67 20 45 78 70 61 6e 64 54 65 6d 70 6c 61 74 65 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 74 ng.ExpandTemplateString(string.t
5b00 65 6d 70 6c 61 74 65 2c 20 46 75 6e 63 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 6d 61 emplate,.Func<string,.string>.ma
5b20 70 46 75 6e 63 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 pFunc)..........{..............i
5b40 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 65 6d 70 6c 61 74 65 f.(string.IsNullOrEmpty(template
5b60 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 65 77 20 41 72 ))..................throw.new.Ar
5b80 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 74 65 6d 70 6c gumentNullException(nameof(templ
5ba0 61 74 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 70 46 75 6e 63 20 ate));..............if.(mapFunc.
5bc0 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 68 72 6f 77 20 ==.null)..................throw.
5be0 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 61 6d 65 6f 66 new.ArgumentNullException(nameof
5c00 28 6d 61 70 46 75 6e 63 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 (mapFunc));................var.b
5c20 75 66 66 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 0d 0a uffer.=.new.StringBuilder();....
5c40 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 6d 70 6c 61 74 ............var.length.=.templat
5c60 65 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 e.Length;..............for.(var.
5c80 69 20 3d 20 30 3b 20 69 20 3c 20 6c 65 6e 67 74 68 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 i.=.0;.i.<.length;.++i).........
5ca0 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 63 68 20 3d .....{..................var.ch.=
5cc0 20 74 65 6d 70 6c 61 74 65 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 .template[i];..................i
5ce0 66 20 28 63 68 20 21 3d 20 27 7b 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b f.(ch.!=.'{')..................{
5d00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 66 65 72 2e 41 70 70 ......................buffer.App
5d20 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 20 20 20 20 63 6f end(ch);......................co
5d40 6e 74 69 6e 75 65 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 ntinue;..................}......
5d60 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 20 20 20 20 20 20 ..............++i;..............
5d80 20 20 20 20 76 61 72 20 74 6f 6b 65 6e 53 74 61 72 74 50 6f 73 20 3d 20 69 3b 0d 0a 20 20 20 20 ....var.tokenStartPos.=.i;......
5da0 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 69 20 3c 20 6c 65 6e 67 74 68 20 26 26 ............while.(i.<.length.&&
5dc0 20 74 65 6d 70 6c 61 74 65 5b 69 5d 20 21 3d 20 27 7d 27 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .template[i].!=.'}')............
5de0 20 20 20 20 20 20 20 20 20 20 2b 2b 69 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........++i;..................
5e00 76 61 72 20 74 6f 6b 65 6e 20 3d 20 74 65 6d 70 6c 61 74 65 2e 53 75 62 73 74 72 69 6e 67 28 74 var.token.=.template.Substring(t
5e20 6f 6b 65 6e 53 74 61 72 74 50 6f 73 2c 20 69 20 2d 20 74 6f 6b 65 6e 53 74 61 72 74 50 6f 73 29 okenStartPos,.i.-.tokenStartPos)
5e40 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 6f 70 20 69 6e 63 72 65 ;..................//.Loop.incre
5e60 6d 65 6e 74 20 77 69 6c 6c 20 73 6b 69 70 20 63 6c 6f 73 69 6e 67 20 27 7d 27 2e 0d 0a 0d 0a 20 ment.will.skip.closing.'}'......
5e80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 70 70 65 64 20 3d 20 6d 61 70 46 ...............var.mapped.=.mapF
5ea0 75 6e 63 28 74 6f 6b 65 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 75 66 unc(token);..................buf
5ec0 66 65 72 2e 41 70 70 65 6e 64 28 6d 61 70 70 65 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 fer.Append(mapped);.............
5ee0 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 62 75 66 66 65 72 2e .}................return.buffer.
5f00 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d ToString();..........}......}..}
5f20 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 53 74 72 69 ............................Stri
5f40 6e 67 48 65 6c 70 65 72 73 00 00 00 21 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 ngHelpers...!...UnityEngine.Inpu
5f60 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 00 00 00 tSystem.Utilities...