summaryrefslogtreecommitdiff
path: root/Library/Artifacts/2b/2b014406a668abce854619ff806b9a15
blob: a39b2b134a7dcf66fe7a34129fb520b76660a908 (plain)
ofshex dumpascii
0000 00 00 0f 81 00 01 b5 50 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe .......P............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 f0 a4 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 .....................y..........
1040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1080 00 00 00 00 00 00 00 00 1e 00 00 00 49 6e 70 75 74 41 63 74 69 6f 6e 52 65 62 69 6e 64 69 6e 67 ............InputActionRebinding
10a0 45 78 74 65 6e 73 69 6f 6e 73 00 00 4a a4 01 00 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 Extensions..J...using.System;..u
10c0 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b sing.System.Collections.Generic;
10e0 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 54 65 78 74 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 ..using.System.Text;..using.Unit
1100 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 61 79 6f 75 74 73 3b 0d 0a 75 73 yEngine.InputSystem.Layouts;..us
1120 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c ing.UnityEngine.InputSystem.LowL
1140 65 76 65 6c 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 evel;..using.UnityEngine.InputSy
1160 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 3b 0d 0a 0d 0a 2f 2f 20 54 68 65 20 77 61 79 20 74 61 stem.Utilities;....//.The.way.ta
1180 72 67 65 74 20 62 69 6e 64 69 6e 67 73 20 66 6f 72 20 6f 76 65 72 72 69 64 65 73 20 61 72 65 20 rget.bindings.for.overrides.are.
11a0 66 6f 75 6e 64 3a 0d 0a 2f 2f 20 2d 20 49 66 20 73 70 65 63 69 66 69 65 64 2c 20 64 69 72 65 63 found:..//.-.If.specified,.direc
11c0 74 6c 79 20 62 79 20 69 6e 64 65 78 20 28 65 2e 67 2e 20 22 61 70 70 6c 79 20 74 68 69 73 20 6f tly.by.index.(e.g.."apply.this.o
11e0 76 65 72 72 69 64 65 20 74 6f 20 74 68 65 20 74 68 69 72 64 20 62 69 6e 64 69 6e 67 20 69 6e 20 verride.to.the.third.binding.in.
1200 74 68 65 20 6d 61 70 22 29 0d 0a 2f 2f 20 2d 20 42 79 20 70 61 74 68 20 28 65 2e 67 2e 20 22 73 the.map")..//.-.By.path.(e.g.."s
1220 65 61 72 63 68 20 66 6f 72 20 62 69 6e 64 69 6e 67 20 74 6f 20 27 3c 47 61 6d 65 70 61 64 3e 2f earch.for.binding.to.'<Gamepad>/
1240 6c 65 66 74 53 74 69 63 6b 27 20 61 6e 64 20 6f 76 65 72 72 69 64 65 20 69 74 20 77 69 74 68 20 leftStick'.and.override.it.with.
1260 27 3c 47 61 6d 65 70 61 64 3e 2f 72 69 67 68 74 53 74 69 63 6b 27 22 29 0d 0a 2f 2f 20 2d 20 42 '<Gamepad>/rightStick'")..//.-.B
1280 79 20 67 72 6f 75 70 20 28 65 2e 67 2e 20 22 73 65 61 72 63 68 20 66 6f 72 20 62 69 6e 64 69 6e y.group.(e.g.."search.for.bindin
12a0 67 20 6f 6e 20 61 63 74 69 6f 6e 20 27 66 69 72 65 27 20 77 69 74 68 20 67 72 6f 75 70 20 27 6b g.on.action.'fire'.with.group.'k
12c0 65 79 62 6f 61 72 64 26 6d 6f 75 73 65 27 20 61 6e 64 20 6f 76 65 72 72 69 64 65 20 69 74 20 77 eyboard&mouse'.and.override.it.w
12e0 69 74 68 20 27 3c 4b 65 79 62 6f 61 72 64 3e 2f 73 70 61 63 65 27 22 29 0d 0a 2f 2f 20 2d 20 42 ith.'<Keyboard>/space'")..//.-.B
1300 79 20 61 63 74 69 6f 6e 20 28 65 2e 67 2e 20 22 62 69 6e 64 20 61 63 74 69 6f 6e 20 27 66 69 72 y.action.(e.g.."bind.action.'fir
1320 65 27 20 66 72 6f 6d 20 77 68 61 74 65 76 65 72 20 69 74 20 69 73 20 72 69 67 68 74 20 6e 6f 77 e'.from.whatever.it.is.right.now
1340 20 74 6f 20 27 3c 47 61 6d 65 70 61 64 3e 2f 6c 65 66 74 53 74 69 63 6b 27 22 29 0d 0a 0d 0a 2f .to.'<Gamepad>/leftStick'")..../
1360 2f 2f 2f 54 4f 44 4f 3a 20 6d 61 6b 65 20 74 68 69 73 20 77 6f 72 6b 20 69 6d 70 6c 69 63 69 74 ///TODO:.make.this.work.implicit
1380 6c 79 20 77 69 74 68 20 50 6c 61 79 65 72 49 6e 70 75 74 73 20 73 75 63 68 20 74 68 61 74 20 72 ly.with.PlayerInputs.such.that.r
13a0 65 62 69 6e 64 73 20 63 61 6e 20 62 65 20 72 65 73 74 72 69 63 74 65 64 20 74 6f 20 74 68 65 20 ebinds.can.be.restricted.to.the.
13c0 64 65 76 69 63 65 27 73 20 6f 66 20 61 20 73 70 65 63 69 66 69 63 20 70 6c 61 79 65 72 0d 0a 0d device's.of.a.specific.player...
13e0 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 72 65 62 69 6e 64 69 6e 67 20 62 79 20 47 55 .////TODO:.allow.rebinding.by.GU
1400 49 44 73 20 6e 6f 77 20 74 68 61 74 20 77 65 20 68 61 76 65 20 49 44 73 20 6f 6e 20 62 69 6e 64 IDs.now.that.we.have.IDs.on.bind
1420 69 6e 67 73 0d 0a 0d 0a 2f 2f 2f 2f 46 49 58 4d 45 3a 20 70 72 6f 70 65 72 6c 79 20 77 6f 72 6b ings....////FIXME:.properly.work
1440 20 77 69 74 68 20 63 6f 6d 70 6f 73 69 74 65 73 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 .with.composites....////REVIEW:.
1460 68 6f 77 20 77 65 6c 6c 20 61 72 65 20 77 65 20 68 61 6e 64 6c 69 6e 67 20 74 68 65 20 63 61 73 how.well.are.we.handling.the.cas
1480 65 20 6f 66 20 72 65 62 69 6e 64 69 6e 67 20 74 6f 20 6a 6f 79 73 74 69 63 6b 73 3f 20 28 6d 6f e.of.rebinding.to.joysticks?.(mo
14a0 73 74 6c 79 20 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 20 48 49 44 20 6c 61 79 6f 75 74 73 29 stly.auto-generated.HID.layouts)
14c0 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 ....namespace.UnityEngine.InputS
14e0 79 73 74 65 6d 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ystem..{......///.<summary>.....
1500 20 2f 2f 2f 20 45 78 74 65 6e 73 69 6f 6e 73 20 74 6f 20 68 65 6c 70 20 77 69 74 68 20 64 79 6e .///.Extensions.to.help.with.dyn
1520 61 6d 69 63 61 6c 6c 79 20 72 65 62 69 6e 64 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e amically.rebinding.<see.cref="In
1540 70 75 74 41 63 74 69 6f 6e 22 2f 3e 73 20 69 6e 0d 0a 20 20 20 20 2f 2f 2f 20 76 61 72 69 6f 75 putAction"/>s.in......///.variou
1560 73 20 77 61 79 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 s.ways.......///.</summary>.....
1580 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 55 6e 6c 69 6b 65 20 3c .///.<remarks>......///.Unlike.<
15a0 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 53 65 74 75 70 45 78 74 65 6e 73 see.cref="InputActionSetupExtens
15c0 69 6f 6e 73 22 2f 3e 2c 20 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 73 20 69 ions"/>,.the.extension.methods.i
15e0 6e 20 68 65 72 65 20 61 72 65 20 6d 65 61 6e 74 20 74 6f 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 n.here.are.meant.to.be......///.
1600 63 61 6c 6c 65 64 20 64 75 72 69 6e 67 20 6e 6f 72 6d 61 6c 20 67 61 6d 65 20 6f 70 65 72 61 74 called.during.normal.game.operat
1620 69 6f 6e 2c 20 69 2e 65 2e 20 61 73 20 70 61 72 74 20 6f 66 20 73 63 72 65 65 6e 73 20 77 68 65 ion,.i.e..as.part.of.screens.whe
1640 74 68 65 72 20 74 68 65 20 75 73 65 72 20 63 61 6e 20 72 65 62 69 6e 64 0d 0a 20 20 20 20 2f 2f ther.the.user.can.rebind......//
1660 2f 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 /.controls.......///......///.Th
1680 65 20 74 77 6f 20 70 72 69 6d 61 72 79 20 64 75 74 69 65 73 20 6f 66 20 74 68 65 73 65 20 65 78 e.two.primary.duties.of.these.ex
16a0 74 65 6e 73 69 6f 6e 73 20 61 72 65 20 74 6f 20 61 70 70 6c 79 20 62 69 6e 64 69 6e 67 20 6f 76 tensions.are.to.apply.binding.ov
16c0 65 72 72 69 64 65 73 20 74 68 61 74 20 6e 6f 6e 2d 64 65 73 74 72 75 63 74 69 76 65 6c 79 0d 0a errides.that.non-destructively..
16e0 20 20 20 20 2f 2f 2f 20 72 65 64 69 72 65 63 74 20 65 78 69 73 74 69 6e 67 20 62 69 6e 64 69 6e ....///.redirect.existing.bindin
1700 67 73 20 61 6e 64 20 74 6f 20 66 61 63 69 6c 69 74 61 74 65 20 75 73 65 72 2d 63 6f 6e 74 72 6f gs.and.to.facilitate.user-contro
1720 6c 6c 65 64 20 72 65 62 69 6e 64 69 6e 67 20 62 79 20 6c 69 73 74 65 6e 69 6e 67 20 66 6f 72 20 lled.rebinding.by.listening.for.
1740 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 2f 2f 2f 20 61 63 74 75 61 74 65 64 20 62 79 20 74 68 controls......///.actuated.by.th
1760 65 20 75 73 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 e.user.......///.</remarks>.....
1780 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 53 .///.<seealso.cref="InputActionS
17a0 65 74 75 70 45 78 74 65 6e 73 69 6f 6e 73 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 etupExtensions"/>......///.<seea
17c0 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 2f lso.cref="InputBinding"/>....../
17e0 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 //.<seealso.cref="InputAction.bi
1800 6e 64 69 6e 67 73 22 2f 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 63 6c 61 ndings"/>......public.static.cla
1820 73 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 52 65 62 69 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e ss.InputActionRebindingExtension
1840 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 61 72 79 3e 0d s......{..........///.<summary>.
1860 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 20 74 68 65 20 69 6e 64 65 78 20 6f 66 20 74 68 .........///.Get.the.index.of.th
1880 65 20 66 69 72 73 74 20 62 69 6e 64 69 6e 67 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e e.first.binding.in.<see.cref="In
18a0 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 20 6f 6e 20 3c 70 61 72 61 6d 72 putAction.bindings"/>.on.<paramr
18c0 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ef.name="action"/>..........///.
18e0 74 68 61 74 20 6d 61 74 63 68 65 73 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 20 6d that.matches.the.given.binding.m
1900 61 73 6b 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 ask...........///.</summary>....
1920 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 ......///.<param.name="action">A
1940 6e 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 n.input.action.</param>.........
1960 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4d 61 73 6b 22 3e 42 .///.<param.name="bindingMask">B
1980 69 6e 64 69 6e 67 20 6d 61 73 6b 20 74 6f 20 6d 61 74 63 68 20 28 73 65 65 20 3c 73 65 65 20 63 inding.mask.to.match.(see.<see.c
19a0 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 65 73 22 2f 3e 29 2e 3c 2f ref="InputBinding.Matches"/>).</
19c0 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 param>..........///.<returns>The
19e0 20 66 69 72 73 74 20 62 69 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 6d 61 74 .first.binding.on.the.action.mat
1a00 63 68 69 6e 67 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4d 61 73 ching.<paramref.name="bindingMas
1a20 6b 22 2f 3e 20 6f 72 20 2d 31 20 69 66 20 6e 6f 20 62 69 6e 64 69 6e 67 0d 0a 20 20 20 20 20 20 k"/>.or.-1.if.no.binding........
1a40 20 20 2f 2f 2f 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 6d 61 74 63 68 65 73 20 74 68 65 20 ..///.on.the.action.matches.the.
1a60 6d 61 73 6b 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 mask.</returns>..........///.<ex
1a80 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 ception.cref="ArgumentNullExcept
1aa0 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 ion"><paramref.name="action"/>.i
1ac0 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 s.<c>null</c>.</exception>......
1ae0 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 ....///.<seealso.cref="InputBind
1b00 69 6e 67 2e 4d 61 74 63 68 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 ing.Matches"/>..........public.s
1b20 74 61 74 69 63 20 69 6e 74 20 47 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 28 74 68 69 73 20 49 tatic.int.GetBindingIndex(this.I
1b40 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 nputAction.action,.InputBinding.
1b60 62 69 6e 64 69 6e 67 4d 61 73 6b 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 bindingMask)..........{.........
1b80 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 .....if.(action.==.null)........
1ba0 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 6c ..........throw.new.ArgumentNull
1bc0 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 Exception(nameof(action));......
1be0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 2e ..........var.bindings.=.action.
1c00 62 69 6e 64 69 6e 67 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 bindings;..............for.(var.
1c20 69 20 3d 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d i.=.0;.i.<.bindings.Count;.++i).
1c40 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 4d 61 73 6b .................if.(bindingMask
1c60 2e 4d 61 74 63 68 65 73 28 62 69 6e 64 69 6e 67 73 5b 69 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 .Matches(bindings[i]))..........
1c80 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ............return.i;...........
1ca0 20 20 20 20 20 72 65 74 75 72 6e 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 .....return.-1;..........}......
1cc0 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ......///.<summary>..........///
1ce0 20 47 65 74 20 74 68 65 20 69 6e 64 65 78 20 6f 66 20 74 68 65 20 66 69 72 73 74 20 62 69 6e 64 .Get.the.index.of.the.first.bind
1d00 69 6e 67 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 ing.in.<see.cref="InputAction.bi
1d20 6e 64 69 6e 67 73 22 2f 3e 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 ndings"/>.on.<paramref.name="act
1d40 69 6f 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 6d 61 74 63 68 65 73 ion"/>..........///.that.matches
1d60 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 20 61 6e 64 2f 6f 72 20 .the.given.binding.group.and/or.
1d80 70 61 74 68 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 path...........///.</summary>...
1da0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e .......///.<param.name="action">
1dc0 41 6e 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 An.input.action.</param>........
1de0 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 67 72 6f 75 70 22 3e 42 69 6e 64 69 6e ..///.<param.name="group">Bindin
1e00 67 20 67 72 6f 75 70 20 74 6f 20 6d 61 74 63 68 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d g.group.to.match.(see.<see.cref=
1e20 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 67 72 6f 75 70 73 22 2f 3e 29 2e 3c 2f 70 61 72 61 6d "InputBinding.groups"/>).</param
1e40 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 61 74 68 >..........///.<param.name="path
1e60 22 3e 42 69 6e 64 69 6e 67 20 70 61 74 68 20 74 6f 20 6d 61 74 63 68 20 28 73 65 65 20 3c 73 65 ">Binding.path.to.match.(see.<se
1e80 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 70 61 74 68 22 2f 3e 29 2e 3c 2f e.cref="InputBinding.path"/>).</
1ea0 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 param>..........///.<returns>The
1ec0 20 66 69 72 73 74 20 62 69 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 6d 61 74 .first.binding.on.the.action.mat
1ee0 63 68 69 6e 67 20 74 68 65 20 67 69 76 65 6e 20 67 72 6f 75 70 20 61 6e 64 2f 6f 72 20 70 61 74 ching.the.given.group.and/or.pat
1f00 68 20 6f 72 20 2d 31 20 69 66 20 6e 6f 20 62 69 6e 64 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f h.or.-1.if.no.binding........../
1f20 2f 2f 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 6d 61 74 63 68 65 73 2e 3c 2f 72 65 74 75 72 //.on.the.action.matches.</retur
1f40 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 ns>..........///.<exception.cref
1f60 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 ="ArgumentNullException"><paramr
1f80 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 ef.name="action"/>.is.<c>null</c
1fa0 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 >.</exception>..........///.<see
1fc0 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 65 73 22 also.cref="InputBinding.Matches"
1fe0 2f 3e 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 47 65 />..........public.static.int.Ge
2000 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 tBindingIndex(this.InputAction.a
2020 63 74 69 6f 6e 2c 20 73 74 72 69 6e 67 20 67 72 6f 75 70 20 3d 20 64 65 66 61 75 6c 74 2c 20 73 ction,.string.group.=.default,.s
2040 74 72 69 6e 67 20 70 61 74 68 20 3d 20 64 65 66 61 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b tring.path.=.default)..........{
2060 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c ..............if.(action.==.null
2080 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 67 )..................throw.new.Arg
20a0 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 61 63 74 69 6f 6e umentNullException(nameof(action
20c0 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 63 74 69 6f 6e 2e 47 ));..............return.action.G
20e0 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 28 6e 65 77 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 28 etBindingIndex(new.InputBinding(
2100 67 72 6f 75 70 73 3a 20 67 72 6f 75 70 2c 20 70 61 74 68 3a 20 70 61 74 68 29 29 3b 0d 0a 20 20 groups:.group,.path:.path));....
2120 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ......}............///.<summary>
2140 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 20 74 68 65 20 62 69 6e 64 69 6e 67 ..........///.Return.the.binding
2160 20 74 68 61 74 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 20 72 65 73 6f 6c 76 65 64 .that.the.given.control.resolved
2180 20 66 72 6f 6d 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 .from...........///.</summary>..
21a0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 ........///.<param.name="action"
21c0 3e 41 6e 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 20 74 68 61 74 20 6d 61 79 20 62 65 20 75 73 69 >An.input.action.that.may.be.usi
21e0 6e 67 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 ng.the.given.control.</param>...
2200 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 .......///.<param.name="control"
2220 3e 43 6f 6e 74 72 6f 6c 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 61 20 62 69 6e 64 69 6e 67 20 66 >Control.to.look.for.a.binding.f
2240 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 or.</param>..........///.<except
2260 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 ion.cref="ArgumentNullException"
2280 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 ><paramref.name="action"/>.is.<c
22a0 3e 6e 75 6c 6c 3c 2f 63 3e 20 2d 6f 72 2d 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 63 >null</c>.-or-.<paramref.name="c
22c0 6f 6e 74 72 6f 6c 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 3c 63 3e 6e 75 6c ontrol"/>..........///.is.<c>nul
22e0 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 l</c>.</exception>..........///.
2300 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 62 69 6e 64 69 6e 67 20 66 72 6f 6d 20 77 68 69 63 68 20 <returns>The.binding.from.which.
2320 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 2f 3e 20 68 61 73 20 62 <paramref.name="control"/>.has.b
2340 65 65 6e 20 72 65 73 6f 6c 76 65 64 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 20 6e een.resolved.or.<c>null</c>.if.n
2360 6f 20 73 75 63 68 20 62 69 6e 64 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 6f 75 6c o.such.binding..........///.coul
2380 64 20 62 65 20 66 6f 75 6e 64 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 d.be.found.on.<paramref.name="ac
23a0 74 69 6f 6e 22 2f 3e 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c tion"/>.</returns>..........publ
23c0 69 63 20 73 74 61 74 69 63 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 3f 20 47 65 74 42 69 6e 64 69 ic.static.InputBinding?.GetBindi
23e0 6e 67 46 6f 72 43 6f 6e 74 72 6f 6c 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 ngForControl(this.InputAction.ac
2400 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 tion,.InputControl.control).....
2420 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d .....{..............if.(action.=
2440 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 6e =.null)..................throw.n
2460 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 ew.ArgumentNullException(nameof(
2480 61 63 74 69 6f 6e 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 action));..............if.(contr
24a0 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 ol.==.null)..................thr
24c0 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d ow.new.ArgumentNullException(nam
24e0 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 eof(control));................va
2500 72 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 20 47 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 r.bindingIndex.=.GetBindingIndex
2520 46 6f 72 43 6f 6e 74 72 6f 6c 28 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 ForControl(action,.control);....
2540 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 3d 20 2d 31 ..........if.(bindingIndex.==.-1
2560 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 6e 75 6c 6c 3b 0d )..................return.null;.
2580 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 63 74 69 6f 6e 2e 62 69 6e 64 69 .............return.action.bindi
25a0 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ngs[bindingIndex];..........}...
25c0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 .........///.<summary>..........
25e0 2f 2f 2f 20 52 65 74 75 72 6e 20 74 68 65 20 69 6e 64 65 78 20 69 6e 74 6f 20 3c 70 61 72 61 6d ///.Return.the.index.into.<param
2600 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 27 73 20 3c 73 65 65 20 63 72 65 66 3d ref.name="action"/>'s.<see.cref=
2620 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 20 74 68 61 74 20 63 6f "InputAction.bindings"/>.that.co
2640 72 72 65 73 70 6f 6e 64 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 3c 70 61 72 61 6d rresponds..........///.to.<param
2660 72 65 66 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 2f 3e 20 62 6f 75 6e 64 20 74 6f 20 74 68 ref.name="control"/>.bound.to.th
2680 65 20 61 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 e.action...........///.</summary
26a0 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 >..........///.<param.name="acti
26c0 6f 6e 22 3e 54 68 65 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 20 77 68 6f 73 65 20 62 69 6e 64 69 on">The.input.action.whose.bindi
26e0 6e 67 73 20 74 6f 20 75 73 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ngs.to.use.</param>..........///
2700 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 3e 41 6e 20 69 6e 70 75 74 20 .<param.name="control">An.input.
2720 63 6f 6e 74 72 6f 6c 20 66 6f 72 20 77 68 69 63 68 20 74 6f 20 6c 6f 6f 6b 20 66 6f 72 20 61 20 control.for.which.to.look.for.a.
2740 62 69 6e 64 69 6e 67 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 binding.</param>..........///.<r
2760 65 74 75 72 6e 73 3e 54 68 65 20 69 6e 64 65 78 20 69 6e 74 6f 20 74 68 65 20 61 63 74 69 6f 6e eturns>The.index.into.the.action
2780 27 73 20 62 69 6e 64 69 6e 67 20 61 72 72 61 79 20 66 6f 72 20 74 68 65 20 62 69 6e 64 69 6e 67 's.binding.array.for.the.binding
27a0 20 74 68 61 74 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 2f 3e .that.<paramref.name="control"/>
27c0 20 77 61 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 73 6f 6c 76 65 64 20 66 72 6f 6d 20 .was..........///.resolved.from.
27e0 6f 72 20 2d 31 20 69 66 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 69 73 20 6e 6f 74 20 63 75 72 72 or.-1.if.the.control.is.not.curr
2800 65 6e 74 6c 79 20 62 6f 75 6e 64 20 74 6f 20 74 68 65 20 61 63 74 69 6f 6e 2e 3c 2f 72 65 74 75 ently.bound.to.the.action.</retu
2820 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 rns>..........///.<remarks>.....
2840 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 6d 65 74 68 6f 64 20 77 .....///.Note.that.this.method.w
2860 69 6c 6c 20 6f 6e 6c 79 20 74 61 6b 65 20 63 75 72 72 65 6e 74 6c 79 20 61 63 74 69 76 65 20 62 ill.only.take.currently.active.b
2880 69 6e 64 69 6e 67 73 20 69 6e 74 6f 20 63 6f 6e 73 69 64 65 72 61 74 69 6f 6e 2e 20 54 68 69 73 indings.into.consideration..This
28a0 20 6d 65 61 6e 73 20 74 68 61 74 20 69 66 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 .means.that.if..........///.the.
28c0 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 20 3c 65 6d 3e 63 6f 75 6c 64 3c 2f 65 6d 3e 20 63 6f 6d given.control.<em>could</em>.com
28e0 65 20 66 72 6f 6d 20 6f 6e 65 20 6f 66 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 6f 6e 20 74 68 e.from.one.of.the.bindings.on.th
2900 65 20 61 63 74 69 6f 6e 20 62 75 74 20 64 6f 65 73 20 6e 6f 74 20 63 75 72 72 65 6e 74 6c 79 0d e.action.but.does.not.currently.
2920 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 64 6f 20 73 6f 2c 20 74 68 65 20 6d 65 74 68 6f 64 20 73 .........///.do.so,.the.method.s
2940 74 69 6c 6c 20 72 65 74 75 72 6e 73 20 2d 31 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 till.returns.-1...........///...
2960 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 20 63 61 73 65 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 6d .......///.In.case.you.want.to.m
2980 61 6e 75 61 6c 6c 79 20 66 69 6e 64 20 6f 75 74 20 77 68 69 63 68 20 6f 66 20 74 68 65 20 62 69 anually.find.out.which.of.the.bi
29a0 6e 64 69 6e 67 73 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 63 6f 75 6c 64 20 6d 61 74 63 68 ndings.on.the.action.could.match
29c0 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f .the.given.control,..........///
29e0 20 79 6f 75 20 63 61 6e 20 64 6f 20 73 6f 20 75 73 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 .you.can.do.so.using.<see.cref="
2a00 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 4d 61 74 63 68 65 73 22 2f 3e 3a 0d 0a 20 20 InputControlPath.Matches"/>:....
2a20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e ......///..........///.<example>
2a40 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f ..........///.<code>..........//
2a60 2f 20 2f 2f 20 46 69 6e 64 20 74 68 65 20 62 69 6e 64 69 6e 67 20 6f 6e 20 27 61 63 74 69 6f 6e /.//.Find.the.binding.on.'action
2a80 27 20 74 68 61 74 20 6d 61 74 63 68 65 73 20 74 68 65 20 67 69 76 65 6e 20 27 63 6f 6e 74 72 6f '.that.matches.the.given.'contro
2aa0 6c 27 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 62 69 l'...........///.foreach.(var.bi
2ac0 6e 64 69 6e 67 20 69 6e 20 61 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 29 0d 0a 20 20 20 20 20 nding.in.action.bindings).......
2ae0 20 20 20 2f 2f 2f 20 20 20 20 20 69 66 20 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e ...///.....if.(InputControlPath.
2b00 4d 61 74 63 68 65 73 28 62 69 6e 64 69 6e 67 2e 65 66 66 65 63 74 69 76 65 50 61 74 68 2c 20 63 Matches(binding.effectivePath,.c
2b20 6f 6e 74 72 6f 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 44 65 ontrol))..........///.........De
2b40 62 75 67 2e 4c 6f 67 28 24 22 42 69 6e 64 69 6e 67 20 66 6f 72 20 7b 63 6f 6e 74 72 6f 6c 7d 3a bug.Log($"Binding.for.{control}:
2b60 20 7b 62 69 6e 64 69 6e 67 7d 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 .{binding}");..........///.</cod
2b80 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 e>..........///.</example>......
2ba0 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ....///.</remarks>..........///.
2bc0 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 <exception.cref="ArgumentNullExc
2be0 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f eption"><paramref.name="action"/
2c00 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 2d 6f 72 2d 20 3c 70 61 72 61 6d 72 65 66 20 >.is.<c>null</c>.-or-.<paramref.
2c20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 name="control"/>..........///.is
2c40 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 .<c>null</c>.</exception>.......
2c60 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 75 6e 73 61 66 65 20 69 6e 74 20 47 65 74 42 ...public.static.unsafe.int.GetB
2c80 69 6e 64 69 6e 67 49 6e 64 65 78 46 6f 72 43 6f 6e 74 72 6f 6c 28 74 68 69 73 20 49 6e 70 75 74 indingIndexForControl(this.Input
2ca0 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 Action.action,.InputControl.cont
2cc0 72 6f 6c 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 rol)..........{..............if.
2ce0 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 (action.==.null)................
2d00 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 69 6f ..throw.new.ArgumentNullExceptio
2d20 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 n(nameof(action));..............
2d40 69 66 20 28 63 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 if.(control.==.null)............
2d60 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 6c 45 78 63 65 ......throw.new.ArgumentNullExce
2d80 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 ption(nameof(control));.........
2da0 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 2e 47 65 .......var.actionMap.=.action.Ge
2dc0 74 4f 72 43 72 65 61 74 65 41 63 74 69 6f 6e 4d 61 70 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 tOrCreateActionMap();...........
2de0 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 52 65 73 6f 6c 76 65 42 69 6e 64 69 6e 67 73 49 66 4e 65 ...actionMap.ResolveBindingsIfNe
2e00 63 65 73 73 61 72 79 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 cessary();................var.st
2e20 61 74 65 20 3d 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 53 74 61 74 65 3b 0d 0a 20 20 20 20 20 20 ate.=.actionMap.m_State;........
2e40 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 73 74 61 74 65 20 21 3d 20 6e 75 6c 6c ......Debug.Assert(state.!=.null
2e60 2c 20 22 42 69 6e 64 69 6e 67 73 20 61 72 65 20 65 78 70 65 63 74 65 64 20 74 6f 20 68 61 76 65 ,."Bindings.are.expected.to.have
2e80 20 62 65 65 6e 20 72 65 73 6f 6c 76 65 64 20 61 74 20 74 68 69 73 20 70 6f 69 6e 74 22 29 3b 0d .been.resolved.at.this.point");.
2ea0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 69 6e 64 65 78 20 6f 66 20 ...............//.Find.index.of.
2ec0 63 6f 6e 74 72 6f 6c 20 69 6e 20 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 control.in.state...............v
2ee0 61 72 20 63 6f 6e 74 72 6f 6c 49 6e 64 65 78 20 3d 20 41 72 72 61 79 2e 49 6e 64 65 78 4f 66 28 ar.controlIndex.=.Array.IndexOf(
2f00 73 74 61 74 65 2e 63 6f 6e 74 72 6f 6c 73 2c 20 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 state.controls,.control);.......
2f20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 49 6e 64 65 78 20 3d 3d 20 2d 31 29 0d 0a .......if.(controlIndex.==.-1)..
2f40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 2d 31 3b 0d 0a 0d 0a 20 20 ................return.-1;......
2f60 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 70 20 74 6f 20 62 69 6e 64 69 6e 67 20 69 6e 64 65 ..........//.Map.to.binding.inde
2f80 78 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 49 6e 64 65 78 20 x...............var.actionIndex.
2fa0 3d 20 61 63 74 69 6f 6e 2e 6d 5f 41 63 74 69 6f 6e 49 6e 64 65 78 49 6e 53 74 61 74 65 3b 0d 0a =.action.m_ActionIndexInState;..
2fc0 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 20 3d 20 73 ............var.bindingCount.=.s
2fe0 74 61 74 65 2e 74 6f 74 61 6c 42 69 6e 64 69 6e 67 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 tate.totalBindingCount;.........
3000 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 6e 67 .....for.(var.i.=.0;.i.<.binding
3020 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 Count;.++i)..............{......
3040 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 53 74 61 74 65 50 74 72 20 ............var.bindingStatePtr.
3060 3d 20 26 73 74 61 74 65 2e 62 69 6e 64 69 6e 67 53 74 61 74 65 73 5b 69 5d 3b 0d 0a 20 20 20 20 =.&state.bindingStates[i];......
3080 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 53 74 61 74 65 50 74 72 2d ............if.(bindingStatePtr-
30a0 3e 61 63 74 69 6f 6e 49 6e 64 65 78 20 3d 3d 20 61 63 74 69 6f 6e 49 6e 64 65 78 20 26 26 20 62 >actionIndex.==.actionIndex.&&.b
30c0 69 6e 64 69 6e 67 53 74 61 74 65 50 74 72 2d 3e 63 6f 6e 74 72 6f 6c 53 74 61 72 74 49 6e 64 65 indingStatePtr->controlStartInde
30e0 78 20 3c 3d 20 63 6f 6e 74 72 6f 6c 49 6e 64 65 78 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 x.<=.controlIndex.&&............
3100 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 49 6e 64 65 78 20 3c 20 62 69 6e 64 69 6e 67 ..........controlIndex.<.binding
3120 53 74 61 74 65 50 74 72 2d 3e 63 6f 6e 74 72 6f 6c 53 74 61 72 74 49 6e 64 65 78 20 2b 20 62 69 StatePtr->controlStartIndex.+.bi
3140 6e 64 69 6e 67 53 74 61 74 65 50 74 72 2d 3e 63 6f 6e 74 72 6f 6c 43 6f 75 6e 74 29 0d 0a 20 20 ndingStatePtr->controlCount)....
3160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
3180 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 49 6e 4d 61 70 20 3d 20 73 74 61 .....var.bindingIndexInMap.=.sta
31a0 74 65 2e 47 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 49 6e 4d 61 70 28 69 29 3b 0d 0a 20 20 20 te.GetBindingIndexInMap(i);.....
31c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 63 74 69 6f 6e 2e 42 .................return.action.B
31e0 69 6e 64 69 6e 67 49 6e 64 65 78 4f 6e 4d 61 70 54 6f 42 69 6e 64 69 6e 67 49 6e 64 65 78 4f 6e indingIndexOnMapToBindingIndexOn
3200 41 63 74 69 6f 6e 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 49 6e 4d 61 70 29 3b 0d 0a 20 20 20 20 Action(bindingIndexInMap);......
3220 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ............}..............}....
3240 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 ............return.-1;..........
3260 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 }............///.<summary>......
3280 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 73 75 69 74 61 62 6c 65 ....///.Return.a.string.suitable
32a0 20 66 6f 72 20 64 69 73 70 6c 61 79 20 69 6e 20 55 49 73 20 74 68 61 74 20 73 68 6f 77 73 20 77 .for.display.in.UIs.that.shows.w
32c0 68 61 74 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 69 73 20 63 75 72 72 65 6e 74 6c hat.the.given.action.is.currentl
32e0 79 20 62 6f 75 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 y.bound.to...........///.</summa
3300 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 ry>..........///.<param.name="ac
3320 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 63 72 65 61 74 65 20 61 20 64 69 73 70 6c 61 79 tion">Action.to.create.a.display
3340 20 73 74 72 69 6e 67 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f .string.for.</param>..........//
3360 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6f 70 74 69 6f 6e 73 22 3e 4f 70 74 69 6f 6e 61 6c /.<param.name="options">Optional
3380 20 73 65 74 20 6f 66 20 66 6f 72 6d 61 74 74 69 6e 67 20 66 6c 61 67 73 2e 3c 2f 70 61 72 61 6d .set.of.formatting.flags.</param
33a0 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 67 72 6f 75 >..........///.<param.name="grou
33c0 70 22 3e 4f 70 74 69 6f 6e 61 6c 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 20 74 6f 20 72 65 73 p">Optional.binding.group.to.res
33e0 74 72 69 63 74 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 20 74 6f 2e 20 49 66 20 74 68 69 73 20 trict.the.operation.to..If.this.
3400 69 73 20 73 75 70 70 6c 69 65 64 2c 20 69 74 20 65 66 66 65 63 74 69 76 65 6c 79 0d 0a 20 20 20 is.supplied,.it.effectively.....
3420 20 20 20 20 20 2f 2f 2f 20 62 65 63 6f 6d 65 73 20 74 68 65 20 62 69 6e 64 69 6e 67 20 6d 61 73 .....///.becomes.the.binding.mas
3440 6b 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d k.(see.<see.cref="InputBinding.M
3460 61 74 63 68 65 73 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 29 20 74 6f 20 73 75 70 70 atches(InputBinding)"/>).to.supp
3480 6c 79 20 74 6f 20 3c 73 65 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 72 65 66 3d 22 47 65 ly.to.<see..........///.cref="Ge
34a0 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 41 63 74 69 6f tBindingDisplayString(InputActio
34c0 6e 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 44 69 73 70 n,InputBinding,InputBinding.Disp
34e0 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 29 22 2f 3e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 layStringOptions)"/>.</param>...
3500 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 41 20 73 74 72 69 6e 67 20 73 75 69 .......///.<returns>A.string.sui
3520 74 61 62 6c 65 20 66 6f 72 20 64 69 73 70 6c 61 79 20 69 6e 20 72 65 62 69 6e 64 69 6e 67 20 55 table.for.display.in.rebinding.U
3540 49 73 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 Is.</returns>..........///.<exce
3560 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f ption.cref="ArgumentNullExceptio
3580 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 n"><paramref.name="action"/>.is.
35a0 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 <c>null</c>.</exception>........
35c0 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 ..///.<remarks>..........///.Thi
35e0 73 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 74 61 6b 65 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 20 s.method.will.take.into.account.
3600 61 6e 79 20 62 69 6e 64 69 6e 67 20 6d 61 73 6b 73 20 28 73 75 63 68 20 61 73 20 66 72 6f 6d 20 any.binding.masks.(such.as.from.
3620 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 29 20 69 6e 20 65 66 66 65 63 74 20 6f 6e 20 74 68 control.schemes).in.effect.on.th
3640 65 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 28 73 75 63 68 20 61 73 20 3c e.action..........///.(such.as.<
3660 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 4d 61 73 see.cref="InputAction.bindingMas
3680 6b 22 2f 3e 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 69 74 73 65 6c 66 2c 20 74 68 65 20 3c k"/>.on.the.action.itself,.the.<
36a0 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 62 69 6e 64 69 6e 67 see.cref="InputActionMap.binding
36c0 4d 61 73 6b 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 20 69 74 73 20 61 63 74 69 Mask"/>..........///.on.its.acti
36e0 6f 6e 20 6d 61 70 2c 20 6f 72 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 on.map,.or.the.<see.cref="InputA
3700 63 74 69 6f 6e 41 73 73 65 74 2e 62 69 6e 64 69 6e 67 4d 61 73 6b 22 2f 3e 20 6f 6e 20 69 74 73 ctionAsset.bindingMask"/>.on.its
3720 20 61 73 73 65 74 29 20 61 73 20 77 65 6c 6c 20 61 73 20 74 68 65 20 61 63 74 75 61 6c 20 63 6f .asset).as.well.as.the.actual.co
3740 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 74 68 65 20 61 63 74 ntrols..........///.that.the.act
3760 69 6f 6e 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 62 6f 75 6e 64 20 74 6f 20 28 73 65 65 20 3c ion.is.currently.bound.to.(see.<
3780 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 63 6f 6e 74 72 6f 6c 73 22 2f see.cref="InputAction.controls"/
37a0 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 >)...........///..........///.<e
37c0 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 xample>..........///.<code>.....
37e0 20 20 20 20 20 2f 2f 2f 20 76 61 72 20 61 63 74 69 6f 6e 20 3d 20 6e 65 77 20 49 6e 70 75 74 41 .....///.var.action.=.new.InputA
3800 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f ction();..........///........../
3820 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 64 42 69 6e 64 69 6e 67 28 22 26 6c 74 3b 47 61 6d 65 70 61 //.action.AddBinding("&lt;Gamepa
3840 64 26 67 74 3b 2f 62 75 74 74 6f 6e 53 6f 75 74 68 22 2c 20 67 72 6f 75 70 73 3a 20 22 47 61 6d d&gt;/buttonSouth",.groups:."Gam
3860 65 70 61 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 64 42 epad");..........///.action.AddB
3880 69 6e 64 69 6e 67 28 22 26 6c 74 3b 4d 6f 75 73 65 26 67 74 3b 2f 6c 65 66 74 42 75 74 74 6f 6e inding("&lt;Mouse&gt;/leftButton
38a0 22 2c 20 67 72 6f 75 70 73 3a 20 22 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 29 3b 0d 0a 20 20 ",.groups:."KeyboardMouse");....
38c0 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 69 6e 74 73 ......///..........///.//.Prints
38e0 20 22 41 20 7c 20 4c 4d 42 22 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c ."A.|.LMB"...........///.Debug.L
3900 6f 67 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e og(action.GetBindingDisplayStrin
3920 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 g());..........///..........///.
3940 2f 2f 20 50 72 69 6e 74 73 20 22 41 22 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 //.Prints."A"...........///.Debu
3960 67 2e 4c 6f 67 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 g.Log(action.GetBindingDisplaySt
3980 72 69 6e 67 28 67 72 6f 75 70 3a 20 22 47 61 6d 65 70 61 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 ring(group:."Gamepad");.........
39a0 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 69 6e 74 73 20 22 4c 4d 42 .///..........///.//.Prints."LMB
39c0 22 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 61 63 74 69 6f 6e "...........///.Debug.Log(action
39e0 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 67 72 6f 75 70 3a 20 .GetBindingDisplayString(group:.
3a00 22 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c "KeyboardMouse");..........///.<
3a20 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a /code>..........///.</example>..
3a40 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 ........///.</remarks>..........
3a60 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e ///.<seealso.cref="InputBinding.
3a80 54 6f 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 44 69 73 ToDisplayString(InputBinding.Dis
3aa0 70 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 2c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 22 playStringOptions,InputControl)"
3ac0 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 />..........///.<seealso.cref="I
3ae0 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 54 6f 48 75 6d 61 6e 52 65 61 64 61 62 6c 65 53 nputControlPath.ToHumanReadableS
3b00 74 72 69 6e 67 28 73 74 72 69 6e 67 2c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 48 75 tring(string,InputControlPath.Hu
3b20 6d 61 6e 52 65 61 64 61 62 6c 65 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 2c 49 6e 70 75 74 43 6f manReadableStringOptions,InputCo
3b40 6e 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 ntrol)"/>..........public.static
3b60 20 73 74 72 69 6e 67 20 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 .string.GetBindingDisplayString(
3b80 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 42 69 this.InputAction.action,.InputBi
3ba0 6e 64 69 6e 67 2e 44 69 73 70 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 20 6f 70 74 69 6f nding.DisplayStringOptions.optio
3bc0 6e 73 20 3d 20 64 65 66 61 75 6c 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e ns.=.default,..............strin
3be0 67 20 67 72 6f 75 70 20 3d 20 64 65 66 61 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 g.group.=.default)..........{...
3c00 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ...........if.(action.==.null)..
3c20 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 6d 65 ................throw.new.Argume
3c40 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b ntNullException(nameof(action));
3c60 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 66 61 75 6c 74 20 62 69 6e 64 69 ................//.Default.bindi
3c80 6e 67 20 6d 61 73 6b 20 74 6f 20 74 68 65 20 6f 6e 65 20 66 6f 75 6e 64 20 6f 6e 20 74 68 65 20 ng.mask.to.the.one.found.on.the.
3ca0 61 63 74 69 6f 6e 20 6f 72 20 61 6e 79 20 6f 66 20 69 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 action.or.any.of.its............
3cc0 20 20 2f 2f 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e ..//.containers...............In
3ce0 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e 64 69 6e 67 4d 61 73 6b 3b 0d 0a 20 20 20 20 20 20 20 putBinding.bindingMask;.........
3d00 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 67 .....if.(!string.IsNullOrEmpty(g
3d20 72 6f 75 70 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 roup))..............{...........
3d40 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b 20 3d 20 49 6e 70 75 74 42 69 6e 64 69 6e .......bindingMask.=.InputBindin
3d60 67 2e 4d 61 73 6b 42 79 47 72 6f 75 70 28 67 72 6f 75 70 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 g.MaskByGroup(group);...........
3d80 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 ...}..............else..........
3da0 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 6d 61 73 6b 20 ....{..................var.mask.
3dc0 3d 20 61 63 74 69 6f 6e 2e 46 69 6e 64 45 66 66 65 63 74 69 76 65 42 69 6e 64 69 6e 67 4d 61 73 =.action.FindEffectiveBindingMas
3de0 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 73 6b 2e 48 k();..................if.(mask.H
3e00 61 73 56 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 asValue)......................bi
3e20 6e 64 69 6e 67 4d 61 73 6b 20 3d 20 6d 61 73 6b 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 ndingMask.=.mask.Value;.........
3e40 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........else...................
3e60 20 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 ...bindingMask.=.default;.......
3e80 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 47 .......}................return.G
3ea0 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 61 63 74 69 6f 6e 2c 20 62 etBindingDisplayString(action,.b
3ec0 69 6e 64 69 6e 67 4d 61 73 6b 2c 20 6f 70 74 69 6f 6e 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d indingMask,.options);..........}
3ee0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 ............///.<summary>.......
3f00 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 73 75 69 74 61 62 6c 65 20 ...///.Return.a.string.suitable.
3f20 66 6f 72 20 64 69 73 70 6c 61 79 20 69 6e 20 55 49 73 20 74 68 61 74 20 73 68 6f 77 73 20 77 68 for.display.in.UIs.that.shows.wh
3f40 61 74 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 69 73 20 63 75 72 72 65 6e 74 6c 79 at.the.given.action.is.currently
3f60 20 62 6f 75 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 .bound.to...........///.</summar
3f80 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 y>..........///.<param.name="act
3fa0 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 63 72 65 61 74 65 20 61 20 64 69 73 70 6c 61 79 20 ion">Action.to.create.a.display.
3fc0 73 74 72 69 6e 67 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f string.for.</param>..........///
3fe0 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4d 61 73 6b 22 3e 4d 61 73 6b 20 .<param.name="bindingMask">Mask.
4000 66 6f 72 20 62 69 6e 64 69 6e 67 73 20 74 6f 20 74 61 6b 65 20 69 6e 74 6f 20 61 63 63 6f 75 6e for.bindings.to.take.into.accoun
4020 74 2e 20 41 6e 79 20 62 69 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 20 6e 6f 74 t..Any.binding.on.the.action.not
4040 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6d 61 74 63 68 69 6e 67 20 28 73 65 65 20 3c 73 65 65 ..........///.matching.(see.<see
4060 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 65 73 28 49 6e 70 75 .cref="InputBinding.Matches(Inpu
4080 74 42 69 6e 64 69 6e 67 29 22 2f 3e 29 20 74 68 65 20 6d 61 73 6b 20 69 73 20 69 67 6e 6f 72 65 tBinding)"/>).the.mask.is.ignore
40a0 64 20 61 6e 64 20 6e 6f 74 20 69 6e 63 6c 75 64 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 d.and.not.included..........///.
40c0 69 6e 20 74 68 65 20 72 65 73 75 6c 74 69 6e 67 20 73 74 72 69 6e 67 2e 3c 2f 70 61 72 61 6d 3e in.the.resulting.string.</param>
40e0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6f 70 74 69 6f ..........///.<param.name="optio
4100 6e 73 22 3e 4f 70 74 69 6f 6e 61 6c 20 73 65 74 20 6f 66 20 66 6f 72 6d 61 74 74 69 6e 67 20 66 ns">Optional.set.of.formatting.f
4120 6c 61 67 73 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 lags.</param>..........///.<retu
4140 72 6e 73 3e 41 20 73 74 72 69 6e 67 20 73 75 69 74 61 62 6c 65 20 66 6f 72 20 64 69 73 70 6c 61 rns>A.string.suitable.for.displa
4160 79 20 69 6e 20 72 65 62 69 6e 64 69 6e 67 20 55 49 73 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 y.in.rebinding.UIs.</returns>...
4180 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 .......///.<exception.cref="Argu
41a0 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d mentNullException"><paramref.nam
41c0 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 e="action"/>.is.<c>null</c>.</ex
41e0 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d ception>..........///.<remarks>.
4200 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 74 61 .........///.This.method.will.ta
4220 6b 65 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 20 61 6e 79 20 62 69 6e 64 69 6e 67 20 6d 61 73 6b ke.into.account.any.binding.mask
4240 73 20 28 73 75 63 68 20 61 73 20 66 72 6f 6d 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 29 s.(such.as.from.control.schemes)
4260 20 69 6e 20 65 66 66 65 63 74 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 .in.effect.on.the.action........
4280 20 20 2f 2f 2f 20 28 73 75 63 68 20 61 73 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 ..///.(such.as.<see.cref="InputA
42a0 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 4d 61 73 6b 22 2f 3e 20 6f 6e 20 74 68 65 20 61 63 74 69 ction.bindingMask"/>.on.the.acti
42c0 6f 6e 20 69 74 73 65 6c 66 2c 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 on.itself,.the.<see.cref="InputA
42e0 63 74 69 6f 6e 4d 61 70 2e 62 69 6e 64 69 6e 67 4d 61 73 6b 22 2f 3e 0d 0a 20 20 20 20 20 20 20 ctionMap.bindingMask"/>.........
4300 20 2f 2f 2f 20 6f 6e 20 69 74 73 20 61 63 74 69 6f 6e 20 6d 61 70 2c 20 6f 72 20 74 68 65 20 3c .///.on.its.action.map,.or.the.<
4320 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 2e 62 69 6e 64 69 see.cref="InputActionAsset.bindi
4340 6e 67 4d 61 73 6b 22 2f 3e 20 6f 6e 20 69 74 73 20 61 73 73 65 74 29 20 61 73 20 77 65 6c 6c 20 ngMask"/>.on.its.asset).as.well.
4360 61 73 20 74 68 65 20 61 63 74 75 61 6c 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 20 20 20 20 as.the.actual.controls..........
4380 2f 2f 2f 20 74 68 61 74 20 74 68 65 20 61 63 74 69 6f 6e 20 69 73 20 63 75 72 72 65 6e 74 6c 79 ///.that.the.action.is.currently
43a0 20 62 6f 75 6e 64 20 74 6f 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 .bound.to.(see.<see.cref="InputA
43c0 63 74 69 6f 6e 2e 63 6f 6e 74 72 6f 6c 73 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ction.controls"/>)...........///
43e0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 ..........///.<example>.........
4400 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 76 61 72 20 61 63 74 .///.<code>..........///.var.act
4420 69 6f 6e 20 3d 20 6e 65 77 20 49 6e 70 75 74 41 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 ion.=.new.InputAction();........
4440 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 64 42 69 6e ..///..........///.action.AddBin
4460 64 69 6e 67 28 22 26 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 2f 62 75 74 74 6f 6e 53 6f 75 74 ding("&lt;Gamepad&gt;/buttonSout
4480 68 22 2c 20 67 72 6f 75 70 73 3a 20 22 47 61 6d 65 70 61 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 h",.groups:."Gamepad");.........
44a0 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 64 42 69 6e 64 69 6e 67 28 22 26 6c 74 3b 4d 6f 75 73 .///.action.AddBinding("&lt;Mous
44c0 65 26 67 74 3b 2f 6c 65 66 74 42 75 74 74 6f 6e 22 2c 20 67 72 6f 75 70 73 3a 20 22 4b 65 79 62 e&gt;/leftButton",.groups:."Keyb
44e0 6f 61 72 64 4d 6f 75 73 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 oardMouse");..........///.......
4500 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 69 6e 74 73 20 22 41 22 2e 0d 0a 20 20 20 20 20 20 20 20 2f ...///.//.Prints."A".........../
4520 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 //.Debug.Log(action.GetBindingDi
4540 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 73 6b 42 79 47 splayString(InputBinding.MaskByG
4560 72 6f 75 70 28 22 47 61 6d 65 70 61 64 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a roup("Gamepad"));..........///..
4580 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 69 6e 74 73 20 22 4c 4d 42 22 2e 0d 0a 20 20 ........///.//.Prints."LMB".....
45a0 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 ......///.Debug.Log(action.GetBi
45c0 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e ndingDisplayString(InputBinding.
45e0 4d 61 73 6b 42 79 47 72 6f 75 70 28 22 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 29 29 3b 0d 0a MaskByGroup("KeyboardMouse"));..
4600 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ........///.</code>..........///
4620 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 .</example>..........///.</remar
4640 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 ks>..........///.<seealso.cref="
4660 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 54 6f 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 InputBinding.ToDisplayString(Inp
4680 75 74 42 69 6e 64 69 6e 67 2e 44 69 73 70 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 2c 49 utBinding.DisplayStringOptions,I
46a0 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 nputControl)"/>..........///.<se
46c0 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 54 6f 48 ealso.cref="InputControlPath.ToH
46e0 75 6d 61 6e 52 65 61 64 61 62 6c 65 53 74 72 69 6e 67 28 73 74 72 69 6e 67 2c 49 6e 70 75 74 43 umanReadableString(string,InputC
4700 6f 6e 74 72 6f 6c 50 61 74 68 2e 48 75 6d 61 6e 52 65 61 64 61 62 6c 65 53 74 72 69 6e 67 4f 70 ontrolPath.HumanReadableStringOp
4720 74 69 6f 6e 73 2c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 tions,InputControl)"/>..........
4740 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 42 69 6e 64 69 6e 67 44 public.static.string.GetBindingD
4760 69 73 70 6c 61 79 53 74 72 69 6e 67 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 isplayString(this.InputAction.ac
4780 74 69 6f 6e 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e 64 69 6e 67 4d 61 73 6b 2c 0d tion,.InputBinding.bindingMask,.
47a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 44 69 73 70 6c 61 .............InputBinding.Displa
47c0 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 20 6f 70 74 69 6f 6e 73 20 3d 20 64 65 66 61 75 6c 74 yStringOptions.options.=.default
47e0 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 61 63 )..........{..............if.(ac
4800 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 tion.==.null)..................t
4820 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e hrow.new.ArgumentNullException(n
4840 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 ameof(action));................v
4860 61 72 20 72 65 73 75 6c 74 20 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 ar.result.=.string.Empty;.......
4880 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 2e 62 69 6e .......var.bindings.=.action.bin
48a0 64 69 6e 67 73 3b 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 3d dings;..............for.(var.i.=
48c0 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 .0;.i.<.bindings.Count;.++i)....
48e0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ..........{..................if.
4900 28 21 62 69 6e 64 69 6e 67 4d 61 73 6b 2e 4d 61 74 63 68 65 73 28 62 69 6e 64 69 6e 67 73 5b 69 (!bindingMask.Matches(bindings[i
4920 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 63 6f 6e 74 69 6e 75 ]))......................continu
4940 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 e;....................////REVIEW
4960 3a 20 73 68 6f 75 6c 64 20 74 68 69 73 20 66 69 6c 74 65 72 20 6f 75 74 20 62 69 6e 64 69 6e 67 :.should.this.filter.out.binding
4980 73 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 72 65 73 6f 6c 76 69 6e 67 20 74 6f 20 61 6e 79 20 s.that.are.not.resolving.to.any.
49a0 63 6f 6e 74 72 6f 6c 73 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 controls?....................var
49c0 20 74 65 78 74 20 3d 20 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 .text.=.action.GetBindingDisplay
49e0 53 74 72 69 6e 67 28 69 2c 20 6f 70 74 69 6f 6e 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 String(i,.options);.............
4a00 20 20 20 20 20 69 66 20 28 72 65 73 75 6c 74 20 21 3d 20 22 22 29 0d 0a 20 20 20 20 20 20 20 20 .....if.(result.!=."")..........
4a20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 24 22 7b 72 65 73 75 6c 74 7d 20 ............result.=.$"{result}.
4a40 7c 20 7b 74 65 78 74 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 |.{text}";..................else
4a60 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 20 3d 20 74 ......................result.=.t
4a80 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ext;..............}.............
4aa0 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 20 7d 0d 0a 0d 0a ...return.result;..........}....
4ac0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f ........///.<summary>........../
4ae0 2f 2f 20 52 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 73 75 69 74 61 62 6c 65 20 66 6f 72 20 //.Return.a.string.suitable.for.
4b00 64 69 73 70 6c 61 79 20 69 6e 20 55 49 73 20 74 68 61 74 20 73 68 6f 77 73 20 77 68 61 74 20 74 display.in.UIs.that.shows.what.t
4b20 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 62 6f 75 he.given.action.is.currently.bou
4b40 6e 64 20 74 6f 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 nd.to...........///.</summary>..
4b60 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 ........///.<param.name="action"
4b80 3e 41 63 74 69 6f 6e 20 74 6f 20 63 72 65 61 74 65 20 61 20 64 69 73 70 6c 61 79 20 73 74 72 69 >Action.to.create.a.display.stri
4ba0 6e 67 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 ng.for.</param>..........///.<pa
4bc0 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 3e 49 6e 64 65 78 20 6f 66 ram.name="bindingIndex">Index.of
4be0 20 74 68 65 20 62 69 6e 64 69 6e 67 20 69 6e 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 .the.binding.in.the.<see.cref="I
4c00 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 20 61 72 72 61 79 20 6f 66 0d nputAction.bindings"/>.array.of.
4c20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 .........///.<paramref.name="act
4c40 69 6f 6e 22 2f 3e 20 66 6f 72 20 77 68 69 63 68 20 74 6f 20 67 65 74 20 61 20 64 69 73 70 6c 61 ion"/>.for.which.to.get.a.displa
4c60 79 20 73 74 72 69 6e 67 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c y.string.</param>..........///.<
4c80 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6f 70 74 69 6f 6e 73 22 3e 4f 70 74 69 6f 6e 61 6c 20 73 65 param.name="options">Optional.se
4ca0 74 20 6f 66 20 66 6f 72 6d 61 74 74 69 6e 67 20 66 6c 61 67 73 2e 3c 2f 70 61 72 61 6d 3e 0d 0a t.of.formatting.flags.</param>..
4cc0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 41 20 73 74 72 69 6e 67 20 73 75 ........///.<returns>A.string.su
4ce0 69 74 61 62 6c 65 20 66 6f 72 20 64 69 73 70 6c 61 79 20 69 6e 20 72 65 62 69 6e 64 69 6e 67 20 itable.for.display.in.rebinding.
4d00 55 49 73 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 UIs.</returns>..........///.<exc
4d20 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 eption.cref="ArgumentNullExcepti
4d40 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 on"><paramref.name="action"/>.is
4d60 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 .<c>null</c>.</exception>.......
4d80 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 ...///.<remarks>..........///.Th
4da0 69 73 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 69 67 6e 6f 72 65 20 61 63 74 69 76 65 20 62 69 6e is.method.will.ignore.active.bin
4dc0 64 69 6e 67 20 6d 61 73 6b 73 20 61 6e 64 20 72 65 74 75 72 6e 20 74 68 65 20 64 69 73 70 6c 61 ding.masks.and.return.the.displa
4de0 79 20 73 74 72 69 6e 67 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 20 77 y.string.for.the.given.binding.w
4e00 68 65 74 68 65 72 20 69 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 6d 61 73 6b 65 64 hether.it..........///.is.masked
4e20 20 6f 75 74 20 28 64 69 73 61 62 6c 65 64 29 20 6f 72 20 6e 6f 74 2e 0d 0a 20 20 20 20 20 20 20 .out.(disabled).or.not..........
4e40 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 .///..........///.<example>.....
4e60 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 76 61 72 .....///.<code>..........///.var
4e80 20 61 63 74 69 6f 6e 20 3d 20 6e 65 77 20 49 6e 70 75 74 41 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 .action.=.new.InputAction();....
4ea0 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 ......///..........///.action.Ad
4ec0 64 42 69 6e 64 69 6e 67 28 22 26 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 2f 62 75 74 74 6f 6e dBinding("&lt;Gamepad&gt;/button
4ee0 53 6f 75 74 68 22 2c 20 67 72 6f 75 70 73 3a 20 22 47 61 6d 65 70 61 64 22 29 3b 0d 0a 20 20 20 South",.groups:."Gamepad");.....
4f00 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 64 42 69 6e 64 69 6e 67 28 22 26 6c 74 3b .....///.action.AddBinding("&lt;
4f20 4d 6f 75 73 65 26 67 74 3b 2f 6c 65 66 74 42 75 74 74 6f 6e 22 2c 20 67 72 6f 75 70 73 3a 20 22 Mouse&gt;/leftButton",.groups:."
4f40 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 KeyboardMouse");..........///...
4f60 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 69 6e 74 73 20 22 41 22 2e 0d 0a 20 20 20 20 20 .......///.//.Prints."A"........
4f80 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 ...///.Debug.Log(action.GetBindi
4fa0 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 30 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f ngDisplayString(0));..........//
4fc0 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 69 6e 74 73 20 22 4c 4d 42 22 2e 0d /..........///.//.Prints."LMB"..
4fe0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 61 63 74 69 6f 6e 2e 47 65 .........///.Debug.Log(action.Ge
5000 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 31 29 29 3b 0d 0a 20 20 20 20 tBindingDisplayString(1));......
5020 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 ....///.</code>..........///.</e
5040 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d xample>..........///.</remarks>.
5060 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 .........///.<seealso.cref="Inpu
5080 74 42 69 6e 64 69 6e 67 2e 54 6f 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 42 69 tBinding.ToDisplayString(InputBi
50a0 6e 64 69 6e 67 2e 44 69 73 70 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 2c 49 6e 70 75 74 nding.DisplayStringOptions,Input
50c0 43 6f 6e 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 Control)"/>..........///.<seeals
50e0 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 54 6f 48 75 6d 61 6e o.cref="InputControlPath.ToHuman
5100 52 65 61 64 61 62 6c 65 53 74 72 69 6e 67 28 73 74 72 69 6e 67 2c 49 6e 70 75 74 43 6f 6e 74 72 ReadableString(string,InputContr
5120 6f 6c 50 61 74 68 2e 48 75 6d 61 6e 52 65 61 64 61 62 6c 65 53 74 72 69 6e 67 4f 70 74 69 6f 6e olPath.HumanReadableStringOption
5140 73 2c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c s,InputControl)"/>..........publ
5160 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c ic.static.string.GetBindingDispl
5180 61 79 53 74 72 69 6e 67 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e ayString(this.InputAction.action
51a0 2c 20 69 6e 74 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 ,.int.bindingIndex,.InputBinding
51c0 2e 44 69 73 70 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 20 6f 70 74 69 6f 6e 73 20 3d 20 .DisplayStringOptions.options.=.
51e0 64 65 66 61 75 6c 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 default)..........{.............
5200 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .if.(action.==.null)............
5220 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 6c 45 78 63 65 ......throw.new.ArgumentNullExce
5240 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 ption(nameof(action));..........
5260 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 ......return.action.GetBindingDi
5280 73 70 6c 61 79 53 74 72 69 6e 67 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 2c 20 6f 75 74 20 76 61 splayString(bindingIndex,.out.va
52a0 72 20 5f 2c 20 6f 75 74 20 76 61 72 20 5f 2c 20 6f 70 74 69 6f 6e 73 29 3b 0d 0a 20 20 20 20 20 r._,.out.var._,.options);.......
52c0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 ...}............///.<summary>...
52e0 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 73 75 69 74 61 .......///.Return.a.string.suita
5300 62 6c 65 20 66 6f 72 20 64 69 73 70 6c 61 79 20 69 6e 20 55 49 73 20 74 68 61 74 20 73 68 6f 77 ble.for.display.in.UIs.that.show
5320 73 20 77 68 61 74 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 69 73 20 63 75 72 72 65 s.what.the.given.action.is.curre
5340 6e 74 6c 79 20 62 6f 75 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 ntly.bound.to...........///.</su
5360 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d mmary>..........///.<param.name=
5380 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 63 72 65 61 74 65 20 61 20 64 69 73 70 "action">Action.to.create.a.disp
53a0 6c 61 79 20 73 74 72 69 6e 67 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 lay.string.for.</param>.........
53c0 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 3e .///.<param.name="bindingIndex">
53e0 49 6e 64 65 78 20 6f 66 20 74 68 65 20 62 69 6e 64 69 6e 67 20 69 6e 20 74 68 65 20 3c 73 65 65 Index.of.the.binding.in.the.<see
5400 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 20 61 .cref="InputAction.bindings"/>.a
5420 72 72 61 79 20 6f 66 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 72 65 66 20 6e rray.of..........///.<paramref.n
5440 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 66 6f 72 20 77 68 69 63 68 20 74 6f 20 67 65 74 20 ame="action"/>.for.which.to.get.
5460 61 20 64 69 73 70 6c 61 79 20 73 74 72 69 6e 67 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 a.display.string.</param>.......
5480 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 64 65 76 69 63 65 4c 61 79 6f 75 74 ...///.<param.name="deviceLayout
54a0 4e 61 6d 65 22 3e 52 65 63 65 69 76 65 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 3c Name">Receives.the.name.of.the.<
54c0 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 22 2f 3e 20 see.cref="InputControlLayout"/>.
54e0 75 73 65 64 20 66 6f 72 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 64 65 76 69 63 65 used.for.the..........///.device
5500 20 69 6e 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 2c 20 69 66 20 61 70 70 6c 69 63 .in.the.given.binding,.if.applic
5520 61 62 6c 65 2e 20 4f 74 68 65 72 77 69 73 65 20 69 73 20 73 65 74 20 74 6f 20 3c 63 3e 6e 75 6c able..Otherwise.is.set.to.<c>nul
5540 6c 3c 2f 63 3e 2e 20 49 66 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 74 68 65 20 62 69 6e 64 l</c>..If,.for.example,.the.bind
5560 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 3c 63 3e 22 26 6c 74 3b 47 61 6d 65 ing..........///.is.<c>"&lt;Game
5580 70 61 64 26 67 74 3b 2f 62 75 74 74 6f 6e 53 6f 75 74 68 22 3c 2f 63 3e 2c 20 74 68 65 20 72 65 pad&gt;/buttonSouth"</c>,.the.re
55a0 73 75 6c 74 69 6e 67 20 76 61 6c 75 65 20 69 73 20 3c 63 3e 22 47 61 6d 65 70 61 64 3c 2f 63 3e sulting.value.is.<c>"Gamepad</c>
55c0 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 .</param>..........///.<param.na
55e0 6d 65 3d 22 63 6f 6e 74 72 6f 6c 50 61 74 68 22 3e 52 65 63 65 69 76 65 73 20 74 68 65 20 70 61 me="controlPath">Receives.the.pa
5600 74 68 20 74 6f 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 20 th.to.the.control.on.the.device.
5620 72 65 66 65 72 65 6e 63 65 64 20 69 6e 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 2c referenced.in.the.given.binding,
5640 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 66 20 61 70 70 6c 69 63 61 62 6c 65 2e 20 4f 74 68 ..........///.if.applicable..Oth
5660 65 72 77 69 73 65 20 69 73 20 73 65 74 20 74 6f 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 20 49 66 erwise.is.set.to.<c>null</c>..If
5680 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 74 68 65 20 62 69 6e 64 69 6e 67 20 69 73 20 3c 63 ,.for.example,.the.binding.is.<c
56a0 3e 22 26 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 2f 6c 65 66 74 53 74 69 63 6b 2f 78 22 3c 2f >"&lt;Gamepad&gt;/leftStick/x"</
56c0 63 3e 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 72 65 73 75 6c 74 69 6e 67 20 76 c>,..........///.the.resulting.v
56e0 61 6c 75 65 20 69 73 20 3c 63 3e 22 6c 65 66 74 53 74 69 63 6b 2f 78 22 3c 2f 63 3e 2e 3c 2f 70 alue.is.<c>"leftStick/x"</c>.</p
5700 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 aram>..........///.<param.name="
5720 6f 70 74 69 6f 6e 73 22 3e 4f 70 74 69 6f 6e 61 6c 20 73 65 74 20 6f 66 20 66 6f 72 6d 61 74 74 options">Optional.set.of.formatt
5740 69 6e 67 20 66 6c 61 67 73 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ing.flags.</param>..........///.
5760 3c 72 65 74 75 72 6e 73 3e 41 20 73 74 72 69 6e 67 20 73 75 69 74 61 62 6c 65 20 66 6f 72 20 64 <returns>A.string.suitable.for.d
5780 69 73 70 6c 61 79 20 69 6e 20 72 65 62 69 6e 64 69 6e 67 20 55 49 73 2e 3c 2f 72 65 74 75 72 6e isplay.in.rebinding.UIs.</return
57a0 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d s>..........///.<exception.cref=
57c0 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 "ArgumentNullException"><paramre
57e0 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e f.name="action"/>.is.<c>null</c>
5800 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 .</exception>..........///.<rema
5820 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f rks>..........///.The.informatio
5840 6e 20 72 65 74 75 72 6e 65 64 20 62 79 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 64 65 n.returned.by.<paramref.name="de
5860 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 22 2f 3e 20 61 6e 64 20 3c 70 61 72 61 6d 72 65 66 20 viceLayoutName"/>.and.<paramref.
5880 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 50 61 74 68 22 2f 3e 20 63 61 6e 20 62 65 20 75 73 65 64 name="controlPath"/>.can.be.used
58a0 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 61 ,.for.example,..........///.to.a
58c0 73 73 6f 63 69 61 74 65 20 69 6d 61 67 65 73 20 77 69 74 68 20 63 6f 6e 74 72 6f 6c 73 2e 20 42 ssociate.images.with.controls..B
58e0 61 73 65 64 20 6f 6e 20 6b 6e 6f 77 69 6e 67 20 77 68 69 63 68 20 6c 61 79 6f 75 74 20 69 73 20 ased.on.knowing.which.layout.is.
5900 75 73 65 64 20 61 6e 64 20 77 68 69 63 68 20 63 6f 6e 74 72 6f 6c 20 6f 6e 20 74 68 65 20 6c 61 used.and.which.control.on.the.la
5920 79 6f 75 74 20 69 73 20 72 65 66 65 72 65 6e 63 65 64 2c 20 79 6f 75 0d 0a 20 20 20 20 20 20 20 yout.is.referenced,.you.........
5940 20 2f 2f 2f 20 63 61 6e 20 6c 6f 6f 6b 20 75 70 20 61 6e 20 69 6d 61 67 65 20 64 79 6e 61 6d 69 .///.can.look.up.an.image.dynami
5960 63 61 6c 6c 79 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 74 68 65 20 6c 61 79 6f 75 cally..For.example,.if.the.layou
5980 74 20 69 73 20 62 61 73 65 64 20 6f 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 44 75 61 6c 53 68 6f t.is.based.on.<see.cref="DualSho
59a0 63 6b 2e 44 75 61 6c 53 68 6f 63 6b 47 61 6d 65 70 61 64 22 2f 3e 20 28 75 73 65 0d 0a 20 20 20 ck.DualShockGamepad"/>.(use.....
59c0 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d 2e .....///.<see.cref="InputSystem.
59e0 49 73 46 69 72 73 74 4c 61 79 6f 75 74 42 61 73 65 64 4f 6e 53 65 63 6f 6e 64 22 2f 3e 20 74 6f IsFirstLayoutBasedOnSecond"/>.to
5a00 20 64 65 74 65 72 6d 69 6e 65 20 69 6e 68 65 72 69 74 61 6e 63 65 29 2c 20 79 6f 75 20 63 61 6e .determine.inheritance),.you.can
5a20 20 70 69 63 6b 20 61 20 50 6c 61 79 53 74 61 74 69 6f 6e 2d 73 70 65 63 69 66 69 63 20 69 6d 61 .pick.a.PlayStation-specific.ima
5a40 67 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f 72 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 ge..........///.for.the.control.
5a60 61 73 20 6e 61 6d 65 64 20 62 79 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 63 6f 6e 74 as.named.by.<paramref.name="cont
5a80 72 6f 6c 50 61 74 68 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 rolPath"/>...........///........
5aa0 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f ..///.<example>..........///.<co
5ac0 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 76 61 72 20 61 63 74 69 6f 6e 20 3d 20 6e 65 de>..........///.var.action.=.ne
5ae0 77 20 49 6e 70 75 74 41 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 w.InputAction();..........///...
5b00 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 64 64 42 69 6e 64 69 6e 67 28 22 26 6c .......///.action.AddBinding("&l
5b20 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 2f 64 70 61 64 2f 75 70 22 2c 20 67 72 6f 75 70 73 3a 20 t;Gamepad&gt;/dpad/up",.groups:.
5b40 22 47 61 6d 65 70 61 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e "Gamepad");..........///.action.
5b60 41 64 64 42 69 6e 64 69 6e 67 28 22 26 6c 74 3b 4d 6f 75 73 65 26 67 74 3b 2f 6c 65 66 74 42 75 AddBinding("&lt;Mouse&gt;/leftBu
5b80 74 74 6f 6e 22 2c 20 67 72 6f 75 70 73 3a 20 22 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 29 3b tton",.groups:."KeyboardMouse");
5ba0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 50 72 ..........///..........///.//.Pr
5bc0 69 6e 74 73 20 22 41 22 2c 20 74 68 65 6e 20 22 47 61 6d 65 70 61 64 22 2c 20 74 68 65 6e 20 22 ints."A",.then."Gamepad",.then."
5be0 64 70 61 64 2f 75 70 22 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 dpad/up"...........///.Debug.Log
5c00 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 (action.GetBindingDisplayString(
5c20 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 73 6b 42 79 47 72 6f 75 70 28 22 47 61 6d 65 70 61 InputBinding.MaskByGroup("Gamepa
5c40 64 22 2c 20 6f 75 74 20 76 61 72 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 41 2c 20 6f d",.out.var.deviceLayoutNameA,.o
5c60 75 74 20 76 61 72 20 63 6f 6e 74 72 6f 6c 50 61 74 68 41 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 ut.var.controlPathA));..........
5c80 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 41 29 ///.Debug.Log(deviceLayoutNameA)
5ca0 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 63 6f 6e 74 72 6f 6c ;..........///.Debug.Log(control
5cc0 50 61 74 68 41 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f PathA);..........///..........//
5ce0 2f 20 2f 2f 20 50 72 69 6e 74 73 20 22 4c 4d 42 22 2c 20 74 68 65 6e 20 22 4d 6f 75 73 65 22 2c /.//.Prints."LMB",.then."Mouse",
5d00 20 74 68 65 6e 20 22 6c 65 66 74 42 75 74 74 6f 6e 22 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f .then."leftButton"...........///
5d20 20 44 65 62 75 67 2e 4c 6f 67 28 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 .Debug.Log(action.GetBindingDisp
5d40 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 73 6b 42 79 47 72 6f layString(InputBinding.MaskByGro
5d60 75 70 28 22 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 2c 20 6f 75 74 20 76 61 72 20 64 65 76 69 up("KeyboardMouse",.out.var.devi
5d80 63 65 4c 61 79 6f 75 74 4e 61 6d 65 42 2c 20 6f 75 74 20 76 61 72 20 63 6f 6e 74 72 6f 6c 50 61 ceLayoutNameB,.out.var.controlPa
5da0 74 68 42 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 2e 4c 6f 67 28 64 65 thB));..........///.Debug.Log(de
5dc0 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 42 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 viceLayoutNameB);..........///.D
5de0 65 62 75 67 2e 4c 6f 67 28 63 6f 6e 74 72 6f 6c 50 61 74 68 42 29 3b 0d 0a 20 20 20 20 20 20 20 ebug.Log(controlPathB);.........
5e00 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d .///.</code>..........///.</exam
5e20 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 ple>..........///.</remarks>....
5e40 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 ......///.<seealso.cref="InputBi
5e60 6e 64 69 6e 67 2e 54 6f 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 49 6e 70 75 74 42 69 6e 64 69 nding.ToDisplayString(InputBindi
5e80 6e 67 2e 44 69 73 70 6c 61 79 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 2c 49 6e 70 75 74 43 6f 6e ng.DisplayStringOptions,InputCon
5ea0 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 trol)"/>..........///.<seealso.c
5ec0 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 54 6f 48 75 6d 61 6e 52 65 61 ref="InputControlPath.ToHumanRea
5ee0 64 61 62 6c 65 53 74 72 69 6e 67 28 73 74 72 69 6e 67 2c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 dableString(string,InputControlP
5f00 61 74 68 2e 48 75 6d 61 6e 52 65 61 64 61 62 6c 65 53 74 72 69 6e 67 4f 70 74 69 6f 6e 73 2c 49 ath.HumanReadableStringOptions,I
5f20 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 nputControl)"/>..........public.
5f40 73 74 61 74 69 63 20 75 6e 73 61 66 65 20 73 74 72 69 6e 67 20 47 65 74 42 69 6e 64 69 6e 67 44 static.unsafe.string.GetBindingD
5f60 69 73 70 6c 61 79 53 74 72 69 6e 67 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 isplayString(this.InputAction.ac
5f80 74 69 6f 6e 2c 20 69 6e 74 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 2c 0d 0a 20 20 20 20 20 20 20 tion,.int.bindingIndex,.........
5fa0 20 20 20 20 20 6f 75 74 20 73 74 72 69 6e 67 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 .....out.string.deviceLayoutName
5fc0 2c 20 6f 75 74 20 73 74 72 69 6e 67 20 63 6f 6e 74 72 6f 6c 50 61 74 68 2c 0d 0a 20 20 20 20 20 ,.out.string.controlPath,.......
5fe0 20 20 20 20 20 20 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 44 69 73 70 6c 61 79 53 74 72 69 6e .......InputBinding.DisplayStrin
6000 67 4f 70 74 69 6f 6e 73 20 6f 70 74 69 6f 6e 73 20 3d 20 64 65 66 61 75 6c 74 29 0d 0a 20 20 20 gOptions.options.=.default).....
6020 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d .....{..............if.(action.=
6040 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 6e =.null)..................throw.n
6060 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 ew.ArgumentNullException(nameof(
6080 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 4c action));................deviceL
60a0 61 79 6f 75 74 4e 61 6d 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 ayoutName.=.null;..............c
60c0 6f 6e 74 72 6f 6c 50 61 74 68 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ontrolPath.=.null;..............
60e0 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 ..var.bindings.=.action.bindings
6100 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 20 ;..............var.bindingCount.
6120 3d 20 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 =.bindings.Count;..............i
6140 66 20 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3c 20 30 20 7c 7c 20 62 69 6e 64 69 6e 67 49 6e f.(bindingIndex.<.0.||.bindingIn
6160 64 65 78 20 3e 3d 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 dex.>=.bindingCount)............
6180 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4f 75 74 4f 66 52 61 6e ......throw.new.ArgumentOutOfRan
61a0 67 65 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 geException(....................
61c0 20 20 24 22 42 69 6e 64 69 6e 67 20 69 6e 64 65 78 20 7b 62 69 6e 64 69 6e 67 49 6e 64 65 78 7d ..$"Binding.index.{bindingIndex}
61e0 20 69 73 20 6f 75 74 20 6f 66 20 72 61 6e 67 65 20 6f 6e 20 61 63 74 69 6f 6e 20 27 7b 61 63 74 .is.out.of.range.on.action.'{act
6200 69 6f 6e 7d 27 20 77 69 74 68 20 7b 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 7d 20 62 69 6e 64 ion}'.with.{bindings.Count}.bind
6220 69 6e 67 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 ings",......................name
6240 6f 66 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 of(bindingIndex));..............
6260 20 20 2f 2f 20 49 66 20 74 68 65 20 62 69 6e 64 69 6e 67 20 69 73 20 61 20 63 6f 6d 70 6f 73 69 ..//.If.the.binding.is.a.composi
6280 74 65 2c 20 63 6f 6d 70 6f 73 65 20 61 20 73 74 72 69 6e 67 20 75 73 69 6e 67 20 74 68 65 20 64 te,.compose.a.string.using.the.d
62a0 69 73 70 6c 61 79 20 66 6f 72 6d 61 74 20 73 74 72 69 6e 67 20 66 6f 72 0d 0a 20 20 20 20 20 20 isplay.format.string.for........
62c0 20 20 20 20 20 20 2f 2f 20 74 68 65 20 63 6f 6d 70 6f 73 69 74 65 2e 0d 0a 20 20 20 20 20 20 20 ......//.the.composite..........
62e0 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 49 6e 20 74 68 69 73 20 63 61 73 65 2c 20 74 68 65 72 .....//.NOTE:.In.this.case,.ther
6300 65 20 77 6f 6e 27 74 20 62 65 20 61 20 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 20 72 65 e.won't.be.a.deviceLayoutName.re
6320 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 turned.from.the.method..........
6340 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 2e .....if.(bindings[bindingIndex].
6360 69 73 43 6f 6d 70 6f 73 69 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 isComposite)..............{.....
6380 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 20 3d .............var.compositeName.=
63a0 20 4e 61 6d 65 41 6e 64 50 61 72 61 6d 65 74 65 72 73 2e 50 61 72 73 65 28 62 69 6e 64 69 6e 67 .NameAndParameters.Parse(binding
63c0 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 2e 65 66 66 65 63 74 69 76 65 50 61 74 68 29 2e 6e s[bindingIndex].effectivePath).n
63e0 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 ame;....................//.Deter
6400 6d 69 6e 65 20 77 68 61 74 20 70 61 72 74 73 20 77 65 20 68 61 76 65 2e 0d 0a 20 20 20 20 20 20 mine.what.parts.we.have.........
6420 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 69 72 73 74 50 61 72 74 49 6e 64 65 78 20 3d 20 62 ..........var.firstPartIndex.=.b
6440 69 6e 64 69 6e 67 49 6e 64 65 78 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 indingIndex.+.1;................
6460 20 20 76 61 72 20 6c 61 73 74 50 61 72 74 49 6e 64 65 78 20 3d 20 66 69 72 73 74 50 61 72 74 49 ..var.lastPartIndex.=.firstPartI
6480 6e 64 65 78 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 6c 61 ndex;..................while.(la
64a0 73 74 50 61 72 74 49 6e 64 65 78 20 3c 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 20 26 26 20 62 69 stPartIndex.<.bindingCount.&&.bi
64c0 6e 64 69 6e 67 73 5b 6c 61 73 74 50 61 72 74 49 6e 64 65 78 5d 2e 69 73 50 61 72 74 4f 66 43 6f ndings[lastPartIndex].isPartOfCo
64e0 6d 70 6f 73 69 74 65 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 mposite)......................++
6500 6c 61 73 74 50 61 72 74 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lastPartIndex;..................
6520 76 61 72 20 70 61 72 74 43 6f 75 6e 74 20 3d 20 6c 61 73 74 50 61 72 74 49 6e 64 65 78 20 2d 20 var.partCount.=.lastPartIndex.-.
6540 66 69 72 73 74 50 61 72 74 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 firstPartIndex;.................
6560 20 20 20 2f 2f 20 47 65 74 20 74 68 65 20 64 69 73 70 6c 61 79 20 73 74 72 69 6e 67 20 66 6f 72 ...//.Get.the.display.string.for
6580 20 65 61 63 68 20 70 61 72 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 .each.part...................var
65a0 20 70 61 72 74 53 74 72 69 6e 67 73 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 70 61 72 74 43 6f .partStrings.=.new.string[partCo
65c0 75 6e 74 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 unt];..................for.(var.
65e0 69 20 3d 20 30 3b 20 69 20 3c 20 70 61 72 74 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 i.=.0;.i.<.partCount;.++i)......
6600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 74 53 74 72 69 6e 67 73 5b 69 5d 20 3d ................partStrings[i].=
6620 20 61 63 74 69 6f 6e 2e 47 65 74 42 69 6e 64 69 6e 67 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 .action.GetBindingDisplayString(
6640 66 69 72 73 74 50 61 72 74 49 6e 64 65 78 20 2b 20 69 2c 20 6f 70 74 69 6f 6e 73 29 3b 0d 0a 0d firstPartIndex.+.i,.options);...
6660 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 75 74 20 74 68 65 20 70 61 72 74 .................//.Put.the.part
6680 73 20 74 6f 67 65 74 68 65 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 64 69 73 70 6c 61 79 20 s.together.based.on.the.display.
66a0 66 6f 72 6d 61 74 20 73 74 72 69 6e 67 20 66 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 format.string.for...............
66c0 20 20 20 2f 2f 20 74 68 65 20 63 6f 6d 70 6f 73 69 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 ...//.the.composite.............
66e0 20 20 20 20 20 20 76 61 72 20 64 69 73 70 6c 61 79 46 6f 72 6d 61 74 53 74 72 69 6e 67 20 3d 20 ......var.displayFormatString.=.
6700 49 6e 70 75 74 42 69 6e 64 69 6e 67 43 6f 6d 70 6f 73 69 74 65 2e 47 65 74 44 69 73 70 6c 61 79 InputBindingComposite.GetDisplay
6720 46 6f 72 6d 61 74 53 74 72 69 6e 67 28 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 29 3b 0d 0a 20 20 FormatString(compositeName);....
6740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f ..............if.(string.IsNullO
6760 72 45 6d 70 74 79 28 64 69 73 70 6c 61 79 46 6f 72 6d 61 74 53 74 72 69 6e 67 29 29 0d 0a 20 20 rEmpty(displayFormatString))....
6780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
67a0 20 20 20 20 20 2f 2f 20 4e 6f 20 64 69 73 70 6c 61 79 20 66 6f 72 6d 61 74 20 73 74 72 69 6e 67 .....//.No.display.format.string
67c0 2e 20 53 69 6d 70 6c 79 20 67 6f 20 61 6e 64 20 63 6f 6d 62 69 6e 65 20 61 6c 6c 20 70 61 72 74 ..Simply.go.and.combine.all.part
67e0 20 73 74 72 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 .strings.......................r
6800 65 74 75 72 6e 20 53 74 72 69 6e 67 48 65 6c 70 65 72 73 2e 4a 6f 69 6e 28 22 2f 22 2c 20 70 61 eturn.StringHelpers.Join("/",.pa
6820 72 74 53 74 72 69 6e 67 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a rtStrings);..................}..
6840 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 53 74 72 69 6e 67 48 ..................return.StringH
6860 65 6c 70 65 72 73 2e 45 78 70 61 6e 64 54 65 6d 70 6c 61 74 65 53 74 72 69 6e 67 28 64 69 73 70 elpers.ExpandTemplateString(disp
6880 6c 61 79 46 6f 72 6d 61 74 53 74 72 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layFormatString,................
68a0 20 20 20 20 20 20 66 72 61 67 6d 65 6e 74 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ......fragment.=>...............
68c0 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 20 .......{........................
68e0 20 20 76 61 72 20 72 65 73 75 6c 74 20 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 0d 0a ..var.result.=.string.Empty;....
6900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 6f 20 74 68 ........................//.Go.th
6920 72 6f 75 67 68 20 61 6c 6c 20 70 61 72 74 73 20 61 6e 64 20 6c 6f 6f 6b 20 66 6f 72 20 6f 6e 65 rough.all.parts.and.look.for.one
6940 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 .with.the.given.name............
6960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 ...............for.(var.i.=.0;.i
6980 20 3c 20 70 61 72 74 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .<.partCount;.++i)..............
69a0 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 ............{...................
69c0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 45 71 75 61 6c 73 28 62 69 ...........if.(!string.Equals(bi
69e0 6e 64 69 6e 67 73 5b 66 69 72 73 74 50 61 72 74 49 6e 64 65 78 20 2b 20 69 5d 2e 6e 61 6d 65 2c ndings[firstPartIndex.+.i].name,
6a00 20 66 72 61 67 6d 65 6e 74 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 .fragment,.StringComparison.Inva
6a20 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))........
6a40 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 63 6f 6e 74 69 6e ..........................contin
6a60 75 65 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 ue;.............................
6a80 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 72 65 73 ...if.(!string.IsNullOrEmpty(res
6aa0 75 6c 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ult))...........................
6ac0 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 24 22 7b 72 65 73 75 6c 74 7d 7c 7b 70 61 72 74 .......result.=.$"{result}|{part
6ae0 53 74 72 69 6e 67 73 5b 69 5d 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Strings[i]}";...................
6b00 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........else.................
6b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 70 61 72 74 53 74 .................result.=.partSt
6b40 72 69 6e 67 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rings[i];.......................
6b60 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 20 ...}............................
6b80 72 65 74 75 72 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 return.result;..................
6ba0 20 20 20 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ....});..............}..........
6bc0 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 74 68 65 20 62 69 6e 64 69 6e 67 20 6d 61 70 73 ......//.See.if.the.binding.maps
6be0 20 74 6f 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 .to.controls...............Input
6c00 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 Control.control.=.null;.........
6c20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 2e 47 65 74 4f .....var.actionMap.=.action.GetO
6c40 72 43 72 65 61 74 65 41 63 74 69 6f 6e 4d 61 70 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rCreateActionMap();.............
6c60 20 61 63 74 69 6f 6e 4d 61 70 2e 52 65 73 6f 6c 76 65 42 69 6e 64 69 6e 67 73 49 66 4e 65 63 65 .actionMap.ResolveBindingsIfNece
6c80 73 73 61 72 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e ssary();..............var.action
6ca0 53 74 61 74 65 20 3d 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 53 74 61 74 65 3b 0d 0a 20 20 20 20 State.=.actionMap.m_State;......
6cc0 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 61 63 74 69 6f 6e 53 74 61 74 65 ........Debug.Assert(actionState
6ce0 20 21 3d 20 6e 75 6c 6c 2c 20 22 45 78 70 65 63 74 69 6e 67 20 61 63 74 69 6f 6e 20 73 74 61 74 .!=.null,."Expecting.action.stat
6d00 65 20 74 6f 20 62 65 20 69 6e 20 70 6c 61 63 65 20 61 74 20 74 68 69 73 20 70 6f 69 6e 74 22 29 e.to.be.in.place.at.this.point")
6d20 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 49 ;..............var.bindingIndexI
6d40 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 2e 42 69 6e 64 69 6e 67 49 6e 64 65 78 4f 6e 41 63 74 69 nMap.=.action.BindingIndexOnActi
6d60 6f 6e 54 6f 42 69 6e 64 69 6e 67 49 6e 64 65 78 4f 6e 4d 61 70 28 62 69 6e 64 69 6e 67 49 6e 64 onToBindingIndexOnMap(bindingInd
6d80 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 49 6e 64 ex);..............var.bindingInd
6da0 65 78 49 6e 53 74 61 74 65 20 3d 20 61 63 74 69 6f 6e 53 74 61 74 65 2e 47 65 74 42 69 6e 64 69 exInState.=.actionState.GetBindi
6dc0 6e 67 49 6e 64 65 78 49 6e 53 74 61 74 65 28 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 4d 61 70 49 6e ngIndexInState(actionMap.m_MapIn
6de0 64 65 78 49 6e 53 74 61 74 65 2c 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 49 6e 4d 61 70 29 3b 0d dexInState,.bindingIndexInMap);.
6e00 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 62 69 6e 64 69 6e .............Debug.Assert(bindin
6e20 67 49 6e 64 65 78 49 6e 53 74 61 74 65 20 3e 3d 20 30 20 26 26 20 62 69 6e 64 69 6e 67 49 6e 64 gIndexInState.>=.0.&&.bindingInd
6e40 65 78 49 6e 53 74 61 74 65 20 3c 20 61 63 74 69 6f 6e 53 74 61 74 65 2e 74 6f 74 61 6c 42 69 6e exInState.<.actionState.totalBin
6e60 64 69 6e 67 43 6f 75 6e 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 43 6f 6d dingCount,.................."Com
6e80 70 75 74 65 64 20 62 69 6e 64 69 6e 67 20 69 6e 64 65 78 20 69 73 20 6f 75 74 20 6f 66 20 72 61 puted.binding.index.is.out.of.ra
6ea0 6e 67 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 53 nge");..............var.bindingS
6ec0 74 61 74 65 50 74 72 20 3d 20 26 61 63 74 69 6f 6e 53 74 61 74 65 2e 62 69 6e 64 69 6e 67 53 74 tatePtr.=.&actionState.bindingSt
6ee0 61 74 65 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 49 6e 53 74 61 74 65 5d 3b 0d 0a 20 20 20 20 ates[bindingIndexInState];......
6f00 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 53 74 61 74 65 50 74 72 2d 3e 63 6f 6e ........if.(bindingStatePtr->con
6f20 74 72 6f 6c 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 trolCount.>.0)..............{...
6f40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 64 6f 65 73 20 ...............////REVIEW:.does.
6f60 69 74 20 6d 61 6b 65 20 73 65 6e 73 65 20 74 6f 20 6a 75 73 74 20 74 61 6b 65 20 61 20 73 69 6e it.make.sense.to.just.take.a.sin
6f80 67 6c 65 20 63 6f 6e 74 72 6f 6c 20 68 65 72 65 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 gle.control.here?...............
6fa0 20 20 20 63 6f 6e 74 72 6f 6c 20 3d 20 61 63 74 69 6f 6e 53 74 61 74 65 2e 63 6f 6e 74 72 6f 6c ...control.=.actionState.control
6fc0 73 5b 62 69 6e 64 69 6e 67 53 74 61 74 65 50 74 72 2d 3e 63 6f 6e 74 72 6f 6c 53 74 61 72 74 49 s[bindingStatePtr->controlStartI
6fe0 6e 64 65 78 5d 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 ndex];..............}...........
7000 20 20 20 20 20 2f 2f 20 54 61 6b 65 20 69 6e 74 65 72 61 63 74 69 6f 6e 73 20 61 70 70 6c 69 65 .....//.Take.interactions.applie
7020 64 20 74 6f 20 74 68 65 20 61 63 74 69 6f 6e 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 2e 0d 0a 20 d.to.the.action.into.account....
7040 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 20 3d 20 62 69 6e 64 69 6e 67 ...........var.binding.=.binding
7060 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 s[bindingIndex];..............if
7080 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 62 69 6e 64 69 6e 67 2e 65 .(string.IsNullOrEmpty(binding.e
70a0 66 66 65 63 74 69 76 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 29 29 0d 0a 20 20 20 20 20 20 20 20 ffectiveInteractions))..........
70c0 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 ........binding.overrideInteract
70e0 69 6f 6e 73 20 3d 20 61 63 74 69 6f 6e 2e 69 6e 74 65 72 61 63 74 69 6f 6e 73 3b 0d 0a 20 20 20 ions.=.action.interactions;.....
7100 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c .........else.if.(!string.IsNull
7120 4f 72 45 6d 70 74 79 28 61 63 74 69 6f 6e 2e 69 6e 74 65 72 61 63 74 69 6f 6e 73 29 29 0d 0a 20 OrEmpty(action.interactions))...
7140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 49 ...............binding.overrideI
7160 6e 74 65 72 61 63 74 69 6f 6e 73 20 3d 20 24 22 7b 62 69 6e 64 69 6e 67 2e 65 66 66 65 63 74 69 nteractions.=.$"{binding.effecti
7180 76 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 7d 3b 61 63 74 69 6f 6e 2e 69 6e 74 65 72 61 63 74 69 veInteractions};action.interacti
71a0 6f 6e 73 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 69 6e 64 ons";................return.bind
71c0 69 6e 67 2e 54 6f 44 69 73 70 6c 61 79 53 74 72 69 6e 67 28 6f 75 74 20 64 65 76 69 63 65 4c 61 ing.ToDisplayString(out.deviceLa
71e0 79 6f 75 74 4e 61 6d 65 2c 20 6f 75 74 20 63 6f 6e 74 72 6f 6c 50 61 74 68 2c 20 6f 70 74 69 6f youtName,.out.controlPath,.optio
7200 6e 73 2c 20 63 6f 6e 74 72 6f 6c 3a 20 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 ns,.control:.control);..........
7220 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 }............///.<summary>......
7240 20 20 20 20 2f 2f 2f 20 50 75 74 20 61 6e 20 6f 76 65 72 72 69 64 65 20 6f 6e 20 61 6c 6c 20 6d ....///.Put.an.override.on.all.m
7260 61 74 63 68 69 6e 67 20 62 69 6e 64 69 6e 67 73 20 6f 66 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 atching.bindings.of.<paramref.na
7280 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 me="action"/>...........///.</su
72a0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d mmary>..........///.<param.name=
72c0 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 61 70 70 6c 79 20 74 68 65 20 6f 76 65 "action">Action.to.apply.the.ove
72e0 72 72 69 64 65 20 74 6f 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c rride.to.</param>..........///.<
7300 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6e 65 77 50 61 74 68 22 3e 4e 65 77 20 62 69 6e 64 69 6e 67 param.name="newPath">New.binding
7320 20 70 61 74 68 20 74 6f 20 74 61 6b 65 20 65 66 66 65 63 74 2e 20 53 75 70 70 6c 79 20 61 6e 20 .path.to.take.effect..Supply.an.
7340 65 6d 70 74 79 20 73 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 64 69 73 empty.string..........///.to.dis
7360 61 62 6c 65 20 74 68 65 20 62 69 6e 64 69 6e 67 28 73 29 2e 20 53 65 65 20 3c 73 65 65 20 63 72 able.the.binding(s)..See.<see.cr
7380 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 22 2f 3e 20 66 6f 72 20 64 65 74 61 ef="InputControlPath"/>.for.deta
73a0 69 6c 73 20 6f 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 70 61 74 68 20 6c 61 6e ils.on..........///.the.path.lan
73c0 67 75 61 67 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 guage.</param>..........///.<par
73e0 61 6d 20 6e 61 6d 65 3d 22 67 72 6f 75 70 22 3e 4f 70 74 69 6f 6e 61 6c 20 6c 69 73 74 20 6f 66 am.name="group">Optional.list.of
7400 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 73 20 74 6f 20 74 61 72 67 65 74 20 74 68 65 20 6f 76 .binding.groups.to.target.the.ov
7420 65 72 72 69 64 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 2e 20 46 6f 72 20 65 78 61 6d erride..........///.to..For.exam
7440 70 6c 65 2c 20 3c 63 3e 22 4b 65 79 62 6f 61 72 64 3b 47 61 6d 65 70 61 64 22 3c 2f 63 3e 20 77 ple,.<c>"Keyboard;Gamepad"</c>.w
7460 69 6c 6c 20 6f 6e 6c 79 20 61 70 70 6c 79 20 6f 76 65 72 72 69 64 65 73 20 74 6f 20 62 69 6e 64 ill.only.apply.overrides.to.bind
7480 69 6e 67 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 65 69 74 68 65 72 20 68 61 ings..........///.that.either.ha
74a0 76 65 20 74 68 65 20 3c 63 3e 22 4b 65 79 62 6f 61 72 64 22 3c 2f 63 3e 20 6f 72 20 74 68 65 20 ve.the.<c>"Keyboard"</c>.or.the.
74c0 3c 63 3e 22 47 61 6d 65 70 61 64 22 3c 2f 63 3e 20 62 69 6e 64 69 6e 67 20 67 72 6f 75 70 0d 0a <c>"Gamepad"</c>.binding.group..
74e0 20 20 20 20 20 20 20 20 2f 2f 2f 20 6c 69 73 74 65 64 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d ........///.listed.in.<see.cref=
7500 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 67 72 6f 75 70 73 22 2f 3e 2e 3c 2f 70 61 72 61 6d 3e "InputBinding.groups"/>.</param>
7520 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 61 74 68 22 ..........///.<param.name="path"
7540 3e 4f 6e 6c 79 20 6f 76 65 72 72 69 64 65 20 62 69 6e 64 69 6e 67 73 20 74 68 61 74 20 68 61 76 >Only.override.bindings.that.hav
7560 65 20 74 68 69 73 20 65 78 61 63 74 20 70 61 74 68 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 e.this.exact.path.</param>......
7580 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e ....///.<exception.cref="Argumen
75a0 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 tNullException"><paramref.name="
75c0 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 action"/>.is.<c>null</c>.</excep
75e0 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 tion>..........///.<remarks>....
7600 20 20 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 69 6e 67 20 74 68 69 73 20 6d 65 74 68 6f 64 20 69 73 ......///.Calling.this.method.is
7620 20 65 71 75 69 76 61 6c 65 6e 74 20 74 6f 20 63 61 6c 6c 69 6e 67 20 3c 73 65 65 20 63 72 65 66 .equivalent.to.calling.<see.cref
7640 3d 22 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 74 41 63 74 69 ="ApplyBindingOverride(InputActi
7660 6f 6e 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f on,InputBinding)"/>..........///
7680 20 77 69 74 68 20 74 68 65 20 70 72 6f 70 65 72 74 69 65 73 20 6f 66 20 74 68 65 20 67 69 76 65 .with.the.properties.of.the.give
76a0 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 22 2f 3e 20 69 6e 69 n.<see.cref="InputBinding"/>.ini
76c0 74 69 61 6c 69 7a 65 64 20 61 63 63 6f 72 64 69 6e 67 6c 79 2e 0d 0a 20 20 20 20 20 20 20 20 2f tialized.accordingly.........../
76e0 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 //..........///.<example>.......
7700 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 4f 76 ...///.<code>..........///.//.Ov
7720 65 72 72 69 64 65 20 74 68 65 20 62 69 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 67 61 6d 65 70 61 erride.the.binding.to.the.gamepa
7740 64 20 41 20 62 75 74 74 6f 6e 20 77 69 74 68 20 61 20 62 69 6e 64 69 6e 67 20 74 6f 0d 0a 20 20 d.A.button.with.a.binding.to....
7760 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 74 68 65 20 59 20 62 75 74 74 6f 6e 2e 0d 0a 20 20 20 20 ......///.//.the.Y.button.......
7780 20 20 20 20 2f 2f 2f 20 66 69 72 65 41 63 74 69 6f 6e 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f ....///.fireAction.ApplyBindingO
77a0 76 65 72 72 69 64 65 28 22 26 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 2f 62 75 74 74 6f 6e 4e verride("&lt;Gamepad&gt;/buttonN
77c0 6f 72 74 68 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 61 74 68 3a 20 22 26 orth",..........///.....path:."&
77e0 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 2f 62 75 74 74 6f 6e 53 6f 75 74 68 29 3b 0d 0a 20 20 lt;Gamepad&gt;/buttonSouth);....
7800 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ......///.</code>..........///.<
7820 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 /example>..........///.</remarks
7840 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 41 70 >..........///.<seealso.cref="Ap
7860 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 74 41 63 74 69 6f 6e 2c 49 plyBindingOverride(InputAction,I
7880 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 nputBinding)"/>..........///.<se
78a0 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 65 66 66 65 63 74 69 ealso.cref="InputBinding.effecti
78c0 76 65 50 61 74 68 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 vePath"/>..........///.<seealso.
78e0 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 61 74 68 22 cref="InputBinding.overridePath"
7900 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 />..........///.<seealso.cref="I
7920 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 nputBinding.Matches"/>..........
7940 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f public.static.void.ApplyBindingO
7960 76 65 72 72 69 64 65 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c verride(this.InputAction.action,
7980 20 73 74 72 69 6e 67 20 6e 65 77 50 61 74 68 2c 20 73 74 72 69 6e 67 20 67 72 6f 75 70 20 3d 20 .string.newPath,.string.group.=.
79a0 6e 75 6c 6c 2c 20 73 74 72 69 6e 67 20 70 61 74 68 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 null,.string.path.=.null).......
79c0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 ...{..............if.(action.==.
79e0 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 6e 65 77 null)..................throw.new
7a00 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 .ArgumentNullException(nameof(ac
7a20 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 6e 64 tion));................ApplyBind
7a40 69 6e 67 4f 76 65 72 72 69 64 65 28 61 63 74 69 6f 6e 2c 20 6e 65 77 20 49 6e 70 75 74 42 69 6e ingOverride(action,.new.InputBin
7a60 64 69 6e 67 20 7b 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 6e 65 77 50 61 74 68 2c 20 67 72 ding.{overridePath.=.newPath,.gr
7a80 6f 75 70 73 20 3d 20 67 72 6f 75 70 2c 20 70 61 74 68 20 3d 20 70 61 74 68 7d 29 3b 0d 0a 20 20 oups.=.group,.path.=.path});....
7aa0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ......}............///.<summary>
7ac0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 70 70 6c 79 20 6f 76 65 72 72 69 64 65 73 20 74 6f ..........///.Apply.overrides.to
7ae0 20 61 6c 6c 20 62 69 6e 64 69 6e 67 73 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d .all.bindings.on.<paramref.name=
7b00 22 61 63 74 69 6f 6e 22 2f 3e 20 74 68 61 74 20 6d 61 74 63 68 20 3c 70 61 72 61 6d 72 65 66 20 "action"/>.that.match.<paramref.
7b20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 22 2f 3e 2e 0d 0a 20 20 20 20 20 name="bindingOverride"/>........
7b40 20 20 20 2f 2f 2f 20 54 68 65 20 6f 76 65 72 72 69 64 65 20 76 61 6c 75 65 73 20 61 72 65 20 74 ...///.The.override.values.are.t
7b60 61 6b 65 6e 20 66 72 6f 6d 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e aken.from.<see.cref="InputBindin
7b80 67 2e 6f 76 65 72 72 69 64 65 50 61 74 68 22 2f 3e 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e g.overridePath"/>,.<see.cref="In
7ba0 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 22 2f 3e putBinding.overrideProcessors"/>
7bc0 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 ,..........///.and.<seealso.cref
7be0 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 ="InputBinding.overrideInteracti
7c00 6f 6e 73 22 2f 3e 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e ons"/>.on.<paramref.name="bindin
7c20 67 4f 76 65 72 72 69 64 65 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d gOverride"/>...........///.</sum
7c40 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 mary>..........///.<param.name="
7c60 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 6f 76 65 72 72 69 64 65 20 62 69 6e 64 69 action">Action.to.override.bindi
7c80 6e 67 73 20 6f 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 ngs.on.</param>..........///.<pa
7ca0 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 22 3e 41 20 62 69 6e ram.name="bindingOverride">A.bin
7cc0 64 69 6e 67 20 74 68 61 74 20 62 6f 74 68 20 61 63 74 73 20 61 73 20 61 20 6d 61 73 6b 20 28 73 ding.that.both.acts.as.a.mask.(s
7ce0 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 ee.<see.cref="InputBinding.Match
7d00 65 73 22 2f 3e 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 20 74 68 65 20 62 69 6e 64 69 es"/>)..........///.on.the.bindi
7d20 6e 67 73 20 74 6f 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e ngs.to.<paramref.name="action"/>
7d40 20 61 6e 64 20 61 73 20 61 20 63 6f 6e 74 61 69 6e 65 72 20 66 6f 72 20 74 68 65 20 6f 76 65 72 .and.as.a.container.for.the.over
7d60 72 69 64 65 20 76 61 6c 75 65 73 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f ride.values.</param>..........//
7d80 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 /.<exception.cref="ArgumentNullE
7da0 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e xception"><paramref.name="action
7dc0 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d "/>.is.<c>null</c>.</exception>.
7de0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 .........///.<remarks>..........
7e00 2f 2f 2f 20 54 68 65 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 67 6f 20 74 68 72 6f 75 67 68 20 61 ///.The.method.will.go.through.a
7e20 6c 6c 20 6f 66 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 66 6f 72 20 3c 70 61 72 61 6d 72 65 66 ll.of.the.bindings.for.<paramref
7e40 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 28 69 2e 65 2e 20 69 74 73 20 3c 73 65 65 20 .name="action"/>.(i.e..its.<see.
7e60 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 29 0d 0a cref="InputAction.bindings"/>)..
7e80 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 63 61 6c 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 ........///.and.call.<see.cref="
7ea0 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 65 73 22 2f 3e 20 6f 6e 20 74 68 65 6d 20 InputBinding.Matches"/>.on.them.
7ec0 77 69 74 68 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4f 76 65 72 with.<paramref.name="bindingOver
7ee0 72 69 64 65 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 65 76 65 72 79 20 ride"/>...........///.For.every.
7f00 62 69 6e 64 69 6e 67 20 74 68 61 74 20 72 65 74 75 72 6e 73 20 3c 63 3e 74 72 75 65 3c 2f 63 3e binding.that.returns.<c>true</c>
7f20 20 66 72 6f 6d 20 3c 63 3e 4d 61 74 63 68 65 73 3c 2f 63 3e 2c 20 74 68 65 20 6f 76 65 72 72 69 .from.<c>Matches</c>,.the.overri
7f40 64 65 20 76 61 6c 75 65 73 20 66 72 6f 6d 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 de.values.from.the..........///.
7f60 62 69 6e 64 69 6e 67 20 28 69 2e 65 2e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 binding.(i.e..<see.cref="InputBi
7f80 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 61 74 68 22 2f 3e 2c 20 3c 73 65 65 20 63 72 65 66 nding.overridePath"/>,.<see.cref
7fa0 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 ="InputBinding.overrideProcessor
7fc0 73 22 2f 3e 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 3c 73 65 65 20 63 72 65 66 s"/>,..........///.and.<see.cref
7fe0 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 ="InputBinding.overrideInteracti
8000 6f 6e 73 22 2f 3e 29 20 61 72 65 20 63 6f 70 69 65 64 20 69 6e 74 6f 20 74 68 65 20 62 69 6e 64 ons"/>).are.copied.into.the.bind
8020 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 42 ing...........///..........///.B
8040 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 73 20 61 72 65 20 6e 6f 6e 2d 64 65 73 74 72 75 63 inding.overrides.are.non-destruc
8060 74 69 76 65 2e 20 54 68 65 79 20 64 6f 20 6e 6f 74 20 63 68 61 6e 67 65 20 74 68 65 20 62 69 6e tive..They.do.not.change.the.bin
8080 64 69 6e 67 73 20 73 65 74 20 75 70 20 66 6f 72 20 61 6e 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 dings.set.up.for.an.action......
80a0 20 20 20 20 2f 2f 2f 20 62 75 74 20 72 61 74 68 65 72 20 61 70 70 6c 79 20 6e 6f 6e 2d 64 65 73 ....///.but.rather.apply.non-des
80c0 74 72 75 63 74 69 76 65 20 6d 6f 64 69 66 69 63 61 74 69 6f 6e 73 20 74 68 61 74 20 63 68 61 6e tructive.modifications.that.chan
80e0 67 65 20 74 68 65 20 70 61 74 68 73 20 6f 66 20 65 78 69 73 74 69 6e 67 20 62 69 6e 64 69 6e 67 ge.the.paths.of.existing.binding
8100 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 48 6f 77 65 76 65 72 2c 20 74 68 69 73 20 61 6c s...........///.However,.this.al
8120 73 6f 20 6d 65 61 6e 73 20 74 68 61 74 20 66 6f 72 20 6f 76 65 72 72 69 64 65 73 20 74 6f 20 77 so.means.that.for.overrides.to.w
8140 6f 72 6b 2c 20 74 68 65 72 65 20 68 61 76 65 20 74 6f 20 62 65 20 65 78 69 73 74 69 6e 67 20 62 ork,.there.have.to.be.existing.b
8160 69 6e 64 69 6e 67 73 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 61 6e 20 62 65 indings.that..........///.can.be
8180 20 6d 6f 64 69 66 69 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 .modified...........///.........
81a0 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 61 63 68 69 65 76 65 64 20 62 79 20 73 65 74 74 69 6e 67 .///.This.is.achieved.by.setting
81c0 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 .<see.cref="InputBinding.overrid
81e0 65 50 61 74 68 22 2f 3e 20 77 68 69 63 68 20 69 73 20 61 20 6e 6f 6e 2d 73 65 72 69 61 6c 69 7a ePath"/>.which.is.a.non-serializ
8200 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 72 6f 70 65 72 74 79 2e 20 57 68 65 6e 20 72 ed..........///.property..When.r
8220 65 73 6f 6c 76 69 6e 67 20 62 69 6e 64 69 6e 67 73 2c 20 74 68 65 20 73 79 73 74 65 6d 20 77 69 esolving.bindings,.the.system.wi
8240 6c 6c 20 75 73 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 65 ll.use.<see.cref="InputBinding.e
8260 66 66 65 63 74 69 76 65 50 61 74 68 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 68 69 ffectivePath"/>..........///.whi
8280 63 68 20 75 73 65 73 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e ch.uses.<see.cref="InputBinding.
82a0 6f 76 65 72 72 69 64 65 50 61 74 68 22 2f 3e 20 69 66 20 73 65 74 20 6f 72 20 3c 73 65 65 20 63 overridePath"/>.if.set.or.<see.c
82c0 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 70 61 74 68 22 2f 3e 0d 0a 20 20 20 20 20 ref="InputBinding.path"/>.......
82e0 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 2e 20 54 68 65 20 73 61 6d 65 20 61 70 70 6c 69 ...///.otherwise..The.same.appli
8300 65 73 20 74 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 65 66 es.to.<see.cref="InputBinding.ef
8320 66 65 63 74 69 76 65 50 72 6f 63 65 73 73 6f 72 73 22 2f 3e 20 61 6e 64 20 3c 73 65 65 0d 0a 20 fectiveProcessors"/>.and.<see...
8340 20 20 20 20 20 20 20 2f 2f 2f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 65 66 .......///.cref="InputBinding.ef
8360 66 65 63 74 69 76 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 fectiveInteractions"/>..........
8380 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 .///..........///.<example>.....
83a0 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 .....///.<code>..........///.//.
83c0 4f 76 65 72 72 69 64 65 20 74 68 65 20 62 69 6e 64 69 6e 67 20 69 6e 20 74 68 65 20 22 4b 65 79 Override.the.binding.in.the."Key
83e0 62 6f 61 72 64 4d 6f 75 73 65 22 20 67 72 6f 75 70 20 6f 6e 20 27 66 69 72 65 41 63 74 69 6f 6e boardMouse".group.on.'fireAction
8400 27 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 62 79 20 73 65 74 74 69 6e 67 20 69 74 73 '..........///.//.by.setting.its
8420 20 6f 76 65 72 72 69 64 65 20 62 69 6e 64 69 6e 67 20 70 61 74 68 20 74 6f 20 74 68 65 20 73 70 .override.binding.path.to.the.sp
8440 61 63 65 20 62 61 72 20 6f 6e 20 74 68 65 20 6b 65 79 62 6f 61 72 64 2e 0d 0a 20 20 20 20 20 20 ace.bar.on.the.keyboard.........
8460 20 20 2f 2f 2f 20 66 69 72 65 41 63 74 69 6f 6e 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 ..///.fireAction.ApplyBindingOve
8480 72 72 69 64 65 28 6e 65 77 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 rride(new.InputBinding..........
84a0 2f 2f 2f 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 67 72 6f 75 70 73 20 3d 20 ///.{..........///.....groups.=.
84c0 22 4b 65 79 62 6f 61 72 64 4d 6f 75 73 65 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 "KeyboardMouse",..........///...
84e0 20 20 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 22 26 6c 74 3b 4b 65 79 62 6f 61 72 64 26 67 ..overridePath.=."&lt;Keyboard&g
8500 74 3b 2f 73 70 61 63 65 22 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 7d 29 3b 0d 0a 20 20 20 20 t;/space"..........///.});......
8520 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 ....///.</code>..........///.</e
8540 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f xample>..........///..........//
8560 2f 20 49 66 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 69 73 20 65 6e 61 62 6c 65 64 /.If.the.given.action.is.enabled
8580 20 77 68 65 6e 20 63 61 6c 6c 69 6e 67 20 74 68 69 73 20 6d 65 74 68 6f 64 2c 20 74 68 65 20 65 .when.calling.this.method,.the.e
85a0 66 66 65 63 74 20 77 69 6c 6c 20 62 65 20 69 6d 6d 65 64 69 61 74 65 2c 0d 0a 20 20 20 20 20 20 ffect.will.be.immediate,........
85c0 20 20 2f 2f 2f 20 69 2e 65 2e 20 62 69 6e 64 69 6e 67 20 72 65 73 6f 6c 75 74 69 6f 6e 20 74 61 ..///.i.e..binding.resolution.ta
85e0 6b 65 73 20 70 6c 61 63 65 20 61 6e 64 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 kes.place.and.<see.cref="InputAc
8600 74 69 6f 6e 2e 63 6f 6e 74 72 6f 6c 73 22 2f 3e 20 61 72 65 20 75 70 64 61 74 65 64 2e 0d 0a 20 tion.controls"/>.are.updated....
8620 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 20 61 63 74 69 6f 6e 20 69 73 20 6e 6f 74 20 .......///.If.the.action.is.not.
8640 65 6e 61 62 6c 65 64 2c 20 62 69 6e 64 69 6e 67 20 72 65 73 6f 6c 75 74 69 6f 6e 20 69 73 20 64 enabled,.binding.resolution.is.d
8660 65 66 65 72 72 65 64 20 74 6f 20 77 68 65 6e 20 63 6f 6e 74 72 6f 6c 73 20 61 72 65 20 6e 65 65 eferred.to.when.controls.are.nee
8680 64 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6e 65 78 74 20 28 75 73 75 61 6c 6c 79 20 77 ded..........///.next.(usually.w
86a0 68 65 6e 20 65 69 74 68 65 72 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f hen.either.<see.cref="InputActio
86c0 6e 2e 63 6f 6e 74 72 6f 6c 73 22 2f 3e 20 69 73 20 71 75 65 72 69 65 64 20 6f 72 20 77 68 65 6e n.controls"/>.is.queried.or.when
86e0 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 20 69 73 20 65 6e 61 62 .the..........///.action.is.enab
8700 6c 65 64 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 led)...........///.</remarks>...
8720 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 41 .......///.<seealso.cref="InputA
8740 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ction.bindings"/>..........///.<
8760 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 seealso.cref="InputBinding.Match
8780 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 es"/>..........public.static.voi
87a0 64 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 74 68 69 73 20 49 6e 70 75 d.ApplyBindingOverride(this.Inpu
87c0 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e tAction.action,.InputBinding.bin
87e0 64 69 6e 67 4f 76 65 72 72 69 64 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 dingOverride)..........{........
8800 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 ......if.(action.==.null).......
8820 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
8840 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 lException(nameof(action));.....
8860 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 61 63 74 69 6f ...........bindingOverride.actio
8880 6e 20 3d 20 61 63 74 69 6f 6e 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 n.=.action.name;..............va
88a0 72 20 61 63 74 69 6f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 2e 47 65 74 4f 72 43 72 65 61 74 65 r.actionMap.=.action.GetOrCreate
88c0 41 63 74 69 6f 6e 4d 61 70 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 ActionMap();..............ApplyB
88e0 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 61 63 74 69 6f 6e 4d 61 70 2c 20 62 69 6e 64 69 6e indingOverride(actionMap,.bindin
8900 67 4f 76 65 72 72 69 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 gOverride);..........}..........
8920 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 70 70 ..///.<summary>..........///.App
8940 6c 79 20 61 20 62 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 20 74 6f 20 74 68 65 20 4e 74 68 ly.a.binding.override.to.the.Nth
8960 20 62 69 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 2e 0d 0a 20 .binding.on.the.given.action....
8980 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f .......///.</summary>........../
89a0 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 //.<param.name="action">Action.t
89c0 6f 20 61 70 70 6c 79 20 74 68 65 20 62 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 20 74 6f 2e o.apply.the.binding.override.to.
89e0 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d </param>..........///.<param.nam
8a00 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 3e 49 6e 64 65 78 20 6f 66 20 74 68 65 20 62 69 e="bindingIndex">Index.of.the.bi
8a20 6e 64 69 6e 67 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e nding.in.<see.cref="InputAction.
8a40 62 69 6e 64 69 6e 67 73 22 2f 3e 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 68 69 63 bindings"/>.to..........///.whic
8a60 68 20 74 6f 20 61 70 70 6c 79 20 74 68 65 20 6f 76 65 72 72 69 64 65 20 74 6f 2e 3c 2f 70 61 72 h.to.apply.the.override.to.</par
8a80 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 am>..........///.<param.name="bi
8aa0 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 22 3e 41 20 62 69 6e 64 69 6e 67 20 74 68 61 74 20 73 70 ndingOverride">A.binding.that.sp
8ac0 65 63 69 66 69 65 73 20 74 68 65 20 6f 76 65 72 72 69 64 65 73 20 74 6f 20 61 70 70 6c 79 2e 20 ecifies.the.overrides.to.apply..
8ae0 49 6e 20 70 61 72 74 69 63 75 6c 61 72 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 In.particular,..........///.the.
8b00 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 <see.cref="InputBinding.override
8b20 50 61 74 68 22 2f 3e 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 Path"/>,.<see.cref="InputBinding
8b40 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 22 2f 3e 2c 20 61 6e 64 0d 0a 20 20 20 .overrideProcessors"/>,.and.....
8b60 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 .....///.<see.cref="InputBinding
8b80 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 22 2f 3e 20 70 72 6f 70 65 72 74 .overrideInteractions"/>.propert
8ba0 69 65 73 20 77 69 6c 6c 20 62 65 20 63 6f 70 69 65 64 20 69 6e 74 6f 20 74 68 65 20 62 69 6e 64 ies.will.be.copied.into.the.bind
8bc0 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 ing..........///.in.<see.cref="I
8be0 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 2e 20 54 68 65 20 72 65 6d 61 nputAction.bindings"/>..The.rema
8c00 69 6e 69 6e 67 20 66 69 65 6c 64 73 20 77 69 6c 6c 20 62 65 20 69 67 6e 6f 72 65 64 20 62 79 20 ining.fields.will.be.ignored.by.
8c20 74 68 69 73 20 6d 65 74 68 6f 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f this.method.</param>..........//
8c40 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 /.<exception.cref="ArgumentNullE
8c60 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e xception"><paramref.name="action
8c80 22 2f 3e 20 69 73 20 6e 75 6c 6c 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 "/>.is.null.</exception>........
8ca0 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4f ..///.<exception.cref="ArgumentO
8cc0 75 74 4f 66 52 61 6e 67 65 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 utOfRangeException"><paramref.na
8ce0 6d 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 2f 3e 20 69 73 20 6f 75 74 20 6f 66 20 72 61 me="bindingIndex"/>.is.out.of.ra
8d00 6e 67 65 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 nge.</exception>..........///.<r
8d20 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 55 6e 6c 69 6b 65 20 3c 73 65 65 emarks>..........///.Unlike.<see
8d40 20 63 72 65 66 3d 22 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 .cref="ApplyBindingOverride(Inpu
8d60 74 41 63 74 69 6f 6e 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 20 74 68 69 73 20 6d 65 tAction,InputBinding)"/>.this.me
8d80 74 68 6f 64 20 77 69 6c 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6e 6f 74 20 75 73 65 20 3c thod.will..........///.not.use.<
8da0 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 74 63 68 65 73 22 2f see.cref="InputBinding.Matches"/
8dc0 3e 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68 69 63 68 20 62 69 6e 64 69 6e 67 20 74 6f 20 >.to.determine.which.binding.to.
8de0 61 70 70 6c 79 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 76 65 72 72 69 64 65 20 apply.the..........///.override.
8e00 74 6f 2e 20 49 6e 73 74 65 61 64 2c 20 69 74 20 77 69 6c 6c 20 61 70 70 6c 79 20 74 68 65 20 6f to..Instead,.it.will.apply.the.o
8e20 76 65 72 72 69 64 65 20 74 6f 20 74 68 65 20 62 69 6e 64 69 6e 67 20 61 74 20 74 68 65 20 67 69 verride.to.the.binding.at.the.gi
8e40 76 65 6e 20 69 6e 64 65 78 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 74 6f 20 74 68 ven.index..........///.and.to.th
8e60 61 74 20 62 69 6e 64 69 6e 67 20 61 6c 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a at.binding.alone...........///..
8e80 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 72 65 6d 61 69 6e 69 6e 67 20 64 65 74 61 69 6c ........///.The.remaining.detail
8ea0 73 20 6f 66 20 61 70 70 6c 79 69 6e 67 20 6f 76 65 72 72 69 64 65 73 20 61 72 65 20 69 64 65 6e s.of.applying.overrides.are.iden
8ec0 74 69 63 61 6c 20 74 6f 20 3c 73 65 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 72 65 66 3d tical.to.<see..........///.cref=
8ee0 22 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 74 41 63 74 69 6f "ApplyBindingOverride(InputActio
8f00 6e 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f n,InputBinding)"/>...........///
8f20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 63 61 6c 6c 69 6e 67 20 ..........///.Note.that.calling.
8f40 74 68 69 73 20 6d 65 74 68 6f 64 20 77 69 74 68 20 61 6e 20 65 6d 70 74 79 20 28 64 65 66 61 75 this.method.with.an.empty.(defau
8f60 6c 74 2d 63 6f 6e 73 74 72 75 63 74 65 64 29 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 lt-constructed).<paramref.name="
8f80 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 bindingOverride"/>..........///.
8fa0 69 73 20 65 71 75 69 76 61 6c 65 6e 74 20 74 6f 20 72 65 73 65 74 74 69 6e 67 20 61 6c 6c 20 6f is.equivalent.to.resetting.all.o
8fc0 76 65 72 72 69 64 65 73 20 6f 6e 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 2e 0d 0a verrides.on.the.given.binding...
8fe0 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c ........///..........///.<exampl
9000 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 e>..........///.<code>..........
9020 2f 2f 2f 20 2f 2f 20 52 65 73 65 74 20 74 68 65 20 6f 76 65 72 72 69 64 65 73 20 6f 6e 20 74 68 ///.//.Reset.the.overrides.on.th
9040 65 20 73 65 63 6f 6e 64 20 62 69 6e 64 69 6e 67 20 6f 6e 20 27 66 69 72 65 41 63 74 69 6f 6e 27 e.second.binding.on.'fireAction'
9060 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 69 72 65 41 63 74 69 6f 6e 2e 41 70 70 6c 79 42 ...........///.fireAction.ApplyB
9080 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 31 2c 20 64 65 66 61 75 6c 74 29 3b 0d 0a 20 20 20 indingOverride(1,.default);.....
90a0 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f .....///.</code>..........///.</
90c0 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e example>..........///.</remarks>
90e0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 41 70 70 ..........///.<seealso.cref="App
9100 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 74 41 63 74 69 6f 6e 2c 49 6e lyBindingOverride(InputAction,In
9120 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 putBinding)"/>..........public.s
9140 74 61 74 69 63 20 76 6f 69 64 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 tatic.void.ApplyBindingOverride(
9160 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 69 6e 74 20 62 69 6e this.InputAction.action,.int.bin
9180 64 69 6e 67 49 6e 64 65 78 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e 64 69 6e 67 4f dingIndex,.InputBinding.bindingO
91a0 76 65 72 72 69 64 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 verride)..........{.............
91c0 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .if.(action.==.null)............
91e0 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 6c 45 78 63 65 ......throw.new.ArgumentNullExce
9200 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 ption(nameof(action));..........
9220 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 4f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 2e 42 69 ......var.indexOnMap.=.action.Bi
9240 6e 64 69 6e 67 49 6e 64 65 78 4f 6e 41 63 74 69 6f 6e 54 6f 42 69 6e 64 69 6e 67 49 6e 64 65 78 ndingIndexOnActionToBindingIndex
9260 4f 6e 4d 61 70 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 OnMap(bindingIndex);............
9280 20 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 61 63 74 69 6f 6e 20 3d 20 61 63 74 69 6f ..bindingOverride.action.=.actio
92a0 6e 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 6e 64 69 6e n.name;..............ApplyBindin
92c0 67 4f 76 65 72 72 69 64 65 28 61 63 74 69 6f 6e 2e 47 65 74 4f 72 43 72 65 61 74 65 41 63 74 69 gOverride(action.GetOrCreateActi
92e0 6f 6e 4d 61 70 28 29 2c 20 69 6e 64 65 78 4f 6e 4d 61 70 2c 20 62 69 6e 64 69 6e 67 4f 76 65 72 onMap(),.indexOnMap,.bindingOver
9300 72 69 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ride);..........}............///
9320 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 70 70 6c 79 20 61 20 .<summary>..........///.Apply.a.
9340 62 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 20 74 6f 20 74 68 65 20 4e 74 68 20 62 69 6e 64 binding.override.to.the.Nth.bind
9360 69 6e 67 20 6f 6e 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 ing.on.the.given.action.........
9380 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 ..///.</summary>..........///.<p
93a0 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 61 70 70 aram.name="action">Action.to.app
93c0 6c 79 20 74 68 65 20 62 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 20 74 6f 2e 3c 2f 70 61 72 ly.the.binding.override.to.</par
93e0 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 am>..........///.<param.name="bi
9400 6e 64 69 6e 67 49 6e 64 65 78 22 3e 49 6e 64 65 78 20 6f 66 20 74 68 65 20 62 69 6e 64 69 6e 67 ndingIndex">Index.of.the.binding
9420 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 .in.<see.cref="InputAction.bindi
9440 6e 67 73 22 2f 3e 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 68 69 63 68 20 74 6f 20 ngs"/>.to..........///.which.to.
9460 61 70 70 6c 79 20 74 68 65 20 6f 76 65 72 72 69 64 65 20 74 6f 2e 3c 2f 70 61 72 61 6d 3e 0d 0a apply.the.override.to.</param>..
9480 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 61 74 68 22 3e 4f ........///.<param.name="path">O
94a0 76 65 72 72 69 64 65 20 70 61 74 68 20 28 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 verride.path.(<see.cref="InputBi
94c0 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 61 74 68 22 2f 3e 29 20 74 6f 20 73 65 74 20 6f 6e nding.overridePath"/>).to.set.on
94e0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 20 ..........///.the.given.binding.
9500 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e in.<see.cref="InputAction.bindin
9520 67 73 22 2f 3e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 gs"/>.</param>..........///.<exc
9540 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 eption.cref="ArgumentNullExcepti
9560 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 on"><paramref.name="action"/>.is
9580 20 6e 75 6c 6c 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 .null.</exception>..........///.
95a0 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4f 75 74 4f 66 52 61 <exception.cref="ArgumentOutOfRa
95c0 6e 67 65 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 62 69 ngeException"><paramref.name="bi
95e0 6e 64 69 6e 67 49 6e 64 65 78 22 2f 3e 20 69 73 20 6f 75 74 20 6f 66 20 72 61 6e 67 65 2e 3c 2f ndingIndex"/>.is.out.of.range.</
9600 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 exception>..........///.<remarks
9620 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 69 6e 67 20 74 68 69 73 20 6d 65 74 68 >..........///.Calling.this.meth
9640 6f 64 20 69 73 20 65 71 75 69 76 61 6c 65 6e 74 20 74 6f 20 63 61 6c 6c 69 6e 67 20 3c 73 65 65 od.is.equivalent.to.calling.<see
9660 20 63 72 65 66 3d 22 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 .cref="ApplyBindingOverride(Inpu
9680 74 41 63 74 69 6f 6e 2c 69 6e 74 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 0d 0a 20 20 tAction,int,InputBinding)"/>....
96a0 20 20 20 20 20 20 2f 2f 2f 20 6c 69 6b 65 20 73 6f 3a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d ......///.like.so:..........///.
96c0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 .........///.<example>..........
96e0 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 2e 41 ///.<code>..........///.action.A
9700 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 6e 65 77 20 49 6e 70 75 74 42 69 6e pplyBindingOverride(new.InputBin
9720 64 69 6e 67 20 7b 20 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 70 61 74 68 20 7d 29 3b 0d 0a ding.{.overridePath.=.path.});..
9740 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ........///.</code>..........///
9760 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 .</example>..........///.</remar
9780 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 ks>..........///.<seealso.cref="
97a0 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 74 41 63 74 69 6f 6e ApplyBindingOverride(InputAction
97c0 2c 69 6e 74 2c 49 6e 70 75 74 42 69 6e 64 69 6e 67 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 ,int,InputBinding)"/>..........p
97e0 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 ublic.static.void.ApplyBindingOv
9800 65 72 72 69 64 65 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 erride(this.InputAction.action,.
9820 69 6e 74 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 2c 20 73 74 72 69 6e 67 20 70 61 74 68 29 0d 0a int.bindingIndex,.string.path)..
9840 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 70 61 74 68 20 ........{..............if.(path.
9860 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.
9880 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 42 69 6e 64 69 6e 67 20 70 new.ArgumentException("Binding.p
98a0 61 74 68 20 63 61 6e 6e 6f 74 20 62 65 20 6e 75 6c 6c 22 2c 20 6e 61 6d 65 6f 66 28 70 61 74 68 ath.cannot.be.null",.nameof(path
98c0 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 ));..............ApplyBindingOve
98e0 72 72 69 64 65 28 61 63 74 69 6f 6e 2c 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 2c 20 6e 65 77 20 rride(action,.bindingIndex,.new.
9900 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 7b 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 70 61 74 InputBinding.{overridePath.=.pat
9920 68 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c h});..........}............///.<
9940 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 70 70 6c 79 20 74 68 65 20 summary>..........///.Apply.the.
9960 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 20 74 6f 20 61 6c 6c 20 62 69 given.binding.override.to.all.bi
9980 6e 64 69 6e 67 73 20 69 6e 20 74 68 65 20 6d 61 70 20 74 68 61 74 20 61 72 65 20 6d 61 74 63 68 ndings.in.the.map.that.are.match
99a0 65 64 20 62 79 20 74 68 65 20 6f 76 65 72 72 69 64 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ed.by.the.override...........///
99c0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 .</summary>..........///.<param.
99e0 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 4d 61 70 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 name="actionMap"></param>.......
9a00 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 4f 76 65 72 72 ...///.<param.name="bindingOverr
9a20 69 64 65 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 ide"></param>..........///.<retu
9a40 72 6e 73 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 62 69 6e 64 69 6e 67 73 20 6f 76 65 72 72 rns>The.number.of.bindings.overr
9a60 69 64 64 65 6e 20 69 6e 20 74 68 65 20 67 69 76 65 6e 20 6d 61 70 2e 3c 2f 72 65 74 75 72 6e 73 idden.in.the.given.map.</returns
9a80 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 >..........///.<exception.cref="
9aa0 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 ArgumentNullException"><paramref
9ac0 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 4d 61 70 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f .name="actionMap"/>.is.<c>null</
9ae0 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 c>.</exception>..........public.
9b00 73 74 61 74 69 63 20 69 6e 74 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 static.int.ApplyBindingOverride(
9b20 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 20 61 63 74 69 6f 6e 4d 61 70 2c 20 49 this.InputActionMap.actionMap,.I
9b40 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 29 0d 0a 20 20 nputBinding.bindingOverride)....
9b60 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 61 63 74 69 6f 6e 4d ......{..............if.(actionM
9b80 61 70 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 ap.==.null)..................thr
9ba0 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d ow.new.ArgumentNullException(nam
9bc0 65 6f 66 28 61 63 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 eof(actionMap));................
9be0 76 61 72 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 69 6e 64 69 var.bindings.=.actionMap.m_Bindi
9c00 6e 67 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 73 20 3d ngs;..............if.(bindings.=
9c20 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 72 65 74 75 72 6e 20 =.null)..................return.
9c40 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 6f 20 74 68 72 6f 75 67 68 20 0;................//.Go.through.
9c60 61 6c 6c 20 62 69 6e 64 69 6e 67 73 20 69 6e 20 74 68 65 20 6d 61 70 20 61 6e 64 20 6d 61 74 63 all.bindings.in.the.map.and.matc
9c80 68 20 74 68 65 6d 20 74 6f 20 74 68 65 20 6f 76 65 72 72 69 64 65 2e 0d 0a 20 20 20 20 20 20 20 h.them.to.the.override..........
9ca0 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 20 3d 20 62 69 6e 64 69 6e 67 73 .....var.bindingCount.=.bindings
9cc0 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 74 63 68 43 .Length;..............var.matchC
9ce0 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 ount.=.0;..............for.(var.
9d00 69 20 3d 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 i.=.0;.i.<.bindingCount;.++i)...
9d20 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 69 66 ...........{..................if
9d40 20 28 21 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 4d 61 74 63 68 65 73 28 72 65 66 20 62 .(!bindingOverride.Matches(ref.b
9d60 69 6e 64 69 6e 67 73 5b 69 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 indings[i]))....................
9d80 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ..continue;..................../
9da0 2f 20 53 65 74 20 6f 76 65 72 72 69 64 65 73 20 6f 6e 20 62 69 6e 64 69 6e 67 2e 0d 0a 20 20 20 /.Set.overrides.on.binding......
9dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 73 5b 69 5d 2e 6f 76 65 72 72 69 64 .............bindings[i].overrid
9de0 65 50 61 74 68 20 3d 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 6f 76 65 72 72 69 64 65 ePath.=.bindingOverride.override
9e00 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 73 5b Path;..................bindings[
9e20 69 5d 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 20 3d 20 62 69 6e 64 69 6e i].overrideInteractions.=.bindin
9e40 67 4f 76 65 72 72 69 64 65 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 3b 0d gOverride.overrideInteractions;.
9e60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 73 5b 69 5d 2e 6f 76 65 .................bindings[i].ove
9e80 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 20 3d 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 rrideProcessors.=.bindingOverrid
9ea0 65 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 e.overrideProcessors;...........
9ec0 20 20 20 20 20 20 20 2b 2b 6d 61 74 63 68 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .......++matchCount;............
9ee0 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 74 63 68 43 6f 75 6e ..}................if.(matchCoun
9f00 74 20 3e 20 30 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 t.>.0)..............{...........
9f20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 43 6c 65 61 72 50 65 72 41 63 74 69 6f 6e 43 .......actionMap.ClearPerActionC
9f40 61 63 68 65 64 42 69 6e 64 69 6e 67 44 61 74 61 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 achedBindingData();.............
9f60 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 4c 61 7a 79 52 65 73 6f 6c 76 65 42 69 6e 64 69 6e .....actionMap.LazyResolveBindin
9f80 67 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 gs();..............}............
9fa0 20 20 20 20 72 65 74 75 72 6e 20 6d 61 74 63 68 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 ....return.matchCount;..........
9fc0 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 76 6f 69 64 20 }............public.static.void.
9fe0 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 74 68 69 73 20 49 6e 70 75 74 41 ApplyBindingOverride(this.InputA
a000 63 74 69 6f 6e 4d 61 70 20 61 63 74 69 6f 6e 4d 61 70 2c 20 69 6e 74 20 62 69 6e 64 69 6e 67 49 ctionMap.actionMap,.int.bindingI
a020 6e 64 65 78 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 ndex,.InputBinding.bindingOverri
a040 64 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 66 20 28 de)..........{..............if.(
a060 61 63 74 69 6f 6e 4d 61 70 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 actionMap.==.null)..............
a080 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
a0a0 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 20 20 20 20 20 20 20 ion(nameof(actionMap));.........
a0c0 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 43 6f 75 6e 74 20 3d 20 61 63 74 69 6f 6e 4d .....var.bindingsCount.=.actionM
a0e0 61 70 2e 6d 5f 42 69 6e 64 69 6e 67 73 3f 2e 4c 65 6e 67 74 68 20 3f 3f 20 30 3b 0d 0a 20 20 20 ap.m_Bindings?.Length.??.0;.....
a100 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3c 20 30 20 7c 7c .........if.(bindingIndex.<.0.||
a120 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3e 3d 20 62 69 6e 64 69 6e 67 73 43 6f 75 6e 74 29 0d .bindingIndex.>=.bindingsCount).
a140 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 6d .................throw.new.Argum
a160 65 6e 74 4f 75 74 4f 66 52 61 6e 67 65 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 62 69 entOutOfRangeException(nameof(bi
a180 6e 64 69 6e 67 49 6e 64 65 78 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ndingIndex),....................
a1a0 20 20 24 22 43 61 6e 6e 6f 74 20 61 70 70 6c 79 20 6f 76 65 72 72 69 64 65 20 74 6f 20 62 69 6e ..$"Cannot.apply.override.to.bin
a1c0 64 69 6e 67 20 61 74 20 69 6e 64 65 78 20 7b 62 69 6e 64 69 6e 67 49 6e 64 65 78 7d 20 69 6e 20 ding.at.index.{bindingIndex}.in.
a1e0 6d 61 70 20 27 7b 61 63 74 69 6f 6e 4d 61 70 7d 27 20 77 69 74 68 20 6f 6e 6c 79 20 7b 62 69 6e map.'{actionMap}'.with.only.{bin
a200 64 69 6e 67 73 43 6f 75 6e 74 7d 20 62 69 6e 64 69 6e 67 73 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 dingsCount}.bindings");.........
a220 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 69 6e 64 69 6e 67 73 5b 62 69 6e 64 .......actionMap.m_Bindings[bind
a240 69 6e 67 49 6e 64 65 78 5d 2e 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 62 69 6e 64 69 6e 67 ingIndex].overridePath.=.binding
a260 4f 76 65 72 72 69 64 65 2e 6f 76 65 72 72 69 64 65 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 Override.overridePath;..........
a280 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 69 6e 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 ....actionMap.m_Bindings[binding
a2a0 49 6e 64 65 78 5d 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 20 3d 20 62 69 Index].overrideInteractions.=.bi
a2c0 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f ndingOverride.overrideInteractio
a2e0 6e 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 69 6e ns;..............actionMap.m_Bin
a300 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 dings[bindingIndex].overrideProc
a320 65 73 73 6f 72 73 20 3d 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 6f 76 65 72 72 69 64 essors.=.bindingOverride.overrid
a340 65 50 72 6f 63 65 73 73 6f 72 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 eProcessors;................acti
a360 6f 6e 4d 61 70 2e 43 6c 65 61 72 50 65 72 41 63 74 69 6f 6e 43 61 63 68 65 64 42 69 6e 64 69 6e onMap.ClearPerActionCachedBindin
a380 67 44 61 74 61 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e gData();..............actionMap.
a3a0 4c 61 7a 79 52 65 73 6f 6c 76 65 42 69 6e 64 69 6e 67 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 LazyResolveBindings();..........
a3c0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 }............///.<summary>......
a3e0 20 20 20 20 2f 2f 2f 20 52 65 6d 6f 76 65 20 61 6e 79 20 6f 76 65 72 72 69 64 65 73 20 66 72 6f ....///.Remove.any.overrides.fro
a400 6d 20 74 68 65 20 62 69 6e 64 69 6e 67 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d m.the.binding.on.<paramref.name=
a420 22 61 63 74 69 6f 6e 22 2f 3e 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 69 6e 64 65 78 2e "action"/>.with.the.given.index.
a440 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 20 ..........///.</summary>........
a460 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f ..///.<param.name="action">Actio
a480 6e 20 77 68 6f 73 65 20 62 69 6e 64 69 6e 67 73 20 74 6f 20 6d 6f 64 69 66 79 2e 3c 2f 70 61 72 n.whose.bindings.to.modify.</par
a4a0 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 am>..........///.<param.name="bi
a4c0 6e 64 69 6e 67 49 6e 64 65 78 22 3e 49 6e 64 65 78 20 6f 66 20 74 68 65 20 62 69 6e 64 69 6e 67 ndingIndex">Index.of.the.binding
a4e0 20 77 69 74 68 69 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f .within.<paramref.name="action"/
a500 3e 27 73 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 >'s.<see.cref="InputAction.bindi
a520 6e 67 73 22 2f 3e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 ngs"/>.</param>..........///.<ex
a540 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 ception.cref="ArgumentNullExcept
a560 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 ion"><paramref.name="action"/>.i
a580 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 s.<c>null</c>.</exception>......
a5a0 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e ....///.<exception.cref="Argumen
a5c0 74 4f 75 74 4f 66 52 61 6e 67 65 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 tOutOfRangeException"><paramref.
a5e0 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 2f 3e 20 69 73 20 69 6e 76 61 6c 69 64 name="bindingIndex"/>.is.invalid
a600 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 .</exception>..........public.st
a620 61 74 69 63 20 76 6f 69 64 20 52 65 6d 6f 76 65 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 atic.void.RemoveBindingOverride(
a640 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 69 6e 74 20 62 69 6e this.InputAction.action,.int.bin
a660 64 69 6e 67 49 6e 64 65 78 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 dingIndex)..........{...........
a680 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 ...if.(action.==.null)..........
a6a0 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 6c 45 78 ........throw.new.ArgumentNullEx
a6c0 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 ception(nameof(action));........
a6e0 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 ........action.ApplyBindingOverr
a700 69 64 65 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 2c 20 64 65 66 61 75 6c 74 28 49 6e 70 75 74 42 ide(bindingIndex,.default(InputB
a720 69 6e 64 69 6e 67 29 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 inding));..........}............
a740 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 6d 6f 76 ///.<summary>..........///.Remov
a760 65 20 61 6e 79 20 6f 76 65 72 72 69 64 65 73 20 66 72 6f 6d 20 74 68 65 20 62 69 6e 64 69 6e 67 e.any.overrides.from.the.binding
a780 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 6d 61 .on.<paramref.name="action"/>.ma
a7a0 74 63 68 69 6e 67 20 74 68 65 20 67 69 76 65 6e 20 62 69 6e 64 69 6e 67 20 6d 61 73 6b 2e 0d 0a tching.the.given.binding.mask...
a7c0 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 20 20 20 ........///.</summary>..........
a7e0 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 ///.<param.name="action">Action.
a800 77 68 6f 73 65 20 62 69 6e 64 69 6e 67 73 20 74 6f 20 6d 6f 64 69 66 79 2e 3c 2f 70 61 72 61 6d whose.bindings.to.modify.</param
a820 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 >..........///.<param.name="bind
a840 69 6e 67 4d 61 73 6b 22 3e 4d 61 73 6b 20 74 68 61 74 20 77 69 6c 6c 20 62 65 20 6d 61 74 63 68 ingMask">Mask.that.will.be.match
a860 65 64 20 61 67 61 69 6e 73 74 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 6f 6e 20 3c 70 61 72 61 ed.against.the.bindings.on.<para
a880 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 2e 20 41 6c 6c 20 62 69 6e 64 69 6e mref.name="action"/>..All.bindin
a8a0 67 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 6d 61 74 63 68 20 74 68 65 20 6d gs..........///.that.match.the.m
a8c0 61 73 6b 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 ask.(see.<see.cref="InputBinding
a8e0 2e 4d 61 74 63 68 65 73 22 2f 3e 29 20 77 69 6c 6c 20 68 61 76 65 20 74 68 65 69 72 20 6f 76 65 .Matches"/>).will.have.their.ove
a900 72 72 69 64 65 73 20 72 65 6d 6f 76 65 64 2e 20 49 66 20 6e 6f 6e 65 20 6f 66 20 74 68 65 0d 0a rrides.removed..If.none.of.the..
a920 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 69 6e 64 69 6e 67 73 20 6f 6e 20 74 68 65 20 61 63 74 69 ........///.bindings.on.the.acti
a940 6f 6e 20 6d 61 74 63 68 20 74 68 65 20 6d 61 73 6b 2c 20 6e 6f 20 62 69 6e 64 69 6e 67 73 20 77 on.match.the.mask,.no.bindings.w
a960 69 6c 6c 20 62 65 20 6d 6f 64 69 66 69 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 ill.be.modified.</param>........
a980 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e ..///.<exception.cref="ArgumentN
a9a0 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 ullException"><paramref.name="ac
a9c0 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 tion"/>.is.<c>null</c>.</excepti
a9e0 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 on>..........///.<remarks>......
aa00 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ....///.<example>..........///.<
aa20 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 52 65 6d 6f 76 65 20 61 6c 6c code>..........///.//.Remove.all
aa40 20 62 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 73 20 66 72 6f 6d 20 62 69 6e 64 69 6e 67 73 .binding.overrides.from.bindings
aa60 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 22 47 61 6d 65 70 61 64 22 20 62 .associated.with.the."Gamepad".b
aa80 69 6e 64 69 6e 67 20 67 72 6f 75 70 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6d 79 41 63 74 inding.group...........///.myAct
aaa0 69 6f 6e 2e 52 65 6d 6f 76 65 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 49 6e 70 75 74 42 ion.RemoveBindingOverride(InputB
aac0 69 6e 64 69 6e 67 2e 4d 61 73 6b 42 79 47 72 6f 75 70 28 22 47 61 6d 65 70 61 64 22 29 29 3b 0d inding.MaskByGroup("Gamepad"));.
aae0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f .........///.</code>..........//
ab00 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 /.</example>..........///.</rema
ab20 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 rks>..........public.static.void
ab40 20 52 65 6d 6f 76 65 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 74 68 69 73 20 49 6e 70 75 .RemoveBindingOverride(this.Inpu
ab60 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e tAction.action,.InputBinding.bin
ab80 64 69 6e 67 4d 61 73 6b 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 dingMask)..........{............
aba0 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 ..if.(action.==.null)...........
abc0 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 6c 45 78 63 .......throw.new.ArgumentNullExc
abe0 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 eption(nameof(action));.........
ac00 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b 2e 6f 76 65 72 72 69 64 65 50 61 74 68 20 .......bindingMask.overridePath.
ac20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b =.null;..............bindingMask
ac40 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 .overrideInteractions.=.null;...
ac60 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b 2e 6f 76 65 72 72 69 64 65 50 ...........bindingMask.overrideP
ac80 72 6f 63 65 73 73 6f 72 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rocessors.=.null;...............
aca0 20 2f 2f 20 53 69 6d 70 6c 79 20 61 70 70 6c 79 20 62 75 74 20 77 69 74 68 20 61 20 6e 75 6c 6c .//.Simply.apply.but.with.a.null
acc0 20 62 69 6e 64 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 6e 64 .binding...............ApplyBind
ace0 69 6e 67 4f 76 65 72 72 69 64 65 28 61 63 74 69 6f 6e 2c 20 62 69 6e 64 69 6e 67 4d 61 73 6b 29 ingOverride(action,.bindingMask)
ad00 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 72 69 76 61 74 65 20 ;..........}............private.
ad20 73 74 61 74 69 63 20 76 6f 69 64 20 52 65 6d 6f 76 65 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 static.void.RemoveBindingOverrid
ad40 65 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 20 61 63 74 69 6f 6e 4d 61 70 2c e(this.InputActionMap.actionMap,
ad60 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 62 69 6e 64 69 6e 67 4d 61 73 6b 29 0d 0a 20 20 20 20 .InputBinding.bindingMask)......
ad80 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 4d 61 70 ....{..............if.(actionMap
ada0 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 .==.null)..................throw
adc0 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f .new.ArgumentNullException(nameo
ade0 66 28 61 63 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 69 f(actionMap));................bi
ae00 6e 64 69 6e 67 4d 61 73 6b 2e 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 6e 75 6c 6c 3b 0d 0a ndingMask.overridePath.=.null;..
ae20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b 2e 6f 76 65 72 72 69 64 65 ............bindingMask.override
ae40 49 6e 74 65 72 61 63 74 69 6f 6e 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 Interactions.=.null;............
ae60 20 20 62 69 6e 64 69 6e 67 4d 61 73 6b 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 ..bindingMask.overrideProcessors
ae80 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 69 6d 70 6c .=.null;................//.Simpl
aea0 79 20 61 70 70 6c 79 20 62 75 74 20 77 69 74 68 20 61 20 6e 75 6c 6c 20 62 69 6e 64 69 6e 67 2e y.apply.but.with.a.null.binding.
aec0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 ..............ApplyBindingOverri
aee0 64 65 28 61 63 74 69 6f 6e 4d 61 70 2c 20 62 69 6e 64 69 6e 67 4d 61 73 6b 29 3b 0d 0a 20 20 20 de(actionMap,.bindingMask);.....
af00 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d .....}............///.<summary>.
af20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 6d 6f 76 65 20 61 6c 6c 20 62 69 6e 64 69 6e 67 20 .........///.Remove.all.binding.
af40 6f 76 65 72 72 69 64 65 73 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 overrides.on.<paramref.name="act
af60 69 6f 6e 22 2f 3e 2c 20 69 2e 65 2e 20 63 6c 65 61 72 20 61 6c 6c 20 3c 73 65 65 20 63 72 65 66 ion"/>,.i.e..clear.all.<see.cref
af80 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 61 74 68 22 2f 3e 2c 0d ="InputBinding.overridePath"/>,.
afa0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e .........///.<see.cref="InputBin
afc0 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 22 2f 3e 2c 20 61 6e 64 20 ding.overrideProcessors"/>,.and.
afe0 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 6f 76 65 72 72 69 64 65 <see.cref="InputBinding.override
b000 49 6e 74 65 72 61 63 74 69 6f 6e 73 22 2f 3e 20 73 65 74 20 6f 6e 20 62 69 6e 64 69 6e 67 73 0d Interactions"/>.set.on.bindings.
b020 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f .........///.for.the.given.actio
b040 6e 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 n...........///.</summary>......
b060 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 ....///.<param.name="action">Act
b080 69 6f 6e 20 74 6f 20 72 65 6d 6f 76 65 20 6f 76 65 72 72 69 64 65 73 20 66 72 6f 6d 2e 3c 2f 70 ion.to.remove.overrides.from.</p
b0a0 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 aram>..........///.<exception.cr
b0c0 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 ef="ArgumentNullException"><para
b0e0 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c mref.name="action"/>.is.<c>null<
b100 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 /c>.</exception>..........public
b120 20 73 74 61 74 69 63 20 76 6f 69 64 20 52 65 6d 6f 76 65 41 6c 6c 42 69 6e 64 69 6e 67 4f 76 65 .static.void.RemoveAllBindingOve
b140 72 72 69 64 65 73 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 29 0d rrides(this.InputAction.action).
b160 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 61 63 74 69 .........{..............if.(acti
b180 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 on.==.null)..................thr
b1a0 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d ow.new.ArgumentNullException(nam
b1c0 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 eof(action));................var
b1e0 20 61 63 74 69 6f 6e 4e 61 6d 65 20 3d 20 61 63 74 69 6f 6e 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 .actionName.=.action.name;......
b200 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 2e 47 ........var.actionMap.=.action.G
b220 65 74 4f 72 43 72 65 61 74 65 41 63 74 69 6f 6e 4d 61 70 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 etOrCreateActionMap();..........
b240 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 ....var.bindings.=.actionMap.m_B
b260 69 6e 64 69 6e 67 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e indings;..............if.(bindin
b280 67 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 gs.==.null)..................ret
b2a0 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 43 urn;................var.bindingC
b2c0 6f 75 6e 74 20 3d 20 62 69 6e 64 69 6e 67 73 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 ount.=.bindings.Length;.........
b2e0 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 6e 67 .....for.(var.i.=.0;.i.<.binding
b300 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 Count;.++i)..............{......
b320 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 43 6f 6d 70 61 72 65 28 62 ............if.(string.Compare(b
b340 69 6e 64 69 6e 67 73 5b 69 5d 2e 61 63 74 69 6f 6e 2c 20 61 63 74 69 6f 6e 4e 61 6d 65 2c 20 53 indings[i].action,.actionName,.S
b360 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 75 6c 74 75 72 65 tringComparison.InvariantCulture
b380 49 67 6e 6f 72 65 43 61 73 65 29 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 IgnoreCase).!=.0)...............
b3a0 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .......continue;................
b3c0 20 20 20 20 62 69 6e 64 69 6e 67 73 5b 69 5d 2e 6f 76 65 72 72 69 64 65 50 61 74 68 20 3d 20 6e ....bindings[i].overridePath.=.n
b3e0 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 73 5b 69 ull;..................bindings[i
b400 5d 2e 6f 76 65 72 72 69 64 65 49 6e 74 65 72 61 63 74 69 6f 6e 73 20 3d 20 6e 75 6c 6c 3b 0d 0a ].overrideInteractions.=.null;..
b420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 73 5b 69 5d 2e 6f 76 65 72 ................bindings[i].over
b440 72 69 64 65 50 72 6f 63 65 73 73 6f 72 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 rideProcessors.=.null;..........
b460 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 43 ....}................actionMap.C
b480 6c 65 61 72 50 65 72 41 63 74 69 6f 6e 43 61 63 68 65 64 42 69 6e 64 69 6e 67 44 61 74 61 28 29 learPerActionCachedBindingData()
b4a0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 4c 61 7a 79 52 65 73 ;..............actionMap.LazyRes
b4c0 6f 6c 76 65 42 69 6e 64 69 6e 67 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 olveBindings();..........}......
b4e0 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 61 72 65 20 74 68 65 20 49 45 6e 75 6d 65 ......////REVIEW:.are.the.IEnume
b500 72 61 62 6c 65 20 76 61 72 69 61 74 69 6f 6e 73 20 77 6f 72 74 68 20 68 61 76 69 6e 67 3f 0d 0a rable.variations.worth.having?..
b520 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 76 6f 69 64 20 41 70 70 ..........public.static.void.App
b540 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 73 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 lyBindingOverrides(this.InputAct
b560 69 6f 6e 4d 61 70 20 61 63 74 69 6f 6e 4d 61 70 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e ionMap.actionMap,.IEnumerable<In
b580 70 75 74 42 69 6e 64 69 6e 67 3e 20 6f 76 65 72 72 69 64 65 73 29 0d 0a 20 20 20 20 20 20 20 20 putBinding>.overrides)..........
b5a0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 4d 61 70 20 3d 3d 20 {..............if.(actionMap.==.
b5c0 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 6e 65 77 null)..................throw.new
b5e0 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 .ArgumentNullException(nameof(ac
b600 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 76 65 72 tionMap));..............if.(over
b620 72 69 64 65 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rides.==.null)..................
b640 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 69 6f 6e 28 throw.new.ArgumentNullException(
b660 6e 61 6d 65 6f 66 28 6f 76 65 72 72 69 64 65 73 29 29 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 nameof(overrides));.............
b680 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 62 69 6e 64 69 6e 67 20 69 6e 20 6f 76 65 .....foreach.(var.binding.in.ove
b6a0 72 72 69 64 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 rrides)..................ApplyBi
b6c0 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 61 63 74 69 6f 6e 4d 61 70 2c 20 62 69 6e 64 69 6e 67 ndingOverride(actionMap,.binding
b6e0 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 63 20 );..........}............public.
b700 73 74 61 74 69 63 20 76 6f 69 64 20 52 65 6d 6f 76 65 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 static.void.RemoveBindingOverrid
b720 65 73 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 20 61 63 74 69 6f 6e 4d 61 70 es(this.InputActionMap.actionMap
b740 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 49 6e 70 75 74 42 69 6e 64 69 6e 67 3e 20 6f 76 65 72 ,.IEnumerable<InputBinding>.over
b760 72 69 64 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 69 rides)..........{..............i
b780 66 20 28 61 63 74 69 6f 6e 4d 61 70 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 f.(actionMap.==.null)...........
b7a0 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 6c 45 78 63 .......throw.new.ArgumentNullExc
b7c0 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 20 20 20 20 eption(nameof(actionMap));......
b7e0 20 20 20 20 20 20 20 20 69 66 20 28 6f 76 65 72 72 69 64 65 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ........if.(overrides.==.null)..
b800 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 6d 65 ................throw.new.Argume
b820 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 6f 76 65 72 72 69 64 65 73 ntNullException(nameof(overrides
b840 29 29 3b 0d 0a 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 ));..................foreach.(va
b860 72 20 62 69 6e 64 69 6e 67 20 69 6e 20 6f 76 65 72 72 69 64 65 73 29 0d 0a 20 20 20 20 20 20 20 r.binding.in.overrides).........
b880 20 20 20 20 20 20 20 20 20 52 65 6d 6f 76 65 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 61 .........RemoveBindingOverride(a
b8a0 63 74 69 6f 6e 4d 61 70 2c 20 62 69 6e 64 69 6e 67 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ctionMap,.binding);..........}..
b8c0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 ..........///.<summary>.........
b8e0 20 2f 2f 2f 20 52 65 73 74 6f 72 65 20 61 6c 6c 20 62 69 6e 64 69 6e 67 73 20 69 6e 20 74 68 65 .///.Restore.all.bindings.in.the
b900 20 6d 61 70 20 74 6f 20 74 68 65 69 72 20 64 65 66 61 75 6c 74 73 2e 0d 0a 20 20 20 20 20 20 20 .map.to.their.defaults..........
b920 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 .///.</summary>..........///.<pa
b940 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 4d 61 70 22 3e 41 63 74 69 6f 6e 20 6d 61 70 20 ram.name="actionMap">Action.map.
b960 74 6f 20 72 65 6d 6f 76 65 20 6f 76 65 72 72 69 64 65 73 20 66 72 6f 6d 2e 3c 2f 70 61 72 61 6d to.remove.overrides.from.</param
b980 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 >..........///.<exception.cref="
b9a0 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 ArgumentNullException"><paramref
b9c0 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 4d 61 70 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f .name="actionMap"/>.is.<c>null</
b9e0 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 c>.</exception>..........public.
ba00 73 74 61 74 69 63 20 76 6f 69 64 20 52 65 6d 6f 76 65 41 6c 6c 42 69 6e 64 69 6e 67 4f 76 65 72 static.void.RemoveAllBindingOver
ba20 72 69 64 65 73 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 20 61 63 74 69 6f 6e rides(this.InputActionMap.action
ba40 4d 61 70 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 Map)..........{..............if.
ba60 28 61 63 74 69 6f 6e 4d 61 70 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 (actionMap.==.null).............
ba80 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
baa0 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 0d 0a 20 20 20 20 tion(nameof(actionMap));........
bac0 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 69 6e 64 69 6e 67 73 ........if.(actionMap.m_Bindings
bae0 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 .==.null)..................retur
bb00 6e 3b 20 2f 2f 20 4e 6f 20 62 69 6e 64 69 6e 67 73 20 69 6e 20 6d 61 70 2e 0d 0a 0d 0a 20 20 20 n;.//.No.bindings.in.map........
bb20 20 20 20 20 20 20 20 20 20 76 61 72 20 65 6d 70 74 79 42 69 6e 64 69 6e 67 20 3d 20 6e 65 77 20 .........var.emptyBinding.=.new.
bb40 49 6e 70 75 74 42 69 6e 64 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 InputBinding();..............var
bb60 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 20 3d 20 61 63 74 69 6f 6e 4d 61 70 2e 6d 5f 42 69 6e 64 .bindingCount.=.actionMap.m_Bind
bb80 69 6e 67 73 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 ings.Length;..............for.(v
bba0 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 6e 67 43 6f 75 6e 74 3b 20 2b 2b 69 29 ar.i.=.0;.i.<.bindingCount;.++i)
bbc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 ..................ApplyBindingOv
bbe0 65 72 72 69 64 65 28 61 63 74 69 6f 6e 4d 61 70 2c 20 69 2c 20 65 6d 70 74 79 42 69 6e 64 69 6e erride(actionMap,.i,.emptyBindin
bc00 67 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 g);..........}............////RE
bc20 56 49 45 57 3a 20 68 6f 77 20 64 6f 65 73 20 74 68 69 73 20 73 79 73 74 65 6d 20 77 6f 72 6b 20 VIEW:.how.does.this.system.work.
bc40 69 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 68 20 61 63 74 75 61 6c 20 75 73 65 72 20 in.combination.with.actual.user.
bc60 6f 76 65 72 72 69 64 65 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 28 overrides..........////........(
bc80 61 6e 73 77 65 72 3a 20 77 65 20 72 65 62 69 6e 64 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 62 answer:.we.rebind.based.on.the.b
bca0 61 73 65 20 70 61 74 68 20 6e 6f 74 20 74 68 65 20 6f 76 65 72 72 69 64 65 20 70 61 74 68 3b 20 ase.path.not.the.override.path;.
bcc0 74 68 75 73 20 75 73 65 72 20 6f 76 65 72 72 69 64 65 73 20 61 72 65 20 75 6e 61 66 66 65 63 74 thus.user.overrides.are.unaffect
bce0 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 61 6e 64 20 68 6f 70 ed;..........////........and.hop
bd00 65 66 75 6c 6c 79 20 6f 70 65 72 61 74 65 20 6f 6e 20 6d 6f 72 65 20 74 68 61 6e 20 6a 75 73 74 efully.operate.on.more.than.just
bd20 20 74 68 65 20 70 61 74 68 3b 20 70 72 6f 62 61 62 6c 79 20 61 63 74 69 6f 6e 2b 70 61 74 68 20 .the.path;.probably.action+path.
bd40 6f 72 20 73 6f 6d 65 74 68 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a or.something)..........////TODO:
bd60 20 61 64 64 20 6f 70 74 69 6f 6e 20 74 6f 20 73 75 70 70 72 65 73 73 20 61 6e 79 20 6e 6f 6e 2d .add.option.to.suppress.any.non-
bd80 6d 61 74 63 68 69 6e 67 20 62 69 6e 64 69 6e 67 20 62 79 20 73 65 74 74 69 6e 67 20 69 74 73 20 matching.binding.by.setting.its.
bda0 6f 76 65 72 72 69 64 65 20 74 6f 20 61 6e 20 65 6d 70 74 79 20 70 61 74 68 0d 0a 20 20 20 20 20 override.to.an.empty.path.......
bdc0 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 6e 65 65 64 20 61 62 69 6c 69 74 79 20 74 6f 20 64 6f 20 ...////TODO:.need.ability.to.do.
bde0 74 68 69 73 20 77 69 74 68 20 61 20 6c 69 73 74 20 6f 66 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 this.with.a.list.of.controls....
be00 20 20 20 20 20 20 2f 2f 20 46 6f 72 20 61 6c 6c 20 62 69 6e 64 69 6e 67 73 20 69 6e 20 74 68 65 ......//.For.all.bindings.in.the
be20 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 2c 20 69 66 20 61 20 62 69 6e 64 69 6e 67 20 6d 61 74 63 .given.action,.if.a.binding.matc
be40 68 65 73 20 61 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 hes.a.control.in.the.given.contr
be60 6f 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 68 69 65 72 61 72 63 68 79 2c 20 73 65 74 20 61 6e ol..........//.hierarchy,.set.an
be80 20 6f 76 65 72 72 69 64 65 20 6f 6e 20 74 68 65 20 62 69 6e 64 69 6e 67 20 74 6f 20 72 65 66 65 .override.on.the.binding.to.refe
bea0 72 20 73 70 65 63 69 66 69 63 61 6c 6c 79 20 74 6f 20 74 68 61 74 20 63 6f 6e 74 72 6f 6c 2e 0d r.specifically.to.that.control..
bec0 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 52 65 74 75 72 6e 73 20 .........//..........//.Returns.
bee0 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 6f 76 65 72 72 69 64 65 73 20 74 68 61 74 20 68 61 76 the.number.of.overrides.that.hav
bf00 65 20 62 65 65 6e 20 61 70 70 6c 69 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 e.been.applied...........//.....
bf20 20 20 20 20 20 2f 2f 20 55 73 65 20 63 61 73 65 3a 20 53 61 79 20 79 6f 75 20 68 61 76 65 20 61 .....//.Use.case:.Say.you.have.a
bf40 20 6c 6f 63 61 6c 20 63 6f 2d 6f 70 20 67 61 6d 65 20 61 6e 64 20 61 20 73 69 6e 67 6c 65 20 61 .local.co-op.game.and.a.single.a
bf60 63 74 69 6f 6e 20 6d 61 70 20 74 68 61 74 20 72 65 70 72 65 73 65 6e 74 73 20 74 68 65 0d 0a 20 ction.map.that.represents.the...
bf80 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 73 20 6f 66 20 61 .......//...........actions.of.a
bfa0 6e 79 20 73 69 6e 67 6c 65 20 70 6c 61 79 65 72 2e 20 54 6f 20 65 6e 64 20 75 70 20 77 69 74 68 ny.single.player..To.end.up.with
bfc0 20 61 63 74 69 6f 6e 20 6d 61 70 73 20 74 68 61 74 20 61 72 65 20 73 70 65 63 69 66 69 63 20 74 .action.maps.that.are.specific.t
bfe0 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 61 20 63 65 72 74 61 69 o..........//...........a.certai
c000 6e 20 70 6c 61 79 65 72 2c 20 79 6f 75 20 63 6f 75 6c 64 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 n.player,.you.could,.for.example
c020 2c 20 63 6c 6f 6e 65 20 74 68 65 20 61 63 74 69 6f 6e 20 6d 61 70 20 66 6f 75 72 20 74 69 6d 65 ,.clone.the.action.map.four.time
c040 73 2c 20 61 6e 64 20 74 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 s,.and.then..........//.........
c060 20 20 74 61 6b 65 20 66 6f 75 72 20 67 61 6d 65 70 61 64 20 64 65 76 69 63 65 73 20 61 6e 64 20 ..take.four.gamepad.devices.and.
c080 75 73 65 20 74 68 65 20 6d 65 74 68 6f 64 73 20 68 65 72 65 20 74 6f 20 68 61 76 65 20 62 69 6e use.the.methods.here.to.have.bin
c0a0 64 69 6e 67 73 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 dings.be.overridden..........//.
c0c0 20 20 20 20 20 20 20 20 20 20 6f 6e 20 65 61 63 68 20 6d 61 70 20 74 6f 20 72 65 66 65 72 20 74 ..........on.each.map.to.refer.t
c0e0 6f 20 61 20 73 70 65 63 69 66 69 63 20 67 61 6d 65 70 61 64 20 69 6e 73 74 61 6e 63 65 2e 0d 0a o.a.specific.gamepad.instance...
c100 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 ........//..........//..........
c120 20 41 6e 6f 74 68 65 72 20 65 78 61 6d 70 6c 65 20 69 73 20 68 61 76 69 6e 67 20 74 77 6f 20 58 .Another.example.is.having.two.X
c140 52 43 6f 6e 74 72 6f 6c 6c 65 72 73 20 61 6e 64 20 74 77 6f 20 61 63 74 69 6f 6e 20 6d 61 70 73 RControllers.and.two.action.maps
c160 20 63 61 6e 20 62 65 20 6f 6e 20 65 69 74 68 65 72 20 68 61 6e 64 2e 0d 0a 20 20 20 20 20 20 20 .can.be.on.either.hand..........
c180 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 41 74 20 72 75 6e 74 69 6d 65 20 79 6f 75 20 63 61 6e .//...........At.runtime.you.can
c1a0 20 64 79 6e 61 6d 69 63 61 6c 6c 79 20 6f 76 65 72 72 69 64 65 20 61 6e 64 20 72 65 2d 6f 76 65 .dynamically.override.and.re-ove
c1c0 72 72 69 64 65 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 6f 6e 20 74 68 65 20 61 63 74 69 6f 6e rride.the.bindings.on.the.action
c1e0 20 6d 61 70 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 74 6f 20 75 .maps..........//...........to.u
c200 73 65 20 74 68 65 6d 20 77 69 74 68 20 74 68 65 20 63 6f 6e 74 72 6f 6c 6c 65 72 73 20 61 73 20 se.them.with.the.controllers.as.
c220 64 65 73 69 72 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 desired...........public.static.
c240 69 6e 74 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 73 4f 6e 4d 61 74 63 68 int.ApplyBindingOverridesOnMatch
c260 69 6e 67 43 6f 6e 74 72 6f 6c 73 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 ingControls(this.InputAction.act
c280 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 ion,.InputControl.control)......
c2a0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d ....{..............if.(action.==
c2c0 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 6e 65 .null)..................throw.ne
c2e0 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 w.ArgumentNullException(nameof(a
c300 63 74 69 6f 6e 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f ction));..............if.(contro
c320 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f l.==.null)..................thro
c340 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 w.new.ArgumentNullException(name
c360 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 of(control));................var
c380 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 3b 0d 0a 20 20 .bindings.=.action.bindings;....
c3a0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 43 6f 75 6e 74 20 3d 20 62 69 ..........var.bindingsCount.=.bi
c3c0 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e ndings.Count;..............var.n
c3e0 75 6d 4d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f 6c 73 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 umMatchingControls.=.0;.........
c400 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 62 69 6e 64 69 .......for.(var.i.=.0;.i.<.bindi
c420 6e 67 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 ngsCount;.++i)..............{...
c440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 74 63 68 69 6e 67 43 6f 6e 74 72 ...............var.matchingContr
c460 6f 6c 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 54 72 79 46 69 6e 64 43 6f 6e ol.=.InputControlPath.TryFindCon
c480 74 72 6f 6c 28 63 6f 6e 74 72 6f 6c 2c 20 62 69 6e 64 69 6e 67 73 5b 69 5d 2e 70 61 74 68 29 3b trol(control,.bindings[i].path);
c4a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 74 63 68 69 6e 67 43 6f ..................if.(matchingCo
c4c0 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntrol.==.null)..................
c4e0 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....continue;...................
c500 20 61 63 74 69 6f 6e 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 69 2c 20 .action.ApplyBindingOverride(i,.
c520 6d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f 6c 2e 70 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 matchingControl.path);..........
c540 20 20 20 20 20 20 20 20 2b 2b 6e 75 6d 4d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f 6c 73 3b 0d 0a ........++numMatchingControls;..
c560 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 74 ............}................ret
c580 75 72 6e 20 6e 75 6d 4d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 20 20 20 20 20 20 urn.numMatchingControls;........
c5a0 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 69 6e 74 ..}............public.static.int
c5c0 20 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 73 4f 6e 4d 61 74 63 68 69 6e 67 .ApplyBindingOverridesOnMatching
c5e0 43 6f 6e 74 72 6f 6c 73 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 20 61 63 74 Controls(this.InputActionMap.act
c600 69 6f 6e 4d 61 70 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 ionMap,.InputControl.control)...
c620 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 61 63 74 69 6f 6e .......{..............if.(action
c640 4d 61 70 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 Map.==.null)..................th
c660 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 row.new.ArgumentNullException(na
c680 6d 65 6f 66 28 61 63 74 69 6f 6e 4d 61 70 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 meof(actionMap));..............i
c6a0 66 20 28 63 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 f.(control.==.null).............
c6c0 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
c6e0 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 tion(nameof(control));..........
c700 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 73 20 3d 20 61 63 74 69 6f 6e 4d 61 70 2e 61 63 ......var.actions.=.actionMap.ac
c720 74 69 6f 6e 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 43 6f tions;..............var.actionCo
c740 75 6e 74 20 3d 20 61 63 74 69 6f 6e 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 unt.=.actions.Count;............
c760 20 20 76 61 72 20 6e 75 6d 4d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f 6c 73 20 3d 20 30 3b 0d 0a ..var.numMatchingControls.=.0;..
c780 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 3d 20 30 3b 20 69 20 ..............for.(var.i.=.0;.i.
c7a0 3c 20 61 63 74 69 6f 6e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 <.actionCount;.++i).............
c7c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 20 3d .{..................var.action.=
c7e0 20 61 63 74 69 6f 6e 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 75 .actions[i];..................nu
c800 6d 4d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f 6c 73 20 3d 20 61 63 74 69 6f 6e 2e 41 70 70 6c 79 mMatchingControls.=.action.Apply
c820 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 73 4f 6e 4d 61 74 63 68 69 6e 67 43 6f 6e 74 72 6f BindingOverridesOnMatchingContro
c840 6c 73 28 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ls(control);..............}.....
c860 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6d 4d 61 74 63 68 69 6e 67 43 6f 6e ...........return.numMatchingCon
c880 74 72 6f 6c 73 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 trols;..........}............///
c8a0 2f 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 6f 76 65 72 77 72 69 74 69 6e 67 20 6d 61 67 6e 69 74 75 /TODO:.allow.overwriting.magnitu
c8c0 64 65 20 77 69 74 68 20 63 75 73 74 6f 6d 20 76 61 6c 75 65 73 3b 20 6d 61 79 62 65 20 74 75 72 de.with.custom.values;.maybe.tur
c8e0 6e 20 6d 6f 72 65 20 69 6e 74 6f 20 61 6e 20 6f 76 65 72 61 6c 6c 20 22 73 63 6f 72 65 22 20 66 n.more.into.an.overall."score".f
c900 6f 72 20 61 20 63 6f 6e 74 72 6f 6c 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d or.a.control............///.<sum
c920 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6e 20 6f 6e 67 6f 69 6e 67 20 72 65 mary>..........///.An.ongoing.re
c940 62 69 6e 64 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 binding.operation...........///.
c960 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 </summary>..........///.<remarks
c980 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 63 6c 61 73 73 20 61 63 74 73 20 61 >..........///.This.class.acts.a
c9a0 73 20 62 6f 74 68 20 61 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 6e 74 65 72 66 61 63 65 s.both.a.configuration.interface
c9c0 20 66 6f 72 20 72 65 62 69 6e 64 73 20 61 73 20 77 65 6c 6c 20 61 73 20 61 20 63 6f 6e 74 72 6f .for.rebinds.as.well.as.a.contro
c9e0 6c 6c 65 72 20 77 68 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 72 65 62 69 ller.while..........///.the.rebi
ca00 6e 64 20 69 73 20 6f 6e 67 6f 69 6e 67 2e 20 41 6e 20 69 6e 73 74 61 6e 63 65 20 63 61 6e 20 62 nd.is.ongoing..An.instance.can.b
ca20 65 20 72 65 75 73 65 64 20 61 72 62 69 74 72 61 72 79 20 6d 61 6e 79 20 74 69 6d 65 73 2e 20 44 e.reused.arbitrary.many.times..D
ca40 6f 69 6e 67 20 73 6f 20 63 61 6e 20 61 76 6f 69 64 20 61 6c 6c 6f 63 61 74 69 6e 67 0d 0a 20 20 oing.so.can.avoid.allocating....
ca60 20 20 20 20 20 20 2f 2f 2f 20 61 64 64 69 74 69 6f 6e 61 6c 20 47 43 20 6d 65 6d 6f 72 79 20 28 ......///.additional.GC.memory.(
ca80 74 68 65 20 63 6c 61 73 73 20 69 6e 74 65 72 6e 61 6c 6c 79 20 72 65 74 61 69 6e 73 20 73 74 61 the.class.internally.retains.sta
caa0 74 65 20 74 68 61 74 20 69 74 20 63 61 6e 20 72 65 75 73 65 20 66 6f 72 20 6d 75 6c 74 69 70 6c te.that.it.can.reuse.for.multipl
cac0 65 20 72 65 62 69 6e 64 73 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 e.rebinds)...........///........
cae0 20 20 2f 2f 2f 20 4e 6f 74 65 2c 20 68 6f 77 65 76 65 72 2c 20 74 68 61 74 20 64 75 72 69 6e 67 ..///.Note,.however,.that.during
cb00 20 72 65 62 69 6e 64 69 6e 67 20 69 74 20 63 61 6e 20 62 65 20 6e 65 63 65 73 73 61 72 79 20 74 .rebinding.it.can.be.necessary.t
cb20 6f 20 6c 6f 6f 6b 20 61 74 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f o.look.at.the.<see.cref="InputCo
cb40 6e 74 72 6f 6c 4c 61 79 6f 75 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 6e 66 6f ntrolLayout"/>..........///.info
cb60 72 6d 61 74 69 6f 6e 20 72 65 67 69 73 74 65 72 65 64 20 69 6e 20 74 68 65 20 73 79 73 74 65 6d rmation.registered.in.the.system
cb80 20 77 68 69 63 68 20 6d 65 61 6e 73 20 74 68 61 74 20 6c 61 79 6f 75 74 73 20 6d 61 79 20 68 61 .which.means.that.layouts.may.ha
cba0 76 65 20 74 6f 20 62 65 20 6c 6f 61 64 65 64 2e 20 54 68 65 73 65 20 77 69 6c 6c 20 62 65 0d 0a ve.to.be.loaded..These.will.be..
cbc0 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 61 63 68 65 64 20 66 6f 72 20 61 73 20 6c 6f 6e 67 20 61 ........///.cached.for.as.long.a
cbe0 73 20 74 68 65 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e 20 69 73 20 6e 6f 74 20 64 69 s.the.rebind.operation.is.not.di
cc00 73 70 6f 73 65 64 20 6f 66 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 sposed.of...........///.........
cc20 20 2f 2f 2f 20 54 6f 20 72 65 73 65 74 20 74 68 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 .///.To.reset.the.configuration.
cc40 6f 66 20 61 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e 20 77 69 74 68 6f 75 74 20 72 65 of.a.rebind.operation.without.re
cc60 6c 65 61 73 69 6e 67 20 69 74 73 20 6d 65 6d 6f 72 79 2c 20 63 61 6c 6c 20 3c 73 65 65 20 63 72 leasing.its.memory,.call.<see.cr
cc80 65 66 3d 22 52 65 73 65 74 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 ef="Reset"/>...........///.Note.
cca0 74 68 61 74 20 63 68 61 6e 67 69 6e 67 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 77 68 69 6c that.changing.configuration.whil
ccc0 65 20 61 20 72 65 62 69 6e 64 20 69 73 20 69 6e 20 70 72 6f 67 72 65 73 73 20 69 6e 20 6e 6f 74 e.a.rebind.is.in.progress.in.not
cce0 20 61 6c 6c 6f 77 65 64 20 61 6e 64 20 77 69 6c 6c 20 74 68 72 6f 77 0d 0a 20 20 20 20 20 20 20 .allowed.and.will.throw.........
cd00 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e .///.<see.cref="InvalidOperation
cd20 45 78 63 65 70 74 69 6f 6e 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 Exception"/>...........///......
cd40 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ....///.<example>..........///.<
cd60 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 76 61 72 20 72 65 62 69 6e 64 20 3d 20 code>..........///.var.rebind.=.
cd80 6e 65 77 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 20 new.RebindingOperation()........
cda0 20 20 2f 2f 2f 20 20 20 20 20 2e 57 69 74 68 41 63 74 69 6f 6e 28 6d 79 41 63 74 69 6f 6e 29 0d ..///......WithAction(myAction).
cdc0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 2e 57 69 74 68 42 69 6e 64 69 6e 67 47 72 6f .........///......WithBindingGro
cde0 75 70 28 22 47 61 6d 65 70 61 64 22 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 2e up("Gamepad")..........///......
ce00 57 69 74 68 43 61 6e 63 65 6c 69 6e 67 54 68 72 6f 75 67 68 28 22 26 6c 74 3b 4b 65 79 62 6f 61 WithCancelingThrough("&lt;Keyboa
ce20 72 64 26 67 74 3b 2f 65 73 63 61 70 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 rd&gt;/escape");..........///...
ce40 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 62 69 6e 64 2e 53 74 61 72 74 28 29 3b 0d 0a 20 20 20 20 .......///.rebind.Start();......
ce60 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 ....///.</code>..........///.</e
ce80 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f xample>..........///..........//
cea0 2f 20 4e 6f 74 65 20 74 68 61 74 20 69 6e 73 74 61 6e 63 65 73 20 6f 66 20 74 68 69 73 20 63 6c /.Note.that.instances.of.this.cl
cec0 61 73 73 20 3c 65 6d 3e 6d 75 73 74 3c 2f 65 6d 3e 20 62 65 20 64 69 73 70 6f 73 65 64 20 6f 66 ass.<em>must</em>.be.disposed.of
cee0 20 74 6f 20 6e 6f 74 20 6c 65 61 6b 20 6d 65 6d 6f 72 79 20 6f 6e 20 74 68 65 20 75 6e 6d 61 6e .to.not.leak.memory.on.the.unman
cf00 61 67 65 64 20 68 65 61 70 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b aged.heap...........///.</remark
cf20 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 s>..........///.<seealso.cref="I
cf40 6e 70 75 74 41 63 74 69 6f 6e 52 65 62 69 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 2e 50 65 nputActionRebindingExtensions.Pe
cf60 72 66 6f 72 6d 49 6e 74 65 72 61 63 74 69 76 65 52 65 62 69 6e 64 69 6e 67 22 2f 3e 0d 0a 20 20 rformInteractiveRebinding"/>....
cf80 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 65 61 6c 65 64 20 63 6c 61 73 73 20 52 65 62 69 6e 64 ......public.sealed.class.Rebind
cfa0 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 3a 20 49 44 69 73 70 6f 73 61 62 6c 65 0d 0a 20 20 20 20 ingOperation.:.IDisposable......
cfc0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 ....{..............public.const.
cfe0 66 6c 6f 61 74 20 6b 44 65 66 61 75 6c 74 4d 61 67 6e 69 74 75 64 65 54 68 72 65 73 68 6f 6c 64 float.kDefaultMagnitudeThreshold
d000 20 3d 20 30 2e 32 66 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .=.0.2f;................///.<sum
d020 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 61 63 74 69 6f mary>..............///.The.actio
d040 6e 20 74 68 61 74 20 72 65 62 69 6e 64 69 6e 67 20 69 73 20 62 65 69 6e 67 20 70 65 72 66 6f 72 n.that.rebinding.is.being.perfor
d060 6d 65 64 20 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 med.on...............///.</summa
d080 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 ry>..............///.<seealso.cr
d0a0 65 66 3d 22 57 69 74 68 41 63 74 69 6f 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 ef="WithAction"/>..............p
d0c0 75 62 6c 69 63 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 20 3d 3e 20 6d 5f 41 63 ublic.InputAction.action.=>.m_Ac
d0e0 74 69 6f 6e 54 6f 52 65 62 69 6e 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f tionToRebind;................///
d100 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4f 70 74 69 .<summary>..............///.Opti
d120 6f 6e 61 6c 20 6d 61 73 6b 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 77 68 69 63 68 20 62 69 6e onal.mask.to.determine.which.bin
d140 64 69 6e 67 73 20 74 6f 20 61 70 70 6c 79 20 6f 76 65 72 72 69 64 65 73 20 74 6f 2e 0d 0a 20 20 dings.to.apply.overrides.to.....
d160 20 20 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 20 ..........///.</summary>........
d180 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ......///.<remarks>.............
d1a0 20 2f 2f 2f 20 49 66 20 74 68 69 73 20 69 73 20 6e 6f 74 20 6e 75 6c 6c 2c 20 61 6c 6c 20 62 69 .///.If.this.is.not.null,.all.bi
d1c0 6e 64 69 6e 67 73 20 74 68 61 74 20 6d 61 74 63 68 20 74 68 69 73 20 6d 61 73 6b 20 77 69 6c 6c ndings.that.match.this.mask.will
d1e0 20 68 61 76 65 20 6f 76 65 72 72 69 64 65 73 20 61 70 70 6c 69 65 64 20 74 6f 20 74 68 65 6d 2e .have.overrides.applied.to.them.
d200 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 ..............///.</remarks>....
d220 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 3f 20 62 ..........public.InputBinding?.b
d240 69 6e 64 69 6e 67 4d 61 73 6b 20 3d 3e 20 6d 5f 42 69 6e 64 69 6e 67 4d 61 73 6b 3b 0d 0a 0d 0a indingMask.=>.m_BindingMask;....
d260 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 65 78 70 6f 73 69 6e 67 ............////REVIEW:.exposing
d280 20 74 68 69 73 20 61 73 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 69 73 74 20 69 73 20 76 65 72 .this.as.InputControlList.is.ver
d2a0 79 20 6d 69 73 6c 65 61 64 69 6e 67 20 61 73 20 75 73 65 72 73 20 77 69 6c 6c 20 6e 6f 74 20 67 y.misleading.as.users.will.not.g
d2c0 65 74 20 61 6e 20 65 72 72 6f 72 20 77 68 65 6e 20 6d 6f 64 69 66 79 69 6e 67 20 74 68 65 20 6c et.an.error.when.modifying.the.l
d2e0 69 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 68 6f ist;..............////........ho
d300 77 65 76 65 72 2c 20 65 78 70 6f 73 69 6e 67 20 74 68 72 6f 75 67 68 20 61 6e 20 69 6e 74 65 72 wever,.exposing.through.an.inter
d320 66 61 63 65 20 77 69 6c 6c 20 6c 65 61 64 20 74 6f 20 62 6f 78 69 6e 67 2e 2e 2e 0d 0a 20 20 20 face.will.lead.to.boxing........
d340 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 .........///.<summary>..........
d360 20 20 20 20 2f 2f 2f 20 43 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 68 61 64 20 69 6e 70 75 74 20 ....///.Controls.that.had.input.
d380 61 6e 64 20 77 65 72 65 20 64 65 65 6d 65 64 20 70 6f 74 65 6e 74 69 61 6c 20 6d 61 74 63 68 65 and.were.deemed.potential.matche
d3a0 73 20 74 6f 20 72 65 62 69 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f s.to.rebind.to...............///
d3c0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 .</summary>..............///.<re
d3e0 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 6f 6e 74 72 6f 6c 73 marks>..............///.Controls
d400 20 69 6e 20 74 68 65 20 6c 69 73 74 20 73 68 6f 75 6c 64 20 62 65 20 6f 72 64 65 72 65 64 20 62 .in.the.list.should.be.ordered.b
d420 79 20 70 72 69 6f 72 69 74 79 20 77 69 74 68 20 74 68 65 20 66 69 72 73 74 20 65 6c 65 6d 65 6e y.priority.with.the.first.elemen
d440 74 20 69 6e 20 74 68 65 20 6c 69 73 74 20 62 65 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 t.in.the.list.being.............
d460 20 2f 2f 2f 20 63 6f 6e 73 69 64 65 72 65 64 20 74 68 65 20 62 65 73 74 20 6d 61 74 63 68 2e 0d .///.considered.the.best.match..
d480 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 .............///.</remarks>.....
d4a0 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 41 64 64 43 .........///.<seealso.cref="AddC
d4c0 61 6e 64 69 64 61 74 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 andidate"/>..............///.<se
d4e0 65 61 6c 73 6f 20 63 72 65 66 3d 22 52 65 6d 6f 76 65 43 61 6e 64 69 64 61 74 65 22 2f 3e 0d 0a ealso.cref="RemoveCandidate"/>..
d500 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c ............public.InputControlL
d520 69 73 74 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3e 20 63 61 6e 64 69 64 61 74 65 73 20 3d 3e 20 ist<InputControl>.candidates.=>.
d540 6d 5f 43 61 6e 64 69 64 61 74 65 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f m_Candidates;................///
d560 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 .<summary>..............///.The.
d580 6d 61 74 63 68 69 6e 67 20 73 63 6f 72 65 20 66 6f 72 20 65 61 63 68 20 63 6f 6e 74 72 6f 6c 20 matching.score.for.each.control.
d5a0 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 2e 0d 0a 20 20 in.<see.cref="candidates"/>.....
d5c0 20 20 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 20 ..........///.</summary>........
d5e0 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 41 20 72 65 6c 61 74 69 76 65 20 66 6c 6f 61 ......///.<value>A.relative.floa
d600 74 69 6e 67 2d 70 6f 69 6e 74 20 73 63 6f 72 65 20 66 6f 72 20 65 61 63 68 20 63 6f 6e 74 72 6f ting-point.score.for.each.contro
d620 6c 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 2e 3c 2f l.in.<see.cref="candidates"/>.</
d640 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 value>..............///.<remarks
d660 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 61 6e 64 69 64 61 74 65 73 20 61 72 >..............///.Candidates.ar
d680 65 20 72 61 6e 6b 65 64 20 61 6e 64 20 73 6f 72 74 65 64 20 62 79 20 74 68 65 69 72 20 73 63 6f e.ranked.and.sorted.by.their.sco
d6a0 72 65 2e 20 42 79 20 64 65 66 61 75 6c 74 2c 20 61 20 73 63 6f 72 65 20 69 73 20 63 6f 6d 70 75 re..By.default,.a.score.is.compu
d6c0 74 65 64 20 66 6f 72 20 65 61 63 68 20 63 61 6e 64 69 64 61 74 65 0d 0a 20 20 20 20 20 20 20 20 ted.for.each.candidate..........
d6e0 20 20 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 2e 20 48 ....///.control.automatically..H
d700 6f 77 65 76 65 72 2c 20 74 68 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 20 75 owever,.this.can.be.overridden.u
d720 73 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 6e 43 6f 6d 70 75 74 65 53 63 6f 72 65 22 2f sing.<see.cref="OnComputeScore"/
d740 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 >...............///.............
d760 20 2f 2f 2f 20 44 65 66 61 75 6c 74 20 73 63 6f 72 65 73 20 61 72 65 20 64 69 72 65 63 74 6c 79 .///.Default.scores.are.directly
d780 20 62 61 73 65 64 20 6f 6e 20 6d 61 67 6e 69 74 75 64 65 73 20 28 73 65 65 20 3c 73 65 65 20 63 .based.on.magnitudes.(see.<see.c
d7a0 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 45 76 61 6c 75 61 74 65 4d 61 67 6e 69 74 ref="InputControl.EvaluateMagnit
d7c0 75 64 65 28 29 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 ude()"/>)...............///.The.
d7e0 67 72 65 61 74 65 72 20 74 68 65 20 6d 61 67 6e 69 74 75 64 65 20 6f 66 20 61 63 74 75 61 74 69 greater.the.magnitude.of.actuati
d800 6f 6e 2c 20 74 68 65 20 67 72 65 61 74 65 72 20 74 68 65 20 73 63 6f 72 65 20 61 73 73 6f 63 69 on,.the.greater.the.score.associ
d820 61 74 65 64 20 77 69 74 68 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 20 54 68 69 73 20 6d 65 61 6e ated.with.the.control..This.mean
d840 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c s,..............///.for.example,
d860 20 74 68 61 74 20 69 66 20 62 6f 74 68 20 58 20 61 6e 64 20 59 20 61 72 65 20 61 63 74 75 61 74 .that.if.both.X.and.Y.are.actuat
d880 65 64 20 6f 6e 20 61 20 67 61 6d 65 70 61 64 20 73 74 69 63 6b 2c 20 74 68 65 20 61 78 69 73 20 ed.on.a.gamepad.stick,.the.axis.
d8a0 77 69 74 68 20 74 68 65 20 67 72 65 61 74 65 72 20 61 6d 6f 75 6e 74 0d 0a 20 20 20 20 20 20 20 with.the.greater.amount.........
d8c0 20 20 20 20 20 2f 2f 2f 20 6f 66 20 61 63 74 75 61 74 69 6f 6e 20 77 69 6c 6c 20 67 65 74 20 73 .....///.of.actuation.will.get.s
d8e0 63 6f 72 65 64 20 68 69 67 68 65 72 20 61 6e 64 20 74 68 75 73 20 62 65 20 6d 6f 72 65 20 6c 69 cored.higher.and.thus.be.more.li
d900 6b 65 6c 79 20 74 6f 20 67 65 74 20 70 69 63 6b 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 kely.to.get.picked..............
d920 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 20 61 64 64 69 74 69 6f .///..............///.In.additio
d940 6e 2c 20 31 20 69 73 20 61 64 64 65 64 20 74 6f 20 65 61 63 68 20 64 65 66 61 75 6c 74 20 73 63 n,.1.is.added.to.each.default.sc
d960 6f 72 65 20 69 66 20 74 68 65 20 72 65 73 70 65 63 74 69 76 65 20 63 6f 6e 74 72 6f 6c 20 69 73 ore.if.the.respective.control.is
d980 20 6e 6f 6e 2d 73 79 6e 74 68 65 74 69 63 20 28 73 65 65 20 3c 73 65 65 0d 0a 20 20 20 20 20 20 .non-synthetic.(see.<see........
d9a0 20 20 20 20 20 20 2f 2f 2f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 73 79 6e ......///.cref="InputControl.syn
d9c0 74 68 65 74 69 63 22 2f 3e 29 2e 20 54 68 69 73 20 77 69 6c 6c 20 67 69 76 65 20 63 6f 6e 74 72 thetic"/>)..This.will.give.contr
d9e0 6f 6c 73 20 74 68 61 74 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 61 63 74 75 61 6c 20 63 6f ols.that.correspond.to.actual.co
da00 6e 74 72 6f 6c 73 20 70 72 65 73 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 ntrols.present..............///.
da20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 20 70 72 65 63 65 64 65 6e 63 65 20 6f 76 65 72 20 74 68 on.the.device.precedence.over.th
da40 6f 73 65 20 61 64 64 65 64 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 46 6f 72 20 65 78 61 6d 70 6c ose.added.internally..For.exampl
da60 65 2c 20 69 66 20 62 6f 74 68 20 61 72 65 20 61 63 74 75 61 74 65 64 2c 20 74 68 65 20 73 79 6e e,.if.both.are.actuated,.the.syn
da80 74 68 65 74 69 63 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 thetic..............///.<see.cre
daa0 66 3d 22 43 6f 6e 74 72 6f 6c 73 2e 53 74 69 63 6b 43 6f 6e 74 72 6f 6c 2e 75 70 22 2f 3e 20 62 f="Controls.StickControl.up"/>.b
dac0 75 74 74 6f 6e 20 6f 6e 20 73 74 69 63 6b 20 63 6f 6e 74 72 6f 6c 73 20 77 69 6c 6c 20 62 65 20 utton.on.stick.controls.will.be.
dae0 72 61 6e 6b 65 64 20 6c 6f 77 65 72 20 74 68 61 6e 20 74 68 65 20 3c 73 65 65 0d 0a 20 20 20 20 ranked.lower.than.the.<see......
db00 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 72 65 66 3d 22 47 61 6d 65 70 61 64 2e 62 75 74 74 6f 6e ........///.cref="Gamepad.button
db20 53 6f 75 74 68 22 2f 3e 20 77 68 69 63 68 20 69 73 20 61 6e 20 61 63 74 75 61 6c 20 62 75 74 74 South"/>.which.is.an.actual.butt
db40 6f 6e 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f on.on.the.device.............../
db60 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c //.</remarks>..............///.<
db80 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 4f 6e 43 6f 6d 70 75 74 65 53 63 6f 72 65 22 2f 3e 0d seealso.cref="OnComputeScore"/>.
dba0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 .............///.<seealso.cref="
dbc0 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 candidates"/>..............publi
dbe0 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 66 6c 6f 61 74 3e 20 73 63 6f 72 65 73 20 3d 3e c.ReadOnlyArray<float>.scores.=>
dc00 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 66 6c 6f 61 74 3e 28 6d 5f 53 63 6f 72 .new.ReadOnlyArray<float>(m_Scor
dc20 65 73 2c 20 30 2c 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 6f 75 6e 74 29 3b 0d 0a 0d 0a 20 es,.0,.m_Candidates.Count);.....
dc40 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ...........///.<summary>........
dc60 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 6d 61 74 63 68 69 6e 67 20 63 6f 6e 74 72 6f 6c 20 61 ......///.The.matching.control.a
dc80 63 74 75 61 74 69 6f 6e 20 6c 65 76 65 6c 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 ctuation.level.(see.<see.cref="I
dca0 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 45 76 61 6c 75 61 74 65 4d 61 67 6e 69 74 75 64 65 28 29 22 nputControl.EvaluateMagnitude()"
dcc0 2f 3e 20 66 6f 72 20 65 61 63 68 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 3c 73 65 65 20 63 72 65 66 />.for.each.control.in.<see.cref
dce0 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f ="candidates"/>...............//
dd00 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 /.</summary>..............///.<v
dd20 61 6c 75 65 3e 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 45 76 61 alue><see.cref="InputControl.Eva
dd40 6c 75 61 74 65 4d 61 67 6e 69 74 75 64 65 28 29 22 2f 3e 20 72 65 73 75 6c 74 20 66 6f 72 20 65 luateMagnitude()"/>.result.for.e
dd60 61 63 68 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 22 2f 3e 20 69 ach.<see.cref="InputControl"/>.i
dd80 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 2e 3c 2f 76 61 6c n.<see.cref="candidates"/>.</val
dda0 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a ue>..............///.<remarks>..
ddc0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 61 72 72 61 79 20 6d 69 72 72 6f ............///.This.array.mirro
dde0 72 73 20 3c 73 65 65 20 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 2c 20 69 2e 65 rs.<see.cref="candidates"/>,.i.e
de00 2e 20 65 61 63 68 20 65 6e 74 72 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 74 68 65 20 ..each.entry.corresponds.to.the.
de20 65 6e 74 72 79 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f entry.in.<see.cref="candidates"/
de40 3e 20 61 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 73 61 6d 65 20 69 >.at..............///.the.same.i
de60 6e 64 65 78 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 ndex...............///.</remarks
de80 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 >..............///.<seealso.cref
dea0 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 45 76 61 6c 75 61 74 65 4d 61 67 6e 69 74 75 64 65 ="InputControl.EvaluateMagnitude
dec0 28 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 ()"/>..............///.<seealso.
dee0 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 cref="candidates"/>.............
df00 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 66 6c 6f 61 74 3e 20 6d 61 67 .public.ReadOnlyArray<float>.mag
df20 6e 69 74 75 64 65 73 20 3d 3e 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 66 6c 6f nitudes.=>.new.ReadOnlyArray<flo
df40 61 74 3e 28 6d 5f 4d 61 67 6e 69 74 75 64 65 73 2c 20 30 2c 20 6d 5f 43 61 6e 64 69 64 61 74 65 at>(m_Magnitudes,.0,.m_Candidate
df60 73 2e 43 6f 75 6e 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 s.Count);................///.<su
df80 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 6f 6e 74 mmary>..............///.The.cont
dfa0 72 6f 6c 20 63 75 72 72 65 6e 74 6c 79 20 64 65 65 6d 65 64 20 74 68 65 20 62 65 73 74 20 63 61 rol.currently.deemed.the.best.ca
dfc0 6e 64 69 64 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d ndidate...............///.</summ
dfe0 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 50 72 69 ary>..............///.<value>Pri
e000 6d 61 72 79 20 63 61 6e 64 69 64 61 74 65 20 63 6f 6e 74 72 6f 6c 20 61 74 20 74 68 69 73 20 70 mary.candidate.control.at.this.p
e020 6f 69 6e 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c oint.</value>..............///.<
e040 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 remarks>..............///.If.the
e060 72 65 20 61 72 65 20 6e 6f 20 63 61 6e 64 69 64 61 74 65 73 20 79 65 74 2c 20 74 68 69 73 20 72 re.are.no.candidates.yet,.this.r
e080 65 74 75 72 6e 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 20 49 66 20 74 68 65 72 65 20 61 72 65 eturns.<c>null</c>..If.there.are
e0a0 20 63 61 6e 64 69 64 61 74 65 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 74 .candidates,..............///.it
e0c0 20 72 65 74 75 72 6e 73 20 74 68 65 20 66 69 72 73 74 20 65 6c 65 6d 65 6e 74 20 6f 66 20 3c 73 .returns.the.first.element.of.<s
e0e0 65 65 20 63 72 65 66 3d 22 63 61 6e 64 69 64 61 74 65 73 22 2f 3e 20 77 68 69 63 68 20 69 73 20 ee.cref="candidates"/>.which.is.
e100 61 6c 77 61 79 73 20 74 68 65 20 63 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 always.the.control..............
e120 2f 2f 2f 20 77 69 74 68 20 74 68 65 20 68 69 67 68 65 73 74 20 6d 61 74 63 68 69 6e 67 20 73 63 ///.with.the.highest.matching.sc
e140 6f 72 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e ore...............///.</remarks>
e160 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f ..............public.InputContro
e180 6c 20 73 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b l.selectedControl..............{
e1a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 ..................get...........
e1c0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .......{......................if
e1e0 20 28 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 6f 75 6e 74 20 3d 3d 20 30 29 0d 0a 20 20 20 20 .(m_Candidates.Count.==.0)......
e200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b ....................return.null;
e220 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d ........................return.m
e240 5f 43 61 6e 64 69 64 61 74 65 73 5b 30 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _Candidates[0];.................
e260 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .}..............}...............
e280 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 .///.<summary>..............///.
e2a0 57 68 65 74 68 65 72 20 74 68 65 20 72 65 62 69 6e 64 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 Whether.the.rebind.is.currently.
e2c0 69 6e 20 70 72 6f 67 72 65 73 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f in.progress...............///.</
e2e0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 summary>..............///.<value
e300 3e 57 68 65 74 68 65 72 20 72 65 62 69 6e 64 20 69 73 20 69 6e 20 70 72 6f 67 72 65 73 73 2e 3c >Whether.rebind.is.in.progress.<
e320 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b /value>..............///.<remark
e340 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 74 72 75 65 s>..............///.This.is.true
e360 20 61 66 74 65 72 20 63 61 6c 6c 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 53 74 61 72 74 22 .after.calling.<see.cref="Start"
e380 2f 3e 20 61 6e 64 20 73 65 74 20 74 6f 20 66 61 6c 73 65 20 77 68 65 6e 0d 0a 20 20 20 20 20 20 />.and.set.to.false.when........
e3a0 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 6e 43 6f 6d 70 6c 65 74 65 22 ......///.<see.cref="OnComplete"
e3c0 2f 3e 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 6e 43 61 6e 63 65 6c 22 2f 3e 20 69 73 20 />.or.<see.cref="OnCancel"/>.is.
e3e0 63 61 6c 6c 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 called...............///.</remar
e400 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 ks>..............///.<seealso.cr
e420 65 66 3d 22 53 74 61 72 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 ef="Start"/>..............///.<s
e440 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 63 6f 6d 70 6c 65 74 65 64 22 2f 3e 0d 0a 20 20 20 20 20 eealso.cref="completed"/>.......
e460 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 63 61 6e 63 65 6c .......///.<seealso.cref="cancel
e480 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 73 ed"/>..............public.bool.s
e4a0 74 61 72 74 65 64 20 3d 3e 20 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 53 74 61 72 74 tarted.=>.(m_Flags.&.Flags.Start
e4c0 65 64 29 20 21 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ed).!=.0;................///.<su
e4e0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 74 68 65 72 20 mmary>..............///.Whether.
e500 74 68 65 20 72 65 62 69 6e 64 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 6c 65 74 65 64 2e 0d 0a the.rebind.has.been.completed...
e520 20 20 20 20 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 ............///.</summary>......
e540 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 54 72 75 65 20 69 66 20 74 68 65 20 72 ........///.<value>True.if.the.r
e560 65 62 69 6e 64 20 68 61 73 20 62 65 65 6e 20 63 6f 6d 70 6c 65 74 65 64 2e 3c 2f 76 61 6c 75 65 ebind.has.been.completed.</value
e580 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 >..............///.<seealso.cref
e5a0 3d 22 4f 6e 43 6f 6d 70 6c 65 74 65 28 41 63 74 69 6f 6e 7b 52 65 62 69 6e 64 69 6e 67 4f 70 65 ="OnComplete(Action{RebindingOpe
e5c0 72 61 74 69 6f 6e 7d 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 ration})"/>..............public.
e5e0 62 6f 6f 6c 20 63 6f 6d 70 6c 65 74 65 64 20 3d 3e 20 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 bool.completed.=>.(m_Flags.&.Fla
e600 67 73 2e 43 6f 6d 70 6c 65 74 65 64 29 20 21 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 gs.Completed).!=.0;.............
e620 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 63 61 6e 63 65 6c 65 64 20 3d 3e 20 28 6d 5f 46 6c ...public.bool.canceled.=>.(m_Fl
e640 61 67 73 20 26 20 46 6c 61 67 73 2e 43 61 6e 63 65 6c 65 64 29 20 21 3d 20 30 3b 0d 0a 0d 0a 20 ags.&.Flags.Canceled).!=.0;.....
e660 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 64 6f 75 62 6c 65 20 73 74 61 72 74 54 69 ...........public.double.startTi
e680 6d 65 20 3d 3e 20 6d 5f 53 74 61 72 74 54 69 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 me.=>.m_StartTime;..............
e6a0 20 20 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 74 69 6d 65 6f 75 74 20 3d 3e 20 6d 5f 54 69 6d 65 ..public.float.timeout.=>.m_Time
e6c0 6f 75 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e out;................public.strin
e6e0 67 20 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 3e 20 6d 5f 45 78 70 65 63 g.expectedControlType.=>.m_Expec
e700 74 65 64 4c 61 79 6f 75 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 tedLayout;................///.<s
e720 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 50 65 72 66 6f 72 6d ummary>..............///.Perform
e740 20 72 65 62 69 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 6f 66 20 74 68 .rebinding.on.the.bindings.of.th
e760 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f e.given.action...............///
e780 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 .</summary>..............///.<pa
e7a0 72 61 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 70 65 72 66 ram.name="action">Action.to.perf
e7c0 6f 72 6d 20 72 65 62 69 6e 64 69 6e 67 20 6f 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 orm.rebinding.on.</param>.......
e7e0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 .......///.<returns>The.same.Reb
e800 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 indingOperation.instance.</retur
e820 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a ns>..............///.<remarks>..
e840 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 62 79 20 64 65 66 ............///.Note.that.by.def
e860 61 75 6c 74 2c 20 61 20 72 65 62 69 6e 64 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 61 20 62 ault,.a.rebind.does.not.have.a.b
e880 69 6e 64 69 6e 67 20 6d 61 73 6b 20 6f 72 20 61 6e 79 20 6f 74 68 65 72 20 73 65 74 74 69 6e 67 inding.mask.or.any.other.setting
e8a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 63 6f 6e 73 74 72 61 69 6e ..............///.that.constrain
e8c0 73 20 77 68 69 63 68 20 62 69 6e 64 69 6e 67 20 74 68 65 20 72 65 62 69 6e 64 20 69 73 20 61 70 s.which.binding.the.rebind.is.ap
e8e0 70 6c 69 65 64 20 74 6f 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 69 66 20 74 68 65 plied.to..This.means.that.if.the
e900 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 68 61 73 20 6d 75 6c .action..............///.has.mul
e920 74 69 70 6c 65 20 62 69 6e 64 69 6e 67 73 2c 20 61 6c 6c 20 6f 66 20 74 68 65 6d 20 77 69 6c 6c tiple.bindings,.all.of.them.will
e940 20 68 61 76 65 20 6f 76 65 72 72 69 64 65 73 20 61 70 70 6c 69 65 64 20 74 6f 20 74 68 65 6d 2e .have.overrides.applied.to.them.
e960 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f ..............///............../
e980 2f 2f 20 54 6f 20 74 61 72 67 65 74 20 73 70 65 63 69 66 69 63 20 62 69 6e 64 69 6e 67 73 2c 20 //.To.target.specific.bindings,.
e9a0 65 69 74 68 65 72 20 73 65 74 20 61 20 62 69 6e 64 69 6e 67 20 69 6e 64 65 78 20 77 69 74 68 20 either.set.a.binding.index.with.
e9c0 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 54 61 72 67 65 74 42 69 6e 64 69 6e 67 22 2f 3e 2c <see.cref="WithTargetBinding"/>,
e9e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 72 20 73 65 74 20 61 20 62 69 6e 64 69 ..............///.or.set.a.bindi
ea00 6e 67 20 6d 61 73 6b 20 77 69 74 68 20 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 42 69 6e 64 ng.mask.with.<see.cref="WithBind
ea20 69 6e 67 4d 61 73 6b 22 2f 3e 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 42 69 6e ingMask"/>.or.<see.cref="WithBin
ea40 64 69 6e 67 47 72 6f 75 70 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a dingGroup"/>...............///..
ea60 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 20 61 63 74 69 6f 6e 20 68 61 ............///.If.the.action.ha
ea80 73 20 61 6e 20 61 73 73 6f 63 69 61 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 s.an.associated.<see.cref="Input
eaa0 41 63 74 69 6f 6e 2e 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 22 2f 3e 20 73 65 Action.expectedControlType"/>.se
eac0 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 74 20 77 69 6c 6c 20 61 75 74 6f t,..............///.it.will.auto
eae0 6d 61 74 69 63 61 6c 6c 79 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 3c 73 65 65 20 63 72 65 66 matically.be.passed.to.<see.cref
eb00 3d 22 57 69 74 68 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 28 73 74 72 69 6e 67 ="WithExpectedControlType(string
eb20 29 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 )"/>...............///.</remarks
eb40 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 >..............///.<exception.cr
eb60 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 ef="ArgumentNullException"><para
eb80 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c mref.name="action"/>.is.<c>null<
eba0 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f /c>.</exception>..............//
ebc0 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 /.<exception.cref="InvalidOperat
ebe0 69 6f 6e 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 ionException"><paramref.name="ac
ec00 74 69 6f 6e 22 2f 3e 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 65 6e 61 62 6c 65 64 2e 3c 2f 65 tion"/>.is.currently.enabled.</e
ec20 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 xception>..............///.<seea
ec40 6c 73 6f 20 63 72 65 66 3d 22 50 65 72 66 6f 72 6d 49 6e 74 65 72 61 63 74 69 76 65 52 65 62 69 lso.cref="PerformInteractiveRebi
ec60 6e 64 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 nding"/>..............public.Reb
ec80 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 41 63 74 69 6f 6e 28 49 6e 70 75 74 indingOperation.WithAction(Input
eca0 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 Action.action)..............{...
ecc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 ...............ThrowIfRebindInPr
ece0 6f 67 72 65 73 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ogress();....................if.
ed00 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 (action.==.null)................
ed20 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 6c 45 78 63 65 ......throw.new.ArgumentNullExce
ed40 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 ption(nameof(action));..........
ed60 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 2e 65 6e 61 62 6c 65 64 29 0d 0a 20 20 20 ........if.(action.enabled).....
ed80 20 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 49 6e 76 61 6c .................throw.new.Inval
eda0 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 24 22 43 61 6e 6e 6f 74 20 72 65 idOperationException($"Cannot.re
edc0 62 69 6e 64 20 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 20 77 68 69 6c 65 20 69 74 20 bind.action.'{action}'.while.it.
ede0 69 73 20 65 6e 61 62 6c 65 64 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 is.enabled");...................
ee00 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 20 3d 20 61 63 74 69 6f 6e 3b 0d 0a 0d 0a 20 .m_ActionToRebind.=.action;.....
ee20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 61 63 74 69 6f 6e 20 ...............//.If.the.action.
ee40 68 61 73 20 61 6e 20 61 73 73 6f 63 69 61 74 65 64 20 65 78 70 65 63 74 65 64 20 6c 61 79 6f 75 has.an.associated.expected.layou
ee60 74 2c 20 63 6f 6e 73 74 72 61 69 6e 20 6f 75 72 73 65 6c 76 65 73 20 62 79 20 69 74 2e 0d 0a 20 t,.constrain.ourselves.by.it....
ee80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 20 64 6f 20 2a 4e ...............//.NOTE:.We.do.*N
eea0 4f 54 2a 20 74 72 61 6e 73 6c 61 74 65 20 74 68 69 73 20 74 6f 20 61 20 63 6f 6e 74 72 6f 6c 20 OT*.translate.this.to.a.control.
eec0 74 79 70 65 20 61 6e 64 20 63 6f 6e 73 74 72 61 69 6e 20 62 79 20 74 68 61 74 20 61 73 20 61 20 type.and.constrain.by.that.as.a.
eee0 77 68 6f 6c 65 20 63 68 61 69 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 whole.chain..................//.
ef00 20 20 20 20 20 20 6f 66 20 64 65 72 69 76 65 64 20 6c 61 79 6f 75 74 73 20 6d 61 79 20 73 68 61 ......of.derived.layouts.may.sha
ef20 72 65 20 74 68 65 20 73 61 6d 65 20 63 6f 6e 74 72 6f 6c 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 re.the.same.control.type........
ef40 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 ...........if.(!string.IsNullOrE
ef60 6d 70 74 79 28 61 63 74 69 6f 6e 2e 65 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 29 mpty(action.expectedControlType)
ef80 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 57 69 74 68 45 78 70 65 63 )......................WithExpec
efa0 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 28 61 63 74 69 6f 6e 2e 65 78 70 65 63 74 65 64 43 6f tedControlType(action.expectedCo
efc0 6e 74 72 6f 6c 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 ntrolType);..................els
efe0 65 20 69 66 20 28 61 63 74 69 6f 6e 2e 74 79 70 65 20 3d 3d 20 49 6e 70 75 74 41 63 74 69 6f 6e e.if.(action.type.==.InputAction
f000 54 79 70 65 2e 42 75 74 74 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Type.Button)....................
f020 20 20 57 69 74 68 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 28 22 42 75 74 74 6f ..WithExpectedControlType("Butto
f040 6e 22 29 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 20 74 n");....................return.t
f060 68 69 73 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 his;..............}.............
f080 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f ...///.<summary>..............//
f0a0 2f 20 50 72 65 76 65 6e 74 20 61 6c 6c 20 69 6e 70 75 74 20 65 76 65 6e 74 73 20 74 68 61 74 20 /.Prevent.all.input.events.that.
f0c0 68 61 76 65 20 69 6e 70 75 74 20 6d 61 74 63 68 69 6e 67 20 74 68 65 20 72 65 62 69 6e 64 20 6f have.input.matching.the.rebind.o
f0e0 70 65 72 61 74 69 6f 6e 27 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 66 72 6f 6d 20 72 65 peration's.configuration.from.re
f100 61 63 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 74 73 20 74 61 72 67 aching..............///.its.targ
f120 65 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 63 65 22 2f 3e 73 20 eted.<see.cref="InputDevice"/>s.
f140 61 6e 64 20 74 68 75 73 20 74 61 6b 69 6e 67 20 65 66 66 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 and.thus.taking.effect..........
f160 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .....///.</summary>.............
f180 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e 64 69 6e 67 .///.<returns>The.same.Rebinding
f1a0 4f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 Operation.instance.</returns>...
f1c0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 ...........///.<remarks>........
f1e0 20 20 20 20 20 20 2f 2f 2f 20 57 68 69 6c 65 20 72 65 62 69 6e 64 69 6e 67 20 69 6e 74 65 72 61 ......///.While.rebinding.intera
f200 63 74 69 76 65 6c 79 2c 20 69 74 20 69 73 20 75 73 75 61 6c 6c 79 20 66 6f 72 20 74 68 65 20 6d ctively,.it.is.usually.for.the.m
f220 6f 73 74 20 70 61 72 74 20 75 6e 64 65 73 69 72 61 62 6c 65 20 66 6f 72 20 69 6e 70 75 74 20 74 ost.part.undesirable.for.input.t
f240 6f 20 61 63 74 75 61 6c 6c 79 20 68 61 76 65 20 61 6e 20 65 66 66 65 63 74 2e 0d 0a 20 20 20 20 o.actually.have.an.effect.......
f260 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 77 68 65 6e 20 72 65 ........///.For.example,.when.re
f280 62 69 6e 64 20 67 61 6d 65 70 61 64 20 69 6e 70 75 74 2c 20 70 72 65 73 73 69 6e 67 20 74 68 65 bind.gamepad.input,.pressing.the
f2a0 20 22 41 22 20 62 75 74 74 6f 6e 20 73 68 6f 75 6c 64 20 6e 6f 74 20 6c 65 61 64 20 74 6f 20 61 ."A".button.should.not.lead.to.a
f2c0 20 22 73 75 62 6d 69 74 22 20 61 63 74 69 6f 6e 20 69 6e 20 74 68 65 20 55 49 2e 0d 0a 20 20 20 ."submit".action.in.the.UI......
f2e0 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 74 68 69 73 20 72 65 61 73 6f 6e 2c 20 61 20 .........///.For.this.reason,.a.
f300 72 65 62 69 6e 64 20 63 61 6e 20 62 65 20 63 6f 6e 66 69 67 75 72 65 64 20 74 6f 20 61 75 74 6f rebind.can.be.configured.to.auto
f320 6d 61 74 69 63 61 6c 6c 79 20 73 77 61 6c 6c 6f 77 20 61 6e 79 20 69 6e 70 75 74 20 65 76 65 6e matically.swallow.any.input.even
f340 74 20 65 78 63 65 70 74 20 74 68 65 20 6f 6e 65 73 20 68 61 76 69 6e 67 0d 0a 20 20 20 20 20 20 t.except.the.ones.having........
f360 20 20 20 20 20 20 2f 2f 2f 20 69 6e 70 75 74 20 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 6d 61 74 63 ......///.input.on.controls.matc
f380 68 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c hing.<see.cref="WithControlsExcl
f3a0 75 64 69 6e 67 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 uding"/>...............///......
f3c0 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 20 61 74 20 61 6c 6c 20 69 6e 70 75 74 20 6e 65 63 ........///.Not.at.all.input.nec
f3e0 65 73 73 61 72 69 6c 79 20 73 68 6f 75 6c 64 20 62 65 20 73 75 70 70 72 65 73 73 65 64 2e 20 46 essarily.should.be.suppressed..F
f400 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 74 20 63 61 6e 20 62 65 20 64 65 73 69 72 61 62 6c 65 20 or.example,.it.can.be.desirable.
f420 74 6f 20 68 61 76 65 20 55 49 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f to.have.UI.that..............///
f440 20 61 6c 6c 6f 77 73 20 74 68 65 20 75 73 65 72 20 74 6f 20 63 61 6e 63 65 6c 20 61 6e 20 6f 6e .allows.the.user.to.cancel.an.on
f460 67 6f 69 6e 67 20 72 65 62 69 6e 64 20 62 79 20 63 6c 69 63 6b 69 6e 67 20 77 69 74 68 20 74 68 going.rebind.by.clicking.with.th
f480 65 20 6d 6f 75 73 65 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 6d 6f 75 73 65 20 70 e.mouse..This.means.that.mouse.p
f4a0 6f 73 69 74 69 6f 6e 20 61 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 6c 69 osition.and..............///.cli
f4c0 63 6b 20 69 6e 70 75 74 20 73 68 6f 75 6c 64 20 63 6f 6d 65 20 74 68 72 6f 75 67 68 2e 20 46 6f ck.input.should.come.through..Fo
f4e0 72 20 74 68 69 73 20 72 65 61 73 6f 6e 2c 20 69 6e 70 75 74 20 66 72 6f 6d 20 63 6f 6e 74 72 6f r.this.reason,.input.from.contro
f500 6c 73 20 6d 61 74 63 68 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 43 6f 6e 74 72 ls.matching.<see.cref="WithContr
f520 6f 6c 73 45 78 63 6c 75 64 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f olsExcluding"/>..............///
f540 20 69 73 20 73 74 69 6c 6c 20 6c 65 74 20 74 68 72 6f 75 67 68 2e 0d 0a 20 20 20 20 20 20 20 20 .is.still.let.through...........
f560 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....///.</remarks>..............
f580 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 4d 61 public.RebindingOperation.WithMa
f5a0 74 63 68 69 6e 67 45 76 65 6e 74 73 42 65 69 6e 67 53 75 70 70 72 65 73 73 65 64 28 62 6f 6f 6c tchingEventsBeingSuppressed(bool
f5c0 20 76 61 6c 75 65 20 3d 20 74 72 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 .value.=.true)..............{...
f5e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 ...............ThrowIfRebindInPr
f600 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 ogress();..................if.(v
f620 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 alue)......................m_Fla
f640 67 73 20 7c 3d 20 46 6c 61 67 73 2e 53 75 70 70 72 65 73 73 4d 61 74 63 68 69 6e 67 45 76 65 6e gs.|=.Flags.SuppressMatchingEven
f660 74 73 3b 0d 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 ts;..................else.......
f680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 ...............m_Flags.&=.~Flags
f6a0 2e 53 75 70 70 72 65 73 73 4d 61 74 63 68 69 6e 67 45 76 65 6e 74 73 3b 0d 0a 20 20 20 20 20 20 .SuppressMatchingEvents;........
f6c0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 ..........return.this;..........
f6e0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 ....}................///.<summar
f700 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 74 20 74 68 65 20 63 6f 6e 74 y>..............///.Set.the.cont
f720 72 6f 6c 20 70 61 74 68 20 74 68 61 74 20 69 73 20 6d 61 74 63 68 65 64 20 61 67 61 69 6e 73 74 rol.path.that.is.matched.against
f740 20 61 63 74 75 61 74 65 64 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .actuated.controls..............
f760 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f .///.</summary>..............///
f780 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 22 3e 41 20 63 6f 6e 74 72 6f 6c .<param.name="binding">A.control
f7a0 20 70 61 74 68 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 .path.(see.<see.cref="InputContr
f7c0 6f 6c 50 61 74 68 22 2f 3e 29 20 73 75 63 68 20 61 73 20 3c 63 3e 22 26 6c 74 3b 4b 65 79 62 6f olPath"/>).such.as.<c>"&lt;Keybo
f7e0 61 72 64 26 67 74 3b 2f 65 73 63 61 70 65 22 3c 2f 63 3e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 ard&gt;/escape"</c>.</param>....
f800 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 ..........///.<returns>The.same.
f820 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 RebindingOperation.instance.</re
f840 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 turns>..............///.<remarks
f860 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 65 76 65 >..............///.Note.that.eve
f880 72 79 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e 20 68 61 73 20 6f 6e 6c 79 20 6f 6e 65 ry.rebind.operation.has.only.one
f8a0 20 73 75 63 68 20 70 61 74 68 2e 20 43 61 6c 6c 69 6e 67 20 74 68 69 73 20 6d 65 74 68 6f 64 20 .such.path..Calling.this.method.
f8c0 72 65 70 65 61 74 65 64 6c 79 20 77 69 6c 6c 20 6f 76 65 72 77 72 69 74 65 0d 0a 20 20 20 20 20 repeatedly.will.overwrite.......
f8e0 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 70 61 74 68 20 73 65 74 20 66 72 6f 6d 20 70 72 69 .......///.the.path.set.from.pri
f900 6f 72 20 63 61 6c 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 or.calls...............///......
f920 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ........///.<code>..............
f940 2f 2f 2f 20 76 61 72 20 72 65 62 69 6e 64 20 3d 20 6e 65 77 20 52 65 62 69 6e 64 69 6e 67 4f 70 ///.var.rebind.=.new.RebindingOp
f960 65 72 61 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 eration();..............///.....
f980 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 43 61 6e 63 65 6c 20 66 72 6f 6d 20 6b 65 79 62 .........///.//.Cancel.from.keyb
f9a0 6f 61 72 64 20 65 73 63 61 70 65 20 6b 65 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f oard.escape.key...............//
f9c0 2f 20 72 65 62 69 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 2e 57 /.rebind..............///......W
f9e0 69 74 68 43 61 6e 63 65 6c 69 6e 67 54 68 72 6f 75 67 68 28 22 26 6c 74 3b 4b 65 79 62 6f 61 72 ithCancelingThrough("&lt;Keyboar
fa00 64 26 67 74 3b 2f 65 73 63 61 70 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f d&gt;/escape");..............///
fa20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 43 61 6e 63 65 6c 20 66 72 6f 6d ..............///.//.Cancel.from
fa40 20 61 6e 79 20 63 6f 6e 74 72 6f 6c 20 77 69 74 68 20 22 43 61 6e 63 65 6c 22 20 75 73 61 67 65 .any.control.with."Cancel".usage
fa60 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 4e 4f 54 45 3a 20 54 68 69 73 ...............///.//.NOTE:.This
fa80 20 63 61 6e 20 62 65 20 64 61 6e 67 65 72 6f 75 73 2e 20 54 68 65 20 63 6f 6e 74 72 6f 6c 20 74 .can.be.dangerous..The.control.t
faa0 68 61 74 20 74 68 65 20 77 61 6e 74 73 20 74 6f 20 62 69 6e 64 20 74 6f 20 6d 61 79 20 68 61 76 hat.the.wants.to.bind.to.may.hav
fac0 65 20 74 68 65 20 22 43 61 6e 63 65 6c 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 e.the."Cancel"..............///.
fae0 2f 2f 20 20 20 20 20 20 20 75 73 61 67 65 20 61 73 73 69 67 6e 65 64 20 74 6f 20 69 74 2c 20 74 //.......usage.assigned.to.it,.t
fb00 68 75 73 20 6d 61 6b 69 6e 67 20 69 74 20 69 6d 70 6f 73 73 69 62 6c 65 20 66 6f 72 20 74 68 65 hus.making.it.impossible.for.the
fb20 20 75 73 65 72 20 74 6f 20 62 69 6e 64 20 74 6f 20 74 68 65 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 .user.to.bind.to.the.control....
fb40 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 62 69 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 ...........///.rebind...........
fb60 20 20 20 2f 2f 2f 20 20 20 20 20 2e 57 69 74 68 43 61 6e 63 65 6c 69 6e 67 54 68 72 6f 75 67 68 ...///......WithCancelingThrough
fb80 28 22 2a 2f 7b 43 61 6e 63 65 6c 7d 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f ("*/{Cancel}");..............///
fba0 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 .</code>..............///.</rema
fbc0 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 rks>..............public.Rebindi
fbe0 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 43 61 6e 63 65 6c 69 6e 67 54 68 72 6f 75 67 68 ngOperation.WithCancelingThrough
fc00 28 73 74 72 69 6e 67 20 62 69 6e 64 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d (string.binding)..............{.
fc20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e .................ThrowIfRebindIn
fc40 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 Progress();..................m_C
fc60 61 6e 63 65 6c 42 69 6e 64 69 6e 67 20 3d 20 62 69 6e 64 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 ancelBinding.=.binding;.........
fc80 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 .........return.this;...........
fca0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e ...}................public.Rebin
fcc0 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 43 61 6e 63 65 6c 69 6e 67 54 68 72 6f 75 dingOperation.WithCancelingThrou
fce0 67 68 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 gh(InputControl.control)........
fd00 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 54 68 72 6f 77 49 66 ......{..................ThrowIf
fd20 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 RebindInProgress();.............
fd40 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .....if.(control.==.null).......
fd60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e ...............throw.new.Argumen
fd80 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b tNullException(nameof(control));
fda0 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 57 69 74 68 43 61 6e ..................return.WithCan
fdc0 63 65 6c 69 6e 67 54 68 72 6f 75 67 68 28 63 6f 6e 74 72 6f 6c 2e 70 61 74 68 29 3b 0d 0a 20 20 celingThrough(control.path);....
fde0 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 ..........}................publi
fe00 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 45 78 70 65 63 74 65 c.RebindingOperation.WithExpecte
fe20 64 43 6f 6e 74 72 6f 6c 54 79 70 65 28 73 74 72 69 6e 67 20 6c 61 79 6f 75 74 4e 61 6d 65 29 0d dControlType(string.layoutName).
fe40 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 .............{..................
fe60 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 ThrowIfRebindInProgress();......
fe80 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 78 70 65 63 74 65 64 4c 61 79 6f 75 74 20 3d 20 6e ............m_ExpectedLayout.=.n
fea0 65 77 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 28 6c 61 79 6f 75 74 4e 61 6d 65 29 3b 0d 0a ew.InternedString(layoutName);..
fec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 ................return.this;....
fee0 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 ..........}................publi
ff00 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 45 78 70 65 63 74 65 c.RebindingOperation.WithExpecte
ff20 64 43 6f 6e 74 72 6f 6c 54 79 70 65 28 54 79 70 65 20 74 79 70 65 29 0d 0a 20 20 20 20 20 20 20 dControlType(Type.type).........
ff40 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 52 .....{..................ThrowIfR
ff60 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ebindInProgress();..............
ff80 20 20 20 20 69 66 20 28 74 79 70 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 74 79 70 65 6f 66 28 ....if.(type.!=.null.&&.!typeof(
ffa0 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 29 2e 49 73 41 73 73 69 67 6e 61 62 6c 65 46 72 6f 6d 28 74 InputControl).IsAssignableFrom(t
ffc0 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 ype))......................throw
ffe0 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 24 22 54 79 70 65 20 27 7b .new.ArgumentException($"Type.'{
10000 74 79 70 65 2e 4e 61 6d 65 7d 27 20 69 73 20 6e 6f 74 20 61 6e 20 49 6e 70 75 74 43 6f 6e 74 72 type.Name}'.is.not.an.InputContr
10020 6f 6c 22 2c 20 22 74 79 70 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d ol",."type");..................m
10040 5f 43 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 20 74 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 _ControlType.=.type;............
10060 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ......return.this;..............
10080 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e }................public.Rebindin
100a0 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 gOperation.WithExpectedControlTy
100c0 70 65 3c 54 43 6f 6e 74 72 6f 6c 3e 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 pe<TControl>()..................
100e0 77 68 65 72 65 20 54 43 6f 6e 74 72 6f 6c 20 3a 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 0d 0a 20 where.TControl.:.InputControl...
10100 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 54 68 ...........{..................Th
10120 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 20 20 rowIfRebindInProgress();........
10140 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 57 69 74 68 45 78 70 65 63 74 65 64 43 6f 6e ..........return.WithExpectedCon
10160 74 72 6f 6c 54 79 70 65 28 74 79 70 65 6f 66 28 54 43 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 20 20 20 trolType(typeof(TControl));.....
10180 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 2f 2f 54 4f .........}................////TO
101a0 44 4f 3a 20 61 6c 6c 6f 77 20 74 61 72 67 65 74 69 6e 67 20 62 69 6e 64 69 6e 67 73 20 62 79 20 DO:.allow.targeting.bindings.by.
101c0 6e 61 6d 65 20 28 69 2e 65 2e 20 62 65 20 61 62 6c 65 20 74 6f 20 73 61 79 20 57 69 74 68 54 61 name.(i.e..be.able.to.say.WithTa
101e0 72 67 65 74 42 69 6e 64 69 6e 67 28 22 4c 65 66 74 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 rgetBinding("Left"))............
10200 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 ..public.RebindingOperation.With
10220 54 61 72 67 65 74 42 69 6e 64 69 6e 67 28 69 6e 74 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 29 0d TargetBinding(int.bindingIndex).
10240 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 .............{..................
10260 6d 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 20 62 69 6e 64 69 6e 67 49 6e m_TargetBindingIndex.=.bindingIn
10280 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 dex;..................return.thi
102a0 73 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 s;..............}...............
102c0 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 42 .public.RebindingOperation.WithB
102e0 69 6e 64 69 6e 67 4d 61 73 6b 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 3f 20 62 69 6e 64 69 6e 67 indingMask(InputBinding?.binding
10300 4d 61 73 6b 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 Mask)..............{............
10320 20 20 20 20 20 20 6d 5f 42 69 6e 64 69 6e 67 4d 61 73 6b 20 3d 20 62 69 6e 64 69 6e 67 4d 61 73 ......m_BindingMask.=.bindingMas
10340 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b k;..................return.this;
10360 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 70 ..............}................p
10380 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 42 69 6e ublic.RebindingOperation.WithBin
103a0 64 69 6e 67 47 72 6f 75 70 28 73 74 72 69 6e 67 20 67 72 6f 75 70 29 0d 0a 20 20 20 20 20 20 20 dingGroup(string.group).........
103c0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 57 .....{..................return.W
103e0 69 74 68 42 69 6e 64 69 6e 67 4d 61 73 6b 28 6e 65 77 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 20 ithBindingMask(new.InputBinding.
10400 7b 67 72 6f 75 70 73 20 3d 20 67 72 6f 75 70 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 {groups.=.group});..............
10420 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a }................///.<summary>..
10440 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 69 73 61 62 6c 65 20 74 68 65 20 64 65 66 61 ............///.Disable.the.defa
10460 75 6c 74 20 62 65 68 61 76 69 6f 72 20 6f 66 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 67 65 ult.behavior.of.automatically.ge
10480 6e 65 72 61 6c 69 7a 69 6e 67 20 74 68 65 20 70 61 74 68 20 6f 66 20 61 20 73 65 6c 65 63 74 65 neralizing.the.path.of.a.selecte
104a0 64 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 d.control...............///.</su
104c0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 mmary>..............///.<returns
104e0 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 69 6e 73 >The.same.RebindingOperation.ins
10500 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f tance.</returns>..............//
10520 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 74 20 /.<remarks>..............///.At.
10540 72 75 6e 74 69 6d 65 2c 20 65 76 65 72 79 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 runtime,.every.<see.cref="InputC
10560 6f 6e 74 72 6f 6c 22 2f 3e 20 68 61 73 20 61 20 75 6e 69 71 75 65 20 70 61 74 68 20 69 6e 20 74 ontrol"/>.has.a.unique.path.in.t
10580 68 65 20 73 79 73 74 65 6d 20 28 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 he.system.(<see.cref="InputContr
105a0 6f 6c 2e 70 61 74 68 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 48 6f ol.path"/>)...............///.Ho
105c0 77 65 76 65 72 2c 20 77 68 65 6e 20 70 65 72 66 6f 72 6d 69 6e 67 20 72 65 62 69 6e 64 73 2c 20 wever,.when.performing.rebinds,.
105e0 77 65 20 61 72 65 20 6e 6f 74 20 67 65 6e 65 72 61 6c 6c 79 20 69 6e 74 65 72 65 73 74 65 64 20 we.are.not.generally.interested.
10600 69 6e 20 74 68 65 20 73 70 65 63 69 66 69 63 20 72 75 6e 74 69 6d 65 20 70 61 74 68 20 6f 66 20 in.the.specific.runtime.path.of.
10620 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c 20 2d 2d 20 the..............///.control.--.
10640 77 68 69 63 68 20 6d 61 79 20 64 65 70 65 6e 64 20 6f 6e 20 74 68 65 20 6e 75 6d 62 65 72 20 61 which.may.depend.on.the.number.a
10660 6e 64 20 74 79 70 65 73 20 6f 66 20 64 65 76 69 63 65 73 20 70 72 65 73 65 6e 74 2e 20 49 6e 20 nd.types.of.devices.present..In.
10680 66 61 63 74 2c 20 6d 6f 73 74 20 6f 66 20 74 68 65 20 74 69 6d 65 20 77 65 20 61 72 65 20 6e 6f fact,.most.of.the.time.we.are.no
106a0 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 65 76 65 6e 20 69 6e 74 65 72 65 73 74 t..............///.even.interest
106c0 65 64 20 69 6e 20 77 68 61 74 20 70 61 72 74 69 63 75 6c 61 72 20 62 72 61 6e 64 20 6f 66 20 64 ed.in.what.particular.brand.of.d
106e0 65 76 69 63 65 20 74 68 65 20 75 73 65 72 20 69 73 20 72 65 62 69 6e 64 69 6e 67 20 74 6f 20 62 evice.the.user.is.rebinding.to.b
10700 75 74 20 72 61 74 68 65 72 20 77 61 6e 74 20 74 6f 20 6a 75 73 74 20 62 69 6e 64 20 62 61 73 65 ut.rather.want.to.just.bind.base
10720 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 d..............///.on.the.device
10740 27 73 20 62 72 6f 61 64 20 63 61 74 65 67 6f 72 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 's.broad.category...............
10760 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 65 78 61 6d 70 6c 65 ///..............///.For.example
10780 2c 20 69 66 20 74 68 65 20 75 73 65 72 20 68 61 73 20 61 20 44 75 61 6c 53 68 6f 63 6b 20 63 6f ,.if.the.user.has.a.DualShock.co
107a0 6e 74 72 6f 6c 6c 65 72 20 61 6e 64 20 70 65 72 66 6f 72 6d 73 20 61 6e 20 69 6e 74 65 72 61 63 ntroller.and.performs.an.interac
107c0 74 69 76 65 20 72 65 62 69 6e 64 2c 20 77 65 20 75 73 75 61 6c 6c 79 20 64 6f 20 6e 6f 74 20 77 tive.rebind,.we.usually.do.not.w
107e0 61 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 67 65 6e 65 72 61 74 65 ant..............///.to.generate
10800 20 6f 76 65 72 72 69 64 65 20 70 61 74 68 73 20 74 68 61 74 20 72 65 66 6c 65 63 74 73 20 74 68 .override.paths.that.reflects.th
10820 61 74 20 74 68 65 20 69 6e 70 75 74 20 73 70 65 63 69 66 69 63 61 6c 6c 79 20 63 61 6d 65 20 66 at.the.input.specifically.came.f
10840 72 6f 6d 20 61 20 44 75 61 6c 53 68 6f 63 6b 20 63 6f 6e 74 72 6f 6c 6c 65 72 2e 20 52 61 74 68 rom.a.DualShock.controller..Rath
10860 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 65 27 72 65 20 75 73 75 61 6c er,..............///.we're.usual
10880 6c 79 20 69 6e 74 65 72 65 73 74 65 64 20 69 6e 20 74 68 65 20 66 61 63 74 20 74 68 61 74 20 69 ly.interested.in.the.fact.that.i
108a0 74 20 63 61 6d 65 20 66 72 6f 6d 20 61 20 67 61 6d 65 70 61 64 2e 0d 0a 20 20 20 20 20 20 20 20 t.came.from.a.gamepad...........
108c0 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....///.</remarks>..............
108e0 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e ///.<seealso.cref="InputBinding.
10900 6f 76 65 72 72 69 64 65 50 61 74 68 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 overridePath"/>..............pub
10920 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 6f 75 74 47 65 lic.RebindingOperation.WithoutGe
10940 6e 65 72 61 6c 69 7a 69 6e 67 50 61 74 68 4f 66 53 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 28 neralizingPathOfSelectedControl(
10960 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
10980 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 44 6f 6e 74 47 65 6e 65 72 61 6c 69 7a ..m_Flags.|=.Flags.DontGeneraliz
109a0 65 50 61 74 68 4f 66 53 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 3b 0d 0a 20 20 20 20 20 20 20 ePathOfSelectedControl;.........
109c0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 .........return.this;...........
109e0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e ...}................public.Rebin
10a00 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 52 65 62 69 6e 64 41 64 64 69 6e 67 4e 65 dingOperation.WithRebindAddingNe
10a20 77 42 69 6e 64 69 6e 67 28 73 74 72 69 6e 67 20 67 72 6f 75 70 20 3d 20 6e 75 6c 6c 29 0d 0a 20 wBinding(string.group.=.null)...
10a40 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 6d 5f ...........{..................m_
10a60 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 41 64 64 4e 65 77 42 69 6e 64 69 6e 67 3b 0d 0a 20 Flags.|=.Flags.AddNewBinding;...
10a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 42 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 ...............m_BindingGroupFor
10aa0 4e 65 77 42 69 6e 64 69 6e 67 20 3d 20 67 72 6f 75 70 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 NewBinding.=.group;.............
10ac0 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d .....return.this;..............}
10ae0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 ................///.<summary>...
10b00 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 72 65 20 61 63 74 75 61 74 69 6f 6e ...........///.Require.actuation
10b20 20 6f 66 20 63 6f 6e 74 72 6f 6c 73 20 74 6f 20 65 78 63 65 65 64 20 61 20 63 65 72 74 61 69 6e .of.controls.to.exceed.a.certain
10b40 20 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .level...............///.</summa
10b60 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 ry>..............///.<param.name
10b80 3d 22 6d 61 67 6e 69 74 75 64 65 22 3e 4d 69 6e 69 6d 75 6d 20 6d 61 67 6e 69 74 75 64 65 20 74 ="magnitude">Minimum.magnitude.t
10ba0 68 72 65 73 68 6f 6c 64 20 74 68 61 74 20 68 61 73 20 74 6f 20 62 65 20 72 65 61 63 68 65 64 20 hreshold.that.has.to.be.reached.
10bc0 6f 6e 20 61 20 63 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f on.a.control..............///.fo
10be0 72 20 69 74 20 74 6f 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 61 20 63 61 6e 64 69 64 61 74 r.it.to.be.considered.a.candidat
10c00 65 2e 20 53 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 45 e..See.<see.cref="InputControl.E
10c20 76 61 6c 75 61 74 65 4d 61 67 6e 69 74 75 64 65 28 29 22 2f 3e 20 66 6f 72 0d 0a 20 20 20 20 20 valuateMagnitude()"/>.for.......
10c40 20 20 20 20 20 20 20 2f 2f 2f 20 64 65 74 61 69 6c 73 20 61 62 6f 75 74 20 6d 61 67 6e 69 74 75 .......///.details.about.magnitu
10c60 64 65 20 65 76 61 6c 75 61 74 69 6f 6e 73 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 de.evaluations.</param>.........
10c80 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e .....///.<returns>The.same.Rebin
10ca0 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 dingOperation.instance.</returns
10cc0 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 >..............///.<exception.cr
10ce0 65 66 3d 22 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 ef="ArgumentException"><paramref
10d00 20 6e 61 6d 65 3d 22 6d 61 67 6e 69 74 75 64 65 22 2f 3e 20 69 73 20 6e 65 67 61 74 69 76 65 2e .name="magnitude"/>.is.negative.
10d20 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 </exception>..............///.<r
10d40 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 62 69 6e 64 20 emarks>..............///.Rebind.
10d60 6f 70 65 72 61 74 69 6f 6e 73 20 75 73 65 20 61 20 64 65 66 61 75 6c 74 20 74 68 72 65 73 68 6f operations.use.a.default.thresho
10d80 6c 64 20 6f 66 20 30 2e 32 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 61 ld.of.0.2..This.means.that.the.a
10da0 63 74 75 61 74 69 6f 6e 20 6c 65 76 65 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 ctuation.level..............///.
10dc0 6f 66 20 61 6e 79 20 63 6f 6e 74 72 6f 6c 20 61 73 20 72 65 74 75 72 6e 65 64 20 62 79 20 3c 73 of.any.control.as.returned.by.<s
10de0 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 45 76 61 6c 75 61 74 65 4d 61 ee.cref="InputControl.EvaluateMa
10e00 67 6e 69 74 75 64 65 28 29 22 2f 3e 20 6d 75 73 74 20 62 65 20 65 71 75 61 6c 0d 0a 20 20 20 20 gnitude()"/>.must.be.equal......
10e20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 72 20 67 72 65 61 74 65 72 20 74 68 61 6e 20 30 2e 32 20 ........///.or.greater.than.0.2.
10e40 66 6f 72 20 69 74 20 74 6f 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 61 20 70 6f 74 65 6e 74 for.it.to.be.considered.a.potent
10e60 69 61 6c 20 63 61 6e 64 69 64 61 74 65 2e 20 54 68 69 73 20 68 65 6c 70 73 20 66 69 6c 74 65 72 ial.candidate..This.helps.filter
10e80 20 6f 75 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c 73 20 74 .out..............///.controls.t
10ea0 68 61 74 20 61 72 65 20 61 63 74 75 61 74 65 64 20 69 6e 63 69 64 65 6e 74 61 6c 6c 79 20 61 73 hat.are.actuated.incidentally.as
10ec0 20 70 61 72 74 20 6f 66 20 61 63 74 75 61 74 69 6e 67 20 6f 74 68 65 72 20 63 6f 6e 74 72 6f 6c .part.of.actuating.other.control
10ee0 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 s...............///.............
10f00 20 2f 2f 2f 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 74 68 65 20 70 6c 61 79 65 72 20 .///.For.example,.if.the.player.
10f20 77 61 6e 74 73 20 74 6f 20 62 69 6e 64 20 61 6e 20 61 63 74 69 6f 6e 20 74 6f 20 74 68 65 20 58 wants.to.bind.an.action.to.the.X
10f40 20 61 78 69 73 20 6f 66 20 74 68 65 20 67 61 6d 65 70 61 64 27 73 20 72 69 67 68 74 0d 0a 20 20 .axis.of.the.gamepad's.right....
10f60 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 74 69 63 6b 2c 20 74 68 65 20 70 6c 61 79 65 72 20 ..........///.stick,.the.player.
10f80 77 69 6c 6c 20 61 6c 6d 6f 73 74 20 75 6e 61 76 6f 69 64 61 62 6c 79 20 61 6c 73 6f 20 61 63 74 will.almost.unavoidably.also.act
10fa0 75 61 74 65 20 74 68 65 20 59 20 61 78 69 73 20 74 6f 20 61 20 63 65 72 74 61 69 6e 20 64 65 67 uate.the.Y.axis.to.a.certain.deg
10fc0 72 65 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 48 6f 77 65 76 65 72 2c 20 69 ree...............///.However,.i
10fe0 66 20 61 63 74 75 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 59 20 61 78 69 73 20 73 74 61 79 73 20 f.actuation.of.the.Y.axis.stays.
11000 75 6e 64 65 72 20 32 2e 30 2c 20 69 74 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 under.2.0,.it.will.automatically
11020 20 67 65 74 20 66 69 6c 74 65 72 65 64 20 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .get.filtered.out...............
11040 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 ///..............///.Note.that.t
11060 68 65 20 6d 61 67 6e 69 74 75 64 65 20 74 68 72 65 73 68 6f 6c 64 20 69 73 20 6e 6f 74 20 74 68 he.magnitude.threshold.is.not.th
11080 65 20 6f 6e 6c 79 20 6d 65 63 68 61 6e 69 73 6d 20 74 68 61 74 20 68 65 6c 70 73 20 74 72 79 69 e.only.mechanism.that.helps.tryi
110a0 6e 67 20 74 6f 20 66 69 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 ng.to.find..............///.the.
110c0 6d 6f 73 74 20 61 63 74 75 61 74 65 64 20 63 6f 6e 74 72 6f 6c 2e 20 49 6e 20 66 61 63 74 2c 20 most.actuated.control..In.fact,.
110e0 61 6c 6c 20 63 6f 6e 74 72 6f 6c 73 20 77 69 6c 6c 20 65 76 65 6e 74 75 61 6c 6c 79 20 62 65 20 all.controls.will.eventually.be.
11100 73 6f 72 74 65 64 20 62 79 20 6d 61 67 6e 69 74 75 64 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 sorted.by.magnitude.............
11120 20 2f 2f 2f 20 6f 66 20 61 63 74 75 61 74 69 6f 6e 20 73 6f 20 65 76 65 6e 20 69 66 20 62 6f 74 .///.of.actuation.so.even.if.bot
11140 68 20 58 20 61 6e 64 20 59 20 6f 66 20 61 20 73 74 69 63 6b 20 6d 61 6b 65 20 69 74 20 69 6e 74 h.X.and.Y.of.a.stick.make.it.int
11160 6f 20 74 68 65 20 63 61 6e 64 69 64 61 74 65 20 6c 69 73 74 2c 20 69 66 20 58 0d 0a 20 20 20 20 o.the.candidate.list,.if.X......
11180 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 61 63 74 75 61 74 65 64 20 6d 6f 72 65 20 73 74 72 ........///.is.actuated.more.str
111a0 6f 6e 67 6c 79 20 74 68 61 6e 20 59 2c 20 69 74 20 77 69 6c 6c 20 62 65 20 66 61 76 6f 72 65 64 ongly.than.Y,.it.will.be.favored
111c0 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...............///..............
111e0 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 79 6f 75 20 63 61 6e 20 61 6c 73 6f 20 75 73 65 20 74 ///.Note.that.you.can.also.use.t
11200 68 69 73 20 6d 65 74 68 6f 64 20 74 6f 20 3c 65 6d 3e 6c 6f 77 65 72 3c 2f 65 6d 3e 20 74 68 65 his.method.to.<em>lower</em>.the
11220 20 64 65 66 61 75 6c 74 20 74 68 72 65 73 68 6f 6c 64 20 6f 66 20 30 2e 32 0d 0a 20 20 20 20 20 .default.threshold.of.0.2.......
11240 20 20 20 20 20 20 20 2f 2f 2f 20 69 6e 20 63 61 73 65 20 79 6f 75 20 77 61 6e 74 20 6d 6f 72 65 .......///.in.case.you.want.more
11260 20 63 6f 6e 74 72 6f 6c 73 20 74 6f 20 6d 61 6b 65 20 69 74 20 74 68 72 6f 75 67 68 20 74 68 65 .controls.to.make.it.through.the
11280 20 6d 61 74 63 68 69 6e 67 20 70 72 6f 63 65 73 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .matching.process...............
112a0 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c ///.</remarks>..............publ
112c0 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 4d 61 67 6e 69 74 ic.RebindingOperation.WithMagnit
112e0 75 64 65 48 61 76 69 6e 67 54 6f 42 65 47 72 65 61 74 65 72 54 68 61 6e 28 66 6c 6f 61 74 20 6d udeHavingToBeGreaterThan(float.m
11300 61 67 6e 69 74 75 64 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 agnitude)..............{........
11320 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 ..........ThrowIfRebindInProgres
11340 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 67 6e 69 74 s();..................if.(magnit
11360 75 64 65 20 3c 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 ude.<.0)......................th
11380 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 24 22 4d 61 67 6e row.new.ArgumentException($"Magn
113a0 69 74 75 64 65 20 68 61 73 20 74 6f 20 62 65 20 70 6f 73 69 74 69 76 65 20 62 75 74 20 77 61 73 itude.has.to.be.positive.but.was
113c0 20 7b 6d 61 67 6e 69 74 75 64 65 7d 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .{magnitude}",..................
113e0 20 20 20 20 20 20 20 20 6e 61 6d 65 6f 66 28 6d 61 67 6e 69 74 75 64 65 29 29 3b 0d 0a 20 20 20 ........nameof(magnitude));.....
11400 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 61 67 6e 69 74 75 64 65 54 68 72 65 73 68 6f 6c .............m_MagnitudeThreshol
11420 64 20 3d 20 6d 61 67 6e 69 74 75 64 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 d.=.magnitude;..................
11440 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 return.this;..............}.....
11460 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ...........///.<summary>........
11480 20 20 20 20 20 20 2f 2f 2f 20 44 6f 20 6e 6f 74 20 69 67 6e 6f 72 65 20 69 6e 70 75 74 20 66 72 ......///.Do.not.ignore.input.fr
114a0 6f 6d 20 6e 6f 69 73 79 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 om.noisy.controls...............
114c0 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 ///.</summary>..............///.
114e0 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 <returns>The.same.RebindingOpera
11500 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 tion.instance.</returns>........
11520 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ......///.<remarks>.............
11540 20 2f 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 6e 6f 69 73 79 20 63 6f 6e 74 72 6f 6c 73 20 .///.By.default,.noisy.controls.
11560 61 72 65 20 69 67 6e 6f 72 65 64 20 66 6f 72 20 72 65 62 69 6e 64 73 2e 20 54 68 69 73 20 6d 65 are.ignored.for.rebinds..This.me
11580 61 6e 73 20 74 68 61 74 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 61 20 67 79 72 6f 0d 0a 20 ans.that,.for.example,.a.gyro...
115a0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 6e 73 69 64 65 20 61 20 67 61 6d 65 70 61 64 20 ...........///.inside.a.gamepad.
115c0 77 69 6c 6c 20 6e 6f 74 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 61 73 20 61 20 70 6f 74 65 will.not.be.considered.as.a.pote
115e0 6e 74 69 61 6c 20 63 61 6e 64 69 64 61 74 65 20 63 6f 6e 74 72 6f 6c 20 61 73 20 69 74 20 69 73 ntial.candidate.control.as.it.is
11600 20 68 61 72 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 74 65 6c 6c 20 76 .hard..............///.to.tell.v
11620 61 6c 69 64 20 75 73 65 72 20 69 6e 74 65 72 61 63 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 6f 6e alid.user.interaction.on.the.con
11640 74 72 6f 6c 20 61 70 61 72 74 20 66 72 6f 6d 20 72 61 6e 64 6f 6d 20 6a 69 74 74 65 72 69 6e 67 trol.apart.from.random.jittering
11660 20 74 68 61 74 20 6f 63 63 75 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 6e .that.occurs..............///.on
11680 20 6e 6f 69 73 79 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .noisy.controls...............//
116a0 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 42 79 20 63 61 6c 6c 69 6e 67 20 74 68 /..............///.By.calling.th
116c0 69 73 20 6d 65 74 68 6f 64 2c 20 74 68 69 73 20 62 65 68 61 76 69 6f 72 20 63 61 6e 20 62 65 20 is.method,.this.behavior.can.be.
116e0 64 69 73 61 62 6c 65 64 2e 20 54 68 69 73 20 69 73 20 75 73 75 61 6c 6c 79 20 6f 6e 6c 79 20 75 disabled..This.is.usually.only.u
11700 73 65 66 75 6c 20 77 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 6d 70 6c seful.when..............///.impl
11720 65 6d 65 6e 74 69 6e 67 20 63 75 73 74 6f 6d 20 63 61 6e 64 69 64 61 74 65 20 73 65 6c 65 63 74 ementing.custom.candidate.select
11740 69 6f 6e 20 74 68 72 6f 75 67 68 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 6e 50 6f 74 65 6e 74 69 ion.through.<see.cref="OnPotenti
11760 61 6c 4d 61 74 63 68 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 alMatch"/>...............///.</r
11780 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 emarks>..............///.<seeals
117a0 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 6e 6f 69 73 79 22 2f 3e 0d 0a 20 o.cref="InputControl.noisy"/>...
117c0 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 ...........public.RebindingOpera
117e0 74 69 6f 6e 20 57 69 74 68 6f 75 74 49 67 6e 6f 72 69 6e 67 4e 6f 69 73 79 43 6f 6e 74 72 6f 6c tion.WithoutIgnoringNoisyControl
11800 73 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 s()..............{..............
11820 20 20 20 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a ....ThrowIfRebindInProgress();..
11840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 ................m_Flags.|=.Flags
11860 2e 44 6f 6e 74 49 67 6e 6f 72 65 4e 6f 69 73 79 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 20 20 20 20 20 .DontIgnoreNoisyControls;.......
11880 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 ...........return.this;.........
118a0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .....}................///.<summa
118c0 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 73 74 72 69 63 74 20 63 61 ry>..............///.Restrict.ca
118e0 6e 64 69 64 61 74 65 20 63 6f 6e 74 72 6f 6c 73 20 75 73 69 6e 67 20 61 20 63 6f 6e 74 72 6f 6c ndidate.controls.using.a.control
11900 20 70 61 74 68 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 .path.(see.<see.cref="InputContr
11920 6f 6c 50 61 74 68 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 olPath"/>)...............///.</s
11940 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 ummary>..............///.<param.
11960 6e 61 6d 65 3d 22 70 61 74 68 22 3e 41 20 63 6f 6e 74 72 6f 6c 20 70 61 74 68 2e 20 53 65 65 20 name="path">A.control.path..See.
11980 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 22 2f 3e 2e 3c <see.cref="InputControlPath"/>.<
119a0 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e /param>..............///.<return
119c0 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 69 6e s>The.same.RebindingOperation.in
119e0 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f stance.</returns>............../
11a00 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c //.<exception.cref="ArgumentNull
11a20 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 70 61 74 68 22 Exception"><paramref.name="path"
11a40 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 6f 72 20 65 6d 70 74 79 2e 3c 2f 65 78 63 />.is.<c>null</c>.or.empty.</exc
11a60 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b eption>..............///.<remark
11a80 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 s>..............///.This.method.
11aa0 69 73 20 6d 6f 73 74 20 75 73 65 66 75 6c 20 74 6f 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 is.most.useful.to,.for.example,.
11ac0 72 65 73 74 72 69 63 74 20 63 6f 6e 74 72 6f 6c 73 20 74 6f 20 73 70 65 63 69 66 69 63 20 74 79 restrict.controls.to.specific.ty
11ae0 70 65 73 20 6f 66 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f pes.of.devices...............///
11b00 20 49 66 2c 20 73 61 79 2c 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 6c 65 74 20 74 68 65 20 70 6c .If,.say,.you.want.to.let.the.pl
11b20 61 79 65 72 20 6f 6e 6c 79 20 62 69 6e 64 20 74 6f 20 67 61 6d 65 70 61 64 73 2c 20 79 6f 75 20 ayer.only.bind.to.gamepads,.you.
11b40 63 61 6e 20 64 6f 20 73 6f 20 75 73 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f can.do.so.using..............///
11b60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 ..............///.<example>.....
11b80 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .........///.<code>.............
11ba0 20 2f 2f 2f 20 72 65 62 69 6e 64 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 48 61 76 69 6e 67 54 6f .///.rebind.WithControlsHavingTo
11bc0 4d 61 74 63 68 50 61 74 68 28 22 26 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 22 29 3b 0d 0a 20 MatchPath("&lt;Gamepad&gt;");...
11be0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 ...........///.</code>..........
11c00 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....///.</example>..............
11c20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 ///..............///.This.method
11c40 20 63 61 6e 20 62 65 20 63 61 6c 6c 65 64 20 72 65 70 65 61 74 65 64 6c 79 20 74 6f 20 61 64 64 .can.be.called.repeatedly.to.add
11c60 20 6d 75 6c 74 69 70 6c 65 20 70 61 74 68 73 2e 20 54 68 65 20 65 66 66 65 63 74 20 69 73 20 74 .multiple.paths..The.effect.is.t
11c80 68 61 74 20 63 61 6e 64 69 64 61 74 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 hat.candidates..............///.
11ca0 61 72 65 20 61 63 63 65 70 74 65 64 20 69 66 20 3c 65 6d 3e 61 6e 79 3c 2f 65 6d 3e 20 6f 66 20 are.accepted.if.<em>any</em>.of.
11cc0 74 68 65 20 67 69 76 65 6e 20 70 61 74 68 73 20 6d 61 74 63 68 65 73 2e 20 54 6f 20 72 65 73 65 the.given.paths.matches..To.rese
11ce0 74 20 74 68 65 20 6c 69 73 74 2c 20 63 61 6c 6c 20 3c 73 65 65 0d 0a 20 20 20 20 20 20 20 20 20 t.the.list,.call.<see...........
11d00 20 20 20 2f 2f 2f 20 63 72 65 66 3d 22 52 65 73 65 74 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 ...///.cref="Reset"/>...........
11d20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....///.</remarks>..............
11d40 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 43 6f public.RebindingOperation.WithCo
11d60 6e 74 72 6f 6c 73 48 61 76 69 6e 67 54 6f 4d 61 74 63 68 50 61 74 68 28 73 74 72 69 6e 67 20 70 ntrolsHavingToMatchPath(string.p
11d80 61 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ath)..............{.............
11da0 20 20 20 20 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d .....ThrowIfRebindInProgress();.
11dc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 .................if.(string.IsNu
11de0 6c 6c 4f 72 45 6d 70 74 79 28 70 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 llOrEmpty(path))................
11e00 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 6c 45 78 63 65 ......throw.new.ArgumentNullExce
11e20 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 70 61 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ption(nameof(path));............
11e40 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 49 6e 63 6c ......for.(var.i.=.0;.i.<.m_Incl
11e60 75 64 65 50 61 74 68 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 udePathCount;.++i)..............
11e80 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 43 6f 6d 70 61 72 65 28 6d 5f 49 6e 63 ........if.(string.Compare(m_Inc
11ea0 6c 75 64 65 50 61 74 68 73 5b 69 5d 2c 20 70 61 74 68 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 ludePaths[i],.path,.StringCompar
11ec0 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 ison.InvariantCultureIgnoreCase)
11ee0 20 3d 3d 20 30 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 .==.0)..........................
11f00 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 return.this;..................Ar
11f20 72 61 79 48 65 6c 70 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 rayHelpers.AppendWithCapacity(re
11f40 66 20 6d 5f 49 6e 63 6c 75 64 65 50 61 74 68 73 2c 20 72 65 66 20 6d 5f 49 6e 63 6c 75 64 65 50 f.m_IncludePaths,.ref.m_IncludeP
11f60 61 74 68 43 6f 75 6e 74 2c 20 70 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 athCount,.path);................
11f80 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d ..return.this;..............}...
11fa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 .............///.<summary>......
11fc0 20 20 20 20 20 20 20 20 2f 2f 2f 20 50 72 65 76 65 6e 74 20 73 70 65 63 69 66 69 63 20 63 6f 6e ........///.Prevent.specific.con
11fe0 74 72 6f 6c 73 20 66 72 6f 6d 20 62 65 69 6e 67 20 63 6f 6e 73 69 64 65 72 65 64 20 61 73 20 63 trols.from.being.considered.as.c
12000 61 6e 64 69 64 61 74 65 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 andidate.controls...............
12020 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 ///.</summary>..............///.
12040 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 61 74 68 22 3e 41 20 63 6f 6e 74 72 6f 6c 20 70 61 74 <param.name="path">A.control.pat
12060 68 2e 20 53 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 h..See.<see.cref="InputControlPa
12080 74 68 22 2f 3e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 th"/>.</param>..............///.
120a0 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 <returns>The.same.RebindingOpera
120c0 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 tion.instance.</returns>........
120e0 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d ......///.<exception.cref="Argum
12100 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 entNullException"><paramref.name
12120 3d 22 70 61 74 68 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 6f 72 20 65 6d 70 74 ="path"/>.is.<c>null</c>.or.empt
12140 79 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 y.</exception>..............///.
12160 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 6f 6d 65 20 <remarks>..............///.Some.
12180 63 6f 6e 74 72 6f 6c 73 20 63 61 6e 20 62 65 20 75 6e 64 65 73 69 72 61 62 6c 65 20 74 6f 20 69 controls.can.be.undesirable.to.i
121a0 6e 63 6c 75 64 65 20 69 6e 20 74 68 65 20 63 61 6e 64 69 64 61 74 65 20 73 65 6c 65 63 74 69 6f nclude.in.the.candidate.selectio
121c0 6e 20 70 72 6f 63 65 73 73 20 65 76 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 n.process.even..............///.
121e0 74 68 6f 75 67 68 20 74 68 65 79 20 63 6f 6e 73 74 69 74 75 74 65 20 76 61 6c 69 64 2c 20 6e 6f though.they.constitute.valid,.no
12200 6e 2d 6e 6f 69 73 65 20 75 73 65 72 20 69 6e 70 75 74 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c n-noise.user.input..For.example,
12220 20 69 6e 20 61 20 64 65 73 6b 74 6f 70 20 61 70 70 6c 69 63 61 74 69 6f 6e 2c 0d 0a 20 20 20 20 .in.a.desktop.application,......
12240 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 6d 6f 75 73 65 20 77 69 6c 6c 20 75 73 75 61 6c ........///.the.mouse.will.usual
12260 6c 79 20 62 65 20 75 73 65 64 20 74 6f 20 6e 61 76 69 67 61 74 65 20 74 68 65 20 55 49 20 69 6e ly.be.used.to.navigate.the.UI.in
12280 63 6c 75 64 69 6e 67 20 61 20 72 65 62 69 6e 64 69 6e 67 20 55 49 20 74 68 61 74 20 6d 61 6b 65 cluding.a.rebinding.UI.that.make
122a0 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 75 73 65 20 6f 66 20 52 65 62 69 6e 64 s..............///.use.of.Rebind
122c0 69 6e 67 4f 70 65 72 61 74 69 6f 6e 2e 20 49 74 20 63 61 6e 20 74 68 75 73 20 62 65 20 61 64 76 ingOperation..It.can.thus.be.adv
122e0 69 73 61 62 6c 65 20 74 6f 20 65 78 63 6c 75 64 65 20 73 70 65 63 69 66 69 63 20 70 6f 69 6e 74 isable.to.exclude.specific.point
12300 65 72 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6c 69 6b er.controls..............///.lik
12320 65 20 73 6f 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 e.so:..............///..........
12340 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f ....///.<example>............../
12360 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 62 69 6e //.<code>..............///.rebin
12380 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 d..............///......WithCont
123a0 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 26 6c 74 3b 50 6f 69 6e 74 65 72 26 67 74 3b 2f 70 rolsExcluding("&lt;Pointer&gt;/p
123c0 6f 73 69 74 69 6f 6e 22 29 20 2f 2f 20 44 6f 6e 27 74 20 62 69 6e 64 20 74 6f 20 6d 6f 75 73 65 osition").//.Don't.bind.to.mouse
123e0 20 70 6f 73 69 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 2e .position..............///......
12400 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 26 6c 74 3b 50 6f 69 6e 74 WithControlsExcluding("&lt;Point
12420 65 72 26 67 74 3b 2f 64 65 6c 74 61 22 29 20 2f 2f 20 44 6f 6e 27 74 20 62 69 6e 64 20 74 6f 20 er&gt;/delta").//.Don't.bind.to.
12440 6d 6f 75 73 65 20 6d 6f 76 65 6d 65 6e 74 20 64 65 6c 74 61 73 0d 0a 20 20 20 20 20 20 20 20 20 mouse.movement.deltas...........
12460 20 20 20 2f 2f 2f 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e ...///......WithControlsExcludin
12480 67 28 22 26 6c 74 3b 50 6f 69 6e 74 65 72 26 67 74 3b 2f 7b 50 72 69 6d 61 72 79 41 63 74 69 6f g("&lt;Pointer&gt;/{PrimaryActio
124a0 6e 7d 22 29 20 2f 2f 20 64 6f 6e 27 74 20 62 69 6e 64 20 74 6f 20 63 6f 6e 74 72 6f 6c 73 20 73 n}").//.don't.bind.to.controls.s
124c0 75 63 68 20 61 73 20 6c 65 66 74 42 75 74 74 6f 6e 20 61 6e 64 20 74 61 70 73 2e 0d 0a 20 20 20 uch.as.leftButton.and.taps......
124e0 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 .........///.</code>............
12500 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f ..///.</example>..............//
12520 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 /..............///.This.method.c
12540 61 6e 20 62 65 20 63 61 6c 6c 65 64 20 72 65 70 65 61 74 65 64 6c 79 20 74 6f 20 61 64 64 20 6d an.be.called.repeatedly.to.add.m
12560 75 6c 74 69 70 6c 65 20 65 78 63 6c 75 73 69 6f 6e 73 2e 20 54 6f 20 72 65 73 65 74 20 74 68 65 ultiple.exclusions..To.reset.the
12580 20 6c 69 73 74 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 61 6c 6c 20 3c 73 65 .list,..............///.call.<se
125a0 65 20 63 72 65 66 3d 22 52 65 73 65 74 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f e.cref="Reset"/>.............../
125c0 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 //.</remarks>..............publi
125e0 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 43 6f 6e 74 72 6f 6c c.RebindingOperation.WithControl
12600 73 45 78 63 6c 75 64 69 6e 67 28 73 74 72 69 6e 67 20 70 61 74 68 29 0d 0a 20 20 20 20 20 20 20 sExcluding(string.path).........
12620 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 49 66 52 .....{..................ThrowIfR
12640 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ebindInProgress();..............
12660 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 70 61 74 ....if.(string.IsNullOrEmpty(pat
12680 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e h))......................throw.n
126a0 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 ew.ArgumentNullException(nameof(
126c0 70 61 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 path));..................for.(va
126e0 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 3b r.i.=.0;.i.<.m_ExcludePathCount;
12700 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 .++i)......................if.(s
12720 74 72 69 6e 67 2e 43 6f 6d 70 61 72 65 28 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 73 5b 69 5d 2c tring.Compare(m_ExcludePaths[i],
12740 20 70 61 74 68 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 .path,.StringComparison.Invarian
12760 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 tCultureIgnoreCase).==.0).......
12780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d ...................return.this;.
127a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 41 70 .................ArrayHelpers.Ap
127c0 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 45 78 63 6c 75 64 65 50 61 pendWithCapacity(ref.m_ExcludePa
127e0 74 68 73 2c 20 72 65 66 20 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 2c 20 70 61 74 ths,.ref.m_ExcludePathCount,.pat
12800 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 h);..................return.this
12820 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 ;..............}................
12840 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 57 69 74 68 54 69 public.RebindingOperation.WithTi
12860 6d 65 6f 75 74 28 66 6c 6f 61 74 20 74 69 6d 65 49 6e 53 65 63 6f 6e 64 73 29 0d 0a 20 20 20 20 meout(float.timeInSeconds)......
12880 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 6d 5f 54 69 6d ........{..................m_Tim
128a0 65 6f 75 74 20 3d 20 74 69 6d 65 49 6e 53 65 63 6f 6e 64 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 eout.=.timeInSeconds;...........
128c0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .......return.this;.............
128e0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 .}................public.Rebindi
12900 6e 67 4f 70 65 72 61 74 69 6f 6e 20 4f 6e 43 6f 6d 70 6c 65 74 65 28 41 63 74 69 6f 6e 3c 52 65 ngOperation.OnComplete(Action<Re
12920 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3e 20 63 61 6c 6c 62 61 63 6b 29 0d 0a 20 20 20 bindingOperation>.callback).....
12940 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 6d 5f 4f 6e .........{..................m_On
12960 43 6f 6d 70 6c 65 74 65 20 3d 20 63 61 6c 6c 62 61 63 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 Complete.=.callback;............
12980 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ......return.this;..............
129a0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e }................public.Rebindin
129c0 67 4f 70 65 72 61 74 69 6f 6e 20 4f 6e 43 61 6e 63 65 6c 28 41 63 74 69 6f 6e 3c 52 65 62 69 6e gOperation.OnCancel(Action<Rebin
129e0 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3e 20 63 61 6c 6c 62 61 63 6b 29 0d 0a 20 20 20 20 20 20 dingOperation>.callback)........
12a00 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 5f 4f 6e 43 61 6e ......{..................m_OnCan
12a20 63 65 6c 20 3d 20 63 61 6c 6c 62 61 63 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 cel.=.callback;.................
12a40 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .return.this;..............}....
12a60 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 ............public.RebindingOper
12a80 61 74 69 6f 6e 20 4f 6e 50 6f 74 65 6e 74 69 61 6c 4d 61 74 63 68 28 41 63 74 69 6f 6e 3c 52 65 ation.OnPotentialMatch(Action<Re
12aa0 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3e 20 63 61 6c 6c 62 61 63 6b 29 0d 0a 20 20 20 bindingOperation>.callback).....
12ac0 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 6d 5f 4f 6e .........{..................m_On
12ae0 50 6f 74 65 6e 74 69 61 6c 4d 61 74 63 68 20 3d 20 63 61 6c 6c 62 61 63 6b 3b 0d 0a 20 20 20 20 PotentialMatch.=.callback;......
12b00 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 ............return.this;........
12b20 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 2f 20 3c 73 75 6d 6d ......}................///.<summ
12b40 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 74 20 66 75 6e 63 74 69 ary>..............///.Set.functi
12b60 6f 6e 20 74 6f 20 63 61 6c 6c 20 77 68 65 6e 20 67 65 6e 65 72 61 74 69 6e 67 20 74 68 65 20 66 on.to.call.when.generating.the.f
12b80 69 6e 61 6c 20 62 69 6e 64 69 6e 67 20 70 61 74 68 20 66 6f 72 20 61 20 63 6f 6e 74 72 6f 6c 0d inal.binding.path.for.a.control.
12ba0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 68 61 73 20 62 65 65 6e 20 73 .............///.that.has.been.s
12bc0 65 6c 65 63 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d elected...............///.</summ
12be0 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d ary>..............///.<param.nam
12c00 65 3d 22 63 61 6c 6c 62 61 63 6b 22 3e 44 65 6c 65 67 61 74 65 20 74 6f 20 63 61 6c 6c 20 3c 2f e="callback">Delegate.to.call.</
12c20 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 param>..............///.<returns
12c40 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 ></returns>..............public.
12c60 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 4f 6e 47 65 6e 65 72 61 74 65 50 61 74 RebindingOperation.OnGeneratePat
12c80 68 28 46 75 6e 63 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2c 20 73 74 72 69 6e 67 3e 20 63 61 6c h(Func<InputControl,.string>.cal
12ca0 6c 62 61 63 6b 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 lback)..............{...........
12cc0 20 20 20 20 20 20 20 6d 5f 4f 6e 47 65 6e 65 72 61 74 65 50 61 74 68 20 3d 20 63 61 6c 6c 62 61 .......m_OnGeneratePath.=.callba
12ce0 63 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 ck;..................return.this
12d00 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 ;..............}................
12d20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 4f 6e 43 6f 6d 70 public.RebindingOperation.OnComp
12d40 75 74 65 53 63 6f 72 65 28 46 75 6e 63 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2c 20 49 6e 70 75 uteScore(Func<InputControl,.Inpu
12d60 74 45 76 65 6e 74 50 74 72 2c 20 66 6c 6f 61 74 3e 20 63 61 6c 6c 62 61 63 6b 29 0d 0a 20 20 20 tEventPtr,.float>.callback).....
12d80 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 6d 5f 4f 6e .........{..................m_On
12da0 43 6f 6d 70 75 74 65 53 63 6f 72 65 20 3d 20 63 61 6c 6c 62 61 63 6b 3b 0d 0a 20 20 20 20 20 20 ComputeScore.=.callback;........
12dc0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 ..........return.this;..........
12de0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 ....}................public.Rebi
12e00 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 4f 6e 41 70 70 6c 79 42 69 6e 64 69 6e 67 28 41 63 ndingOperation.OnApplyBinding(Ac
12e20 74 69 6f 6e 3c 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 2c 20 73 74 72 69 6e 67 3e tion<RebindingOperation,.string>
12e40 20 63 61 6c 6c 62 61 63 6b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .callback)..............{.......
12e60 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 41 70 70 6c 79 42 69 6e 64 69 6e 67 20 3d 20 63 61 ...........m_OnApplyBinding.=.ca
12e80 6c 6c 62 61 63 6b 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 llback;..................return.
12ea0 74 68 69 73 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 this;..............}............
12ec0 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 4f 6e ....public.RebindingOperation.On
12ee0 4d 61 74 63 68 57 61 69 74 46 6f 72 41 6e 6f 74 68 65 72 28 66 6c 6f 61 74 20 73 65 63 6f 6e 64 MatchWaitForAnother(float.second
12f00 73 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 s)..............{...............
12f20 20 20 20 6d 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 68 20 3d 20 73 65 63 ...m_WaitSecondsAfterMatch.=.sec
12f40 6f 6e 64 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 onds;..................return.th
12f60 69 73 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 is;..............}..............
12f80 20 20 70 75 62 6c 69 63 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 53 74 61 72 ..public.RebindingOperation.Star
12fa0 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 t()..............{..............
12fc0 20 20 20 20 2f 2f 20 49 67 6e 6f 72 65 20 69 66 20 61 6c 72 65 61 64 79 20 73 74 61 72 74 65 64 ....//.Ignore.if.already.started
12fe0 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 61 72 74 65 64 29 0d ...................if.(started).
13000 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 .....................return.this
13020 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 72 ;....................//.Make.sur
13040 65 20 6f 75 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 73 20 73 6f 75 6e 64 2e 0d 0a 20 e.our.configuration.is.sound....
13060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 ...............if.(m_ActionToReb
13080 69 6e 64 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 2e ind.!=.null.&&.m_ActionToRebind.
130a0 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 20 3d 3d 20 30 20 26 26 20 28 6d 5f 46 6c 61 67 73 20 bindings.Count.==.0.&&.(m_Flags.
130c0 26 20 46 6c 61 67 73 2e 41 64 64 4e 65 77 42 69 6e 64 69 6e 67 29 20 3d 3d 20 30 29 0d 0a 20 20 &.Flags.AddNewBinding).==.0)....
130e0 20 20 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 49 6e 76 61 ..................throw.new.Inva
13100 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 lidOperationException(..........
13120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 41 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f ................$"Action.'{actio
13140 6e 7d 27 20 6d 75 73 74 20 68 61 76 65 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 65 78 69 73 74 n}'.must.have.at.least.one.exist
13160 69 6e 67 20 62 69 6e 64 69 6e 67 20 6f 72 20 6d 75 73 74 20 62 65 20 75 73 65 64 20 77 69 74 68 ing.binding.or.must.be.used.with
13180 20 57 69 74 68 52 65 62 69 6e 64 69 6e 67 41 64 64 4e 65 77 42 69 6e 64 69 6e 67 28 29 22 29 3b .WithRebindingAddNewBinding()");
131a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 54 6f ..................if.(m_ActionTo
131c0 52 65 62 69 6e 64 20 3d 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 4f 6e 41 70 70 6c 79 42 69 6e 64 69 Rebind.==.null.&&.m_OnApplyBindi
131e0 6e 67 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ng.==.null).....................
13200 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 .throw.new.InvalidOperationExcep
13220 74 69 6f 6e 28 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 22 tion(.........................."
13240 4d 75 73 74 20 65 69 74 68 65 72 20 68 61 76 65 20 61 6e 20 61 63 74 69 6f 6e 20 28 63 61 6c 6c Must.either.have.an.action.(call
13260 20 57 69 74 68 41 63 74 69 6f 6e 28 29 29 20 74 6f 20 61 70 70 6c 79 20 62 69 6e 64 69 6e 67 20 .WithAction()).to.apply.binding.
13280 74 6f 20 6f 72 20 68 61 76 65 20 61 20 63 75 73 74 6f 6d 20 63 61 6c 6c 62 61 63 6b 20 74 6f 20 to.or.have.a.custom.callback.to.
132a0 61 70 70 6c 79 20 74 68 65 20 62 69 6e 64 69 6e 67 20 28 63 61 6c 6c 20 4f 6e 41 70 70 6c 79 42 apply.the.binding.(call.OnApplyB
132c0 69 6e 64 69 6e 67 28 29 29 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 inding())");....................
132e0 6d 5f 53 74 61 72 74 54 69 6d 65 20 3d 20 49 6e 70 75 74 52 75 6e 74 69 6d 65 2e 73 5f 49 6e 73 m_StartTime.=.InputRuntime.s_Ins
13300 74 61 6e 63 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 tance.currentTime;..............
13320 20 20 20 20 20 20 69 66 20 28 6d 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 ......if.(m_WaitSecondsAfterMatc
13340 68 20 3e 20 30 20 7c 7c 20 6d 5f 54 69 6d 65 6f 75 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 h.>.0.||.m_Timeout.>.0).........
13360 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
13380 48 6f 6f 6b 4f 6e 41 66 74 65 72 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 HookOnAfterUpdate();............
133a0 20 20 20 20 20 20 20 20 20 20 6d 5f 4c 61 73 74 4d 61 74 63 68 54 69 6d 65 20 3d 20 2d 31 3b 0d ..........m_LastMatchTime.=.-1;.
133c0 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 .................}..............
133e0 20 20 20 20 20 20 48 6f 6f 6b 4f 6e 45 76 65 6e 74 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ......HookOnEvent();............
13400 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 53 74 61 72 74 65 64 ........m_Flags.|=.Flags.Started
13420 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 ;..................m_Flags.&=.~F
13440 6c 61 67 73 2e 43 61 6e 63 65 6c 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lags.Canceled;..................
13460 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 43 6f 6d 70 6c 65 74 65 64 3b 0d 0a 0d 0a m_Flags.&=.~Flags.Completed;....
13480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 3b 0d 0a 20 20 ................return.this;....
134a0 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 ..........}................publi
134c0 63 20 76 6f 69 64 20 43 61 6e 63 65 6c 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a c.void.Cancel()..............{..
134e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 61 72 74 65 64 29 0d 0a 20 ................if.(!started)...
13500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 ...................return;......
13520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 43 61 6e 63 65 6c 28 29 3b 0d 0a 20 20 20 20 20 ..............OnCancel();.......
13540 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 2f 20 3c 73 75 6d .......}................///.<sum
13560 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 61 6e 75 61 6c 6c 79 20 mary>..............///.Manually.
13580 63 6f 6d 70 6c 65 74 65 20 74 68 65 20 72 65 62 69 6e 64 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e complete.the.rebinding.operation
135a0 2e 0d 0a 20 20 20 20 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 ...............///.</summary>...
135c0 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6f 6d 70 6c 65 74 65 28 ...........public.void.Complete(
135e0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
13600 20 20 69 66 20 28 21 73 74 61 72 74 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..if.(!started).................
13620 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....return;....................
13640 4f 6e 43 6f 6d 70 6c 65 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a OnComplete();..............}....
13660 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 64 64 43 61 6e 64 69 ............public.void.AddCandi
13680 64 61 74 65 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 2c 20 66 6c 6f 61 74 date(InputControl.control,.float
136a0 20 73 63 6f 72 65 2c 20 66 6c 6f 61 74 20 6d 61 67 6e 69 74 75 64 65 20 3d 20 2d 31 29 0d 0a 20 .score,.float.magnitude.=.-1)...
136c0 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 69 66 ...........{..................if
136e0 20 28 63 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .(control.==.null)..............
13700 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 6c 45 78 ........throw.new.ArgumentNullEx
13720 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 ception(nameof(control));.......
13740 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 69 74 27 73 20 61 6c 72 65 61 64 79 20 .............//.If.it's.already.
13760 61 64 64 65 64 2c 20 75 70 64 61 74 65 20 73 63 6f 72 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 added,.update.score.............
13780 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 49 ......var.index.=.m_Candidates.I
137a0 6e 64 65 78 4f 66 28 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ndexOf(control);................
137c0 20 20 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 ..if.(index.!=.-1)..............
137e0 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 6d 5f 53 63 6f ....{......................m_Sco
13800 72 65 73 5b 69 6e 64 65 78 5d 20 3d 20 73 63 6f 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 res[index].=.score;.............
13820 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 20 20 .....}..................else....
13840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
13860 20 20 20 20 20 2f 2f 20 4f 74 68 65 72 77 69 73 65 2c 20 61 64 64 20 69 74 2e 0d 0a 20 20 20 20 .....//.Otherwise,.add.it.......
13880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 63 6f 72 65 43 6f 75 6e 74 20 3d ................var.scoreCount.=
138a0 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .m_Candidates.Count;............
138c0 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 67 6e 69 74 75 64 65 43 6f 75 6e 74 20 3d 20 6d ..........var.magnitudeCount.=.m
138e0 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 _Candidates.Count;..............
13900 20 20 20 20 20 20 20 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 41 64 64 28 63 6f 6e 74 72 6f 6c ........m_Candidates.Add(control
13920 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c );......................ArrayHel
13940 70 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 53 63 pers.AppendWithCapacity(ref.m_Sc
13960 6f 72 65 73 2c 20 72 65 66 20 73 63 6f 72 65 43 6f 75 6e 74 2c 20 73 63 6f 72 65 29 3b 0d 0a 20 ores,.ref.scoreCount,.score);...
13980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e ...................ArrayHelpers.
139a0 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 4d 61 67 6e 69 74 75 AppendWithCapacity(ref.m_Magnitu
139c0 64 65 73 2c 20 72 65 66 20 6d 61 67 6e 69 74 75 64 65 43 6f 75 6e 74 2c 20 6d 61 67 6e 69 74 75 des,.ref.magnitudeCount,.magnitu
139e0 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 de);..................}.........
13a00 20 20 20 20 20 20 20 20 20 20 20 53 6f 72 74 43 61 6e 64 69 64 61 74 65 73 42 79 53 63 6f 72 65 ...........SortCandidatesByScore
13a20 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ();..............}..............
13a40 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 52 65 6d 6f 76 65 43 61 6e 64 69 64 61 74 65 28 49 6e ..public.void.RemoveCandidate(In
13a60 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 putControl.control).............
13a80 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 20 .{..................if.(control.
13aa0 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 ==.null)......................th
13ac0 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 row.new.ArgumentNullException(na
13ae0 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 meof(control));.................
13b00 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 49 6e 64 65 ...var.index.=.m_Candidates.Inde
13b20 78 4f 66 28 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 xOf(control);..................i
13b40 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 20 f.(index.==.-1).................
13b60 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....return;....................
13b80 76 61 72 20 63 61 6e 64 69 64 61 74 65 43 6f 75 6e 74 20 3d 20 6d 5f 43 61 6e 64 69 64 61 74 65 var.candidateCount.=.m_Candidate
13ba0 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 61 6e 64 s.Count;..................m_Cand
13bc0 69 64 61 74 65 73 2e 52 65 6d 6f 76 65 41 74 28 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 idates.RemoveAt(index);.........
13be0 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 45 72 61 73 65 41 74 57 69 74 .........ArrayHelpers.EraseAtWit
13c00 68 43 61 70 61 63 69 74 79 28 6d 5f 53 63 6f 72 65 73 2c 20 72 65 66 20 63 61 6e 64 69 64 61 74 hCapacity(m_Scores,.ref.candidat
13c20 65 43 6f 75 6e 74 2c 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a eCount,.index);..............}..
13c40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 44 69 73 70 6f 73 ..............public.void.Dispos
13c60 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 e()..............{..............
13c80 20 20 20 20 55 6e 68 6f 6f 6b 4f 6e 45 76 65 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ....UnhookOnEvent();............
13ca0 20 20 20 20 20 20 55 6e 68 6f 6f 6b 4f 6e 41 66 74 65 72 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 ......UnhookOnAfterUpdate();....
13cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 44 69 73 70 6f ..............m_Candidates.Dispo
13ce0 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4c 61 79 6f 75 74 43 se();..................m_LayoutC
13d00 61 63 68 65 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ache.Clear();..............}....
13d20 20 20 20 20 20 20 20 20 20 20 20 20 7e 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 28 ............~RebindingOperation(
13d40 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
13d60 20 20 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ..Dispose();..............}.....
13d80 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ...........///.<summary>........
13da0 20 20 20 20 20 20 2f 2f 2f 20 52 65 73 65 74 20 74 68 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ......///.Reset.the.configuratio
13dc0 6e 20 6f 6e 20 74 68 65 20 72 65 62 69 6e 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f n.on.the.rebind...............//
13de0 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 /.</summary>..............///.<r
13e00 65 74 75 72 6e 73 3e 54 68 65 20 73 61 6d 65 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 eturns>The.same.RebindingOperati
13e20 6f 6e 20 69 6e 73 74 61 6e 63 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 on.instance.</returns>..........
13e40 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f ....///.<remarks>............../
13e60 2f 2f 20 43 61 6c 6c 20 74 68 69 73 20 6d 65 74 68 6f 64 20 74 6f 20 72 65 73 65 74 20 74 68 65 //.Call.this.method.to.reset.the
13e80 20 65 66 66 65 63 74 73 20 6f 66 20 63 61 6c 6c 69 6e 67 20 6d 65 74 68 6f 64 73 20 73 75 63 68 .effects.of.calling.methods.such
13ea0 20 61 73 20 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 41 63 74 69 6f 6e 22 2f 3e 2c 0d 0a 20 .as.<see.cref="WithAction"/>,...
13ec0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 57 69 74 68 42 69 ...........///.<see.cref="WithBi
13ee0 6e 64 69 6e 67 47 72 6f 75 70 22 2f 3e 2c 20 65 74 63 2e 20 62 75 74 20 72 65 74 61 69 6e 20 6f ndingGroup"/>,.etc..but.retain.o
13f00 74 68 65 72 20 64 61 74 61 20 74 68 61 74 20 74 68 65 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 ther.data.that.the.rebind.operat
13f20 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6d 61 79 20 68 61 76 65 20 61 6c ion..............///.may.have.al
13f40 6c 6f 63 61 74 65 64 20 61 6c 72 65 61 64 79 2e 20 49 66 20 79 6f 75 20 61 72 65 20 72 65 75 73 located.already..If.you.are.reus
13f60 69 6e 67 20 74 68 65 20 73 61 6d 65 20 3c 63 3e 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 ing.the.same.<c>RebindingOperati
13f80 6f 6e 3c 2f 63 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 6d 75 6c 74 69 70 6c 65 on</c>..............///.multiple
13fa0 20 74 69 6d 65 73 2c 20 61 20 67 6f 6f 64 20 73 74 72 61 74 65 67 79 20 69 73 20 74 6f 20 72 65 .times,.a.good.strategy.is.to.re
13fc0 73 65 74 20 61 6e 64 20 72 65 63 6f 6e 66 69 67 75 72 65 20 74 68 65 20 6f 70 65 72 61 74 69 6f set.and.reconfigure.the.operatio
13fe0 6e 20 62 65 66 6f 72 65 20 73 74 61 72 74 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f n.before.starting............../
14000 2f 2f 20 69 74 20 61 67 61 69 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f //.it.again...............///.</
14020 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 62 remarks>..............public.Reb
14040 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 52 65 73 65 74 28 29 0d 0a 20 20 20 20 20 20 20 indingOperation.Reset().........
14060 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 61 6e 63 65 6c 28 29 .....{..................Cancel()
14080 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 ;..................m_ActionToReb
140a0 69 6e 64 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ind.=.default;..................
140c0 6d 5f 42 69 6e 64 69 6e 67 4d 61 73 6b 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 m_BindingMask.=.default;........
140e0 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 54 79 70 65 20 3d 20 64 65 66 61 75 6c ..........m_ControlType.=.defaul
14100 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 78 70 65 63 74 65 64 4c 61 t;..................m_ExpectedLa
14120 79 6f 75 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 yout.=.default;.................
14140 20 6d 5f 49 6e 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a .m_IncludePathCount.=.default;..
14160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 43 6f 75 ................m_ExcludePathCou
14180 6e 74 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d nt.=.default;..................m
141a0 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 _TargetBindingIndex.=.-1;.......
141c0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 42 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 4e 65 77 42 ...........m_BindingGroupForNewB
141e0 69 6e 64 69 6e 67 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 inding.=.default;...............
14200 20 20 20 6d 5f 43 61 6e 63 65 6c 42 69 6e 64 69 6e 67 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 ...m_CancelBinding.=.default;...
14220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 61 67 6e 69 74 75 64 65 54 68 72 65 73 68 ...............m_MagnitudeThresh
14240 6f 6c 64 20 3d 20 6b 44 65 66 61 75 6c 74 4d 61 67 6e 69 74 75 64 65 54 68 72 65 73 68 6f 6c 64 old.=.kDefaultMagnitudeThreshold
14260 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 54 69 6d 65 6f 75 74 20 3d 20 64 ;..................m_Timeout.=.d
14280 65 66 61 75 6c 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 57 61 69 74 53 efault;..................m_WaitS
142a0 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 68 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 20 20 20 econdsAfterMatch.=.default;.....
142c0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 3d 20 64 65 66 61 75 6c 74 3b 0d .............m_Flags.=.default;.
142e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 61 72 74 69 6e 67 41 63 74 75 61 .................m_StartingActua
14300 74 69 6f 6e 43 6f 6e 74 72 6f 6c 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 tionControls.Clear();...........
14320 20 20 20 20 20 20 20 6d 5f 53 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 73 43 6f 75 6e 74 .......m_StartingActuationsCount
14340 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 .=.0;..................return.th
14360 69 73 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 is;..............}..............
14380 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 48 6f 6f 6b 4f 6e 45 76 65 6e 74 28 29 0d 0a 20 20 ..private.void.HookOnEvent()....
143a0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ..........{..................if.
143c0 28 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 4f 6e 45 76 65 6e 74 48 6f 6f 6b 65 64 29 ((m_Flags.&.Flags.OnEventHooked)
143e0 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 .!=.0)......................retu
14400 72 6e 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 6d 5f 4f 6e 45 rn;....................if.(m_OnE
14420 76 65 6e 74 44 65 6c 65 67 61 74 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 ventDelegate.==.null)...........
14440 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 45 76 65 6e 74 44 65 6c 65 67 61 74 65 20 3d 20 4f ...........m_OnEventDelegate.=.O
14460 6e 45 76 65 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 nEvent;....................Input
14480 53 79 73 74 65 6d 2e 6f 6e 45 76 65 6e 74 20 2b 3d 20 6d 5f 4f 6e 45 76 65 6e 74 44 65 6c 65 67 System.onEvent.+=.m_OnEventDeleg
144a0 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d ate;..................m_Flags.|=
144c0 20 46 6c 61 67 73 2e 4f 6e 45 76 65 6e 74 48 6f 6f 6b 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 .Flags.OnEventHooked;...........
144e0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 ...}................private.void
14500 20 55 6e 68 6f 6f 6b 4f 6e 45 76 65 6e 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d .UnhookOnEvent()..............{.
14520 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6c 61 67 73 20 26 20 .................if.((m_Flags.&.
14540 46 6c 61 67 73 2e 4f 6e 45 76 65 6e 74 48 6f 6f 6b 65 64 29 20 3d 3d 20 30 29 0d 0a 20 20 20 20 Flags.OnEventHooked).==.0)......
14560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 ................return;.........
14580 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 6f 6e 45 76 65 6e 74 20 2d ...........InputSystem.onEvent.-
145a0 3d 20 6d 5f 4f 6e 45 76 65 6e 74 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 =.m_OnEventDelegate;............
145c0 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e 46 6c 61 67 73 2e 4f 6e 45 76 65 6e 74 48 ......m_Flags.&=.~Flags.OnEventH
145e0 6f 6f 6b 65 64 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 ooked;..............}...........
14600 20 20 20 20 20 70 72 69 76 61 74 65 20 75 6e 73 61 66 65 20 76 6f 69 64 20 4f 6e 45 76 65 6e 74 .....private.unsafe.void.OnEvent
14620 28 49 6e 70 75 74 45 76 65 6e 74 50 74 72 20 65 76 65 6e 74 50 74 72 2c 20 49 6e 70 75 74 44 65 (InputEventPtr.eventPtr,.InputDe
14640 76 69 63 65 20 64 65 76 69 63 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 vice.device)..............{.....
14660 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 67 6e 6f 72 65 20 69 66 20 6e 6f 74 20 61 20 .............//.Ignore.if.not.a.
14680 73 74 61 74 65 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 state.event...................if
146a0 20 28 21 65 76 65 6e 74 50 74 72 2e 49 73 41 3c 53 74 61 74 65 45 76 65 6e 74 3e 28 29 20 26 26 .(!eventPtr.IsA<StateEvent>().&&
146c0 20 21 65 76 65 6e 74 50 74 72 2e 49 73 41 3c 44 65 6c 74 61 53 74 61 74 65 45 76 65 6e 74 3e 28 .!eventPtr.IsA<DeltaStateEvent>(
146e0 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d ))......................return;.
14700 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 64 64 ...................////TODO:.add
14720 20 63 61 6c 6c 62 61 63 6b 20 74 68 61 74 20 73 68 6f 77 73 20 74 68 65 20 63 61 6e 64 69 64 61 .callback.that.shows.the.candida
14740 74 65 20 2a 61 6e 64 2a 20 74 68 65 20 65 76 65 6e 74 20 74 6f 20 74 68 65 20 75 73 65 72 20 28 te.*and*.the.event.to.the.user.(
14760 74 68 69 73 20 69 73 20 70 61 72 74 69 63 75 6c 61 72 6c 79 20 75 73 65 66 75 6c 20 77 68 65 6e this.is.particularly.useful.when
14780 20 77 65 20 61 72 65 20 73 75 70 70 72 65 73 73 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .we.are.suppressing.............
147a0 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 61 6e 64 20 74 68 75 73 20 74 68 72 6f 77 69 6e 67 .....////......and.thus.throwing
147c0 20 61 77 61 79 20 65 76 65 6e 74 73 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .away.events)...................
147e0 20 2f 2f 20 47 6f 20 74 68 72 6f 75 67 68 20 63 6f 6e 74 72 6f 6c 73 20 61 6e 64 20 73 65 65 20 .//.Go.through.controls.and.see.
14800 69 66 20 74 68 65 72 65 27 73 20 61 6e 79 74 68 69 6e 67 20 69 6e 74 65 72 65 73 74 69 6e 67 20 if.there's.anything.interesting.
14820 69 6e 20 74 68 65 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f in.the.event.................../
14840 2f 20 4e 4f 54 45 3a 20 57 65 20 67 6f 20 74 68 72 6f 75 67 68 20 71 75 69 74 65 20 61 20 66 65 /.NOTE:.We.go.through.quite.a.fe
14860 77 20 73 74 65 70 73 20 61 6e 64 20 6f 70 65 72 61 74 69 6f 6e 73 20 68 65 72 65 2e 20 48 6f 77 w.steps.and.operations.here..How
14880 65 76 65 72 2c 20 74 68 65 20 63 68 69 65 66 20 67 6f 61 6c 20 68 65 72 65 20 69 73 20 74 72 79 ever,.the.chief.goal.here.is.try
148a0 69 6e 67 20 74 6f 20 62 65 20 61 73 20 72 6f 62 75 73 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ing.to.be.as.robust.............
148c0 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 61 73 20 77 65 20 63 61 6e 20 69 6e 20 69 73 6f 6c 61 .....//.......as.we.can.in.isola
148e0 74 69 6e 67 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 74 68 65 20 75 73 65 72 20 72 65 61 6c 6c 79 ting.the.control.the.user.really
14900 20 6d 65 61 6e 73 20 74 6f 20 73 69 6e 67 6c 65 20 6f 75 74 2e 20 49 66 20 74 68 69 73 20 63 6f .means.to.single.out..If.this.co
14920 64 65 20 68 65 72 65 20 64 6f 65 73 20 69 74 73 20 6a 6f 62 2c 20 74 68 61 74 0d 0a 20 20 20 20 de.here.does.its.job,.that......
14940 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 20 73 68 6f ............//.......control.sho
14960 75 6c 64 20 61 6c 77 61 79 73 20 70 6f 70 20 75 70 20 61 73 20 74 68 65 20 66 69 72 73 74 20 65 uld.always.pop.up.as.the.first.e
14980 6e 74 72 79 20 69 6e 20 74 68 65 20 63 61 6e 64 69 64 61 74 65 73 20 6c 69 73 74 20 28 69 66 20 ntry.in.the.candidates.list.(if.
149a0 74 68 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 72 65 62 69 6e 64 0d the.configuration.of.the.rebind.
149c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 6f 70 65 72 61 74 .................//.......operat
149e0 69 6f 6e 20 69 73 20 6f 74 68 65 72 77 69 73 65 20 73 61 6e 65 29 2e 0d 0a 20 20 20 20 20 20 20 ion.is.otherwise.sane)..........
14a00 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 73 20 3d 20 64 65 76 69 63 65 2e 61 .........var.controls.=.device.a
14a20 6c 6c 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 llControls;..................var
14a40 20 63 6f 6e 74 72 6f 6c 43 6f 75 6e 74 20 3d 20 63 6f 6e 74 72 6f 6c 73 2e 43 6f 75 6e 74 3b 0d .controlCount.=.controls.Count;.
14a60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 61 76 65 43 68 61 6e 67 65 64 .................var.haveChanged
14a80 43 61 6e 64 69 64 61 74 65 73 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Candidates.=.false;.............
14aa0 20 20 20 20 20 76 61 72 20 73 75 70 70 72 65 73 73 45 76 65 6e 74 20 3d 20 66 61 6c 73 65 3b 0d .....var.suppressEvent.=.false;.
14ac0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b .................for.(var.i.=.0;
14ae0 20 69 20 3c 20 63 6f 6e 74 72 6f 6c 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 .i.<.controlCount;.++i).........
14b00 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
14b20 76 61 72 20 63 6f 6e 74 72 6f 6c 20 3d 20 63 6f 6e 74 72 6f 6c 73 5b 69 5d 3b 0d 0a 0d 0a 20 20 var.control.=.controls[i];......
14b40 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 20 63 6f 6e 74 72 6f ..................//.Skip.contro
14b60 6c 73 20 74 68 61 74 20 68 61 76 65 20 6e 6f 20 73 74 61 74 65 20 69 6e 20 74 68 65 20 65 76 65 ls.that.have.no.state.in.the.eve
14b80 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 nt.......................var.sta
14ba0 74 65 50 74 72 20 3d 20 63 6f 6e 74 72 6f 6c 2e 47 65 74 53 74 61 74 65 50 74 72 46 72 6f 6d 53 tePtr.=.control.GetStatePtrFromS
14bc0 74 61 74 65 45 76 65 6e 74 28 65 76 65 6e 74 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 tateEvent(eventPtr);............
14be0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 61 74 65 50 74 72 20 3d 3d 20 6e 75 6c 6c 29 0d ..........if.(statePtr.==.null).
14c00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 .........................continu
14c20 65 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 2f 2f 20 49 66 20 e;........................//.If.
14c40 74 68 65 20 63 6f 6e 74 72 6f 6c 20 74 68 61 74 20 63 61 6e 63 65 6c 73 20 68 61 73 20 62 65 65 the.control.that.cancels.has.bee
14c60 6e 20 61 63 74 75 61 74 65 64 2c 20 61 62 6f 72 74 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 20 n.actuated,.abort.the.operation.
14c80 6e 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 now.......................if.(!s
14ca0 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6d 5f 43 61 6e 63 65 6c 42 69 6e 64 tring.IsNullOrEmpty(m_CancelBind
14cc0 69 6e 67 29 20 26 26 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 4d 61 74 63 68 65 73 ing).&&.InputControlPath.Matches
14ce0 28 6d 5f 43 61 6e 63 65 6c 42 69 6e 64 69 6e 67 2c 20 63 6f 6e 74 72 6f 6c 29 20 26 26 0d 0a 20 (m_CancelBinding,.control).&&...
14d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 63 6f 6e 74 72 6f 6c 2e .......................!control.
14d20 43 68 65 63 6b 53 74 61 74 65 49 73 41 74 44 65 66 61 75 6c 74 28 73 74 61 74 65 50 74 72 29 20 CheckStateIsAtDefault(statePtr).
14d40 26 26 20 63 6f 6e 74 72 6f 6c 2e 48 61 73 56 61 6c 75 65 43 68 61 6e 67 65 49 6e 53 74 61 74 65 &&.control.HasValueChangeInState
14d60 28 73 74 61 74 65 50 74 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 (statePtr)).....................
14d80 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 4f 6e 43 61 .{..........................OnCa
14da0 6e 63 65 6c 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ncel();.........................
14dc0 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 20 7d 0d 0a .break;......................}..
14de0 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 20 6e 6f ......................//.Skip.no
14e00 69 73 79 20 63 6f 6e 74 72 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 isy.controls....................
14e20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 2e 6e 6f 69 73 79 20 26 26 20 28 6d 5f 46 6c 61 67 73 ...if.(control.noisy.&&.(m_Flags
14e40 20 26 20 46 6c 61 67 73 2e 44 6f 6e 74 49 67 6e 6f 72 65 4e 6f 69 73 79 43 6f 6e 74 72 6f 6c 73 .&.Flags.DontIgnoreNoisyControls
14e60 29 20 3d 3d 20 30 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 ).==.0).........................
14e80 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .continue;......................
14ea0 20 20 2f 2f 20 49 66 20 63 6f 6e 74 72 6f 6c 73 20 6d 75 73 74 20 6e 6f 74 20 6d 61 74 63 68 20 ..//.If.controls.must.not.match.
14ec0 63 65 72 74 61 69 6e 20 70 61 74 68 73 2c 20 6d 61 6b 65 20 73 75 72 65 20 74 68 65 20 63 6f 6e certain.paths,.make.sure.the.con
14ee0 74 72 6f 6c 20 64 6f 65 73 6e 27 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 trol.doesn't....................
14f00 20 20 20 69 66 20 28 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 20 3e 20 30 20 26 26 ...if.(m_ExcludePathCount.>.0.&&
14f20 20 48 61 76 65 50 61 74 68 4d 61 74 63 68 28 63 6f 6e 74 72 6f 6c 2c 20 6d 5f 45 78 63 6c 75 64 .HavePathMatch(control,.m_Exclud
14f40 65 50 61 74 68 73 2c 20 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 29 29 0d 0a 20 20 ePaths,.m_ExcludePathCount))....
14f60 20 20 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;.
14f80 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 54 68 65 20 63 6f .......................//.The.co
14fa0 6e 74 72 6f 6c 20 69 73 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c 79 20 65 78 63 6c 75 64 65 64 ntrol.is.not.explicitly.excluded
14fc0 20 73 6f 20 77 65 20 73 75 70 70 72 65 73 73 20 74 68 65 20 65 76 65 6e 74 2c 20 69 66 20 74 68 .so.we.suppress.the.event,.if.th
14fe0 61 74 27 73 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 at's.enabled....................
15000 20 20 20 73 75 70 70 72 65 73 73 45 76 65 6e 74 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 ...suppressEvent.=.true;........
15020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 63 6f 6e 74 72 6f 6c 73 20 68 ................//.If.controls.h
15040 61 76 65 20 74 6f 20 6d 61 74 63 68 20 61 20 63 65 72 74 61 69 6e 20 70 61 74 68 2c 20 63 68 65 ave.to.match.a.certain.path,.che
15060 63 6b 20 69 66 20 74 68 69 73 20 6f 6e 65 20 64 6f 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 ck.if.this.one.does.............
15080 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 49 6e 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 ..........if.(m_IncludePathCount
150a0 20 3e 20 30 20 26 26 20 21 48 61 76 65 50 61 74 68 4d 61 74 63 68 28 63 6f 6e 74 72 6f 6c 2c 20 .>.0.&&.!HavePathMatch(control,.
150c0 6d 5f 49 6e 63 6c 75 64 65 50 61 74 68 73 2c 20 6d 5f 49 6e 63 6c 75 64 65 50 61 74 68 43 6f 75 m_IncludePaths,.m_IncludePathCou
150e0 6e 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f nt))..........................co
15100 6e 74 69 6e 75 65 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 2f ntinue;......................../
15120 2f 20 49 66 20 77 65 27 72 65 20 65 78 70 65 63 74 69 6e 67 20 63 6f 6e 74 72 6f 6c 73 20 6f 66 /.If.we're.expecting.controls.of
15140 20 61 20 63 65 72 74 61 69 6e 20 74 79 70 65 2c 20 73 6b 69 70 20 69 66 20 63 6f 6e 74 72 6f 6c .a.certain.type,.skip.if.control
15160 20 69 73 6e 27 74 20 6f 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f .isn't.of....................../
15180 2f 20 74 68 65 20 72 69 67 68 74 20 74 79 70 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 /.the.right.type................
151a0 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c 54 79 70 65 20 21 3d 20 6e 75 6c 6c .......if.(m_ControlType.!=.null
151c0 20 26 26 20 21 6d 5f 43 6f 6e 74 72 6f 6c 54 79 70 65 2e 49 73 49 6e 73 74 61 6e 63 65 4f 66 54 .&&.!m_ControlType.IsInstanceOfT
151e0 79 70 65 28 63 6f 6e 74 72 6f 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ype(control))...................
15200 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .......continue;................
15220 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 27 72 65 20 65 78 70 65 63 74 69 6e 67 20 63 6f ........//.If.we're.expecting.co
15240 6e 74 72 6f 6c 73 20 74 6f 20 62 65 20 62 61 73 65 64 20 6f 6e 20 61 20 73 70 65 63 69 66 69 63 ntrols.to.be.based.on.a.specific
15260 20 6c 61 79 6f 75 74 2c 20 73 6b 69 70 20 69 66 20 63 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 .layout,.skip.if.control........
15280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 73 6e 27 74 20 62 61 73 65 64 20 6f 6e 20 ..............//.isn't.based.on.
152a0 74 68 61 74 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 that.layout.....................
152c0 20 20 69 66 20 28 21 6d 5f 45 78 70 65 63 74 65 64 4c 61 79 6f 75 74 2e 49 73 45 6d 70 74 79 28 ..if.(!m_ExpectedLayout.IsEmpty(
152e0 29 20 26 26 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 6d 5f ).&&..........................m_
15300 45 78 70 65 63 74 65 64 4c 61 79 6f 75 74 20 21 3d 20 63 6f 6e 74 72 6f 6c 2e 6d 5f 4c 61 79 6f ExpectedLayout.!=.control.m_Layo
15320 75 74 20 26 26 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 21 ut.&&..........................!
15340 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e 49 73 42 InputControlLayout.s_Layouts.IsB
15360 61 73 65 64 4f 6e 28 6d 5f 45 78 70 65 63 74 65 64 4c 61 79 6f 75 74 2c 20 63 6f 6e 74 72 6f 6c asedOn(m_ExpectedLayout,.control
15380 2e 6d 5f 4c 61 79 6f 75 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .m_Layout)).....................
153a0 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....continue;..................
153c0 20 20 20 20 20 20 2f 2f 20 53 6b 69 70 20 63 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 61 72 65 20 ......//.Skip.controls.that.are.
153e0 69 6e 20 74 68 65 69 72 20 64 65 66 61 75 6c 74 20 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 in.their.default.state..........
15400 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 54 68 69 73 20 69 73 20 74 68 .............//.NOTE:.This.is.th
15420 65 20 63 68 65 61 70 65 73 74 20 63 68 65 63 6b 20 77 69 74 68 20 72 65 73 70 65 63 74 20 74 6f e.cheapest.check.with.respect.to
15440 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 61 63 74 75 61 6c 20 73 74 61 74 65 2e 20 53 6f 0d 0a 20 20 .looking.at.actual.state..So....
15460 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 64 6f 20 74 68 ..................//.......do.th
15480 69 73 20 66 69 72 73 74 20 62 65 66 6f 72 65 20 6c 6f 6f 6b 69 6e 67 20 66 75 72 74 68 65 72 20 is.first.before.looking.further.
154a0 61 74 20 74 68 65 20 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 at.the.state....................
154c0 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 2e 43 68 65 63 6b 53 74 61 74 65 49 73 41 74 44 65 66 ...if.(control.CheckStateIsAtDef
154e0 61 75 6c 74 28 73 74 61 74 65 50 74 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ault(statePtr)).................
15500 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 20 20 20 .....{..........................
15520 2f 2f 20 46 6f 72 20 63 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 77 65 72 65 20 61 6c 72 65 61 64 //.For.controls.that.were.alread
15540 79 20 61 63 74 75 61 74 65 64 20 77 68 65 6e 20 77 65 20 73 74 61 72 74 65 64 20 74 68 65 20 72 y.actuated.when.we.started.the.r
15560 65 62 69 6e 64 2c 20 77 65 20 72 65 63 6f 72 64 20 73 74 61 72 74 69 6e 67 20 61 63 74 75 61 74 ebind,.we.record.starting.actuat
15580 69 6f 6e 73 20 62 65 6c 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ions.below......................
155a0 20 20 20 20 20 2f 2f 20 48 6f 77 65 76 65 72 2c 20 77 68 65 6e 20 73 75 63 68 20 61 20 63 6f 6e .....//.However,.when.such.a.con
155c0 74 72 6f 6c 20 67 6f 65 73 20 62 61 63 6b 20 74 6f 20 64 65 66 61 75 6c 74 20 73 74 61 74 65 2c trol.goes.back.to.default.state,
155e0 20 77 65 20 77 61 6e 74 20 74 6f 20 72 65 73 65 74 20 74 68 61 74 20 72 65 63 6f 72 64 65 64 20 .we.want.to.reset.that.recorded.
15600 76 61 6c 75 65 2e 20 54 68 69 73 20 6d 61 6b 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 value..This.makes...............
15620 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 75 72 65 20 74 68 61 74 20 69 66 2c 20 66 6f 72 20 ...........//.sure.that.if,.for.
15640 65 78 61 6d 70 6c 65 2c 20 61 20 6b 65 79 20 69 73 20 64 6f 77 6e 20 77 68 65 6e 20 74 68 65 20 example,.a.key.is.down.when.the.
15660 72 65 62 69 6e 64 20 73 74 61 72 74 65 64 2c 20 77 68 65 6e 20 74 68 65 20 6b 65 79 20 69 73 20 rebind.started,.when.the.key.is.
15680 72 65 6c 65 61 73 65 64 20 61 6e 64 20 74 68 65 6e 20 70 72 65 73 73 65 64 0d 0a 20 20 20 20 20 released.and.then.pressed.......
156a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 67 61 69 6e 2c 20 77 65 20 ...................//.again,.we.
156c0 64 6f 6e 27 74 20 63 6f 6d 70 61 72 65 20 74 6f 20 74 68 65 20 70 72 65 76 69 6f 75 73 6c 79 20 don't.compare.to.the.previously.
156e0 72 65 63 6f 72 64 65 64 20 6d 61 67 6e 69 74 75 64 65 20 6f 66 20 31 20 62 75 74 20 72 61 74 68 recorded.magnitude.of.1.but.rath
15700 65 72 20 74 6f 20 30 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 er.to.0.........................
15720 20 20 76 61 72 20 73 74 61 72 69 6e 67 41 63 74 75 61 74 69 6f 6e 49 6e 64 65 78 20 3d 20 6d 5f ..var.staringActuationIndex.=.m_
15740 53 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 43 6f 6e 74 72 6f 6c 73 2e 49 6e 64 65 78 4f StartingActuationControls.IndexO
15760 66 52 65 66 65 72 65 6e 63 65 28 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 fReference(control);............
15780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 61 72 69 6e 67 41 63 74 75 61 74 69 ..............if.(staringActuati
157a0 6f 6e 49 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 20 20 onIndex.!=.-1)..................
157c0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 61 72 69 6e 67 41 63 74 75 61 74 69 6f 6e 4d 61 ............m_StaringActuationMa
157e0 67 6e 69 74 75 64 65 73 5b 73 74 61 72 69 6e 67 41 63 74 75 61 74 69 6f 6e 49 6e 64 65 78 5d 20 gnitudes[staringActuationIndex].
15800 3d 20 30 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 =.0;............................
15820 63 6f 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 20 20 20 20 7d continue;......................}
15840 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 67 6e ........................var.magn
15860 69 74 75 64 65 20 3d 20 63 6f 6e 74 72 6f 6c 2e 45 76 61 6c 75 61 74 65 4d 61 67 6e 69 74 75 64 itude.=.control.EvaluateMagnitud
15880 65 28 73 74 61 74 65 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e(statePtr);....................
158a0 20 20 69 66 20 28 6d 61 67 6e 69 74 75 64 65 20 3e 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 ..if.(magnitude.>=.0)...........
158c0 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
158e0 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 73 74 61 72 74 69 6e 67 20 61 63 74 75 ......//.Determine.starting.actu
15900 61 74 69 6f 6e 2e 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 ation...........................
15920 66 6c 6f 61 74 20 73 74 61 72 74 69 6e 67 4d 61 67 6e 69 74 75 64 65 3b 0d 0a 20 20 20 20 20 20 float.startingMagnitude;........
15940 20 20 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 69 6e 67 41 63 ..................var.startingAc
15960 74 75 61 74 69 6f 6e 49 6e 64 65 78 20 3d 20 6d 5f 53 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 tuationIndex.=.m_StartingActuati
15980 6f 6e 43 6f 6e 74 72 6f 6c 73 2e 49 6e 64 65 78 4f 66 52 65 66 65 72 65 6e 63 65 28 63 6f 6e 74 onControls.IndexOfReference(cont
159a0 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 rol);..........................i
159c0 66 20 28 73 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 49 6e 64 65 78 20 21 3d 20 2d 31 29 f.(startingActuationIndex.!=.-1)
159e0 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 7b 0d 0a 20 20 20 ..........................{.....
15a00 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 2f 2f 20 57 65 20 68 .........................//.We.h
15a20 61 76 65 20 73 65 65 6e 20 74 68 69 73 20 63 6f 6e 74 72 6f 6c 20 73 74 61 72 74 20 61 63 74 75 ave.seen.this.control.start.actu
15a40 61 74 69 6e 67 20 62 65 66 6f 72 65 20 61 6e 64 20 68 61 76 65 20 72 65 63 6f 72 64 65 64 20 69 ating.before.and.have.recorded.i
15a60 74 73 20 73 74 61 72 74 69 6e 67 20 61 63 74 75 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 ts.starting.actuation...........
15a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 61 72 74 69 6e 67 4d 61 67 6e ....................startingMagn
15aa0 69 74 75 64 65 20 3d 20 6d 5f 53 74 61 72 69 6e 67 41 63 74 75 61 74 69 6f 6e 4d 61 67 6e 69 74 itude.=.m_StaringActuationMagnit
15ac0 75 64 65 73 5b 73 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 49 6e 64 65 78 5d 3b 0d 0a 20 udes[startingActuationIndex];...
15ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 .......................}........
15b00 20 20 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 ..................else..........
15b20 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 ................{...............
15b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 76 65 6e 27 74 20 73 65 65 6e 20 74 ...............//.Haven't.seen.t
15b60 68 69 73 20 63 6f 6e 74 72 6f 6c 20 63 68 61 6e 67 69 6e 67 20 61 63 74 75 61 74 69 6f 6e 20 79 his.control.changing.actuation.y
15b80 65 74 2e 20 52 65 63 6f 72 64 20 69 74 73 20 63 75 72 72 65 6e 74 20 61 63 74 75 61 74 69 6f 6e et..Record.its.current.actuation
15ba0 20 61 73 20 69 74 73 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 .as.its.........................
15bc0 20 20 20 20 20 2f 2f 20 73 74 61 72 74 69 6e 67 20 61 63 74 75 61 74 69 6f 6e 20 61 6e 64 20 69 .....//.starting.actuation.and.i
15be0 67 6e 6f 72 65 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 69 66 20 77 65 20 68 61 76 65 6e 27 74 20 gnore.the.control.if.we.haven't.
15c00 72 65 61 63 68 65 64 20 6f 75 72 20 61 63 74 75 61 74 69 6f 6e 20 74 68 72 65 73 68 6f 6c 64 20 reached.our.actuation.threshold.
15c20 79 65 74 2e 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 yet.............................
15c40 20 20 73 74 61 72 74 69 6e 67 4d 61 67 6e 69 74 75 64 65 20 3d 20 63 6f 6e 74 72 6f 6c 2e 45 76 ..startingMagnitude.=.control.Ev
15c60 61 6c 75 61 74 65 4d 61 67 6e 69 74 75 64 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 aluateMagnitude();..............
15c80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 75 6e 74 20 3d 20 6d 5f 53 74 ................var.count.=.m_St
15ca0 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 73 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 artingActuationsCount;..........
15cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 72 73 ....................ArrayHelpers
15ce0 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 53 74 61 72 74 69 .AppendWithCapacity(ref.m_Starti
15d00 6e 67 41 63 74 75 61 74 69 6f 6e 43 6f 6e 74 72 6f 6c 73 2c 20 72 65 66 20 6d 5f 53 74 61 72 74 ngActuationControls,.ref.m_Start
15d20 69 6e 67 41 63 74 75 61 74 69 6f 6e 73 43 6f 75 6e 74 2c 20 63 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 ingActuationsCount,.control);...
15d40 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 41 72 72 61 79 ...........................Array
15d60 48 65 6c 70 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d Helpers.AppendWithCapacity(ref.m
15d80 5f 53 74 61 72 69 6e 67 41 63 74 75 61 74 69 6f 6e 4d 61 67 6e 69 74 75 64 65 73 2c 20 72 65 66 _StaringActuationMagnitudes,.ref
15da0 20 63 6f 75 6e 74 2c 20 73 74 61 72 74 69 6e 67 4d 61 67 6e 69 74 75 64 65 29 3b 0d 0a 20 20 20 .count,.startingMagnitude);.....
15dc0 20 20 20 20 20 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 .....................}..........
15de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 67 6e 6f 72 65 20 63 6f 6e 74 ..................//.Ignore.cont
15e00 72 6f 6c 20 69 66 20 69 74 20 68 61 73 6e 27 74 20 65 78 63 65 65 64 65 64 20 74 68 65 20 6d 61 rol.if.it.hasn't.exceeded.the.ma
15e20 67 6e 69 74 75 64 65 20 74 68 72 65 73 68 6f 6c 64 20 72 65 6c 61 74 69 76 65 20 74 6f 20 69 74 gnitude.threshold.relative.to.it
15e40 73 20 73 74 61 72 74 69 6e 67 20 61 63 74 75 61 74 69 6f 6e 20 79 65 74 2e 0d 0a 20 20 20 20 20 s.starting.actuation.yet........
15e60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 4d 61 74 68 66 2e 41 62 73 ...................if.(Mathf.Abs
15e80 28 73 74 61 72 74 69 6e 67 4d 61 67 6e 69 74 75 64 65 20 2d 20 6d 61 67 6e 69 74 75 64 65 29 20 (startingMagnitude.-.magnitude).
15ea0 3c 20 6d 5f 4d 61 67 6e 69 74 75 64 65 54 68 72 65 73 68 6f 6c 64 29 0d 0a 20 20 20 20 20 20 20 <.m_MagnitudeThreshold).........
15ec0 20 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;..
15ee0 20 20 20 20 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 ....................}...........
15f00 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 74 68 69 73 20 77 6f .............////REVIEW:.this.wo
15f20 75 6c 64 20 62 65 20 6d 6f 72 65 20 75 73 65 66 75 6c 20 62 79 20 70 72 6f 76 69 64 69 6e 67 20 uld.be.more.useful.by.providing.
15f40 74 68 65 20 64 65 66 61 75 6c 74 20 73 63 6f 72 65 20 2a 74 6f 2a 20 74 68 65 20 63 61 6c 6c 62 the.default.score.*to*.the.callb
15f60 61 63 6b 20 28 77 68 69 63 68 20 6d 61 79 20 61 6c 74 65 72 20 69 74 20 6f 72 20 6a 75 73 74 20 ack.(which.may.alter.it.or.just.
15f80 72 65 70 6c 61 63 65 20 69 74 20 61 6c 74 6f 67 65 74 68 65 72 29 0d 0a 20 20 20 20 20 20 20 20 replace.it.altogether)..........
15fa0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 70 75 74 65 20 73 63 6f 72 65 2e 0d 0a 20 ............//.Compute.score....
15fc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 63 6f 72 65 3b 0d ...................float.score;.
15fe0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 6e 43 6f 6d .....................if.(m_OnCom
16000 70 75 74 65 53 63 6f 72 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 puteScore.!=.null)..............
16020 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 ........{.......................
16040 20 20 20 73 63 6f 72 65 20 3d 20 6d 5f 4f 6e 43 6f 6d 70 75 74 65 53 63 6f 72 65 28 63 6f 6e 74 ...score.=.m_OnComputeScore(cont
16060 72 6f 6c 2c 20 65 76 65 6e 74 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rol,.eventPtr);.................
16080 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 65 6c 73 65 .....}......................else
160a0 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 20 20 20 ......................{.........
160c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 63 6f 72 65 20 3d 20 6d 61 67 6e 69 74 75 .................score.=.magnitu
160e0 64 65 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 2f de;............................/
16100 2f 20 57 65 20 64 6f 6e 27 74 20 77 61 6e 74 20 73 79 6e 74 68 65 74 69 63 20 63 6f 6e 74 72 6f /.We.don't.want.synthetic.contro
16120 6c 73 20 74 6f 20 6e 6f 74 20 62 65 20 62 69 6e 64 61 62 6c 65 20 61 74 20 61 6c 6c 20 62 75 74 ls.to.not.be.bindable.at.all.but
16140 20 74 68 65 79 20 73 68 6f 75 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .they.should....................
16160 20 20 20 20 20 20 2f 2f 20 67 65 6e 65 72 61 6c 6c 79 20 63 65 64 65 20 70 72 69 6f 72 69 74 79 ......//.generally.cede.priority
16180 20 74 6f 20 63 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 61 72 65 6e 27 74 20 73 79 6e 74 68 65 74 .to.controls.that.aren't.synthet
161a0 69 63 2e 20 53 6f 20 77 65 20 62 75 6d 70 20 61 6c 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ic..So.we.bump.all..............
161c0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 63 6f 72 65 73 20 6f 66 20 63 6f 6e 74 72 6f 6c ............//.scores.of.control
161e0 73 20 74 68 61 74 20 61 72 65 6e 27 74 20 73 79 6e 74 68 65 74 69 63 2e 0d 0a 20 20 20 20 20 20 s.that.aren't.synthetic.........
16200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 63 6f 6e 74 72 6f 6c 2e 73 ..................if.(!control.s
16220 79 6e 74 68 65 74 69 63 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ynthetic).......................
16240 20 20 20 20 20 20 20 73 63 6f 72 65 20 2b 3d 20 31 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .......score.+=.1f;.............
16260 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 20 20 20 20 .........}......................
16280 20 20 2f 2f 20 43 6f 6e 74 72 6f 6c 20 69 73 20 61 20 63 61 6e 64 69 64 61 74 65 2e 0d 0a 20 20 ..//.Control.is.a.candidate.....
162a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 61 ..................//.See.if.we.a
162c0 6c 72 65 61 64 79 20 73 69 6e 67 6c 65 64 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 6f 75 74 20 61 lready.singled.the.control.out.a
162e0 73 20 61 20 70 6f 74 65 6e 74 69 61 6c 20 63 61 6e 64 69 64 61 74 65 2e 0d 0a 20 20 20 20 20 20 s.a.potential.candidate.........
16300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 61 6e 64 69 64 61 74 65 49 6e 64 65 78 ..............var.candidateIndex
16320 20 3d 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 49 6e 64 65 78 4f 66 28 63 6f 6e 74 72 6f 6c 29 .=.m_Candidates.IndexOf(control)
16340 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 61 6e 64 69 ;......................if.(candi
16360 64 61 74 65 49 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 dateIndex.!=.-1)................
16380 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 20 20 ......{.........................
163a0 20 2f 2f 20 59 65 73 2c 20 77 65 20 64 69 64 2e 20 53 6f 20 6a 75 73 74 20 63 68 65 63 6b 20 77 .//.Yes,.we.did..So.just.check.w
163c0 68 65 74 68 65 72 20 69 74 20 62 65 63 61 6d 65 20 61 20 62 65 74 74 65 72 20 63 61 6e 64 69 64 hether.it.became.a.better.candid
163e0 61 74 65 20 74 68 61 6e 20 62 65 66 6f 72 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ate.than.before.................
16400 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 53 63 6f 72 65 73 5b 63 61 6e 64 69 64 61 74 65 ..........if.(m_Scores[candidate
16420 49 6e 64 65 78 5d 20 3c 20 73 63 6f 72 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Index].<.score).................
16440 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
16460 20 20 20 20 20 20 20 20 68 61 76 65 43 68 61 6e 67 65 64 43 61 6e 64 69 64 61 74 65 73 20 3d 20 ........haveChangedCandidates.=.
16480 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 true;...........................
164a0 20 20 20 6d 5f 53 63 6f 72 65 73 5b 63 61 6e 64 69 64 61 74 65 49 6e 64 65 78 5d 20 3d 20 73 63 ...m_Scores[candidateIndex].=.sc
164c0 6f 72 65 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 ore;............................
164e0 20 20 20 20 69 66 20 28 6d 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 68 20 ....if.(m_WaitSecondsAfterMatch.
16500 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 >.0)............................
16520 20 20 20 20 20 20 6d 5f 4c 61 73 74 4d 61 74 63 68 54 69 6d 65 20 3d 20 49 6e 70 75 74 52 75 6e ......m_LastMatchTime.=.InputRun
16540 74 69 6d 65 2e 73 5f 49 6e 73 74 61 6e 63 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 3b 0d 0a 20 20 time.s_Instance.currentTime;....
16560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
16580 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 .............}..................
165a0 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 7b 0d ....else......................{.
165c0 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 2f 2f 20 4e 6f 2c 20 .........................//.No,.
165e0 73 6f 20 61 64 64 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 so.add.it.......................
16600 20 20 20 20 76 61 72 20 73 63 6f 72 65 43 6f 75 6e 74 20 3d 20 6d 5f 43 61 6e 64 69 64 61 74 65 ....var.scoreCount.=.m_Candidate
16620 73 2e 43 6f 75 6e 74 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 s.Count;........................
16640 20 20 76 61 72 20 6d 61 67 6e 69 74 75 64 65 43 6f 75 6e 74 20 3d 20 6d 5f 43 61 6e 64 69 64 61 ..var.magnitudeCount.=.m_Candida
16660 74 65 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tes.Count;......................
16680 20 20 20 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 41 64 64 28 63 6f 6e 74 72 6f 6c 29 3b 0d 0a ....m_Candidates.Add(control);..
166a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c ........................ArrayHel
166c0 70 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 53 63 pers.AppendWithCapacity(ref.m_Sc
166e0 6f 72 65 73 2c 20 72 65 66 20 73 63 6f 72 65 43 6f 75 6e 74 2c 20 73 63 6f 72 65 29 3b 0d 0a 20 ores,.ref.scoreCount,.score);...
16700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 .......................ArrayHelp
16720 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 6d 5f 4d 61 67 ers.AppendWithCapacity(ref.m_Mag
16740 6e 69 74 75 64 65 73 2c 20 72 65 66 20 6d 61 67 6e 69 74 75 64 65 43 6f 75 6e 74 2c 20 6d 61 67 nitudes,.ref.magnitudeCount,.mag
16760 6e 69 74 75 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nitude);........................
16780 20 20 68 61 76 65 43 68 61 6e 67 65 64 43 61 6e 64 69 64 61 74 65 73 20 3d 20 74 72 75 65 3b 0d ..haveChangedCandidates.=.true;.
167a0 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 69 66 20 28 6d ...........................if.(m
167c0 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 68 20 3e 20 30 29 0d 0a 20 20 20 _WaitSecondsAfterMatch.>.0).....
167e0 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 6d 5f 4c 61 73 74 4d .........................m_LastM
16800 61 74 63 68 54 69 6d 65 20 3d 20 49 6e 70 75 74 52 75 6e 74 69 6d 65 2e 73 5f 49 6e 73 74 61 6e atchTime.=.InputRuntime.s_Instan
16820 63 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ce.currentTime;.................
16840 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 0d 0a 20 20 20 .....}..................}.......
16860 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 73 68 6f 75 6c 64 .............//.See.if.we.should
16880 20 73 75 70 70 72 65 73 73 20 74 68 65 20 65 76 65 6e 74 2e 20 49 66 20 73 6f 2c 20 6d 61 72 6b .suppress.the.event..If.so,.mark
168a0 20 69 74 20 68 61 6e 64 6c 65 64 20 73 6f 20 74 68 61 74 20 74 68 65 20 69 6e 70 75 74 20 6d 61 .it.handled.so.that.the.input.ma
168c0 6e 61 67 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 69 6c 6c 20 73 nager..................//.will.s
168e0 6b 69 70 20 66 75 72 74 68 65 72 20 70 72 6f 63 65 73 73 69 6e 67 20 6f 66 20 74 68 65 20 65 76 kip.further.processing.of.the.ev
16900 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 75 70 70 72 65 ent...................if.(suppre
16920 73 73 45 76 65 6e 74 20 26 26 20 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 53 75 70 70 ssEvent.&&.(m_Flags.&.Flags.Supp
16940 72 65 73 73 4d 61 74 63 68 69 6e 67 45 76 65 6e 74 73 29 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 ressMatchingEvents).!=.0).......
16960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 76 65 6e 74 50 74 72 2e 68 61 6e 64 6c 65 64 20 ...............eventPtr.handled.
16980 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 68 =.true;....................if.(h
169a0 61 76 65 43 68 61 6e 67 65 64 43 61 6e 64 69 64 61 74 65 73 20 26 26 20 21 63 61 6e 63 65 6c 65 aveChangedCandidates.&&.!cancele
169c0 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 d)..................{...........
169e0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 61 20 63 61 6c 6c 62 ...........//.If.we.have.a.callb
16a00 61 63 6b 20 74 68 61 74 20 77 61 6e 74 73 20 74 6f 20 63 6f 6e 74 72 6f 6c 20 6d 61 74 63 68 69 ack.that.wants.to.control.matchi
16a20 6e 67 2c 20 6c 65 61 76 65 20 69 74 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 74 6f 20 ng,.leave.it.to.the.callback.to.
16a40 64 65 63 69 64 65 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 77 decide......................//.w
16a60 68 65 74 68 65 72 20 74 68 65 20 72 65 62 69 6e 64 20 69 73 20 63 6f 6d 70 6c 65 74 65 20 6f 72 hether.the.rebind.is.complete.or
16a80 20 6e 6f 74 2e 20 4f 74 68 65 72 77 69 73 65 2c 20 6a 75 73 74 20 63 6f 6d 70 6c 65 74 65 2e 0d .not..Otherwise,.just.complete..
16aa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 6e 50 6f 74 .....................if.(m_OnPot
16ac0 65 6e 74 69 61 6c 4d 61 74 63 68 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 entialMatch.!=.null)............
16ae0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
16b00 20 20 20 20 20 53 6f 72 74 43 61 6e 64 69 64 61 74 65 73 42 79 53 63 6f 72 65 28 29 3b 0d 0a 20 .....SortCandidatesByScore();...
16b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 50 6f 74 65 6e .......................m_OnPoten
16b40 74 69 61 6c 4d 61 74 63 68 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tialMatch(this);................
16b60 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 65 6c 73 ......}......................els
16b80 65 20 69 66 20 28 6d 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 68 20 3c 3d e.if.(m_WaitSecondsAfterMatch.<=
16ba0 20 30 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 .0)......................{......
16bc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 43 6f 6d 70 6c 65 74 65 28 29 ....................OnComplete()
16be0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ;......................}........
16c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..............else..............
16c20 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 ........{.......................
16c40 20 20 20 53 6f 72 74 43 61 6e 64 69 64 61 74 65 73 42 79 53 63 6f 72 65 28 29 3b 0d 0a 20 20 20 ...SortCandidatesByScore();.....
16c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
16c80 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ....}..............}............
16ca0 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 6f 72 74 43 61 6e 64 69 64 61 74 65 73 42 ....private.void.SortCandidatesB
16cc0 79 53 63 6f 72 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 yScore()..............{.........
16ce0 20 20 20 20 20 20 20 20 20 76 61 72 20 63 61 6e 64 69 64 61 74 65 43 6f 75 6e 74 20 3d 20 6d 5f .........var.candidateCount.=.m_
16d00 43 61 6e 64 69 64 61 74 65 73 2e 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Candidates.Count;...............
16d20 20 20 20 69 66 20 28 63 61 6e 64 69 64 61 74 65 43 6f 75 6e 74 20 3c 3d 20 31 29 0d 0a 20 20 20 ...if.(candidateCount.<=.1).....
16d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 .................return;........
16d60 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 69 6d 70 6c 65 20 69 6e 73 65 72 74 69 6f 6e 20 ............//.Simple.insertion.
16d80 73 6f 72 74 20 74 68 61 74 20 73 6f 72 74 73 20 62 6f 74 68 20 6d 5f 43 61 6e 64 69 64 61 74 65 sort.that.sorts.both.m_Candidate
16da0 73 20 61 6e 64 20 6d 5f 53 63 6f 72 65 73 20 61 74 20 74 68 65 20 73 61 6d 65 20 74 69 6d 65 2e s.and.m_Scores.at.the.same.time.
16dc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 77 ..................//.Note.that.w
16de0 65 27 72 65 20 73 6f 72 74 69 6e 67 20 62 79 20 2a 64 65 63 72 65 61 73 69 6e 67 2a 20 73 63 6f e're.sorting.by.*decreasing*.sco
16e00 72 65 20 68 65 72 65 2c 20 6e 6f 74 20 62 79 20 69 6e 63 72 65 61 73 69 6e 67 20 73 63 6f 72 65 re.here,.not.by.increasing.score
16e20 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 ...................for.(var.i.=.
16e40 31 3b 20 69 20 3c 20 63 61 6e 64 69 64 61 74 65 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 1;.i.<.candidateCount;.++i).....
16e60 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
16e80 20 20 20 20 66 6f 72 20 28 76 61 72 20 6a 20 3d 20 69 3b 20 6a 20 3e 20 30 20 26 26 20 6d 5f 53 ....for.(var.j.=.i;.j.>.0.&&.m_S
16ea0 63 6f 72 65 73 5b 6a 20 2d 20 31 5d 20 3c 20 6d 5f 53 63 6f 72 65 73 5b 6a 5d 3b 20 2d 2d 6a 29 cores[j.-.1].<.m_Scores[j];.--j)
16ec0 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 20 20 20 ......................{.........
16ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 63 6f 72 65 73 2e 53 77 61 70 45 6c .................m_Scores.SwapEl
16f00 65 6d 65 6e 74 73 28 6a 2c 20 6a 20 2d 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ements(j,.j.-.1);...............
16f20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 53 77 61 70 45 6c 65 6d ...........m_Candidates.SwapElem
16f40 65 6e 74 73 28 6a 2c 20 6a 20 2d 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ents(j,.j.-.1);.................
16f60 20 20 20 20 20 20 20 20 20 6d 5f 4d 61 67 6e 69 74 75 64 65 73 2e 53 77 61 70 45 6c 65 6d 65 6e .........m_Magnitudes.SwapElemen
16f80 74 73 28 69 2c 20 6a 20 2d 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ts(i,.j.-.1);...................
16fa0 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 20 20 ...}..................}.........
16fc0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 .....}................private.st
16fe0 61 74 69 63 20 62 6f 6f 6c 20 48 61 76 65 50 61 74 68 4d 61 74 63 68 28 49 6e 70 75 74 43 6f 6e atic.bool.HavePathMatch(InputCon
17000 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 2c 20 73 74 72 69 6e 67 5b 5d 20 70 61 74 68 73 2c 20 69 6e trol.control,.string[].paths,.in
17020 74 20 70 61 74 68 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 t.pathCount)..............{.....
17040 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c .............for.(var.i.=.0;.i.<
17060 20 70 61 74 68 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .pathCount;.++i)................
17080 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 49 6e 70 ..{......................if.(Inp
170a0 75 74 43 6f 6e 74 72 6f 6c 50 61 74 68 2e 4d 61 74 63 68 65 73 50 72 65 66 69 78 28 70 61 74 68 utControlPath.MatchesPrefix(path
170c0 73 5b 69 5d 2c 20 63 6f 6e 74 72 6f 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s[i],.control)).................
170e0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 .........return.true;...........
17100 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 .......}....................retu
17120 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 rn.false;..............}........
17140 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 48 6f 6f 6b 4f 6e 41 66 74 65 72 ........private.void.HookOnAfter
17160 55 70 64 61 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 Update()..............{.........
17180 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 4f 6e .........if.((m_Flags.&.Flags.On
171a0 41 66 74 65 72 55 70 64 61 74 65 48 6f 6f 6b 65 64 29 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 AfterUpdateHooked).!=.0)........
171c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ..............return;...........
171e0 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 6e 41 66 74 65 72 55 70 64 61 74 65 44 65 6c 65 .........if.(m_OnAfterUpdateDele
17200 67 61 74 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 gate.==.null)...................
17220 20 20 20 6d 5f 4f 6e 41 66 74 65 72 55 70 64 61 74 65 44 65 6c 65 67 61 74 65 20 3d 20 4f 6e 41 ...m_OnAfterUpdateDelegate.=.OnA
17240 66 74 65 72 55 70 64 61 74 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 fterUpdate;....................I
17260 6e 70 75 74 53 79 73 74 65 6d 2e 6f 6e 41 66 74 65 72 55 70 64 61 74 65 20 2b 3d 20 6d 5f 4f 6e nputSystem.onAfterUpdate.+=.m_On
17280 41 66 74 65 72 55 70 64 61 74 65 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 AfterUpdateDelegate;............
172a0 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 4f 6e 41 66 74 65 72 55 70 ......m_Flags.|=.Flags.OnAfterUp
172c0 64 61 74 65 48 6f 6f 6b 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 dateHooked;..............}......
172e0 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 55 6e 68 6f 6f 6b 4f 6e 41 ..........private.void.UnhookOnA
17300 66 74 65 72 55 70 64 61 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 fterUpdate()..............{.....
17320 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 .............if.((m_Flags.&.Flag
17340 73 2e 4f 6e 41 66 74 65 72 55 70 64 61 74 65 48 6f 6f 6b 65 64 29 20 3d 3d 20 30 29 0d 0a 20 20 s.OnAfterUpdateHooked).==.0)....
17360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 ..................return;.......
17380 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 6f 6e 41 66 74 65 72 .............InputSystem.onAfter
173a0 55 70 64 61 74 65 20 2d 3d 20 6d 5f 4f 6e 41 66 74 65 72 55 70 64 61 74 65 44 65 6c 65 67 61 74 Update.-=.m_OnAfterUpdateDelegat
173c0 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 26 3d 20 7e e;..................m_Flags.&=.~
173e0 46 6c 61 67 73 2e 4f 6e 41 66 74 65 72 55 70 64 61 74 65 48 6f 6f 6b 65 64 3b 0d 0a 20 20 20 20 Flags.OnAfterUpdateHooked;......
17400 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 ........}................private
17420 20 76 6f 69 64 20 4f 6e 41 66 74 65 72 55 70 64 61 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 .void.OnAfterUpdate()...........
17440 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 64 ...{..................//.If.we.d
17460 6f 6e 27 74 20 68 61 76 65 20 61 20 6d 61 74 63 68 20 79 65 74 20 62 75 74 20 77 65 20 68 61 76 on't.have.a.match.yet.but.we.hav
17480 65 20 61 20 74 69 6d 65 6f 75 74 20 61 6e 64 20 68 61 76 65 20 65 78 70 69 72 65 64 20 69 74 2c e.a.timeout.and.have.expired.it,
174a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 61 6e 63 65 6c 20 74 68 65 20 ..................//.cancel.the.
174c0 6f 70 65 72 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 operation...................if.(
174e0 6d 5f 4c 61 73 74 4d 61 74 63 68 54 69 6d 65 20 3c 20 30 20 26 26 20 6d 5f 54 69 6d 65 6f 75 74 m_LastMatchTime.<.0.&&.m_Timeout
17500 20 3e 20 30 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 .>.0.&&......................Inp
17520 75 74 52 75 6e 74 69 6d 65 2e 73 5f 49 6e 73 74 61 6e 63 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 utRuntime.s_Instance.currentTime
17540 20 2d 20 6d 5f 53 74 61 72 74 54 69 6d 65 20 3e 20 6d 5f 54 69 6d 65 6f 75 74 29 0d 0a 20 20 20 .-.m_StartTime.>.m_Timeout).....
17560 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
17580 20 20 20 20 43 61 6e 63 65 6c 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....Cancel();...................
175a0 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d ...return;..................}...
175c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 61 6e 69 74 79 20 63 68 65 63 6b .................//.Sanity.check
175e0 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 77 65 27 72 65 20 61 63 74 75 61 6c 6c 79 20 77 61 69 .to.make.sure.we're.actually.wai
17600 74 69 6e 67 20 66 6f 72 20 63 6f 6d 70 6c 65 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 ting.for.completion.............
17620 20 20 20 20 20 20 69 66 20 28 6d 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 ......if.(m_WaitSecondsAfterMatc
17640 68 20 3c 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 h.<=.0)......................ret
17660 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 61 6e 27 74 urn;....................//.Can't
17680 20 63 6f 6d 70 6c 65 74 65 20 69 66 20 77 65 20 68 61 76 65 20 6e 6f 20 6d 61 74 63 68 20 79 65 .complete.if.we.have.no.match.ye
176a0 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4c 61 73 74 4d 61 t...................if.(m_LastMa
176c0 74 63 68 54 69 6d 65 20 3c 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tchTime.<.0)....................
176e0 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ..return;....................//.
17700 43 6f 6d 70 6c 65 74 65 20 69 66 20 74 69 6d 65 6f 75 74 20 68 61 73 20 65 78 70 69 72 65 64 2e Complete.if.timeout.has.expired.
17720 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 49 6e 70 75 74 52 75 6e 74 69 ..................if.(InputRunti
17740 6d 65 2e 73 5f 49 6e 73 74 61 6e 63 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 20 3e 3d 20 6d 5f 4c me.s_Instance.currentTime.>=.m_L
17760 61 73 74 4d 61 74 63 68 54 69 6d 65 20 2b 20 6d 5f 57 61 69 74 53 65 63 6f 6e 64 73 41 66 74 65 astMatchTime.+.m_WaitSecondsAfte
17780 72 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 20 20 20 43 6f 6d rMatch)......................Com
177a0 70 6c 65 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 plete();..............}.........
177c0 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 4f 6e 43 6f 6d 70 6c 65 74 65 28 29 .......private.void.OnComplete()
177e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
17800 20 53 6f 72 74 43 61 6e 64 69 64 61 74 65 73 42 79 53 63 6f 72 65 28 29 3b 0d 0a 0d 0a 20 20 20 .SortCandidatesByScore();.......
17820 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 6f .............if.(m_Candidates.Co
17840 75 6e 74 20 3e 20 30 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 unt.>.0)..................{.....
17860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 61 20 70 61 74 .................//.Create.a.pat
17880 68 20 66 72 6f 6d 20 74 68 65 20 73 65 6c 65 63 74 65 64 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 h.from.the.selected.control.....
178a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 65 6c 65 63 74 65 64 43 6f ..................var.selectedCo
178c0 6e 74 72 6f 6c 20 3d 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 5b 30 5d 3b 0d 0a 20 20 20 20 20 20 ntrol.=.m_Candidates[0];........
178e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 61 74 68 20 3d 20 73 65 6c 65 63 74 65 ..............var.path.=.selecte
17900 64 43 6f 6e 74 72 6f 6c 2e 70 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dControl.path;..................
17920 20 20 20 20 69 66 20 28 6d 5f 4f 6e 47 65 6e 65 72 61 74 65 50 61 74 68 20 21 3d 20 6e 75 6c 6c ....if.(m_OnGeneratePath.!=.null
17940 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 20 20 )......................{........
17960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 68 61 76 65 20 61 20 63 ..................//.We.have.a.c
17980 61 6c 6c 62 61 63 6b 2e 20 47 69 76 65 20 69 74 20 61 20 73 68 6f 74 20 74 6f 20 67 65 6e 65 72 allback..Give.it.a.shot.to.gener
179a0 61 74 65 20 61 20 70 61 74 68 2e 20 49 66 20 69 74 20 64 6f 65 73 6e 27 74 2c 0d 0a 20 20 20 20 ate.a.path..If.it.doesn't,......
179c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 66 61 6c 6c 20 62 61 63 6b ....................//.fall.back
179e0 20 74 6f 20 6f 75 72 20 64 65 66 61 75 6c 74 20 6c 6f 67 69 63 2e 0d 0a 20 20 20 20 20 20 20 20 .to.our.default.logic...........
17a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 50 61 74 68 20 3d 20 6d 5f ................var.newPath.=.m_
17a20 4f 6e 47 65 6e 65 72 61 74 65 50 61 74 68 28 73 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 29 3b OnGeneratePath(selectedControl);
17a40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 ..........................if.(!s
17a60 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 65 77 50 61 74 68 29 29 0d 0a 20 tring.IsNullOrEmpty(newPath))...
17a80 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 70 61 74 68 20 ...........................path.
17aa0 3d 20 6e 65 77 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.newPath;......................
17ac0 20 20 20 20 65 6c 73 65 20 69 66 20 28 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 44 6f ....else.if.((m_Flags.&.Flags.Do
17ae0 6e 74 47 65 6e 65 72 61 6c 69 7a 65 50 61 74 68 4f 66 53 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f ntGeneralizePathOfSelectedContro
17b00 6c 29 20 3d 3d 20 30 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 l).==.0)........................
17b20 20 20 20 20 20 20 70 61 74 68 20 3d 20 47 65 6e 65 72 61 74 65 50 61 74 68 46 6f 72 43 6f 6e 74 ......path.=.GeneratePathForCont
17b40 72 6f 6c 28 73 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 rol(selectedControl);...........
17b60 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 20 20 ...........}....................
17b80 20 20 65 6c 73 65 20 69 66 20 28 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 44 6f 6e 74 ..else.if.((m_Flags.&.Flags.Dont
17ba0 47 65 6e 65 72 61 6c 69 7a 65 50 61 74 68 4f 66 53 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 29 GeneralizePathOfSelectedControl)
17bc0 20 3d 3d 20 30 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 .==.0)..........................
17be0 70 61 74 68 20 3d 20 47 65 6e 65 72 61 74 65 50 61 74 68 46 6f 72 43 6f 6e 74 72 6f 6c 28 73 65 path.=.GeneratePathForControl(se
17c00 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 lectedControl);.................
17c20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 61 20 63 75 73 74 6f 6d 20 63 61 .......//.If.we.have.a.custom.ca
17c40 6c 6c 62 61 63 6b 20 66 6f 72 20 61 70 70 6c 79 69 6e 67 20 74 68 65 20 62 69 6e 64 69 6e 67 2c llback.for.applying.the.binding,
17c60 20 6c 65 74 20 69 74 20 68 61 6e 64 6c 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .let.it.handle..................
17c80 20 20 20 20 2f 2f 20 65 76 65 72 79 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....//.everything...............
17ca0 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 6e 41 70 70 6c 79 42 69 6e 64 69 6e 67 20 21 3d 20 ........if.(m_OnApplyBinding.!=.
17cc0 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d null)..........................m
17ce0 5f 4f 6e 41 70 70 6c 79 42 69 6e 64 69 6e 67 28 74 68 69 73 2c 20 70 61 74 68 29 3b 0d 0a 20 20 _OnApplyBinding(this,.path);....
17d00 20 20 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 ..................else..........
17d20 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 ............{...................
17d40 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 .......Debug.Assert(m_ActionToRe
17d60 62 69 6e 64 20 21 3d 20 6e 75 6c 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 bind.!=.null);..................
17d80 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 73 68 6f 75 6c 64 20 6d 6f ..........//.See.if.we.should.mo
17da0 64 69 66 79 20 61 6e 20 65 78 69 73 74 69 6e 67 20 62 69 6e 64 69 6e 67 20 6f 72 20 63 72 65 61 dify.an.existing.binding.or.crea
17dc0 74 65 20 61 20 6e 65 77 20 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 te.a.new.one....................
17de0 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6c 61 67 73 20 26 20 46 6c 61 67 73 2e 41 64 64 4e .......if.((m_Flags.&.Flags.AddN
17e00 65 77 42 69 6e 64 69 6e 67 29 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ewBinding).!=.0)................
17e20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
17e40 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 6e 65 77 20 62 69 6e 64 69 6e 67 2e 0d .........//.Create.new.binding..
17e60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 .............................m_A
17e80 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 2e 41 64 64 42 69 6e 64 69 6e 67 28 70 61 74 68 2c 20 67 ctionToRebind.AddBinding(path,.g
17ea0 72 6f 75 70 73 3a 20 6d 5f 42 69 6e 64 69 6e 67 47 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 69 roups:.m_BindingGroupForNewBindi
17ec0 6e 67 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ng);..........................}.
17ee0 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 65 6c 73 65 0d 0a 20 .........................else...
17f00 20 20 20 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 .......................{........
17f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 70 70 6c 79 20 62 ......................//.Apply.b
17f40 69 6e 64 69 6e 67 20 6f 76 65 72 72 69 64 65 20 74 6f 20 65 78 69 73 74 69 6e 67 20 62 69 6e 64 inding.override.to.existing.bind
17f60 69 6e 67 2e 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 ing.............................
17f80 20 20 69 66 20 28 6d 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 20 3e 3d 20 30 29 ..if.(m_TargetBindingIndex.>=.0)
17fa0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d ..............................{.
17fc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................................
17fe0 20 69 66 20 28 6d 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 20 3e 3d 20 6d 5f 41 .if.(m_TargetBindingIndex.>=.m_A
18000 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 2e 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 29 0d 0a 20 ctionToRebind.bindings.Count)...
18020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................................
18040 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 ...throw.new.InvalidOperationExc
18060 65 70 74 69 6f 6e 28 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 eption(.........................
18080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 54 61 72 67 65 74 20 62 69 6e 64 69 6e .................$"Target.bindin
180a0 67 20 69 6e 64 65 78 20 7b 6d 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 7d 20 6f g.index.{m_TargetBindingIndex}.o
180c0 75 74 20 6f 66 20 72 61 6e 67 65 20 66 6f 72 20 61 63 74 69 6f 6e 20 27 7b 6d 5f 41 63 74 69 6f ut.of.range.for.action.'{m_Actio
180e0 6e 54 6f 52 65 62 69 6e 64 7d 27 20 77 69 74 68 20 7b 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 69 nToRebind}'.with.{m_ActionToRebi
18100 6e 64 2e 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 7d 20 62 69 6e 64 69 6e 67 73 22 29 3b 0d 0a nd.bindings.Count}.bindings");..
18120 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................................
18140 20 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f ..m_ActionToRebind.ApplyBindingO
18160 76 65 72 72 69 64 65 28 6d 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 2c 20 70 61 verride(m_TargetBindingIndex,.pa
18180 74 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 20 20 20 20 20 20 th);............................
181a0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..}.............................
181c0 20 65 6c 73 65 20 69 66 20 28 6d 5f 42 69 6e 64 69 6e 67 4d 61 73 6b 20 21 3d 20 6e 75 6c 6c 29 .else.if.(m_BindingMask.!=.null)
181e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d ..............................{.
18200 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................................
18220 20 76 61 72 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 20 3d 20 6d 5f 42 69 6e 64 69 6e 67 .var.bindingOverride.=.m_Binding
18240 4d 61 73 6b 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Mask.Value;.....................
18260 20 20 20 20 20 20 20 20 20 20 20 20 20 62 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 2e 6f 76 65 .............bindingOverride.ove
18280 72 72 69 64 65 50 61 74 68 20 3d 20 70 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rridePath.=.path;...............
182a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 ...................m_ActionToReb
182c0 69 6e 64 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 62 69 6e 64 69 6e 67 ind.ApplyBindingOverride(binding
182e0 4f 76 65 72 72 69 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Override);......................
18300 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 20 ........}.......................
18320 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......else.....................
18340 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
18360 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 2e 41 70 70 ............m_ActionToRebind.App
18380 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 70 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 lyBindingOverride(path);........
183a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
183c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
183e0 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ........}..................}....
18400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 70 6c 65 74 65 2e 0d 0a 20 20 ................//.Complete.....
18420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6c 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 43 ..............m_Flags.|=.Flags.C
18440 6f 6d 70 6c 65 74 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 43 ompleted;..................m_OnC
18460 6f 6d 70 6c 65 74 65 3f 2e 49 6e 76 6f 6b 65 28 74 68 69 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 omplete?.Invoke(this);..........
18480 20 20 20 20 20 20 20 20 20 20 52 65 73 65 74 41 66 74 65 72 4d 61 74 63 68 43 6f 6d 70 6c 65 74 ..........ResetAfterMatchComplet
184a0 65 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ed();..............}............
184c0 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 4f 6e 43 61 6e 63 65 6c 28 29 0d 0a 20 20 20 ....private.void.OnCancel().....
184e0 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 6d 5f 46 6c .........{..................m_Fl
18500 61 67 73 20 7c 3d 20 46 6c 61 67 73 2e 43 61 6e 63 65 6c 65 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 ags.|=.Flags.Canceled;..........
18520 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 43 61 6e 63 65 6c 3f 2e 49 6e 76 6f 6b 65 28 74 68 69 ..........m_OnCancel?.Invoke(thi
18540 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 73 65 74 41 66 74 65 s);....................ResetAfte
18560 72 4d 61 74 63 68 43 6f 6d 70 6c 65 74 65 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 rMatchCompleted();..............
18580 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 52 65 }................private.void.Re
185a0 73 65 74 41 66 74 65 72 4d 61 74 63 68 43 6f 6d 70 6c 65 74 65 64 28 29 0d 0a 20 20 20 20 20 20 setAfterMatchCompleted()........
185c0 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 5f 46 6c 61 67 73 ......{..................m_Flags
185e0 20 26 3d 20 7e 46 6c 61 67 73 2e 53 74 61 72 74 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .&=.~Flags.Started;.............
18600 20 20 20 20 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 .....m_Candidates.Clear();......
18620 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e 43 61 70 61 63 69 74 ............m_Candidates.Capacit
18640 79 20 3d 20 30 3b 20 2f 2f 20 52 65 6c 65 61 73 65 20 6f 75 72 20 75 6e 6d 61 6e 61 67 65 64 20 y.=.0;.//.Release.our.unmanaged.
18660 6d 65 6d 6f 72 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 61 72 74 memory...................m_Start
18680 54 69 6d 65 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 Time.=.-1;..................m_St
186a0 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 43 6f 6e 74 72 6f 6c 73 2e 43 6c 65 61 72 28 29 3b artingActuationControls.Clear();
186c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 74 61 72 74 69 6e 67 41 63 74 75 ..................m_StartingActu
186e0 61 74 69 6f 6e 73 43 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 ationsCount.=.0;................
18700 20 20 20 20 55 6e 68 6f 6f 6b 4f 6e 45 76 65 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ....UnhookOnEvent();............
18720 20 20 20 20 20 20 55 6e 68 6f 6f 6b 4f 6e 41 66 74 65 72 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 ......UnhookOnAfterUpdate();....
18740 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 ..........}................priva
18760 74 65 20 76 6f 69 64 20 54 68 72 6f 77 49 66 52 65 62 69 6e 64 49 6e 50 72 6f 67 72 65 73 73 28 te.void.ThrowIfRebindInProgress(
18780 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
187a0 20 20 69 66 20 28 73 74 61 72 74 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..if.(started)..................
187c0 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 ....throw.new.InvalidOperationEx
187e0 63 65 70 74 69 6f 6e 28 22 43 61 6e 6e 6f 74 20 72 65 63 6f 6e 66 69 67 75 72 65 20 72 65 62 69 ception("Cannot.reconfigure.rebi
18800 6e 64 69 6e 67 20 77 68 69 6c 65 20 6f 70 65 72 61 74 69 6f 6e 20 69 73 20 69 6e 20 70 72 6f 67 nding.while.operation.is.in.prog
18820 72 65 73 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ress");..............}..........
18840 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ......///.<summary>.............
18860 20 2f 2f 2f 20 42 61 73 65 64 20 6f 6e 20 74 68 65 20 63 68 6f 73 65 6e 20 63 6f 6e 74 72 6f 6c .///.Based.on.the.chosen.control
18880 2c 20 67 65 6e 65 72 61 74 65 20 61 6e 20 6f 76 65 72 72 69 64 65 20 70 61 74 68 20 74 6f 20 72 ,.generate.an.override.path.to.r
188a0 65 62 69 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ebind.to...............///.</sum
188c0 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e mary>..............private.strin
188e0 67 20 47 65 6e 65 72 61 74 65 50 61 74 68 46 6f 72 43 6f 6e 74 72 6f 6c 28 49 6e 70 75 74 43 6f g.GeneratePathForControl(InputCo
18900 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 ntrol.control)..............{...
18920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 63 6f 6e 74 ...............var.device.=.cont
18940 72 6f 6c 2e 64 65 76 69 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 rol.device;..................Deb
18960 75 67 2e 41 73 73 65 72 74 28 63 6f 6e 74 72 6f 6c 20 21 3d 20 64 65 76 69 63 65 2c 20 22 43 6f ug.Assert(control.!=.device,."Co
18980 6e 74 72 6f 6c 20 6d 75 73 74 20 6e 6f 74 20 62 65 20 61 20 64 65 76 69 63 65 22 29 3b 0d 0a 0d ntrol.must.not.be.a.device");...
189a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 4c 61 79 6f 75 .................var.deviceLayou
189c0 74 4e 61 6d 65 20 3d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 tName.=......................Inp
189e0 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 73 5f 4c 61 79 6f 75 74 73 2e 46 69 6e 64 4c 61 utControlLayout.s_Layouts.FindLa
18a00 79 6f 75 74 54 68 61 74 49 6e 74 72 6f 64 75 63 65 73 43 6f 6e 74 72 6f 6c 28 63 6f 6e 74 72 6f youtThatIntroducesControl(contro
18a20 6c 2c 20 6d 5f 4c 61 79 6f 75 74 43 61 63 68 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 l,.m_LayoutCache);..............
18a40 20 20 20 20 20 20 69 66 20 28 6d 5f 50 61 74 68 42 75 69 6c 64 65 72 20 3d 3d 20 6e 75 6c 6c 29 ......if.(m_PathBuilder.==.null)
18a60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 61 74 68 42 75 69 6c ......................m_PathBuil
18a80 64 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 20 20 20 20 der.=.new.StringBuilder();......
18aa0 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............else................
18ac0 20 20 20 20 20 20 6d 5f 50 61 74 68 42 75 69 6c 64 65 72 2e 4c 65 6e 67 74 68 20 3d 20 30 3b 0d ......m_PathBuilder.Length.=.0;.
18ae0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 2e 42 75 69 6c 64 ...................control.Build
18b00 50 61 74 68 28 64 65 76 69 63 65 4c 61 79 6f 75 74 4e 61 6d 65 2c 20 6d 5f 50 61 74 68 42 75 69 Path(deviceLayoutName,.m_PathBui
18b20 6c 64 65 72 29 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 lder);....................return
18b40 20 6d 5f 50 61 74 68 42 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 .m_PathBuilder.ToString();......
18b60 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 ........}................private
18b80 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 6d 5f 41 63 74 69 6f 6e 54 6f 52 65 62 69 6e 64 3b 0d 0a .InputAction.m_ActionToRebind;..
18ba0 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 ............private.InputBinding
18bc0 3f 20 6d 5f 42 69 6e 64 69 6e 67 4d 61 73 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 ?.m_BindingMask;..............pr
18be0 69 76 61 74 65 20 54 79 70 65 20 6d 5f 43 6f 6e 74 72 6f 6c 54 79 70 65 3b 0d 0a 20 20 20 20 20 ivate.Type.m_ControlType;.......
18c00 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 74 65 72 6e 65 64 53 74 72 69 6e 67 20 6d 5f .......private.InternedString.m_
18c20 45 78 70 65 63 74 65 64 4c 61 79 6f 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 ExpectedLayout;..............pri
18c40 76 61 74 65 20 69 6e 74 20 6d 5f 49 6e 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 3b 0d 0a 20 20 vate.int.m_IncludePathCount;....
18c60 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 5b 5d 20 6d 5f 49 6e 63 ..........private.string[].m_Inc
18c80 6c 75 64 65 50 61 74 68 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 ludePaths;..............private.
18ca0 69 6e 74 20 6d 5f 45 78 63 6c 75 64 65 50 61 74 68 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 int.m_ExcludePathCount;.........
18cc0 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 5b 5d 20 6d 5f 45 78 63 6c 75 64 65 50 .....private.string[].m_ExcludeP
18ce0 61 74 68 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 6d aths;..............private.int.m
18d00 5f 54 61 72 67 65 74 42 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 _TargetBindingIndex.=.-1;.......
18d20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 6d 5f 42 69 6e 64 69 6e 67 47 .......private.string.m_BindingG
18d40 72 6f 75 70 46 6f 72 4e 65 77 42 69 6e 64 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 roupForNewBinding;..............
18d60 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 6d 5f 43 61 6e 63 65 6c 42 69 6e 64 69 6e 67 3b 0d private.string.m_CancelBinding;.
18d80 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 66 6c 6f 61 74 20 6d 5f 4d 61 67 .............private.float.m_Mag
18da0 6e 69 74 75 64 65 54 68 72 65 73 68 6f 6c 64 20 3d 20 6b 44 65 66 61 75 6c 74 4d 61 67 6e 69 74 nitudeThreshold.=.kDefaultMagnit
18dc0 75 64 65 54 68 72 65 73 68 6f 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 udeThreshold;..............priva
18de0 74 65 20 66 6c 6f 61 74 5b 5d 20 6d 5f 53 63 6f 72 65 73 3b 20 2f 2f 20 53 63 6f 72 65 73 20 66 te.float[].m_Scores;.//.Scores.f
18e00 6f 72 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 69 6e 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 2e or.the.controls.in.m_Candidates.
18e20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 66 6c 6f 61 74 5b 5d 20 6d 5f ..............private.float[].m_
18e40 4d 61 67 6e 69 74 75 64 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 Magnitudes;..............private
18e60 20 64 6f 75 62 6c 65 20 6d 5f 4c 61 73 74 4d 61 74 63 68 54 69 6d 65 3b 20 2f 2f 20 4c 61 73 74 .double.m_LastMatchTime;.//.Last
18e80 20 69 6e 70 75 74 20 65 76 65 6e 74 20 74 69 6d 65 20 77 65 20 64 69 73 63 6f 76 65 72 65 64 20 .input.event.time.we.discovered.
18ea0 61 20 62 65 74 74 65 72 20 6d 61 74 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 a.better.match...............pri
18ec0 76 61 74 65 20 64 6f 75 62 6c 65 20 6d 5f 53 74 61 72 74 54 69 6d 65 3b 0d 0a 20 20 20 20 20 20 vate.double.m_StartTime;........
18ee0 20 20 20 20 20 20 70 72 69 76 61 74 65 20 66 6c 6f 61 74 20 6d 5f 54 69 6d 65 6f 75 74 3b 0d 0a ......private.float.m_Timeout;..
18f00 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 66 6c 6f 61 74 20 6d 5f 57 61 69 74 ............private.float.m_Wait
18f20 53 65 63 6f 6e 64 73 41 66 74 65 72 4d 61 74 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 SecondsAfterMatch;..............
18f40 70 72 69 76 61 74 65 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 69 73 74 3c 49 6e 70 75 74 43 6f private.InputControlList<InputCo
18f60 6e 74 72 6f 6c 3e 20 6d 5f 43 61 6e 64 69 64 61 74 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ntrol>.m_Candidates;............
18f80 20 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 3c 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 ..private.Action<RebindingOperat
18fa0 69 6f 6e 3e 20 6d 5f 4f 6e 43 6f 6d 70 6c 65 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ion>.m_OnComplete;..............
18fc0 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 3c 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f private.Action<RebindingOperatio
18fe0 6e 3e 20 6d 5f 4f 6e 43 61 6e 63 65 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 n>.m_OnCancel;..............priv
19000 61 74 65 20 41 63 74 69 6f 6e 3c 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 3e 20 6d ate.Action<RebindingOperation>.m
19020 5f 4f 6e 50 6f 74 65 6e 74 69 61 6c 4d 61 74 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 _OnPotentialMatch;..............
19040 70 72 69 76 61 74 65 20 46 75 6e 63 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2c 20 73 74 72 69 6e private.Func<InputControl,.strin
19060 67 3e 20 6d 5f 4f 6e 47 65 6e 65 72 61 74 65 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 g>.m_OnGeneratePath;............
19080 20 20 70 72 69 76 61 74 65 20 46 75 6e 63 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2c 20 49 6e 70 ..private.Func<InputControl,.Inp
190a0 75 74 45 76 65 6e 74 50 74 72 2c 20 66 6c 6f 61 74 3e 20 6d 5f 4f 6e 43 6f 6d 70 75 74 65 53 63 utEventPtr,.float>.m_OnComputeSc
190c0 6f 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e ore;..............private.Action
190e0 3c 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 2c 20 73 74 72 69 6e 67 3e 20 6d 5f 4f <RebindingOperation,.string>.m_O
19100 6e 41 70 70 6c 79 42 69 6e 64 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 nApplyBinding;..............priv
19120 61 74 65 20 41 63 74 69 6f 6e 3c 49 6e 70 75 74 45 76 65 6e 74 50 74 72 2c 20 49 6e 70 75 74 44 ate.Action<InputEventPtr,.InputD
19140 65 76 69 63 65 3e 20 6d 5f 4f 6e 45 76 65 6e 74 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 evice>.m_OnEventDelegate;.......
19160 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 20 6d 5f 4f 6e 41 66 74 65 72 55 .......private.Action.m_OnAfterU
19180 70 64 61 74 65 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f pdateDelegate;..............////
191a0 54 4f 44 4f 3a 20 75 73 65 20 67 6c 6f 62 61 6c 20 63 61 63 68 65 0d 0a 20 20 20 20 20 20 20 20 TODO:.use.global.cache..........
191c0 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 2e 43 ....private.InputControlLayout.C
191e0 61 63 68 65 20 6d 5f 4c 61 79 6f 75 74 43 61 63 68 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ache.m_LayoutCache;.............
19200 20 70 72 69 76 61 74 65 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 6d 5f 50 61 74 68 42 75 69 .private.StringBuilder.m_PathBui
19220 6c 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 46 6c 61 67 73 lder;..............private.Flags
19240 20 6d 5f 46 6c 61 67 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 74 .m_Flags;................//.Cont
19260 72 6f 6c 73 20 6d 61 79 20 61 6c 72 65 61 64 79 20 62 65 20 61 63 74 75 61 74 65 64 20 62 79 20 rols.may.already.be.actuated.by.
19280 74 68 65 20 74 69 6d 65 20 77 65 20 73 74 61 72 74 20 61 20 72 65 62 69 6e 64 2e 20 46 6f 72 20 the.time.we.start.a.rebind..For.
192a0 74 68 6f 73 65 2c 20 77 65 20 74 72 61 63 6b 20 73 74 61 72 74 69 6e 67 20 61 63 74 75 74 61 74 those,.we.track.starting.actutat
192c0 69 6f 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 64 69 76 69 64 75 61 6c 6c ions..............//.individuall
192e0 79 20 61 6e 64 20 72 65 71 75 69 72 65 20 74 68 65 6d 20 74 6f 20 63 72 6f 73 73 20 74 68 65 20 y.and.require.them.to.cross.the.
19300 61 63 74 75 61 74 69 6f 6e 20 74 68 72 65 73 68 6f 6c 64 20 57 52 54 20 74 68 65 20 73 74 61 72 actuation.threshold.WRT.the.star
19320 74 69 6e 67 20 61 63 74 75 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 ting.actuation...............pri
19340 76 61 74 65 20 69 6e 74 20 6d 5f 53 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 73 43 6f 75 vate.int.m_StartingActuationsCou
19360 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 66 6c 6f 61 74 5b 5d nt;..............private.float[]
19380 20 6d 5f 53 74 61 72 69 6e 67 41 63 74 75 61 74 69 6f 6e 4d 61 67 6e 69 74 75 64 65 73 3b 0d 0a .m_StaringActuationMagnitudes;..
193a0 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c ............private.InputControl
193c0 5b 5d 20 6d 5f 53 74 61 72 74 69 6e 67 41 63 74 75 61 74 69 6f 6e 43 6f 6e 74 72 6f 6c 73 3b 0d [].m_StartingActuationControls;.
193e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 46 6c 61 67 73 5d 0d 0a 20 20 20 20 20 20 20 20 ...............[Flags]..........
19400 20 20 20 20 70 72 69 76 61 74 65 20 65 6e 75 6d 20 46 6c 61 67 73 0d 0a 20 20 20 20 20 20 20 20 ....private.enum.Flags..........
19420 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 61 72 74 65 64 20 3d ....{..................Started.=
19440 20 31 20 3c 3c 20 30 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6d 70 6c 65 .1.<<.0,..................Comple
19460 74 65 64 20 3d 20 31 20 3c 3c 20 31 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 ted.=.1.<<.1,..................C
19480 61 6e 63 65 6c 65 64 20 3d 20 31 20 3c 3c 20 32 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 anceled.=.1.<<.2,...............
194a0 20 20 20 4f 6e 45 76 65 6e 74 48 6f 6f 6b 65 64 20 3d 20 31 20 3c 3c 20 33 2c 0d 0a 20 20 20 20 ...OnEventHooked.=.1.<<.3,......
194c0 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 41 66 74 65 72 55 70 64 61 74 65 48 6f 6f 6b 65 64 20 ............OnAfterUpdateHooked.
194e0 3d 20 31 20 3c 3c 20 34 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 6f 6e 74 49 =.1.<<.4,..................DontI
19500 67 6e 6f 72 65 4e 6f 69 73 79 43 6f 6e 74 72 6f 6c 73 20 3d 20 31 20 3c 3c 20 36 2c 0d 0a 20 20 gnoreNoisyControls.=.1.<<.6,....
19520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 6f 6e 74 47 65 6e 65 72 61 6c 69 7a 65 50 61 74 68 ..............DontGeneralizePath
19540 4f 66 53 65 6c 65 63 74 65 64 43 6f 6e 74 72 6f 6c 20 3d 20 31 20 3c 3c 20 37 2c 0d 0a 20 20 20 OfSelectedControl.=.1.<<.7,.....
19560 20 20 20 20 20 20 20 20 20 20 20 20 20 41 64 64 4e 65 77 42 69 6e 64 69 6e 67 20 3d 20 31 20 3c .............AddNewBinding.=.1.<
19580 3c 20 38 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 75 70 70 72 65 73 73 4d 61 <.8,..................SuppressMa
195a0 74 63 68 69 6e 67 45 76 65 6e 74 73 20 3d 20 31 20 3c 3c 20 39 2c 0d 0a 20 20 20 20 20 20 20 20 tchingEvents.=.1.<<.9,..........
195c0 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 2f 2f 2f 20 ....}..........}............///.
195e0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 74 65 20 <summary>..........///.Initiate.
19600 61 6e 20 6f 70 65 72 61 74 69 6f 6e 20 74 68 61 74 20 69 6e 74 65 72 61 63 74 69 76 65 6c 79 20 an.operation.that.interactively.
19620 72 65 62 69 6e 64 73 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 62 61 73 65 64 20 6f rebinds.the.given.action.based.o
19640 6e 20 72 65 63 65 69 76 65 64 20 69 6e 70 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c n.received.input...........///.<
19660 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 /summary>..........///.<param.na
19680 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 63 74 69 6f 6e 20 74 6f 20 70 65 72 66 6f 72 6d 20 72 65 me="action">Action.to.perform.re
196a0 62 69 6e 64 69 6e 67 20 6f 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f binding.on.</param>..........///
196c0 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 3e 4f 70 74 69 .<param.name="bindingIndex">Opti
196e0 6f 6e 61 6c 20 69 6e 64 65 78 20 28 77 69 74 68 69 6e 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 onal.index.(within.the.<see.cref
19700 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 22 2f 3e 20 61 72 72 61 79 20 ="InputAction.bindings"/>.array.
19720 6f 66 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 29 0d 0a 20 of.<paramref.name="action"/>)...
19740 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 62 69 6e 64 69 6e 67 20 74 6f 20 70 65 72 66 6f 72 6d .......///.of.binding.to.perform
19760 20 72 65 62 69 6e 64 69 6e 67 20 6f 6e 2e 20 4d 75 73 74 20 6e 6f 74 20 62 65 20 61 20 63 6f 6d .rebinding.on..Must.not.be.a.com
19780 70 6f 73 69 74 65 20 62 69 6e 64 69 6e 67 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 posite.binding.</param>.........
197a0 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 41 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e .///.<returns>A.rebind.operation
197c0 20 63 6f 6e 66 69 67 75 72 65 64 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 20 72 65 62 69 6e .configured.to.perform.the.rebin
197e0 64 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 d.</returns>..........///.<excep
19800 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e tion.cref="ArgumentNullException
19820 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 2f 3e 20 69 73 20 3c "><paramref.name="action"/>.is.<
19840 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 c>null</c>.</exception>.........
19860 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4f 75 .///.<exception.cref="ArgumentOu
19880 74 4f 66 52 61 6e 67 65 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d tOfRangeException"><paramref.nam
198a0 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 2f 3e 20 69 73 20 6e 6f 74 20 61 20 76 61 6c 69 e="bindingIndex"/>.is.not.a.vali
198c0 64 20 69 6e 64 65 78 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f d.index.</exception>..........//
198e0 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 /.<exception.cref="InvalidOperat
19900 69 6f 6e 45 78 63 65 70 74 69 6f 6e 22 3e 54 68 65 20 62 69 6e 64 69 6e 67 20 61 74 20 3c 70 61 ionException">The.binding.at.<pa
19920 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 62 69 6e 64 69 6e 67 49 6e 64 65 78 22 2f 3e 20 69 73 20 ramref.name="bindingIndex"/>.is.
19940 61 20 63 6f 6d 70 6f 73 69 74 65 20 62 69 6e 64 69 6e 67 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e a.composite.binding.</exception>
19960 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 ..........///.<remarks>.........
19980 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 .///.This.method.will.automatica
199a0 6c 6c 79 20 70 65 72 66 6f 72 6d 20 61 20 73 65 74 20 6f 66 20 63 6f 6e 66 69 67 75 72 61 74 69 lly.perform.a.set.of.configurati
199c0 6f 6e 20 6f 6e 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 52 65 62 69 6e 64 69 6e 67 4f 70 on.on.the.<see.cref="RebindingOp
199e0 65 72 61 74 69 6f 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 61 73 65 64 20 6f 6e eration"/>..........///.based.on
19a00 20 74 68 65 20 61 63 74 69 6f 6e 20 61 6e 64 2c 20 69 66 20 73 70 65 63 69 66 69 65 64 2c 20 62 .the.action.and,.if.specified,.b
19a20 69 6e 64 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f inding...........///..........//
19a40 2f 20 54 4f 44 4f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f /.TODO..........///..........///
19a60 20 4e 6f 74 65 20 74 68 61 74 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e 73 20 6d 75 73 .Note.that.rebind.operations.mus
19a80 74 20 62 65 20 64 69 73 70 6f 73 65 64 20 6f 66 20 6f 6e 63 65 20 66 69 6e 69 73 68 65 64 20 69 t.be.disposed.of.once.finished.i
19aa0 6e 20 6f 72 64 65 72 20 74 6f 20 6e 6f 74 20 6c 65 61 6b 20 6d 65 6d 6f 72 79 2e 0d 0a 20 20 20 n.order.to.not.leak.memory......
19ac0 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d .....///..........///.<example>.
19ae0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f .........///.<code>..........///
19b00 20 2f 2f 20 54 61 72 67 65 74 20 74 68 65 20 66 69 72 73 74 20 62 69 6e 64 69 6e 67 20 69 6e 20 .//.Target.the.first.binding.in.
19b20 74 68 65 20 67 61 6d 65 70 61 64 20 73 63 68 65 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f the.gamepad.scheme...........///
19b40 20 76 61 72 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 20 6d 79 41 63 74 69 6f 6e 2e 47 65 74 .var.bindingIndex.=.myAction.Get
19b60 42 69 6e 64 69 6e 67 49 6e 64 65 78 28 49 6e 70 75 74 42 69 6e 64 69 6e 67 2e 4d 61 73 6b 42 79 BindingIndex(InputBinding.MaskBy
19b80 47 72 6f 75 70 28 22 47 61 6d 65 70 61 64 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 Group("Gamepad"));..........///.
19ba0 76 61 72 20 72 65 62 69 6e 64 20 3d 20 6d 79 41 63 74 69 6f 6e 2e 50 65 72 66 6f 72 6d 49 6e 74 var.rebind.=.myAction.PerformInt
19bc0 65 72 61 63 74 69 76 65 52 65 62 69 6e 64 69 6e 67 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 29 3b eractiveRebinding(bindingIndex);
19be0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 44 69 ..........///..........///.//.Di
19c00 73 70 6f 73 65 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 20 6f 6e 20 63 6f 6d 70 6c 65 74 69 6f spose.the.operation.on.completio
19c20 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 62 69 6e 64 2e 4f 6e 43 6f 6d 70 6c 65 74 n...........///.rebind.OnComplet
19c40 65 28 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 0d e(..........///....operation.=>.
19c60 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 .........///....{..........///..
19c80 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 28 24 22 52 65 62 6f 75 6e 64 20 27 7b 6d 79 41 63 ......Debug.Log($"Rebound.'{myAc
19ca0 74 69 6f 6e 7d 27 20 74 6f 20 27 7b 6f 70 65 72 61 74 69 6f 6e 2e 73 65 6c 65 63 74 65 64 43 6f tion}'.to.'{operation.selectedCo
19cc0 6e 74 72 6f 6c 7d 27 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 6f ntrol}'");..........///........o
19ce0 70 65 72 61 74 69 6f 6e 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f peration.Dispose();..........///
19d00 20 20 20 20 7d 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ....};..........///..........///
19d20 20 2f 2f 20 53 74 61 72 74 20 74 68 65 20 72 65 62 69 6e 64 2e 20 54 68 69 73 20 77 69 6c 6c 20 .//.Start.the.rebind..This.will.
19d40 63 61 75 73 65 20 74 68 65 20 72 65 62 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e 20 74 6f 20 73 74 cause.the.rebind.operation.to.st
19d60 61 72 74 20 72 75 6e 6e 69 6e 67 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 art.running.in.the..........///.
19d80 2f 2f 20 62 61 63 6b 67 72 6f 75 6e 64 20 6c 69 73 74 65 6e 69 6e 67 20 66 6f 72 20 69 6e 70 75 //.background.listening.for.inpu
19da0 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 62 69 6e 64 2e 53 74 61 72 74 28 29 3b 0d t...........///.rebind.Start();.
19dc0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f .........///.</code>..........//
19de0 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 /.</example>..........///.</rema
19e00 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 52 65 62 69 rks>..........public.static.Rebi
19e20 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 20 50 65 72 66 6f 72 6d 49 6e 74 65 72 61 63 74 69 76 ndingOperation.PerformInteractiv
19e40 65 52 65 62 69 6e 64 69 6e 67 28 74 68 69 73 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 eRebinding(this.InputAction.acti
19e60 6f 6e 2c 20 69 6e 74 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3d 20 2d 31 29 0d 0a 20 20 20 20 on,.int.bindingIndex.=.-1)......
19e80 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d ....{..............if.(action.==
19ea0 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 6e 65 .null)..................throw.ne
19ec0 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 w.ArgumentNullException(nameof(a
19ee0 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 65 62 69 ction));................var.rebi
19f00 6e 64 20 3d 20 6e 65 77 20 52 65 62 69 6e 64 69 6e 67 4f 70 65 72 61 74 69 6f 6e 28 29 0d 0a 20 nd.=.new.RebindingOperation()...
19f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 41 63 74 69 6f 6e 28 61 63 74 69 6f ................WithAction(actio
19f40 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 69 76 65 20 69 74 20 61 n)..................//.Give.it.a
19f60 6e 20 65 76 65 72 20 73 6f 20 73 6c 69 67 68 74 20 64 65 6c 61 79 20 74 6f 20 6d 61 6b 65 20 73 n.ever.so.slight.delay.to.make.s
19f80 75 72 65 20 74 68 65 72 65 20 69 73 6e 27 74 20 61 20 62 65 74 74 65 72 20 6d 61 74 63 68 20 69 ure.there.isn't.a.better.match.i
19fa0 6d 6d 65 64 69 61 74 65 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 66 mmediately..................//.f
19fc0 6f 6c 6c 6f 77 69 6e 67 20 74 68 65 20 63 75 72 72 65 6e 74 20 65 76 65 6e 74 2e 0d 0a 20 20 20 ollowing.the.current.event......
19fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 4f 6e 4d 61 74 63 68 57 61 69 74 46 6f 72 41 6e 6f 74 ..............OnMatchWaitForAnot
1a000 68 65 72 28 30 2e 30 35 66 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 her(0.05f)..................//.I
1a020 74 20 64 6f 65 73 6e 27 74 20 72 65 61 6c 6c 79 20 6d 61 6b 65 20 73 65 6e 73 65 20 74 6f 20 69 t.doesn't.really.make.sense.to.i
1a040 6e 74 65 72 61 63 74 69 76 65 6c 79 20 62 69 6e 64 20 70 6f 69 6e 74 65 72 20 70 6f 73 69 74 69 nteractively.bind.pointer.positi
1a060 6f 6e 20 69 6e 70 75 74 20 61 73 20 69 6e 74 65 72 61 63 74 69 76 65 0d 0a 20 20 20 20 20 20 20 on.input.as.interactive.........
1a080 20 20 20 20 20 20 20 20 20 2f 2f 20 72 65 62 69 6e 64 73 20 61 72 65 20 75 73 75 61 6c 6c 79 20 .........//.rebinds.are.usually.
1a0a0 69 6e 69 74 69 61 74 65 64 20 66 72 6f 6d 20 55 49 73 20 77 68 69 63 68 20 61 72 65 20 6f 70 65 initiated.from.UIs.which.are.ope
1a0c0 72 61 74 65 64 20 62 79 20 70 6f 69 6e 74 65 72 73 2e 20 53 6f 20 65 78 63 6c 75 64 65 20 70 6f rated.by.pointers..So.exclude.po
1a0e0 69 6e 74 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 70 6f 73 69 74 69 inter..................//.positi
1a100 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 62 79 20 64 65 66 61 75 6c 74 2e 0d 0a 20 20 20 20 20 20 20 on.controls.by.default..........
1a120 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 ..........WithControlsExcluding(
1a140 22 3c 50 6f 69 6e 74 65 72 3e 2f 64 65 6c 74 61 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 "<Pointer>/delta")..............
1a160 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 3c 50 6f 69 .....WithControlsExcluding("<Poi
1a180 6e 74 65 72 3e 2f 70 6f 73 69 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nter>/position")................
1a1a0 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e 67 28 22 3c 54 6f 75 63 68 ...WithControlsExcluding("<Touch
1a1c0 73 63 72 65 65 6e 3e 2f 74 6f 75 63 68 2a 2f 70 6f 73 69 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 screen>/touch*/position").......
1a1e0 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 63 6c 75 64 69 6e ............WithControlsExcludin
1a200 67 28 22 3c 54 6f 75 63 68 73 63 72 65 65 6e 3e 2f 74 6f 75 63 68 2a 2f 64 65 6c 74 61 22 29 0d g("<Touchscreen>/touch*/delta").
1a220 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 45 78 ..................WithControlsEx
1a240 63 6c 75 64 69 6e 67 28 22 3c 4d 6f 75 73 65 3e 2f 63 6c 69 63 6b 43 6f 75 6e 74 22 29 0d 0a 20 cluding("<Mouse>/clickCount")...
1a260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 69 74 68 4d 61 74 63 68 69 6e 67 45 76 65 6e ................WithMatchingEven
1a280 74 73 42 65 69 6e 67 53 75 70 70 72 65 73 73 65 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 tsBeingSuppressed();............
1a2a0 20 20 20 20 2f 2f 20 49 66 20 77 65 27 72 65 20 6e 6f 74 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 20 ....//.If.we're.not.looking.for.
1a2c0 61 20 62 75 74 74 6f 6e 2c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 64 64 20 6b 65 79 62 a.button,.automatically.add.keyb
1a2e0 6f 61 72 64 20 65 73 63 61 70 65 20 6b 65 79 20 74 6f 20 61 62 6f 72 74 20 72 65 62 69 6e 64 2e oard.escape.key.to.abort.rebind.
1a300 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 65 62 69 6e 64 2e 65 78 70 65 63 74 65 ..............if.(rebind.expecte
1a320 64 43 6f 6e 74 72 6f 6c 54 79 70 65 20 21 3d 20 22 42 75 74 74 6f 6e 22 29 0d 0a 20 20 20 20 20 dControlType.!=."Button").......
1a340 20 20 20 20 20 20 20 20 20 20 20 72 65 62 69 6e 64 2e 57 69 74 68 43 61 6e 63 65 6c 69 6e 67 54 ...........rebind.WithCancelingT
1a360 68 72 6f 75 67 68 28 22 3c 4b 65 79 62 6f 61 72 64 3e 2f 65 73 63 61 70 65 22 29 3b 0d 0a 0d 0a hrough("<Keyboard>/escape");....
1a380 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 3e 3d 20 ............if.(bindingIndex.>=.
1a3a0 30 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 0)..............{...............
1a3c0 20 20 20 76 61 72 20 62 69 6e 64 69 6e 67 73 20 3d 20 61 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 ...var.bindings.=.action.binding
1a3e0 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 49 s;..................if.(bindingI
1a400 6e 64 65 78 20 3e 3d 20 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 ndex.>=.bindings.Count).........
1a420 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 4f .............throw.new.ArgumentO
1a440 75 74 4f 66 52 61 6e 67 65 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 utOfRangeException(.............
1a460 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 42 69 6e 64 69 6e 67 20 69 6e 64 65 78 20 7b 62 69 .............$"Binding.index.{bi
1a480 6e 64 69 6e 67 49 6e 64 65 78 7d 20 69 73 20 6f 75 74 20 6f 66 20 72 61 6e 67 65 20 66 6f 72 20 ndingIndex}.is.out.of.range.for.
1a4a0 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 20 77 69 74 68 20 7b 62 69 6e 64 69 6e 67 73 action.'{action}'.with.{bindings
1a4c0 2e 43 6f 75 6e 74 7d 20 62 69 6e 64 69 6e 67 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .Count}.bindings",..............
1a4e0 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 6f 66 28 62 69 6e 64 69 6e 67 73 29 29 3b 0d 0a ............nameof(bindings));..
1a500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 69 6e 67 73 5b 62 69 6e ................if.(bindings[bin
1a520 64 69 6e 67 49 6e 64 65 78 5d 2e 69 73 43 6f 6d 70 6f 73 69 74 65 29 0d 0a 20 20 20 20 20 20 20 dingIndex].isComposite).........
1a540 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 .............throw.new.InvalidOp
1a560 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 erationException(...............
1a580 20 20 20 20 20 20 20 20 20 20 20 24 22 43 61 6e 6e 6f 74 20 70 65 72 66 6f 72 6d 20 72 65 62 69 ...........$"Cannot.perform.rebi
1a5a0 6e 64 69 6e 67 20 6f 6e 20 63 6f 6d 70 6f 73 69 74 65 20 62 69 6e 64 69 6e 67 20 27 7b 62 69 6e nding.on.composite.binding.'{bin
1a5c0 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 7d 27 20 6f 66 20 27 7b 61 63 74 69 6f dings[bindingIndex]}'.of.'{actio
1a5e0 6e 7d 27 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 62 69 6e 64 n}'");....................rebind
1a600 2e 57 69 74 68 54 61 72 67 65 74 42 69 6e 64 69 6e 67 28 62 69 6e 64 69 6e 67 49 6e 64 65 78 29 .WithTargetBinding(bindingIndex)
1a620 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 62 ;....................//.If.the.b
1a640 69 6e 64 69 6e 67 20 69 73 20 61 20 70 61 72 74 20 62 69 6e 64 69 6e 67 2c 20 73 77 69 74 63 68 inding.is.a.part.binding,.switch
1a660 20 66 72 6f 6d 20 74 68 65 20 61 63 74 69 6f 6e 27 73 20 65 78 70 65 63 74 65 64 20 63 6f 6e 74 .from.the.action's.expected.cont
1a680 72 6f 6c 20 74 79 70 65 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 rol.type.to..................//.
1a6a0 74 68 61 74 20 65 78 70 65 63 74 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 6f 73 69 74 65 27 73 that.expected.by.the.composite's
1a6c0 20 70 61 72 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 69 6e 64 .part...................if.(bind
1a6e0 69 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 5d 2e 69 73 50 61 72 74 4f 66 43 6f 6d 70 6f ings[bindingIndex].isPartOfCompo
1a700 73 69 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 site)..................{........
1a720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 61 72 63 68 20 66 6f 72 20 63 6f 6d 70 ..............//.Search.for.comp
1a740 6f 73 69 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 osite.......................var.
1a760 63 6f 6d 70 6f 73 69 74 65 49 6e 64 65 78 20 3d 20 62 69 6e 64 69 6e 67 49 6e 64 65 78 20 2d 20 compositeIndex.=.bindingIndex.-.
1a780 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 63 1;......................while.(c
1a7a0 6f 6d 70 6f 73 69 74 65 49 6e 64 65 78 20 3e 20 30 20 26 26 20 21 62 69 6e 64 69 6e 67 73 5b 63 ompositeIndex.>.0.&&.!bindings[c
1a7c0 6f 6d 70 6f 73 69 74 65 49 6e 64 65 78 5d 2e 69 73 43 6f 6d 70 6f 73 69 74 65 29 0d 0a 20 20 20 ompositeIndex].isComposite).....
1a7e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 2d 63 6f 6d 70 6f 73 69 74 65 .....................--composite
1a800 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 Index;........................if
1a820 20 28 63 6f 6d 70 6f 73 69 74 65 49 6e 64 65 78 20 3e 3d 20 30 20 26 26 20 62 69 6e 64 69 6e 67 .(compositeIndex.>=.0.&&.binding
1a840 73 5b 63 6f 6d 70 6f 73 69 74 65 49 6e 64 65 78 5d 2e 69 73 43 6f 6d 70 6f 73 69 74 65 29 0d 0a s[compositeIndex].isComposite)..
1a860 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 ....................{...........
1a880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6d 70 6f 73 69 74 65 4e 61 6d 65 ...............var.compositeName
1a8a0 20 3d 20 62 69 6e 64 69 6e 67 73 5b 63 6f 6d 70 6f 73 69 74 65 49 6e 64 65 78 5d 2e 47 65 74 4e .=.bindings[compositeIndex].GetN
1a8c0 61 6d 65 4f 66 43 6f 6d 70 6f 73 69 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ameOfComposite();...............
1a8e0 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 54 79 70 65 45 78 70 65 63 74 ...........var.controlTypeExpect
1a900 65 64 42 79 50 61 72 74 20 3d 20 49 6e 70 75 74 42 69 6e 64 69 6e 67 43 6f 6d 70 6f 73 69 74 65 edByPart.=.InputBindingComposite
1a920 2e 47 65 74 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 4e 61 6d 65 28 63 6f .GetExpectedControlLayoutName(co
1a940 6d 70 6f 73 69 74 65 4e 61 6d 65 2c 20 62 69 6e 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 mpositeName,.bindings[bindingInd
1a960 65 78 5d 2e 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ex].name);......................
1a980 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 ......if.(!string.IsNullOrEmpty(
1a9a0 63 6f 6e 74 72 6f 6c 54 79 70 65 45 78 70 65 63 74 65 64 42 79 50 61 72 74 29 29 0d 0a 20 20 20 controlTypeExpectedByPart)).....
1a9c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 62 69 6e 64 2e .........................rebind.
1a9e0 57 69 74 68 45 78 70 65 63 74 65 64 43 6f 6e 74 72 6f 6c 54 79 70 65 28 63 6f 6e 74 72 6f 6c 54 WithExpectedControlType(controlT
1aa00 79 70 65 45 78 70 65 63 74 65 64 42 79 50 61 72 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ypeExpectedByPart);.............
1aa20 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 7d 0d 0a 0d .........}..................}...
1aa40 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 62 69 6e 64 69 .................//.If.the.bindi
1aa60 6e 67 20 69 73 20 70 61 72 74 20 6f 66 20 61 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2c 20 ng.is.part.of.a.control.scheme,.
1aa80 6f 6e 6c 79 20 61 63 63 65 70 74 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 20 20 20 20 20 20 only.accept.controls............
1aaa0 20 20 20 20 20 20 2f 2f 20 74 68 61 74 20 61 6c 73 6f 20 6d 61 74 63 68 20 64 65 76 69 63 65 20 ......//.that.also.match.device.
1aac0 72 65 71 75 69 72 65 6d 65 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 requirements...................v
1aae0 61 72 20 62 69 6e 64 69 6e 67 47 72 6f 75 70 73 20 3d 20 62 69 6e 64 69 6e 67 73 5b 62 69 6e 64 ar.bindingGroups.=.bindings[bind
1ab00 69 6e 67 49 6e 64 65 78 5d 2e 67 72 6f 75 70 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ingIndex].groups;...............
1ab20 20 20 20 76 61 72 20 61 73 73 65 74 20 3d 20 61 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 4d 61 70 3f ...var.asset.=.action.actionMap?
1ab40 2e 61 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 73 73 .asset;..................if.(ass
1ab60 65 74 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d et.!=.null.&&.!string.IsNullOrEm
1ab80 70 74 79 28 61 63 74 69 6f 6e 2e 62 69 6e 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 49 6e 64 65 78 pty(action.bindings[bindingIndex
1aba0 5d 2e 67 72 6f 75 70 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 ].groups))..................{...
1abc0 20 20 20 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 72 20 ...................foreach.(var.
1abe0 67 72 6f 75 70 20 69 6e 20 62 69 6e 64 69 6e 67 47 72 6f 75 70 73 2e 53 70 6c 69 74 28 49 6e 70 group.in.bindingGroups.Split(Inp
1ac00 75 74 42 69 6e 64 69 6e 67 2e 53 65 70 61 72 61 74 6f 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 utBinding.Separator))...........
1ac20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
1ac40 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 49 6e 64 65 78 20 3d 0d 0a ......var.controlSchemeIndex.=..
1ac60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 73 73 65 ............................asse
1ac80 74 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 2e 49 6e 64 65 78 4f 66 28 78 20 3d 3e 20 67 72 t.controlSchemes.IndexOf(x.=>.gr
1aca0 6f 75 70 2e 45 71 75 61 6c 73 28 78 2e 62 69 6e 64 69 6e 67 47 72 6f 75 70 2c 20 53 74 72 69 6e oup.Equals(x.bindingGroup,.Strin
1acc0 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f gComparison.InvariantCultureIgno
1ace0 72 65 43 61 73 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 reCase));.......................
1ad00 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 49 6e 64 65 78 20 3d 3d 20 2d 31 29 ...if.(controlSchemeIndex.==.-1)
1ad20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f ..............................co
1ad40 6e 74 69 6e 75 65 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 ntinue;.........................
1ad60 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 6d 61 6b 65 20 74 68 69 73 20 64 65 61 6c 20 77 69 74 68 ...////TODO:.make.this.deal.with
1ad80 20 61 6e 64 2f 6f 72 20 72 65 71 75 69 72 65 6d 65 6e 74 73 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .and/or.requirements............
1ada0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d ................var.controlSchem
1adc0 65 20 3d 20 61 73 73 65 74 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 5b 63 6f 6e 74 72 6f 6c e.=.asset.controlSchemes[control
1ade0 53 63 68 65 6d 65 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 SchemeIndex];...................
1ae00 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 72 65 71 75 69 72 65 6d 65 6e 74 20 .......foreach.(var.requirement.
1ae20 69 6e 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e 64 65 76 69 63 65 52 65 71 75 69 72 65 6d 65 in.controlScheme.deviceRequireme
1ae40 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nts)............................
1ae60 20 20 72 65 62 69 6e 64 2e 57 69 74 68 43 6f 6e 74 72 6f 6c 73 48 61 76 69 6e 67 54 6f 4d 61 74 ..rebind.WithControlsHavingToMat
1ae80 63 68 50 61 74 68 28 72 65 71 75 69 72 65 6d 65 6e 74 2e 63 6f 6e 74 72 6f 6c 50 61 74 68 29 3b chPath(requirement.controlPath);
1aea0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
1aec0 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 .........}..............}.......
1aee0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 62 69 6e 64 3b 0d 0a 20 20 20 20 20 20 20 .........return.rebind;.........
1af00 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .}............///.<summary>.....
1af20 20 20 20 20 20 2f 2f 2f 20 54 65 6d 70 6f 72 61 72 69 6c 79 20 73 75 73 70 65 6e 64 20 69 6d 6d .....///.Temporarily.suspend.imm
1af40 65 64 69 61 74 65 20 72 65 2d 72 65 73 6f 6c 75 74 69 6f 6e 20 6f 66 20 62 69 6e 64 69 6e 67 73 ediate.re-resolution.of.bindings
1af60 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>.......
1af80 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 ...///.<remarks>..........///.Wh
1afa0 65 6e 20 63 68 61 6e 67 69 6e 67 20 63 6f 6e 74 72 6f 6c 20 73 65 74 75 70 73 2c 20 69 74 20 6d en.changing.control.setups,.it.m
1afc0 61 79 20 74 61 6b 65 20 6d 75 6c 74 69 70 6c 65 20 73 74 65 70 73 20 74 6f 20 67 65 74 20 74 6f ay.take.multiple.steps.to.get.to
1afe0 20 74 68 65 20 66 69 6e 61 6c 20 73 65 74 75 70 20 62 75 74 20 65 61 63 68 20 69 6e 64 69 76 69 .the.final.setup.but.each.indivi
1b000 64 75 61 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 74 65 70 20 6d 61 79 20 74 72 69 67 67 dual..........///.step.may.trigg
1b020 65 72 20 62 69 6e 64 69 6e 67 73 20 74 6f 20 62 65 20 72 65 73 6f 6c 76 65 64 20 61 67 61 69 6e er.bindings.to.be.resolved.again
1b040 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 75 70 64 61 74 65 20 63 6f 6e 74 72 6f 6c 73 20 6f 6e 20 .in.order.to.update.controls.on.
1b060 61 63 74 69 6f 6e 73 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 actions.(see.<see.cref="InputAct
1b080 69 6f 6e 2e 63 6f 6e 74 72 6f 6c 73 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 55 ion.controls"/>)...........///.U
1b0a0 73 69 6e 67 20 74 68 69 73 20 73 74 72 75 63 74 2c 20 74 68 69 73 20 63 61 6e 20 62 65 20 61 76 sing.this.struct,.this.can.be.av
1b0c0 6f 69 64 65 64 20 61 6e 64 20 62 69 6e 64 69 6e 67 20 72 65 73 6f 6c 75 74 69 6f 6e 20 63 61 6e oided.and.binding.resolution.can
1b0e0 20 62 65 20 64 65 66 65 72 72 65 64 20 74 6f 20 61 66 74 65 72 20 74 68 65 20 77 68 6f 6c 65 20 .be.deferred.to.after.the.whole.
1b100 6f 70 65 72 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 63 6f 6d 70 6c 65 operation..........///.is.comple
1b120 74 65 20 61 6e 64 20 74 68 65 20 66 69 6e 61 6c 20 62 69 6e 64 69 6e 67 20 73 65 74 75 70 20 69 te.and.the.final.binding.setup.i
1b140 73 20 69 6e 20 70 6c 61 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 s.in.place...........///.</remar
1b160 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 49 44 69 ks>..........internal.static.IDi
1b180 73 70 6f 73 61 62 6c 65 20 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 28 sposable.DeferBindingResolution(
1b1a0 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 73 5f )..........{..............if.(s_
1b1c0 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 57 72 61 70 70 65 72 20 3d 3d DeferBindingResolutionWrapper.==
1b1e0 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 66 65 72 42 .null)..................s_DeferB
1b200 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 57 72 61 70 70 65 72 20 3d 20 6e 65 77 20 44 65 indingResolutionWrapper.=.new.De
1b220 66 65 72 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 57 72 61 70 70 65 72 28 29 3b 0d 0a ferBindingResolutionWrapper();..
1b240 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 ............s_DeferBindingResolu
1b260 74 69 6f 6e 57 72 61 70 70 65 72 2e 41 63 71 75 69 72 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 tionWrapper.Acquire();..........
1b280 20 20 20 20 72 65 74 75 72 6e 20 73 5f 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 ....return.s_DeferBindingResolut
1b2a0 69 6f 6e 57 72 61 70 70 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ionWrapper;..........}..........
1b2c0 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 ..private.static.DeferBindingRes
1b2e0 6f 6c 75 74 69 6f 6e 57 72 61 70 70 65 72 20 73 5f 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 olutionWrapper.s_DeferBindingRes
1b300 6f 6c 75 74 69 6f 6e 57 72 61 70 70 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 olutionWrapper;............priva
1b320 74 65 20 63 6c 61 73 73 20 44 65 66 65 72 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 57 te.class.DeferBindingResolutionW
1b340 72 61 70 70 65 72 20 3a 20 49 44 69 73 70 6f 73 61 62 6c 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d rapper.:.IDisposable..........{.
1b360 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 41 63 71 75 69 72 65 .............public.void.Acquire
1b380 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ()..............{...............
1b3a0 20 20 20 2b 2b 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 73 5f 44 65 66 65 72 42 69 6e 64 69 ...++InputActionMap.s_DeferBindi
1b3c0 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ngResolution;..............}....
1b3e0 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 44 69 73 70 6f 73 65 28 ............public.void.Dispose(
1b400 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
1b420 20 20 69 66 20 28 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 73 5f 44 65 66 65 72 42 69 6e 64 ..if.(InputActionMap.s_DeferBind
1b440 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ingResolution.>.0)..............
1b460 20 20 20 20 20 20 20 20 2d 2d 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 73 5f 44 65 66 65 72 ........--InputActionMap.s_Defer
1b480 42 69 6e 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 BindingResolution;..............
1b4a0 20 20 20 20 49 6e 70 75 74 41 63 74 69 6f 6e 53 74 61 74 65 2e 44 65 66 65 72 72 65 64 52 65 73 ....InputActionState.DeferredRes
1b4c0 6f 6c 75 74 69 6f 6e 4f 66 42 69 6e 64 69 6e 67 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 olutionOfBindings();............
1b4e0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 00 00 00 00 00 00 ..}..........}......}..}........
1b500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 49 6e 70 75 74 41 63 74 69 6f 6e 52 ....................InputActionR
1b520 65 62 69 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 00 00 17 00 00 00 55 6e 69 74 79 45 6e 67 ebindingExtensions......UnityEng
1b540 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 00 ine.InputSystem.