aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/Procedures Assemblies/System.Data.Entity.Design.dll
blob: d49ac61278bbb11014c826c6c8326e1debf6d4e6 (plain)
ofshex dumpascii
0000 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 MZ......................@.......
0020 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 80 00 00 00 ................................
0040 0e 1f ba 0e 00 b4 09 cd 21 b8 01 4c cd 21 54 68 69 73 20 70 72 6f 67 72 61 6d 20 63 61 6e 6e 6f ........!..L.!This.program.canno
0060 74 20 62 65 20 72 75 6e 20 69 6e 20 44 4f 53 20 6d 6f 64 65 2e 0d 0d 0a 24 00 00 00 00 00 00 00 t.be.run.in.DOS.mode....$.......
0080 50 45 00 00 4c 01 03 00 f5 0f 3c 56 00 00 00 00 00 00 00 00 e0 00 22 20 0b 01 30 00 00 d8 0b 00 PE..L.....<V.........."...0.....
00a0 00 08 00 00 00 00 00 00 32 f6 0b 00 00 20 00 00 00 00 0c 00 00 00 ce 60 00 20 00 00 00 02 00 00 ........2..............`........
00c0 04 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 40 0c 00 00 02 00 00 be 2c 0c 00 03 00 60 85 .................@.......,....`.
00e0 00 00 10 00 00 10 00 00 00 00 10 00 00 10 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 ................................
0100 e0 f5 0b 00 4f 00 00 00 00 00 0c 00 80 04 00 00 00 00 00 00 00 00 00 00 00 e2 0b 00 e0 3e 00 00 ....O........................>..
0120 00 20 0c 00 0c 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 ................................
0140 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 20 00 00 08 00 00 00 ................................
0160 00 00 00 00 00 00 00 00 08 20 00 00 48 00 00 00 00 00 00 00 00 00 00 00 2e 74 65 78 74 00 00 00 ............H............text...
0180 40 d6 0b 00 00 20 00 00 00 d8 0b 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 60 @..............................`
01a0 2e 72 73 72 63 00 00 00 80 04 00 00 00 00 0c 00 00 06 00 00 00 da 0b 00 00 00 00 00 00 00 00 00 .rsrc...........................
01c0 00 00 00 00 40 00 00 40 2e 72 65 6c 6f 63 00 00 0c 00 00 00 00 20 0c 00 00 02 00 00 00 e0 0b 00 ....@..@.reloc..................
01e0 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............@..B................
0200 14 f6 0b 00 00 00 00 00 48 00 00 00 02 00 05 00 d8 20 00 00 50 2f 00 00 09 00 00 00 00 00 00 00 ........H...........P/..........
0220 28 50 00 00 b8 a4 0b 00 e0 f4 0b 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (P..............................
0240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................................
0260 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................................
0280 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................................
02a0 02 02 02 02 02 02 02 02 02 02 00 00 13 30 0c 00 00 00 00 00 00 00 00 00 02 02 02 02 02 02 02 02 .............0..................
02c0 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 00 42 53 4a 42 01 00 01 00 ........................BSJB....
02e0 00 00 00 00 0c 00 00 00 76 34 2e 30 2e 33 30 33 31 39 00 00 00 00 05 00 6c 00 00 00 64 14 00 00 ........v4.0.30319......l...d...
0300 23 7e 00 00 d0 14 00 00 08 12 00 00 23 53 74 72 69 6e 67 73 00 00 00 00 d8 26 00 00 08 00 00 00 #~..........#Strings.....&......
0320 23 55 53 00 e0 26 00 00 10 00 00 00 23 47 55 49 44 00 00 00 f0 26 00 00 60 08 00 00 23 42 6c 6f #US..&......#GUID....&..`...#Blo
0340 62 00 00 00 00 00 00 00 02 00 00 01 57 9d b4 21 09 03 00 00 00 fa 01 33 00 16 00 00 01 00 00 00 b...........W..!.......3........
0360 44 00 00 00 1a 00 00 00 10 00 00 00 87 00 00 00 a3 00 00 00 1c 00 00 00 09 00 00 00 39 00 00 00 D...........................9...
0380 01 00 00 00 01 00 00 00 02 00 00 00 0a 00 00 00 20 00 00 00 2e 00 00 00 01 00 00 00 01 00 00 00 ................................
03a0 09 00 00 00 05 00 00 00 01 00 00 00 00 00 be 08 01 00 00 00 00 00 06 00 14 11 31 09 06 00 0f 00 ..........................1.....
03c0 bb 01 06 00 9f 04 31 09 06 00 5a 11 31 09 06 00 74 08 31 09 06 00 32 00 bb 01 0e 00 f1 0c ee 08 ......1...Z.1...t.1...2.........
03e0 16 00 b5 0b dc 08 06 00 df 0c c2 00 06 00 01 00 bb 01 06 00 47 09 31 09 06 00 f3 0f 31 09 0e 00 ....................G.1.....1...
0400 19 09 ee 08 0a 00 e0 02 38 09 06 00 33 00 bb 01 0a 00 87 11 38 09 0a 00 bc 09 38 09 0e 00 26 09 ........8...3.......8.....8...&.
0420 ee 08 06 00 65 04 31 09 0a 00 a6 0b 38 09 0e 00 b8 0c ee 08 0e 00 4a 0a ee 08 0e 00 b1 0a ee 08 ....e.1.....8.........J.........
0440 06 00 9d 09 31 09 16 00 c8 0c dc 08 0e 00 78 0a ce 07 06 00 1d 00 9b 08 0e 00 33 04 ee 08 06 00 ....1.........x...........3.....
0460 e7 08 c2 00 0e 00 59 02 ee 08 0e 00 ee 0a 6e 11 06 00 54 0b d5 09 1e 00 1a 0c a5 09 1e 00 a3 0f ......Y.......n...T.............
0480 a5 09 0a 00 86 10 87 0c 1e 00 28 0c a5 09 06 00 29 04 31 09 06 00 7e 05 9f 0e 06 00 8e 06 9f 0e ..........(.....).1...~.........
04a0 06 00 ee 04 f9 0d a3 00 f4 0e 00 00 06 00 1e 07 e5 11 06 00 02 05 80 0e 06 00 08 07 31 09 06 00 ............................1...
04c0 ae 06 e5 11 06 00 68 06 e5 11 06 00 43 11 e5 11 06 00 2f 05 ea 09 06 00 f6 05 ea 09 06 00 4a 06 ......h.....C...../...........J.
04e0 ea 09 06 00 74 07 ea 09 06 00 d4 06 ea 09 06 00 ed 06 ea 09 06 00 91 05 ea 09 06 00 ae 05 ea 09 ....t...........................
0500 06 00 d4 05 bf 0e 06 00 cc 04 bf 0e 06 00 63 05 ea 09 06 00 16 05 ea 09 06 00 3b 07 ea 09 06 00 ..............c...........;.....
0520 8d 07 9f 0e 06 00 59 07 9f 0e 06 00 33 06 ea 09 06 00 b1 04 9f 0e 06 00 46 05 f9 0d 06 00 7f 06 ......Y.....3...........F.......
0540 31 09 1e 00 13 06 a5 09 1e 00 3d 0b a5 09 00 00 00 00 9a 00 00 00 00 00 01 00 01 00 01 00 10 00 1.........=.....................
0560 64 0b 4c 09 05 00 01 00 01 00 01 01 00 00 4f 0c 4c 09 0d 00 01 00 0b 00 01 01 00 00 69 0c 4c 09 d.L...........O.L...........i.L.
0580 0d 00 01 00 0f 00 01 01 10 00 4a 0d 4c 09 05 00 01 00 13 00 01 01 00 00 1f 0b 4c 09 2d 00 01 00 ..........J.L.............L.-...
05a0 20 00 01 01 10 00 e2 0f 4c 09 31 00 04 00 20 00 01 01 10 00 cb 0f 4c 09 31 00 04 00 29 00 01 01 ........L.1...........L.1...)...
05c0 10 00 1b 0d 4c 09 05 00 04 00 31 00 01 01 00 00 ef 10 4c 09 2d 00 04 00 40 00 01 00 10 00 c8 11 ....L.....1.......L.-...@.......
05e0 4c 09 05 00 07 00 40 00 01 01 00 00 61 0f 4c 09 2d 00 07 00 47 00 01 00 10 00 5f 0d 4c 09 05 00 L.....@.....a.L.-...G....._.L...
0600 0d 00 47 00 81 01 10 00 0c 0e 4c 09 05 00 0d 00 51 00 81 01 10 00 aa 11 4c 09 05 00 0d 00 52 00 ..G.......L.....Q.......L.....R.
0620 81 01 10 00 41 10 4c 09 05 00 0d 00 58 00 01 01 10 00 00 0d 4c 09 05 00 10 00 5a 00 01 00 10 00 ....A.L.....X.......L.....Z.....
0640 36 0d 4c 09 05 00 10 00 66 00 a1 00 00 00 f6 07 50 0e 00 00 10 00 73 00 81 00 10 00 cb 02 50 0e 6.L.....f.......P.....s.......P.
0660 05 00 10 00 74 00 01 00 10 00 0c 0c 22 11 85 00 10 00 7c 00 01 00 10 00 f3 0b 22 11 85 00 10 00 ....t.......".....|.......".....
0680 7f 00 01 00 10 00 d9 0b 22 11 85 00 10 00 82 00 01 00 10 00 bf 0b 22 11 85 00 10 00 85 00 00 01 ........".............".........
06a0 00 00 a3 00 00 00 05 00 10 00 88 00 13 01 00 00 7e 00 00 00 95 00 11 00 88 00 06 06 cc 00 6b 00 ................~.............k.
06c0 56 80 4a 03 6e 00 56 80 2e 03 6e 00 06 06 cc 00 6b 00 56 80 a4 11 72 00 56 80 5d 03 72 00 06 06 V.J.n.V...n.....k.V...r.V.].r...
06e0 cc 00 6b 00 56 80 01 04 76 00 56 80 7b 03 76 00 56 80 9f 11 76 00 56 80 ff 0a 76 00 56 80 ba 08 ..k.V...v.V.{.v.V...v.V...v.V...
0700 76 00 36 00 3a 00 7a 00 36 00 43 00 7a 00 36 00 75 00 7a 00 33 01 4c 00 7e 00 50 20 00 00 00 00 v.6.:.z.6.C.z.6.u.z.3.L.~.P.....
0720 83 18 73 0d 01 00 01 00 51 20 00 00 00 00 86 00 d6 01 22 00 01 00 52 20 00 00 00 00 86 00 1a 10 ..s.....Q........."...R.........
0740 82 00 03 00 53 20 00 00 00 00 86 08 3e 0e 87 00 04 00 54 20 00 00 00 00 86 00 b1 07 82 00 04 00 ....S.......>.....T.............
0760 55 20 00 00 00 00 86 00 7a 02 8f 00 05 00 56 20 00 00 00 00 86 08 07 09 96 00 07 00 57 20 00 00 U.......z.....V.............W...
0780 00 00 86 08 10 09 22 00 08 00 58 20 00 00 00 00 86 00 8c 0b 01 00 0a 00 59 20 00 00 00 00 86 08 ......"...X.............Y.......
07a0 95 11 9b 00 0a 00 00 00 00 00 03 00 86 18 73 0d 9f 00 0a 00 00 00 00 00 03 00 c6 01 74 03 a5 00 ..............s.............t...
07c0 0c 00 00 00 00 00 03 00 c6 01 6f 03 ac 00 0e 00 00 00 00 00 03 00 c6 01 65 03 b7 00 12 00 00 00 ..........o.............e.......
07e0 00 00 03 00 86 18 73 0d 9f 00 13 00 00 00 00 00 03 00 c6 01 74 03 bd 00 15 00 00 00 00 00 03 00 ......s.............t...........
0800 c6 01 6f 03 c4 00 17 00 00 00 00 00 03 00 c6 01 65 03 b7 00 1b 00 5a 20 00 00 00 00 86 08 da 01 ..o.............e.....Z.........
0820 cf 00 1c 00 5b 20 00 00 00 00 86 08 ee 01 cf 00 1d 00 5c 20 00 00 00 00 86 08 05 02 d5 00 1e 00 ....[.............\.............
0840 5d 20 00 00 00 00 86 08 1d 02 d5 00 1f 00 5e 20 00 00 00 00 86 18 73 0d 01 00 20 00 5f 20 00 00 ].............^.......s....._...
0860 00 00 86 18 73 0d db 00 20 00 60 20 00 00 00 00 86 08 08 0b e1 00 21 00 61 20 00 00 00 00 86 08 ....s.....`...........!.a.......
0880 1b 0b db 00 21 00 62 20 00 00 00 00 86 08 60 0b e6 00 22 00 63 20 00 00 00 00 86 00 3d 03 eb 00 ....!.b.......`...".c.......=...
08a0 22 00 64 20 00 00 00 00 86 00 3d 03 f8 00 24 00 65 20 00 00 00 00 86 00 3d 03 0b 01 27 00 66 20 ".d.......=...$.e.......=...'.f.
08c0 00 00 00 00 86 00 3d 03 16 01 29 00 67 20 00 00 00 00 86 18 73 0d 01 00 2c 00 68 20 00 00 00 00 ......=...).g.......s...,.h.....
08e0 86 18 73 0d 26 01 2c 00 69 20 00 00 00 00 86 08 0c 03 2f 01 2f 00 6a 20 00 00 00 00 86 08 8a 03 ..s.&.,.i........././.j.........
0900 34 01 2f 00 6b 20 00 00 00 00 86 08 41 04 38 01 2f 00 6c 20 00 00 00 00 86 08 50 04 3d 01 2f 00 4./.k.......A.8./.l.......P.=./.
0920 6d 20 00 00 00 00 86 08 9e 10 43 01 30 00 6e 20 00 00 00 00 86 08 ba 10 43 01 30 00 6f 20 00 00 m.........C.0.n.........C.0.o...
0940 00 00 86 08 8a 0f 4c 01 30 00 70 20 00 00 00 00 86 18 73 0d 01 00 30 00 71 20 00 00 00 00 86 18 ......L.0.p.......s...0.q.......
0960 73 0d 55 01 30 00 72 20 00 00 00 00 86 08 f2 02 5d 01 32 00 73 20 00 00 00 00 86 08 06 04 38 01 s.U.0.r.........].2.s.........8.
0980 32 00 74 20 00 00 00 00 86 08 13 04 3d 01 32 00 75 20 00 00 00 00 86 08 25 0e 62 01 33 00 76 20 2.t.........=.2.u.......%.b.3.v.
09a0 00 00 00 00 86 08 59 10 6b 01 33 00 77 20 00 00 00 00 86 08 8a 0f 4c 01 33 00 78 20 00 00 00 00 ......Y.k.3.w.........L.3.x.....
09c0 86 18 73 0d 74 01 33 00 79 20 00 00 00 00 86 18 73 0d 7a 01 34 00 7a 20 00 00 00 00 86 18 73 0d ..s.t.3.y.......s.z.4.z.......s.
09e0 82 01 37 00 7b 20 00 00 00 00 86 08 9f 0c 8a 01 3a 00 7c 20 00 00 00 00 86 08 95 0a 8f 01 3a 00 ..7.{...........:.|...........:.
0a00 7d 20 00 00 00 00 86 08 ae 02 94 01 3a 00 7e 20 00 00 00 00 86 08 c7 02 99 01 3a 00 7f 20 00 00 }...........:.~...........:.....
0a20 00 00 86 08 03 0f 9f 01 3b 00 80 20 00 00 00 00 86 08 24 0f 11 00 3b 00 81 20 00 00 00 00 86 00 ........;.........$...;.........
0a40 3a 01 a3 01 3c 00 82 20 00 00 00 00 86 00 3a 01 ac 01 3c 00 83 20 00 00 00 00 86 00 f0 00 1d 00 :...<.........:...<.............
0a60 3d 00 84 20 00 00 00 00 86 00 f0 00 b7 01 3e 00 85 20 00 00 00 00 86 00 e2 07 1d 00 3f 00 86 20 =.............>.............?...
0a80 00 00 00 00 86 00 e2 07 b7 01 40 00 87 20 00 00 00 00 86 18 73 0d bd 01 41 00 88 20 00 00 00 00 ..........@.........s...A.......
0aa0 86 18 73 0d c8 01 46 00 89 20 00 00 00 00 86 08 23 08 34 01 49 00 8a 20 00 00 00 00 86 08 d4 00 ..s...F.........#.4.I...........
0ac0 34 01 49 00 8b 20 00 00 00 00 86 08 81 03 34 01 49 00 8c 20 00 00 00 00 86 08 45 0f cf 01 49 00 4.I...........4.I.........E...I.
0ae0 8d 20 00 00 00 00 86 08 e4 10 d4 01 49 00 8e 20 00 00 00 00 86 18 73 0d db 00 49 00 8f 20 00 00 ............I.........s...I.....
0b00 00 00 86 18 73 0d 01 00 4a 00 90 20 00 00 00 00 86 08 08 0b e1 00 4a 00 91 20 00 00 00 00 86 08 ....s...J.............J.........
0b20 1b 0b db 00 4a 00 92 20 00 00 00 00 86 00 d6 10 d9 01 4b 00 93 20 00 00 00 00 86 00 d6 10 e5 01 ....J.............K.............
0b40 4d 00 94 20 00 00 00 00 86 00 d6 10 f2 01 4f 00 95 20 00 00 00 00 96 00 96 04 01 02 52 00 96 20 M.............O.............R...
0b60 00 00 00 00 96 00 96 04 0c 02 53 00 97 20 00 00 00 00 91 18 79 0d 19 02 55 00 98 20 00 00 00 00 ..........S.........y...U.......
0b80 96 00 4f 0f 1d 02 55 00 99 20 00 00 00 00 96 00 ab 0a 2a 02 57 00 9a 20 00 00 00 00 96 00 ab 0a ..O...U...........*.W...........
0ba0 3c 02 59 00 9b 20 00 00 00 00 96 00 44 0a 50 02 5c 00 9c 20 00 00 00 00 96 00 44 0a 62 02 5e 00 <.Y.........D.P.\.........D.b.^.
0bc0 9d 20 00 00 00 00 96 00 72 0a 76 02 61 00 9e 20 00 00 00 00 96 00 72 0a 8c 02 65 00 9f 20 00 00 ........r.v.a.........r...e.....
0be0 00 00 96 00 4c 02 a4 02 6a 00 a0 20 00 00 00 00 91 18 79 0d 19 02 6c 00 a1 20 00 00 00 00 86 18 ....L...j.........y...l.........
0c00 73 0d c8 01 6c 00 a2 20 00 00 00 00 86 08 9f 0c 8a 01 6f 00 a3 20 00 00 00 00 86 08 2c 0a ad 02 s...l.............o.........,...
0c20 6f 00 a4 20 00 00 00 00 86 08 03 0f 9f 01 6f 00 a5 20 00 00 00 00 86 08 24 0f 11 00 6f 00 a6 20 o.............o.........$...o...
0c40 00 00 00 00 86 00 24 01 a3 01 70 00 a7 20 00 00 00 00 86 00 24 01 b2 02 70 00 a8 20 00 00 00 00 ......$...p.........$...p.......
0c60 86 00 24 01 c1 02 71 00 a9 20 00 00 00 00 86 00 df 00 1d 00 73 00 ac 20 00 00 00 00 86 00 df 00 ..$...q.............s...........
0c80 b7 01 74 00 b8 20 00 00 00 00 96 00 d2 0a d2 02 75 00 b9 20 00 00 00 00 96 00 d2 0a d9 02 77 00 ..t.............u.............w.
0ca0 ba 20 00 00 00 00 86 18 73 0d db 00 7a 00 bb 20 00 00 00 00 86 08 08 0b e1 00 7b 00 bc 20 00 00 ........s...z.............{.....
0cc0 00 00 86 08 1b 0b db 00 7b 00 bd 20 00 00 00 00 86 08 60 0b e6 00 7c 00 be 20 00 00 00 00 86 00 ........{.........`...|.........
0ce0 3d 03 e2 02 7c 00 bf 20 00 00 00 00 86 00 3d 03 16 01 80 00 c0 20 00 00 00 00 86 00 3d 03 f4 02 =...|.........=.............=...
0d00 83 00 c1 20 00 00 00 00 86 00 3d 03 0b 01 86 00 c2 20 00 00 00 00 86 00 3d 03 01 03 88 00 c3 20 ..........=.............=.......
0d20 00 00 00 00 86 00 3d 03 eb 00 8b 00 c4 20 00 00 00 00 86 00 3d 03 10 03 8d 00 c5 20 00 00 00 00 ......=.............=...........
0d40 86 00 3d 03 f8 00 91 00 c6 20 00 00 00 00 91 18 79 0d 19 02 94 00 00 00 00 00 00 00 c6 05 3f 02 ..=.............y.............?.
0d60 22 00 94 00 c7 20 00 00 00 00 86 08 76 04 25 03 96 00 c8 20 00 00 00 00 84 08 82 04 2b 03 96 00 "...........v.%.............+...
0d80 00 00 00 00 00 00 c6 05 8b 08 82 00 97 00 00 00 00 00 00 00 c6 05 92 0b 82 00 98 00 00 00 00 00 ................................
0da0 00 00 c6 05 b8 07 96 00 99 00 00 00 00 00 00 00 c6 05 c2 07 96 00 9a 00 c9 20 00 00 00 00 96 00 ................................
0dc0 a0 02 32 03 9b 00 ca 20 00 00 00 00 84 18 73 0d 01 00 9c 00 cb 20 00 00 00 00 86 18 73 0d 01 00 ..2...........s.............s...
0de0 9c 00 cc 20 00 00 00 00 c6 00 bc 0f 3a 03 9c 00 cd 20 00 00 00 00 c6 00 3d 03 43 03 9d 00 ce 20 ............:...........=.C.....
0e00 00 00 00 00 86 18 73 0d 01 00 9e 00 cf 20 00 00 00 00 c6 00 bc 0f 3a 03 9e 00 d0 20 00 00 00 00 ......s...............:.........
0e20 c6 00 3d 03 43 03 9f 00 d1 20 00 00 00 00 86 18 73 0d 01 00 a0 00 d2 20 00 00 00 00 c6 00 bc 0f ..=.C...........s...............
0e40 3a 03 a0 00 d3 20 00 00 00 00 c6 00 3d 03 43 03 a1 00 d4 20 00 00 00 00 86 18 73 0d 01 00 a2 00 :...........=.C...........s.....
0e60 d5 20 00 00 00 00 c6 00 bc 0f 3a 03 a2 00 d6 20 00 00 00 00 c6 00 3d 03 43 03 a3 00 00 00 01 00 ..........:...........=.C.......
0e80 6d 02 00 00 02 00 90 02 00 00 01 00 6d 02 00 00 01 00 6d 02 00 00 01 00 6d 02 02 00 02 00 90 02 m...........m.....m.....m.......
0ea0 00 00 01 00 6d 02 00 00 01 00 6d 02 00 00 02 00 ab 07 00 00 01 00 1b 11 00 00 02 00 38 02 00 00 ....m.....m.................8...
0ec0 01 00 48 0c 00 00 02 00 cc 07 00 00 01 00 48 0c 00 00 02 00 cc 07 00 00 03 00 82 08 00 00 04 00 ..H...........H.................
0ee0 1b 11 00 00 01 00 67 11 00 00 01 00 1b 11 00 00 02 00 38 02 00 00 01 00 48 0c 00 00 02 00 cc 07 ......g...........8.....H.......
0f00 00 00 01 00 48 0c 00 00 02 00 cc 07 00 00 03 00 82 08 00 00 04 00 1b 11 00 00 01 00 67 11 00 00 ....H.......................g...
0f20 01 00 ab 07 00 00 01 00 ab 07 00 00 01 00 ab 07 00 00 01 00 ab 07 00 00 01 00 2e 0b 00 00 01 00 ................................
0f40 ab 07 00 00 01 00 01 01 00 00 02 00 53 11 00 00 01 00 01 01 00 00 02 00 53 11 00 00 03 00 80 0d ............S...........S.......
0f60 00 00 01 00 37 08 00 00 02 00 4f 08 00 00 01 00 37 08 00 00 02 00 5e 08 00 00 03 00 fd 0f 00 00 ....7.....O.....7.....^.........
0f80 01 00 1f 03 00 00 02 00 9f 03 00 00 03 00 5f 04 00 00 01 00 ab 07 00 00 01 00 01 03 00 00 02 00 .............._.................
0fa0 20 04 00 00 01 00 ab 07 00 00 01 00 b3 0c 00 00 01 00 b3 0c 00 00 02 00 b0 03 00 00 03 00 cd 03 ................................
0fc0 00 00 01 00 5e 0a 00 00 02 00 b0 03 00 00 03 00 cd 03 00 00 01 00 ab 07 00 00 01 00 ab 07 00 00 ....^...........................
0fe0 01 00 66 09 00 00 01 00 be 03 00 00 01 00 ea 0c 00 00 01 00 be 03 00 00 01 00 ea 0c 00 00 01 00 ..f.............................
1000 2f 08 00 00 02 00 11 01 00 00 03 00 fc 03 00 00 04 00 84 0f 00 00 05 00 0d 11 00 00 01 00 2f 08 /............................./.
1020 00 00 02 00 11 01 00 00 03 00 fc 03 00 00 01 00 2e 0b 00 00 01 00 ab 07 00 00 01 00 0c 0a 00 00 ................................
1040 02 00 69 08 00 00 01 00 0c 0a 00 00 02 00 d2 0c 00 00 01 00 0c 0a 00 00 02 00 d2 0c 00 00 03 00 ..i.............................
1060 66 09 00 00 01 00 0c 0a 00 00 01 00 0c 0a 00 00 02 00 66 09 00 00 01 00 c3 0a 00 00 02 00 9a 09 f.................f.............
1080 00 00 01 00 6f 10 02 00 02 00 7f 10 00 00 01 00 6f 10 00 00 02 00 66 09 02 00 03 00 7f 10 00 00 ....o...........o.....f.........
10a0 01 00 6f 10 02 00 02 00 7f 10 00 00 01 00 6f 10 00 00 02 00 66 09 02 00 03 00 7f 10 00 00 01 00 ..o...........o.....f...........
10c0 1e 0a 00 00 02 00 fc 09 00 00 03 00 6f 10 02 00 04 00 7f 10 00 00 01 00 1e 0a 00 00 02 00 fc 09 ............o...................
10e0 00 00 03 00 6f 10 00 00 04 00 66 09 02 00 05 00 7f 10 00 00 01 00 83 09 00 00 02 00 63 02 00 00 ....o.....f.................c...
1100 01 00 e6 03 00 00 02 00 12 08 00 00 03 00 b0 03 00 00 01 00 ab 07 00 00 01 00 77 10 00 00 01 00 ..........................w.....
1120 77 10 00 00 02 00 66 09 00 00 01 00 be 03 00 00 01 00 ea 0c 00 00 01 00 e6 03 00 00 02 00 12 08 w.....f.........................
1140 00 00 01 00 e6 03 00 00 02 00 12 08 00 00 03 00 66 09 00 00 01 00 2e 0b 00 00 01 00 ab 07 00 00 ................f...............
1160 01 00 37 08 00 00 02 00 5e 08 00 00 03 00 fd 0f 00 00 04 00 66 09 00 00 01 00 37 08 00 00 02 00 ..7.....^...........f.....7.....
1180 5e 08 00 00 03 00 fd 0f 00 00 01 00 37 08 00 00 02 00 5e 08 00 00 03 00 66 09 00 00 01 00 37 08 ^...........7.....^.....f.....7.
11a0 00 00 02 00 5e 08 00 00 01 00 01 01 00 00 02 00 53 11 00 00 03 00 66 09 00 00 01 00 01 01 00 00 ....^...........S.....f.........
11c0 02 00 53 11 00 00 01 00 01 01 00 00 02 00 53 11 00 00 03 00 80 0d 00 00 04 00 66 09 00 00 01 00 ..S...........S...........f.....
11e0 01 01 00 00 02 00 53 11 00 00 03 00 80 0d 00 00 01 00 9d 0b 00 00 02 00 94 08 00 00 01 00 ab 07 ......S.........................
1200 00 00 01 00 47 02 00 00 01 00 47 02 00 00 01 00 47 02 00 00 01 00 47 02 00 00 01 00 8e 04 00 00 ....G.....G.....G.....G.........
1220 01 00 96 10 00 00 01 00 38 0c 00 00 01 00 96 10 00 00 01 00 38 0c 00 00 01 00 96 10 00 00 01 00 ........8...........8...........
1240 38 0c 00 00 01 00 96 10 00 00 01 00 38 0c 31 01 73 0d 01 00 39 01 73 0d 05 00 41 01 73 0d 0a 00 8...........8.1.s...9.s...A.s...
1260 51 01 73 0d 01 00 59 01 73 0d 11 00 61 01 73 0d 11 00 69 01 73 0d 01 00 71 01 73 0d 16 00 81 01 Q.s...Y.s...a.s...i.s...q.s.....
1280 73 0d 1d 00 89 01 73 0d 1d 00 91 01 73 0d 1d 00 99 01 73 0d 1d 00 a1 01 73 0d 1d 00 a9 01 73 0d s.....s.....s.....s.....s.....s.
12a0 1d 00 b1 01 73 0d 1d 00 b9 01 73 0d 1d 00 c1 01 73 0d 1d 00 c9 01 73 0d 1d 00 d1 01 73 0d 11 00 ....s.....s.....s.....s.....s...
12c0 d9 01 73 0d 1d 00 e1 01 73 0d 22 00 e9 01 73 0d 01 00 f1 01 73 0d 01 00 f9 01 73 0d 1d 00 01 02 ..s.....s."...s.....s.....s.....
12e0 73 0d 01 00 09 02 73 0d 01 00 11 02 73 0d 01 00 19 02 73 0d 28 00 08 00 08 00 52 00 08 00 0c 00 s.....s.....s.....s.(.....R.....
1300 57 00 08 00 14 00 52 00 08 00 18 00 57 00 08 00 20 00 52 00 08 00 24 00 57 00 08 00 28 00 5c 00 W.....R.....W.....R...$.W...(.\.
1320 08 00 2c 00 61 00 08 00 30 00 66 00 2e 00 0b 00 57 00 2e 00 13 00 c4 03 2e 00 1b 00 cd 03 2e 00 ..,.a...0.f.....W...............
1340 23 00 57 00 2e 00 2b 00 d6 03 2e 00 33 00 dc 03 2e 00 3b 00 57 00 2e 00 43 00 e2 03 2e 00 4b 00 #.W...+.....3.....;.W...C.....K.
1360 07 04 2e 00 53 00 07 04 2e 00 5b 00 07 04 2e 00 63 00 2a 04 2e 00 6b 00 45 04 2e 00 73 00 65 04 ....S.....[.....c.*...k.E...s.e.
1380 2e 00 7b 00 9a 04 2e 00 83 00 9a 04 2e 00 8b 00 aa 04 2e 00 93 00 b7 04 2e 00 9b 00 dc 03 2e 00 ..{.............................
13a0 a3 00 c2 04 2e 00 ab 00 ec 04 2e 00 b3 00 36 08 2e 00 bb 00 57 00 43 00 c3 00 55 08 83 01 db 00 ..............6.....W.C...U.....
13c0 57 00 c3 01 0b 00 57 00 c3 01 33 00 d6 03 e3 01 33 00 d6 03 49 02 33 00 d6 03 60 02 cb 00 57 00 W.....W...3.....3...I.3...`...W.
13e0 80 02 cb 00 57 00 a0 02 cb 00 57 00 a3 02 e3 00 cd 03 c0 02 cb 00 57 00 c3 02 e3 00 cd 03 e3 02 ....W.....W...........W.........
1400 e3 00 cd 03 03 03 e3 00 cd 03 23 03 cb 00 57 00 89 03 33 00 d6 03 60 06 33 00 d6 03 00 07 cb 00 ..........#...W...3...`.3.......
1420 57 00 20 07 cb 00 57 00 40 08 d3 00 57 00 60 08 d3 00 57 00 80 08 d3 00 57 00 a0 08 d3 00 57 00 W.....W.@...W.`...W.....W.....W.
1440 c0 08 d3 00 57 00 60 09 33 00 d6 03 80 09 33 00 d6 03 a0 09 33 00 d6 03 c0 09 33 00 d6 03 e0 09 ....W.`.3.....3.....3.....3.....
1460 33 00 d6 03 20 0a 0b 00 57 00 a0 0b cb 00 57 00 c0 0b cb 00 57 00 80 0e cb 00 57 00 a0 0e cb 00 3.......W.....W.....W.....W.....
1480 57 00 01 00 06 00 00 00 1a 00 05 00 01 00 00 00 f5 01 0c 00 00 00 24 02 10 00 02 00 01 00 05 00 W.....................$.........
14a0 04 00 07 00 06 00 08 00 0c 00 09 00 11 00 0b 00 15 00 0d 00 1a 00 11 00 1b 00 12 00 1e 00 14 00 ................................
14c0 20 00 00 00 42 0e 4a 03 00 00 2c 09 52 03 00 00 99 11 57 03 00 00 1f 0b 5b 03 00 00 64 0b 60 03 ....B.J...,.R.....W.....[...d.`.
14e0 00 00 10 03 65 03 00 00 8e 03 6a 03 00 00 54 04 6e 03 00 00 a2 10 73 03 00 00 be 10 73 03 00 00 ....e.....j...T.n.....s.....s...
1500 8e 0f 7c 03 00 00 f6 02 85 03 00 00 17 04 6e 03 00 00 29 0e 8a 03 00 00 5d 10 93 03 00 00 8e 0f ..|...........n...).....].......
1520 7c 03 00 00 b8 0c 9c 03 00 00 b1 0a a1 03 00 00 cb 02 a6 03 00 00 28 0f ab 03 00 00 27 08 6a 03 |.....................(.....'.j.
1540 00 00 0a 01 6a 03 00 00 f7 03 6a 03 00 00 7e 0f af 03 00 00 06 11 b4 03 00 00 1f 0b 5b 03 00 00 ....j.....j...~.............[...
1560 b8 0c 9c 03 00 00 4a 0a b9 03 00 00 28 0f ab 03 00 00 1f 0b 5b 03 00 00 64 0b 60 03 00 00 86 04 ......J.....(.......[...d.`.....
1580 be 03 08 00 13 00 02 00 10 00 14 00 02 00 02 00 04 00 03 00 08 00 15 00 04 00 10 00 16 00 04 00 ................................
15a0 02 00 07 00 05 00 01 00 08 00 05 00 02 00 0a 00 07 00 02 00 19 00 09 00 01 00 1a 00 09 00 02 00 ................................
15c0 1b 00 0b 00 02 00 22 00 0d 00 02 00 23 00 0f 00 02 00 24 00 11 00 01 00 25 00 11 00 02 00 26 00 ......".....#.....$.....%.....&.
15e0 13 00 02 00 27 00 15 00 02 00 28 00 17 00 02 00 2b 00 19 00 02 00 2c 00 1b 00 01 00 2d 00 1b 00 ....'.....(.....+.....,.....-...
1600 02 00 2e 00 1d 00 02 00 2f 00 1f 00 02 00 30 00 21 00 02 00 34 00 23 00 02 00 35 00 25 00 02 00 ......../.....0.!...4.#...5.%...
1620 36 00 27 00 01 00 37 00 27 00 02 00 38 00 29 00 01 00 39 00 29 00 02 00 42 00 2b 00 02 00 43 00 6.'...7.'...8.)...9.)...B.+...C.
1640 2d 00 02 00 44 00 2f 00 02 00 45 00 31 00 02 00 46 00 33 00 02 00 49 00 35 00 01 00 4a 00 35 00 -...D./...E.1...F.3...I.5...J.5.
1660 02 00 5b 00 37 00 02 00 5c 00 39 00 02 00 5d 00 3b 00 01 00 5e 00 3b 00 02 00 67 00 3d 00 01 00 ..[.7...\.9...].;...^.;...g.=...
1680 68 00 3d 00 02 00 69 00 3f 00 02 00 74 00 41 00 01 00 75 00 41 00 38 f6 0b 00 10 00 04 80 00 00 h.=...i.?...t.A...u.A.8.........
16a0 04 00 00 00 00 00 00 00 71 00 00 00 41 00 4c 09 00 00 04 00 00 00 00 00 00 00 00 00 00 00 2f 00 ........q...A.L.............../.
16c0 56 01 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 2f 00 31 09 00 00 00 00 04 00 00 00 00 00 V................./.1...........
16e0 00 00 00 00 00 00 2f 00 f5 11 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 2f 00 6a 04 00 00 ....../.................../.j...
1700 00 00 04 00 00 00 00 00 00 00 00 00 00 00 2f 00 dc 08 00 00 00 00 04 00 00 00 00 00 00 00 00 00 ............../.................
1720 00 00 2f 00 18 01 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 38 00 4b 01 00 00 00 00 04 00 ../...................8.K.......
1740 00 00 00 00 00 00 00 00 00 00 2f 00 7c 0b 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 2f 00 ........../.|................./.
1760 23 10 00 00 00 00 00 00 00 00 01 00 00 00 d0 0e 00 00 d8 4f 00 00 01 00 00 00 c9 0d 00 00 08 dd #..................O............
1780 02 00 01 00 00 00 95 0d 00 00 c0 7c 05 00 01 00 00 00 8f 01 00 00 90 87 08 00 01 00 00 00 5f 01 ...........|.................._.
17a0 00 00 1a 00 19 00 00 00 00 49 45 6e 75 6d 65 72 61 62 6c 65 60 31 00 49 43 6f 6c 6c 65 63 74 69 .........IEnumerable`1.ICollecti
17c0 6f 6e 60 31 00 52 65 61 64 4f 6e 6c 79 43 6f 6c 6c 65 63 74 69 6f 6e 60 31 00 49 4c 69 73 74 60 on`1.ReadOnlyCollection`1.IList`
17e0 31 00 56 65 72 73 69 6f 6e 31 00 56 65 72 73 69 6f 6e 32 00 39 30 45 45 45 39 46 31 42 45 31 32 1.Version1.Version2.90EEE9F1BE12
1800 35 42 36 33 34 41 31 39 37 41 41 37 42 44 38 33 45 36 38 31 31 42 45 38 42 36 46 33 00 56 65 72 5B634A197AA7BD83E6811BE8B6F3.Ver
1820 73 69 6f 6e 33 00 5f 5f 53 74 61 74 69 63 41 72 72 61 79 49 6e 69 74 54 79 70 65 53 69 7a 65 3d sion3.__StaticArrayInitTypeSize=
1840 36 00 3c 4d 6f 64 75 6c 65 3e 00 3c 50 72 69 76 61 74 65 49 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6.<Module>.<PrivateImplementatio
1860 6e 44 65 74 61 69 6c 73 3e 00 53 79 73 74 65 6d 2e 49 4f 00 76 61 6c 75 65 5f 5f 00 67 65 74 5f nDetails>.System.IO.value__.get_
1880 53 63 68 65 6d 61 00 57 72 69 74 65 53 74 6f 72 65 53 63 68 65 6d 61 00 57 72 69 74 65 4d 6f 64 Schema.WriteStoreSchema.WriteMod
18a0 65 6c 53 63 68 65 6d 61 00 73 6f 75 72 63 65 45 64 6d 53 63 68 65 6d 61 00 73 63 68 65 6d 61 00 elSchema.sourceEdmSchema.schema.
18c0 53 79 73 74 65 6d 2e 44 61 74 61 00 47 65 6e 65 72 61 74 65 53 74 6f 72 65 4d 65 74 61 64 61 74 System.Data.GenerateStoreMetadat
18e0 61 00 47 65 6e 65 72 61 74 65 4d 65 74 61 64 61 74 61 00 53 79 73 74 65 6d 2e 57 65 62 00 6d 73 a.GenerateMetadata.System.Web.ms
1900 63 6f 72 6c 69 62 00 54 65 6d 70 6c 61 74 65 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 73 2e 56 42 corlib.TemplateCodeGenerators.VB
1920 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 56 35 2e 30 2e 76 62 00 54 65 6d 70 6c 61 74 65 43 CodeGenTemplateV5.0.vb.TemplateC
1940 6f 64 65 47 65 6e 65 72 61 74 6f 72 73 2e 56 42 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 2e odeGenerators.VBCodeGenTemplate.
1960 76 62 00 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 00 41 64 vb.System.Collections.Generic.Ad
1980 64 00 61 64 64 5f 4f 6e 54 79 70 65 47 65 6e 65 72 61 74 65 64 00 72 65 6d 6f 76 65 5f 4f 6e 54 d.add_OnTypeGenerated.remove_OnT
19a0 79 70 65 47 65 6e 65 72 61 74 65 64 00 61 64 64 5f 4f 6e 50 72 6f 70 65 72 74 79 47 65 6e 65 72 ypeGenerated.add_OnPropertyGener
19c0 61 74 65 64 00 72 65 6d 6f 76 65 5f 4f 6e 50 72 6f 70 65 72 74 79 47 65 6e 65 72 61 74 65 64 00 ated.remove_OnPropertyGenerated.
19e0 6d 65 74 68 6f 64 00 41 64 64 57 6f 72 64 00 77 6f 72 64 00 47 65 74 53 63 68 65 6d 61 58 73 64 method.AddWord.word.GetSchemaXsd
1a00 00 44 61 74 61 53 70 61 63 65 00 64 61 74 61 53 70 61 63 65 00 65 64 6d 4e 61 6d 65 73 70 61 63 .DataSpace.dataSpace.edmNamespac
1a20 65 00 54 72 79 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 00 6f 62 6a 65 63 74 4e 61 e.TryGetObjectNamespace.objectNa
1a40 6d 65 73 70 61 63 65 00 43 72 65 61 74 65 53 65 72 76 69 63 65 00 67 65 74 5f 50 6c 75 72 61 6c mespace.CreateService.get_Plural
1a60 69 7a 61 74 69 6f 6e 53 65 72 76 69 63 65 00 73 65 74 5f 50 6c 75 72 61 6c 69 7a 61 74 69 6f 6e izationService.set_Pluralization
1a80 53 65 72 76 69 63 65 00 43 6f 64 65 54 79 70 65 52 65 66 65 72 65 6e 63 65 00 67 65 74 5f 54 79 Service.CodeTypeReference.get_Ty
1aa0 70 65 53 6f 75 72 63 65 00 74 79 70 65 53 6f 75 72 63 65 00 67 65 74 5f 50 72 6f 70 65 72 74 79 peSource.typeSource.get_Property
1ac0 53 6f 75 72 63 65 00 70 72 6f 70 65 72 74 79 53 6f 75 72 63 65 00 47 65 6e 65 72 61 74 65 56 42 Source.propertySource.GenerateVB
1ae0 43 6f 64 65 00 47 65 6e 65 72 61 74 65 43 6f 64 65 00 47 65 6e 65 72 61 74 65 43 53 68 61 72 70 Code.GenerateCode.GenerateCSharp
1b00 43 6f 64 65 00 45 78 63 6c 75 64 65 00 45 6e 64 49 6e 76 6f 6b 65 00 42 65 67 69 6e 49 6e 76 6f Code.Exclude.EndInvoke.BeginInvo
1b20 6b 65 00 54 61 62 6c 65 00 67 65 74 5f 4e 61 6d 65 00 67 65 74 5f 42 61 63 6b 69 6e 67 46 69 65 ke.Table.get_Name.get_BackingFie
1b40 6c 64 4e 61 6d 65 00 62 61 63 6b 69 6e 67 46 69 65 6c 64 4e 61 6d 65 00 6e 61 6d 65 73 70 61 63 ldName.backingFieldName.namespac
1b60 65 4e 61 6d 65 00 6f 75 74 70 75 74 46 69 6c 65 4e 61 6d 65 00 6d 6f 64 65 6c 45 6e 74 69 74 79 eName.outputFileName.modelEntity
1b80 43 6f 6e 74 61 69 6e 65 72 4e 61 6d 65 00 70 72 6f 76 69 64 65 72 49 6e 76 61 72 69 61 6e 74 4e ContainerName.providerInvariantN
1ba0 61 6d 65 00 6e 61 6d 65 00 4e 6f 6e 65 00 67 65 74 5f 42 61 73 65 54 79 70 65 00 73 65 74 5f 42 ame.name.None.get_BaseType.set_B
1bc0 61 73 65 54 79 70 65 00 62 61 73 65 54 79 70 65 00 56 61 6c 75 65 54 79 70 65 00 50 72 69 6d 69 aseType.baseType.ValueType.Primi
1be0 74 69 76 65 54 79 70 65 00 67 65 74 5f 52 65 74 75 72 6e 54 79 70 65 00 73 65 74 5f 52 65 74 75 tiveType.get_ReturnType.set_Retu
1c00 72 6e 54 79 70 65 00 72 65 74 75 72 6e 54 79 70 65 00 53 79 73 74 65 6d 2e 43 6f 72 65 00 67 65 rnType.returnType.System.Core.ge
1c20 74 5f 43 75 6c 74 75 72 65 00 73 65 74 5f 43 75 6c 74 75 72 65 00 63 75 6c 74 75 72 65 00 56 61 t_Culture.set_Culture.culture.Va
1c40 6c 69 64 61 74 65 00 4d 75 6c 74 69 63 61 73 74 44 65 6c 65 67 61 74 65 00 43 6f 6d 70 69 6c 65 lidate.MulticastDelegate.Compile
1c60 72 47 65 6e 65 72 61 74 65 64 41 74 74 72 69 62 75 74 65 00 4e 65 75 74 72 61 6c 52 65 73 6f 75 rGeneratedAttribute.NeutralResou
1c80 72 63 65 73 4c 61 6e 67 75 61 67 65 41 74 74 72 69 62 75 74 65 00 44 65 62 75 67 67 61 62 6c 65 rcesLanguageAttribute.Debuggable
1ca0 41 74 74 72 69 62 75 74 65 00 43 6f 6d 56 69 73 69 62 6c 65 41 74 74 72 69 62 75 74 65 00 41 73 Attribute.ComVisibleAttribute.As
1cc0 73 65 6d 62 6c 79 4b 65 79 46 69 6c 65 41 74 74 72 69 62 75 74 65 00 41 73 73 65 6d 62 6c 79 54 semblyKeyFileAttribute.AssemblyT
1ce0 69 74 6c 65 41 74 74 72 69 62 75 74 65 00 44 65 62 75 67 67 65 72 53 74 65 70 54 68 72 6f 75 67 itleAttribute.DebuggerStepThroug
1d00 68 41 74 74 72 69 62 75 74 65 00 41 73 73 65 6d 62 6c 79 44 65 6c 61 79 53 69 67 6e 41 74 74 72 hAttribute.AssemblyDelaySignAttr
1d20 69 62 75 74 65 00 45 78 74 65 6e 73 69 6f 6e 41 74 74 72 69 62 75 74 65 00 41 73 73 65 6d 62 6c ibute.ExtensionAttribute.Assembl
1d40 79 46 69 6c 65 56 65 72 73 69 6f 6e 41 74 74 72 69 62 75 74 65 00 41 73 73 65 6d 62 6c 79 49 6e yFileVersionAttribute.AssemblyIn
1d60 66 6f 72 6d 61 74 69 6f 6e 61 6c 56 65 72 73 69 6f 6e 41 74 74 72 69 62 75 74 65 00 53 61 74 65 formationalVersionAttribute.Sate
1d80 6c 6c 69 74 65 43 6f 6e 74 72 61 63 74 56 65 72 73 69 6f 6e 41 74 74 72 69 62 75 74 65 00 41 73 lliteContractVersionAttribute.As
1da0 73 65 6d 62 6c 79 44 65 73 63 72 69 70 74 69 6f 6e 41 74 74 72 69 62 75 74 65 00 42 75 69 6c 64 semblyDescriptionAttribute.Build
1dc0 50 72 6f 76 69 64 65 72 41 70 70 6c 69 65 73 54 6f 41 74 74 72 69 62 75 74 65 00 44 65 66 61 75 ProviderAppliesToAttribute.Defau
1de0 6c 74 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 00 41 73 73 65 6d 62 6c 79 44 65 66 61 75 6c ltMemberAttribute.AssemblyDefaul
1e00 74 41 6c 69 61 73 41 74 74 72 69 62 75 74 65 00 53 65 63 75 72 69 74 79 52 75 6c 65 73 41 74 74 tAliasAttribute.SecurityRulesAtt
1e20 72 69 62 75 74 65 00 46 6c 61 67 73 41 74 74 72 69 62 75 74 65 00 43 6f 6d 70 69 6c 61 74 69 6f ribute.FlagsAttribute.Compilatio
1e40 6e 52 65 6c 61 78 61 74 69 6f 6e 73 41 74 74 72 69 62 75 74 65 00 41 6c 6c 6f 77 50 61 72 74 69 nRelaxationsAttribute.AllowParti
1e60 61 6c 6c 79 54 72 75 73 74 65 64 43 61 6c 6c 65 72 73 41 74 74 72 69 62 75 74 65 00 41 73 73 65 allyTrustedCallersAttribute.Asse
1e80 6d 62 6c 79 50 72 6f 64 75 63 74 41 74 74 72 69 62 75 74 65 00 41 73 73 65 6d 62 6c 79 43 6f 70 mblyProductAttribute.AssemblyCop
1ea0 79 72 69 67 68 74 41 74 74 72 69 62 75 74 65 00 43 4c 53 43 6f 6d 70 6c 69 61 6e 74 41 74 74 72 yrightAttribute.CLSCompliantAttr
1ec0 69 62 75 74 65 00 53 65 63 75 72 69 74 79 54 72 61 6e 73 70 61 72 65 6e 74 41 74 74 72 69 62 75 ibute.SecurityTransparentAttribu
1ee0 74 65 00 41 73 73 65 6d 62 6c 79 53 69 67 6e 61 74 75 72 65 4b 65 79 41 74 74 72 69 62 75 74 65 te.AssemblySignatureKeyAttribute
1f00 00 52 65 66 65 72 65 6e 63 65 41 73 73 65 6d 62 6c 79 41 74 74 72 69 62 75 74 65 00 41 73 73 65 .ReferenceAssemblyAttribute.Asse
1f20 6d 62 6c 79 43 6f 6d 70 61 6e 79 41 74 74 72 69 62 75 74 65 00 52 75 6e 74 69 6d 65 43 6f 6d 70 mblyCompanyAttribute.RuntimeComp
1f40 61 74 69 62 69 6c 69 74 79 41 74 74 72 69 62 75 74 65 00 76 61 6c 75 65 00 52 65 6d 6f 76 65 00 atibilityAttribute.value.Remove.
1f60 50 6c 75 72 61 6c 69 7a 65 00 53 69 6e 67 75 6c 61 72 69 7a 65 00 53 79 73 74 65 6d 2e 44 61 74 Pluralize.Singularize.System.Dat
1f80 61 2e 4d 61 70 70 69 6e 67 00 57 72 69 74 65 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 00 49 43 a.Mapping.WriteStorageMapping.IC
1fa0 75 73 74 6f 6d 50 6c 75 72 61 6c 69 7a 61 74 69 6f 6e 4d 61 70 70 69 6e 67 00 63 6f 6e 6e 65 63 ustomPluralizationMapping.connec
1fc0 74 69 6f 6e 53 74 72 69 6e 67 00 67 65 74 5f 43 61 74 61 6c 6f 67 00 63 61 74 61 6c 6f 67 00 73 tionString.get_Catalog.catalog.s
1fe0 6f 75 72 63 65 45 64 6d 53 63 68 65 6d 61 46 69 6c 65 50 61 74 68 00 74 61 72 67 65 74 46 69 6c ourceEdmSchemaFilePath.targetFil
2000 65 50 61 74 68 00 74 61 72 67 65 74 50 61 74 68 00 6f 75 74 70 75 74 50 61 74 68 00 41 73 79 6e ePath.targetPath.outputPath.Asyn
2020 63 43 61 6c 6c 62 61 63 6b 00 63 61 6c 6c 62 61 63 6b 00 49 73 50 6c 75 72 61 6c 00 70 6c 75 72 cCallback.callback.IsPlural.plur
2040 61 6c 00 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 4f 62 6a 65 63 74 4d 6f 64 65 al.System.Collections.ObjectMode
2060 6c 00 41 6c 6c 00 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 2e l.All.System.Data.Entity.Design.
2080 64 6c 6c 00 53 79 73 74 65 6d 2e 58 6d 6c 00 53 74 72 65 61 6d 00 53 79 73 74 65 6d 2e 44 61 74 dll.System.Xml.Stream.System.Dat
20a0 61 2e 4d 65 74 61 64 61 74 61 2e 45 64 6d 00 67 65 74 5f 49 74 65 6d 00 73 65 74 5f 49 74 65 6d a.Metadata.Edm.get_Item.set_Item
20c0 00 4d 65 74 61 64 61 74 61 49 74 65 6d 00 47 6c 6f 62 61 6c 49 74 65 6d 00 53 79 73 74 65 6d 00 .MetadataItem.GlobalItem.System.
20e0 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 00 45 6e 75 6d 00 53 79 73 74 65 6d 2e 44 61 74 61 2e System.CodeDom.Enum.System.Data.
2100 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 00 74 61 72 67 65 74 45 6e 74 69 74 79 46 72 61 6d 65 77 Entity.Design.targetEntityFramew
2120 6f 72 6b 56 65 72 73 69 6f 6e 00 65 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f orkVersion.entityFrameworkVersio
2140 6e 00 65 64 6d 56 65 72 73 69 6f 6e 00 53 79 73 74 65 6d 2e 57 65 62 2e 43 6f 6d 70 69 6c 61 74 n.edmVersion.System.Web.Compilat
2160 69 6f 6e 00 43 6f 64 65 41 74 74 72 69 62 75 74 65 44 65 63 6c 61 72 61 74 69 6f 6e 00 53 79 73 ion.CodeAttributeDeclaration.Sys
2180 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 00 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 tem.Globalization.System.Reflect
21a0 69 6f 6e 00 73 74 6f 72 65 43 6f 6c 6c 65 63 74 69 6f 6e 00 6d 61 70 70 69 6e 67 43 6f 6c 6c 65 ion.storeCollection.mappingColle
21c0 63 74 69 6f 6e 00 65 64 6d 43 6f 6c 6c 65 63 74 69 6f 6e 00 67 65 74 5f 53 74 6f 72 65 49 74 65 ction.edmCollection.get_StoreIte
21e0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 00 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 mCollection.CreateStoreItemColle
2200 63 74 69 6f 6e 00 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 00 43 72 65 61 74 65 ction.storeItemCollection.Create
2220 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 00 67 65 74 StorageMappingItemCollection.get
2240 5f 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 00 43 72 65 61 74 65 45 64 6d 49 74 65 6d _EdmItemCollection.CreateEdmItem
2260 43 6f 6c 6c 65 63 74 69 6f 6e 00 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 00 43 72 65 61 74 65 Collection.itemCollection.Create
2280 53 74 6f 72 65 53 63 68 65 6d 61 43 6f 6e 6e 65 63 74 69 6f 6e 00 45 6e 74 69 74 79 43 6f 6e 6e StoreSchemaConnection.EntityConn
22a0 65 63 74 69 6f 6e 00 46 75 6e 63 74 69 6f 6e 00 67 65 74 5f 4c 61 6e 67 75 61 67 65 4f 70 74 69 ection.Function.get_LanguageOpti
22c0 6f 6e 00 73 65 74 5f 4c 61 6e 67 75 61 67 65 4f 70 74 69 6f 6e 00 6c 61 6e 67 75 61 67 65 4f 70 on.set_LanguageOption.languageOp
22e0 74 69 6f 6e 00 42 75 69 6c 64 50 72 6f 76 69 64 65 72 41 70 70 6c 69 65 73 54 6f 00 43 75 6c 74 tion.BuildProviderAppliesTo.Cult
2300 75 72 65 49 6e 66 6f 00 67 65 74 5f 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 ureInfo.get_EdmToObjectNamespace
2320 4d 61 70 00 53 79 73 74 65 6d 2e 58 6d 6c 2e 4c 69 6e 71 00 43 6c 65 61 72 00 49 73 53 69 6e 67 Map.System.Xml.Linq.Clear.IsSing
2340 75 6c 61 72 00 73 69 6e 67 75 6c 61 72 00 43 6f 64 65 54 79 70 65 4d 65 6d 62 65 72 00 58 6d 6c ular.singular.CodeTypeMember.Xml
2360 52 65 61 64 65 72 00 53 74 6f 72 61 67 65 4d 6f 64 65 6c 42 75 69 6c 64 50 72 6f 76 69 64 65 72 Reader.StorageModelBuildProvider
2380 00 4d 61 70 70 69 6e 67 4d 6f 64 65 6c 42 75 69 6c 64 50 72 6f 76 69 64 65 72 00 45 6e 74 69 74 .MappingModelBuildProvider.Entit
23a0 79 4d 6f 64 65 6c 42 75 69 6c 64 50 72 6f 76 69 64 65 72 00 45 6e 74 69 74 79 44 65 73 69 67 6e yModelBuildProvider.EntityDesign
23c0 65 72 42 75 69 6c 64 50 72 6f 76 69 64 65 72 00 41 73 73 65 6d 62 6c 79 42 75 69 6c 64 65 72 00 erBuildProvider.AssemblyBuilder.
23e0 61 73 73 65 6d 62 6c 79 42 75 69 6c 64 65 72 00 73 65 6e 64 65 72 00 54 79 70 65 47 65 6e 65 72 assemblyBuilder.sender.TypeGener
2400 61 74 65 64 45 76 65 6e 74 48 61 6e 64 6c 65 72 00 50 72 6f 70 65 72 74 79 47 65 6e 65 72 61 74 atedEventHandler.PropertyGenerat
2420 65 64 45 76 65 6e 74 48 61 6e 64 6c 65 72 00 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f edEventHandler.System.CodeDom.Co
2440 6d 70 69 6c 65 72 00 67 65 74 5f 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 00 73 74 6f 72 65 mpiler.get_EntityContainer.store
2460 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 00 58 6d 6c 57 72 69 74 65 72 00 6f 75 74 70 75 74 EntityContainer.XmlWriter.output
2480 57 72 69 74 65 72 00 54 65 78 74 57 72 69 74 65 72 00 77 72 69 74 65 72 00 45 64 6d 53 63 68 65 Writer.TextWriter.writer.EdmSche
24a0 6d 61 45 72 72 6f 72 00 45 6e 74 69 74 79 53 74 6f 72 65 53 63 68 65 6d 61 47 65 6e 65 72 61 74 maError.EntityStoreSchemaGenerat
24c0 6f 72 00 45 6e 74 69 74 79 4d 6f 64 65 6c 53 63 68 65 6d 61 47 65 6e 65 72 61 74 6f 72 00 45 6e or.EntityModelSchemaGenerator.En
24e0 74 69 74 79 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 00 45 6e 74 69 74 79 43 6c 61 73 73 47 65 6e tityCodeGenerator.EntityClassGen
2500 65 72 61 74 6f 72 00 45 6e 74 69 74 79 56 69 65 77 47 65 6e 65 72 61 74 6f 72 00 2e 63 74 6f 72 erator.EntityViewGenerator..ctor
2520 00 2e 63 63 74 6f 72 00 61 64 64 69 74 69 6f 6e 61 6c 45 64 6d 53 63 68 65 6d 61 73 00 54 65 6d ..cctor.additionalEdmSchemas.Tem
2540 70 6c 61 74 65 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 73 2e 43 53 68 61 72 70 43 6f 64 65 47 65 plateCodeGenerators.CSharpCodeGe
2560 6e 54 65 6d 70 6c 61 74 65 56 35 2e 30 2e 63 73 00 54 65 6d 70 6c 61 74 65 43 6f 64 65 47 65 6e nTemplateV5.0.cs.TemplateCodeGen
2580 65 72 61 74 6f 72 73 2e 43 53 68 61 72 70 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 2e 63 73 erators.CSharpCodeGenTemplate.cs
25a0 00 53 79 73 74 65 6d 2e 44 69 61 67 6e 6f 73 74 69 63 73 00 4d 65 74 61 64 61 74 61 45 78 74 65 .System.Diagnostics.MetadataExte
25c0 6e 73 69 6f 6e 4d 65 74 68 6f 64 73 00 67 65 74 5f 41 64 64 69 74 69 6f 6e 61 6c 49 6e 74 65 72 nsionMethods.get_AdditionalInter
25e0 66 61 63 65 73 00 67 65 74 5f 45 64 6d 4e 61 6d 65 73 70 61 63 65 73 00 53 79 73 74 65 6d 2e 44 faces.get_EdmNamespaces.System.D
2600 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 2e 50 6c 75 72 61 6c 69 7a 61 74 69 6f 6e 53 ata.Entity.Design.PluralizationS
2620 65 72 76 69 63 65 73 00 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e 49 6e 74 65 72 6f 70 53 65 ervices.System.Runtime.InteropSe
2640 72 76 69 63 65 73 00 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e 43 6f 6d 70 69 6c 65 72 53 65 rvices.System.Runtime.CompilerSe
2660 72 76 69 63 65 73 00 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 00 53 79 73 74 65 6d 2e 44 rvices.System.Resources.System.D
2680 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 2e 72 65 73 6f 75 72 63 65 73 00 44 65 62 75 ata.Entity.Design.resources.Debu
26a0 67 67 69 6e 67 4d 6f 64 65 73 00 67 65 74 5f 47 65 6e 65 72 61 74 65 46 6f 72 65 69 67 6e 4b 65 ggingModes.get_GenerateForeignKe
26c0 79 50 72 6f 70 65 72 74 69 65 73 00 73 65 74 5f 47 65 6e 65 72 61 74 65 46 6f 72 65 69 67 6e 4b yProperties.set_GenerateForeignK
26e0 65 79 50 72 6f 70 65 72 74 69 65 73 00 67 65 74 5f 54 79 70 65 73 00 47 65 74 50 72 69 6d 69 74 eyProperties.get_Types.GetPrimit
2700 69 76 65 54 79 70 65 73 00 45 6e 74 69 74 79 53 74 6f 72 65 53 63 68 65 6d 61 46 69 6c 74 65 72 iveTypes.EntityStoreSchemaFilter
2720 4f 62 6a 65 63 74 54 79 70 65 73 00 74 79 70 65 73 00 67 65 74 5f 41 64 64 69 74 69 6f 6e 61 6c ObjectTypes.types.get_Additional
2740 41 74 74 72 69 62 75 74 65 73 00 42 75 69 6c 64 50 72 6f 76 69 64 65 72 52 65 73 75 6c 74 46 6c Attributes.BuildProviderResultFl
2760 61 67 73 00 47 65 74 52 65 73 75 6c 74 46 6c 61 67 73 00 54 79 70 65 47 65 6e 65 72 61 74 65 64 ags.GetResultFlags.TypeGenerated
2780 45 76 65 6e 74 41 72 67 73 00 50 72 6f 70 65 72 74 79 47 65 6e 65 72 61 74 65 64 45 76 65 6e 74 EventArgs.PropertyGeneratedEvent
27a0 41 72 67 73 00 61 64 64 69 74 69 6f 6e 61 6c 45 64 6d 53 63 68 65 6d 61 46 69 6c 65 50 61 74 68 Args.additionalEdmSchemaFilePath
27c0 73 00 43 6f 6e 74 61 69 6e 73 00 53 79 73 74 65 6d 2e 44 61 74 61 2e 44 61 74 61 53 65 74 45 78 s.Contains.System.Data.DataSetEx
27e0 74 65 6e 73 69 6f 6e 73 00 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f 6e 73 tensions.EntityFrameworkVersions
2800 00 67 65 74 5f 41 64 64 69 74 69 6f 6e 61 6c 4d 65 6d 62 65 72 73 00 72 65 61 64 65 72 73 00 66 .get_AdditionalMembers.readers.f
2820 69 6c 74 65 72 73 00 65 72 72 6f 72 73 00 43 6f 6d 70 69 6c 65 72 52 65 73 75 6c 74 73 00 72 65 ilters.errors.CompilerResults.re
2840 73 75 6c 74 73 00 67 65 74 5f 41 64 64 69 74 69 6f 6e 61 6c 47 65 74 53 74 61 74 65 6d 65 6e 74 sults.get_AdditionalGetStatement
2860 73 00 67 65 74 5f 41 64 64 69 74 69 6f 6e 61 6c 53 65 74 53 74 61 74 65 6d 65 6e 74 73 00 47 65 s.get_AdditionalSetStatements.Ge
2880 6e 65 72 61 74 65 56 69 65 77 73 00 67 65 74 5f 45 66 66 65 63 74 00 45 6e 74 69 74 79 53 74 6f nerateViews.get_Effect.EntitySto
28a0 72 65 53 63 68 65 6d 61 46 69 6c 74 65 72 45 66 66 65 63 74 00 65 66 66 65 63 74 00 4f 62 6a 65 reSchemaFilterEffect.effect.Obje
28c0 63 74 00 6f 62 6a 65 63 74 00 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 ct.object.System.Data.Entity.Des
28e0 69 67 6e 2e 41 73 70 4e 65 74 00 53 65 63 75 72 69 74 79 52 75 6c 65 53 65 74 00 74 61 72 67 65 ign.AspNet.SecurityRuleSet.targe
2900 74 00 49 41 73 79 6e 63 52 65 73 75 6c 74 00 72 65 73 75 6c 74 00 53 79 73 74 65 6d 2e 44 61 74 t.IAsyncResult.result.System.Dat
2920 61 2e 45 6e 74 69 74 79 43 6c 69 65 6e 74 00 43 6f 64 65 53 74 61 74 65 6d 65 6e 74 00 67 65 74 a.EntityClient.CodeStatement.get
2940 5f 43 6f 75 6e 74 00 56 69 65 77 00 41 6c 6c 6f 77 00 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f _Count.View.Allow.MetadataItemCo
2960 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 00 45 6e 74 69 74 79 53 74 6f 72 65 53 63 68 65 6d llectionFactory.EntityStoreSchem
2980 61 46 69 6c 74 65 72 45 6e 74 72 79 00 53 79 73 74 65 6d 2e 53 65 63 75 72 69 74 79 00 53 79 73 aFilterEntry.System.Security.Sys
29a0 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 00 00 03 20 00 00 00 00 00 a4 14 2e 81 f8 fb 3f 48 tem.Data.Entity...............?H
29c0 85 a6 1e da 87 ea 16 57 00 03 20 00 01 04 20 01 01 08 06 20 01 01 11 80 a5 04 20 01 01 02 06 20 .......W........................
29e0 01 01 11 80 bd 04 20 01 01 0e 05 20 02 01 0e 0e 06 20 01 01 11 81 11 08 b7 7a 5c 56 19 34 e0 89 .........................z\V.4..
2a00 08 b0 3f 5f 7f 11 d5 0a 3a 10 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 04 00 00 00 00 04 ..?_....:.......................
2a20 01 00 00 00 04 02 00 00 00 04 04 00 00 00 04 07 00 00 00 02 06 08 03 06 11 18 03 06 11 28 03 06 .............................(..
2a40 11 30 03 06 12 61 03 06 11 68 04 20 01 02 0e 07 20 00 15 12 09 01 0e 06 20 02 02 0e 10 0e 04 20 .0...a...h......................
2a60 01 0e 0e 03 20 00 08 05 20 02 01 1c 18 06 20 02 01 1c 12 20 0a 20 04 12 11 1c 12 20 12 15 1c 05 ................................
2a80 20 01 01 12 11 06 20 02 01 1c 12 1c 0a 20 04 12 11 1c 12 1c 12 15 1c 05 20 01 01 12 0c 05 20 01 ................................
2aa0 01 12 10 05 20 01 01 11 18 04 20 00 11 18 04 20 00 12 08 0c 20 02 15 12 19 01 12 1d 12 21 12 25 .............................!.%
2ac0 12 20 03 15 12 19 01 12 1d 12 21 12 25 15 12 29 01 12 21 0a 20 02 15 12 19 01 12 1d 0e 0e 0f 20 ..........!.%..)..!.............
2ae0 03 15 12 19 01 12 1d 0e 0e 15 12 29 01 0e 08 20 03 01 12 35 0e 12 39 04 20 00 12 35 03 20 00 0e ...........).......5..9....5....
2b00 04 20 00 12 39 05 20 01 01 12 39 08 20 00 15 12 3d 01 12 41 08 20 00 15 12 3d 01 12 45 07 20 02 ....9.....9.....=..A.....=..E...
2b20 01 12 49 12 39 04 20 00 12 49 08 20 00 15 12 3d 01 12 4d 08 20 00 15 12 3d 01 12 51 05 20 01 01 ..I.9....I.....=..M.....=..Q....
2b40 12 55 07 20 03 01 12 55 0e 0e 07 20 03 01 12 59 0e 0e 04 20 00 12 55 04 20 00 12 5d 04 20 00 12 .U.....U.......Y......U....]....
2b60 50 05 20 01 01 12 50 03 20 00 02 08 20 00 15 12 19 01 12 1d 0a 20 01 15 12 19 01 12 1d 12 61 05 P.....P.......................a.
2b80 20 01 01 12 65 0a 20 05 01 0e 0e 0e 11 30 11 28 06 20 03 01 0e 0e 0e 04 20 00 11 30 04 20 00 11 ....e........0.(...........0....
2ba0 28 0b 20 02 15 12 19 01 12 1d 12 69 0e 0c 20 02 15 12 19 01 12 1d 12 69 12 25 0e 20 03 15 12 19 (..........i...........i.%......
2bc0 01 12 1d 12 69 12 25 12 61 0a 00 01 15 12 19 01 12 1d 12 69 0c 00 02 15 12 19 01 12 1d 12 69 12 ....i.%.a..........i..........i.
2be0 61 03 00 00 01 0c 00 02 15 12 6d 01 12 71 12 5d 12 61 11 00 02 12 5d 15 12 29 01 12 21 10 15 12 a.........m..q.].a....]..)..!...
2c00 19 01 12 1d 13 00 03 12 5d 15 12 29 01 12 21 12 61 10 15 12 19 01 12 1d 11 00 02 12 59 15 12 29 ........]..)..!.a...........Y..)
2c20 01 12 21 10 15 12 19 01 12 1d 13 00 03 12 59 15 12 29 01 12 21 12 61 10 15 12 19 01 12 1d 15 00 ..!...........Y..)..!.a.........
2c40 04 12 69 12 5d 12 59 15 12 29 01 12 21 10 15 12 19 01 12 1d 17 00 05 12 69 12 5d 12 59 15 12 29 ..i.].Y..)..!...........i.].Y..)
2c60 01 12 21 12 61 10 15 12 19 01 12 1d 08 00 02 12 75 12 61 11 79 04 20 00 12 59 0e 20 01 15 12 19 ..!.a...........u.a.y....Y......
2c80 01 12 1d 15 12 29 01 12 2c 10 20 02 15 12 19 01 12 1d 15 12 29 01 12 2c 12 61 06 00 02 12 7d 0e .....)..,...........)..,.a....}.
2ca0 0e 08 00 03 12 7d 0e 0e 12 61 11 20 04 15 12 19 01 12 1d 0e 0e 15 12 29 01 0e 12 61 0c 20 03 15 .....}...a.............)...a....
2cc0 12 19 01 12 1d 0e 0e 12 61 0e 20 03 15 12 19 01 12 1d 12 21 12 25 12 61 14 20 04 15 12 19 01 12 ........a..........!.%.a........
2ce0 1d 12 21 12 25 15 12 29 01 12 21 12 61 05 20 00 12 80 81 06 20 01 01 12 80 81 07 00 01 12 50 12 ..!.%..)..!.a.................P.
2d00 80 81 08 20 01 11 80 89 12 80 8d 06 20 01 01 12 80 91 07 28 00 15 12 09 01 0e 04 28 01 0e 0e 03 ...................(.......(....
2d20 28 00 08 04 28 00 11 18 04 28 00 12 08 04 28 00 12 35 03 28 00 0e 04 28 00 12 39 08 28 00 15 12 (...(....(....(..5.(...(..9.(...
2d40 3d 01 12 41 08 28 00 15 12 3d 01 12 45 04 28 00 12 49 08 28 00 15 12 3d 01 12 4d 08 28 00 15 12 =..A.(...=..E.(..I.(...=..M.(...
2d60 3d 01 12 51 04 28 00 12 55 04 28 00 12 5d 04 28 00 12 50 03 28 00 02 04 28 00 11 30 04 28 00 11 =..Q.(..U.(..].(..P.(...(..0.(..
2d80 28 04 28 00 12 59 05 28 00 12 80 81 08 01 00 08 00 00 00 00 00 08 01 00 02 00 00 00 00 00 05 01 (.(..Y.(........................
2da0 00 00 00 00 05 01 00 01 00 00 24 01 00 01 01 00 54 02 1b 53 6b 69 70 56 65 72 69 66 69 63 61 74 ..........$.....T..SkipVerificat
2dc0 69 6f 6e 49 6e 46 75 6c 6c 54 72 75 73 74 01 22 01 00 1d 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 ionInFullTrust."...System.Data.E
2de0 6e 74 69 74 79 2e 44 65 73 69 67 6e 2e 64 6c 6c 00 00 1a 01 00 15 4d 69 63 72 6f 73 6f 66 74 20 ntity.Design.dll......Microsoft.
2e00 43 6f 72 70 6f 72 61 74 69 6f 6e 00 00 1f 01 00 1a 4d 69 63 72 6f 73 6f 66 74 c2 ae 20 2e 4e 45 Corporation......Microsoft....NE
2e20 54 20 46 72 61 6d 65 77 6f 72 6b 00 00 34 01 00 2f c2 a9 20 4d 69 63 72 6f 73 6f 66 74 20 43 6f T.Framework..4../...Microsoft.Co
2e40 72 70 6f 72 61 74 69 6f 6e 2e 20 20 41 6c 6c 20 72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 2e rporation...All.rights.reserved.
2e60 00 00 0f 01 00 0a 34 2e 36 2e 31 30 35 35 2e 30 00 00 0c 01 00 07 34 2e 30 2e 30 2e 30 00 00 0a ......4.6.1055.0......4.0.0.0...
2e80 01 00 05 65 6e 2d 55 53 00 00 29 01 00 24 66 3a 5c 64 64 5c 74 6f 6f 6c 73 5c 64 65 76 64 69 76 ...en-US..)..$f:\dd\tools\devdiv
2ea0 5c 45 63 6d 61 50 75 62 6c 69 63 4b 65 79 2e 73 6e 6b 00 00 83 48 01 00 82 40 30 30 32 34 30 30 \EcmaPublicKey.snk...H...@002400
2ec0 30 30 30 63 38 30 30 30 30 30 31 34 30 31 30 30 30 30 30 36 30 32 30 30 30 30 30 30 32 34 30 30 000c8000001401000006020000002400
2ee0 30 30 35 32 35 33 34 31 33 31 30 30 30 38 30 30 30 30 30 31 30 30 30 31 30 30 36 31 33 33 39 39 00525341310008000001000100613399
2f00 61 66 66 31 38 65 66 31 61 32 63 32 35 31 34 61 32 37 33 61 34 32 64 39 30 34 32 62 37 32 33 32 aff18ef1a2c2514a273a42d9042b7232
2f20 31 66 31 37 35 37 31 30 32 64 66 39 65 62 61 64 61 36 39 39 32 33 65 32 37 33 38 34 30 36 63 32 1f1757102df9ebada69923e2738406c2
2f40 31 65 35 62 38 30 31 35 35 32 61 62 38 64 32 30 30 61 36 35 61 32 33 35 65 30 30 31 61 63 39 61 1e5b801552ab8d200a65a235e001ac9a
2f60 64 63 32 35 66 32 64 38 31 31 65 62 30 39 34 39 36 61 34 63 36 61 35 39 64 34 36 31 39 35 38 39 dc25f2d811eb09496a4c6a59d4619589
2f80 63 36 39 66 35 62 61 66 30 63 34 31 37 39 61 34 37 33 31 31 64 39 32 35 35 35 63 64 30 30 36 61 c69f5baf0c4179a47311d92555cd006a
2fa0 63 63 38 62 35 39 35 39 66 32 62 64 36 65 31 30 65 33 36 30 63 33 34 35 33 37 61 31 64 32 36 36 cc8b5959f2bd6e10e360c34537a1d266
2fc0 64 61 38 30 38 35 38 35 36 35 38 33 63 38 35 64 38 31 64 61 37 66 33 65 63 30 31 65 64 39 35 36 da8085856583c85d81da7f3ec01ed956
2fe0 34 63 35 38 64 39 33 64 37 31 33 63 64 30 31 37 32 63 38 65 32 33 61 31 30 66 30 32 33 39 62 38 4c58d93d713cd0172c8e23a10f0239b8
3000 30 63 39 36 62 30 37 37 33 36 66 35 64 38 62 30 32 32 35 34 32 61 34 65 37 34 32 35 31 61 35 66 0c96b07736f5d8b022542a4e74251a5f
3020 34 33 32 38 32 34 33 31 38 62 33 35 33 39 61 35 61 30 38 37 66 38 65 35 33 64 32 66 31 33 35 66 432824318b3539a5a087f8e53d2f135f
3040 39 63 61 34 37 66 33 62 62 32 65 31 30 61 66 66 30 61 66 30 38 34 39 35 30 34 66 62 37 63 65 61 9ca47f3bb2e10aff0af0849504fb7cea
3060 33 66 66 31 39 32 64 63 38 64 65 30 65 64 61 64 36 34 63 36 38 65 66 64 65 33 34 63 35 36 64 33 3ff192dc8de0edad64c68efde34c56d3
3080 30 32 61 64 35 35 66 64 36 65 38 30 66 33 30 32 64 35 65 66 63 64 65 61 65 39 35 33 36 35 38 64 02ad55fd6e80f302d5efcdeae953658d
30a0 33 34 35 32 35 36 31 62 35 66 33 36 63 35 34 32 65 66 64 62 64 64 39 66 38 38 38 35 33 38 64 33 3452561b5f36c542efdbdd9f888538d3
30c0 37 34 63 65 66 31 30 36 61 63 66 37 64 39 33 61 34 34 34 35 63 33 63 37 33 63 64 39 31 31 66 30 74cef106acf7d93a4445c3c73cd911f0
30e0 35 37 31 61 61 66 33 64 35 34 64 61 31 32 62 31 31 64 64 65 63 33 37 35 62 33 81 00 61 35 61 38 571aaf3d54da12b11ddec375b3..a5a8
3100 36 36 65 31 65 65 31 38 36 66 38 30 37 36 36 38 32 30 39 66 33 62 31 31 32 33 36 61 63 65 35 65 66e1ee186f807668209f3b11236ace5e
3120 32 31 66 31 31 37 38 30 33 61 33 31 34 33 61 62 62 31 32 36 64 64 30 33 35 64 37 64 32 66 38 37 21f117803a3143abb126dd035d7d2f87
3140 36 62 36 39 33 38 61 61 66 32 65 65 33 34 31 34 64 35 34 32 30 64 37 35 33 36 32 31 34 30 30 64 6b6938aaf2ee3414d5420d753621400d
3160 62 34 34 61 34 39 63 34 38 36 63 65 31 33 34 33 30 30 61 32 31 30 36 61 64 62 36 62 64 62 34 33 b44a49c486ce134300a2106adb6bdb43
3180 33 35 39 30 66 65 66 38 61 64 35 63 34 33 63 62 61 38 32 32 39 30 64 63 34 39 35 33 30 65 66 66 3590fef8ad5c43cba82290dc49530eff
31a0 64 38 36 35 32 33 64 39 34 38 33 63 30 30 66 34 35 38 61 66 34 36 38 39 30 30 33 36 62 30 65 32 d86523d9483c00f458af46890036b0e2
31c0 63 36 31 64 30 37 37 64 37 66 62 61 63 34 36 37 61 35 30 36 65 62 61 32 39 65 34 36 37 61 38 37 c61d077d7fbac467a506eba29e467a87
31e0 31 39 38 62 30 35 33 63 37 34 39 61 61 32 61 34 64 32 38 34 30 63 37 38 34 65 36 64 00 00 1e 01 198b053c749aa2a4d2840c784e6d....
3200 00 01 00 54 02 16 57 72 61 70 4e 6f 6e 45 78 63 65 70 74 69 6f 6e 54 68 72 6f 77 73 01 09 01 00 ...T..WrapNonExceptionThrows....
3220 04 49 74 65 6d 00 00 00 cd 4f 00 00 ce ca ef be 01 00 00 00 91 00 00 00 6c 53 79 73 74 65 6d 2e .Item....O..............lSystem.
3240 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 52 65 61 64 65 72 2c 20 6d 73 63 6f 72 6c Resources.ResourceReader,.mscorl
3260 69 62 2c 20 56 65 72 73 69 6f 6e 3d 34 2e 30 2e 30 2e 30 2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 ib,.Version=4.0.0.0,.Culture=neu
3280 74 72 61 6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 6f 6b 65 6e 3d 62 37 37 61 35 63 35 36 31 39 33 tral,.PublicKeyToken=b77a5c56193
32a0 34 65 30 38 39 23 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 75 6e 74 69 6d 65 52 65 4e089#System.Resources.RuntimeRe
32c0 73 6f 75 72 63 65 53 65 74 02 00 00 00 74 00 00 00 00 00 00 00 50 41 44 50 41 44 50 e8 2f 38 82 sourceSet....t.......PADPADP./8.
32e0 04 1f 6d 82 06 1f 6d 82 07 1f 6d 82 44 87 37 8b a0 88 37 8b 4f 5e 88 8b 9b d4 3c 91 97 cd 8e 91 ..m...m...m.D.7...7.O^....<.....
3300 21 b5 66 92 b3 8c 4b 96 b4 e0 55 96 1b cc a7 97 d8 44 8b 98 d7 cf 5f 99 16 47 5b 9b 7c d6 01 9e !.f...K...U......D...._..G[.|...
3320 d5 bb 79 a0 44 53 1b a3 20 10 63 a4 f8 2c 73 a4 af 26 f5 a4 61 3d 86 aa fa e1 09 ac 03 26 c2 b0 ..y.DS....c..,s..&..a=.......&..
3340 45 7b ed b0 fd 17 5b b8 61 8a 70 b8 ed c2 77 bc ca dc a0 c0 bb fc 96 c7 73 63 19 c9 3d 83 22 c9 E{....[.a.p...w.........sc..=.".
3360 16 44 c3 cc 6d 07 71 cd 92 82 0c d2 4e 1c 69 d5 11 f4 b0 d8 e5 c6 b9 d8 4f 58 3a d9 c6 28 3f da .D..m.q.....N.i.........OX:..(?.
3380 0b 84 86 da b4 90 89 da d0 28 8a db f9 cf 68 dd ca c7 7b e0 f3 b2 c5 e1 21 e6 4c e4 05 04 b2 e6 .........(....h...{.....!.L.....
33a0 90 a0 1b e7 4f 8c a9 e7 f5 d1 22 e9 79 d4 e2 ea 4e 45 b1 ef db 0d 3c f2 19 fc 3e f5 f0 89 76 f6 ....O.....".y...NE....<...>...v.
33c0 d5 06 3a f8 92 c4 6e fa 0c 78 54 fe c4 31 7f fe 45 85 bb ff 47 57 c5 01 1e cf 02 03 35 17 1e 05 ..:...n..xT..1..E...GW......5...
33e0 3e bc 0c 06 e2 34 56 0b 71 20 b3 0d e2 e5 f1 0f 49 42 76 11 19 cf 36 17 52 6b 4b 17 79 ad 6a 1b >....4V.q.......IBv...6.RkK.y.j.
3400 50 b8 da 1b f0 e3 bf 1c 38 8a 21 1e 96 09 3e 24 8d a8 74 2a f9 32 8d 2b b2 bd 8d 2c fe 86 de 2e P.......8.!...>$..t*.2.+...,....
3420 ba d9 ba 2f b3 28 e5 31 f7 36 71 33 30 f1 21 34 f4 c6 ef 38 e4 d3 2c 3a 53 76 26 3c 6c ba 3c 3d .../.(.1.6q30.!4...8..,:Sv&<l.<=
3440 a1 08 b7 3f 35 8c 8f 40 a5 ae 25 44 10 5b 34 44 54 2a 52 45 b1 75 aa 46 da 19 b8 4a 10 ea f2 4b ...?5..@..%D.[4DT*RE.u.F...J...K
3460 a2 10 39 4e 6a d1 79 4e d0 bb 11 51 a2 f4 26 51 5a 55 31 57 c3 f9 0c 5a f2 e6 ea 64 e9 77 f9 65 ..9Nj.yN...Q..&QZU1W...Z...d.w.e
3480 93 6f 96 67 2d fb db 68 5d 62 2a 6d 1d 03 7d 6d a5 08 61 6e 7e f1 ad 77 69 ce 26 78 68 70 d6 7a .o.g-..h]b*m..}m..an~..wi.&xhp.z
34a0 3d 12 9e 7b 0a 8c bc 7c 71 6a 83 7e 6b 1b 00 00 f9 14 00 00 8b 15 00 00 42 15 00 00 b4 14 00 00 =..{...|qj.~k...........B.......
34c0 6f 14 00 00 7c 00 00 00 56 03 00 00 bf 05 00 00 5f 13 00 00 3b 10 00 00 d6 0c 00 00 80 02 00 00 o...|...V......._...;...........
34e0 a6 13 00 00 56 04 00 00 7f 07 00 00 15 09 00 00 63 01 00 00 d4 15 00 00 c3 1d 00 00 6c 0a 00 00 ....V...........c...........l...
3500 fd 16 00 00 56 08 00 00 c9 00 00 00 62 0b 00 00 f8 0e 00 00 3c 19 00 00 b0 10 00 00 9c 01 00 00 ....V.......b.......<...........
3520 37 12 00 00 fd 06 00 00 67 06 00 00 03 1a 00 00 6f 0d 00 00 ad 0a 00 00 e7 13 00 00 ad 04 00 00 7.......g.......o...............
3540 d5 0d 00 00 47 02 00 00 2f 05 00 00 1d 0d 00 00 f0 0b 00 00 18 0e 00 00 cc 1c 00 00 6d 1c 00 00 ....G.../...................m...
3560 9c 0d 00 00 20 1c 00 00 e4 04 00 00 9d 0b 00 00 a5 0f 00 00 3b 00 00 00 d2 07 00 00 5e 09 00 00 ....................;.......^...
3580 ca 19 00 00 a1 11 00 00 54 16 00 00 af 09 00 00 6c 1d 00 00 ac 1b 00 00 d2 1a 00 00 0e 06 00 00 ........T.......l...............
35a0 f2 09 00 00 16 13 00 00 a2 17 00 00 77 1a 00 00 44 0d 00 00 1d 0f 00 00 e3 1b 00 00 b5 0e 00 00 ............w...D...............
35c0 d2 08 00 00 65 17 00 00 2e 1b 00 00 e3 17 00 00 26 14 00 00 c7 01 00 00 03 1b 00 00 87 08 00 00 ....e...........&...............
35e0 77 18 00 00 00 00 00 00 fe 0a 00 00 61 0e 00 00 13 1d 00 00 50 11 00 00 0f 04 00 00 7a 12 00 00 w...........a.......P.......z...
3600 23 08 00 00 2e 18 00 00 33 0c 00 00 2d 0b 00 00 cf 12 00 00 60 0c 00 00 7d 03 00 00 20 1a 00 00 #.......3...-.......`...}.......
3620 99 0c 00 00 74 05 00 00 f9 10 00 00 36 07 00 00 8e 0e 00 00 b0 03 00 00 f0 01 00 00 66 0f 00 00 ....t.......6...............f...
3640 20 01 00 00 2f 0a 00 00 b6 18 00 00 8f 16 00 00 0f 16 00 00 f8 0f 00 00 ee 11 00 00 27 03 00 00 ..../.......................'...
3660 ff 18 00 00 ca 16 00 00 a9 02 00 00 e6 02 00 00 7f 19 00 00 30 17 00 00 c2 06 00 00 74 22 00 00 ....................0.......t"..
3680 36 41 00 73 00 73 00 6f 00 63 00 69 00 61 00 74 00 69 00 6f 00 6e 00 4d 00 69 00 73 00 73 00 69 6A.s.s.o.c.i.a.t.i.o.n.M.i.s.s.i
36a0 00 6e 00 67 00 4b 00 65 00 79 00 43 00 6f 00 6c 00 75 00 6d 00 6e 00 00 00 00 00 3c 43 00 61 00 .n.g.K.e.y.C.o.l.u.m.n.....<C.a.
36c0 6e 00 6e 00 6f 00 74 00 43 00 68 00 61 00 6e 00 67 00 65 00 50 00 72 00 6f 00 70 00 65 00 72 00 n.n.o.t.C.h.a.n.g.e.P.r.o.p.e.r.
36e0 74 00 79 00 52 00 65 00 74 00 75 00 72 00 6e 00 54 00 79 00 70 00 65 00 a5 00 00 00 48 43 00 61 t.y.R.e.t.u.r.n.T.y.p.e.....HC.a
3700 00 6e 00 6e 00 6f 00 74 00 43 00 68 00 61 00 6e 00 67 00 65 00 50 00 72 00 6f 00 70 00 65 00 72 .n.n.o.t.C.h.a.n.g.e.P.r.o.p.e.r
3720 00 74 00 79 00 52 00 65 00 74 00 75 00 72 00 6e 00 54 00 79 00 70 00 65 00 54 00 6f 00 4e 00 75 .t.y.R.e.t.u.r.n.T.y.p.e.T.o.N.u
3740 00 6c 00 6c 00 f2 00 00 00 52 43 00 61 00 6e 00 6e 00 6f 00 74 00 43 00 72 00 65 00 61 00 74 00 .l.l.....RC.a.n.n.o.t.C.r.e.a.t.
3760 65 00 45 00 6e 00 74 00 69 00 74 00 79 00 57 00 69 00 74 00 68 00 4e 00 6f 00 50 00 72 00 69 00 e.E.n.t.i.t.y.W.i.t.h.N.o.P.r.i.
3780 6d 00 61 00 72 00 79 00 4b 00 65 00 79 00 44 00 65 00 66 00 69 00 6e 00 65 00 64 00 47 01 00 00 m.a.r.y.K.e.y.D.e.f.i.n.e.d.G...
37a0 3e 43 00 6f 00 64 00 65 00 47 00 65 00 6e 00 53 00 6f 00 75 00 72 00 63 00 65 00 46 00 69 00 6c >C.o.d.e.G.e.n.S.o.u.r.c.e.F.i.l
37c0 00 65 00 50 00 61 00 74 00 68 00 49 00 73 00 4e 00 6f 00 74 00 41 00 46 00 69 00 6c 00 65 00 31 .e.P.a.t.h.I.s.N.o.t.A.F.i.l.e.1
37e0 02 00 00 34 43 00 6f 00 6c 00 75 00 6d 00 6e 00 46 00 61 00 63 00 65 00 74 00 56 00 61 00 6c 00 ...4C.o.l.u.m.n.F.a.c.e.t.V.a.l.
3800 75 00 65 00 4f 00 75 00 74 00 4f 00 66 00 52 00 61 00 6e 00 67 00 65 00 6a 02 00 00 26 43 00 6f u.e.O.u.t.O.f.R.a.n.g.e.j...&C.o
3820 00 6e 00 73 00 74 00 72 00 75 00 63 00 74 00 6f 00 72 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 .n.s.t.r.u.c.t.o.r.C.o.m.m.e.n.t
3840 00 73 00 03 03 00 00 24 43 00 74 00 6f 00 72 00 53 00 75 00 6d 00 6d 00 61 00 72 00 79 00 43 00 .s.....$C.t.o.r.S.u.m.m.a.r.y.C.
3860 6f 00 6d 00 6d 00 65 00 6e 00 74 00 8e 03 00 00 52 44 00 62 00 50 00 72 00 6f 00 76 00 69 00 64 o.m.m.e.n.t.....RD.b.P.r.o.v.i.d
3880 00 65 00 72 00 53 00 65 00 72 00 76 00 69 00 63 00 65 00 73 00 49 00 6e 00 66 00 6f 00 72 00 6d .e.r.S.e.r.v.i.c.e.s.I.n.f.o.r.m
38a0 00 61 00 74 00 69 00 6f 00 6e 00 4c 00 6f 00 63 00 61 00 74 00 69 00 6f 00 6e 00 50 00 61 00 74 .a.t.i.o.n.L.o.c.a.t.i.o.n.P.a.t
38c0 00 68 00 ac 03 00 00 34 44 00 65 00 66 00 61 00 75 00 6c 00 74 00 54 00 61 00 72 00 67 00 65 00 .h.....4D.e.f.a.u.l.t.T.a.r.g.e.
38e0 74 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 54 00 6f 00 6f 00 4c 00 6f 00 77 00 ca 03 00 00 t.V.e.r.s.i.o.n.T.o.o.L.o.w.....
3900 24 44 00 75 00 70 00 6c 00 69 00 63 00 61 00 74 00 65 00 43 00 6c 00 61 00 73 00 73 00 4e 00 61 $D.u.p.l.i.c.a.t.e.C.l.a.s.s.N.a
3920 00 6d 00 65 00 54 05 00 00 38 44 00 75 00 70 00 6c 00 69 00 63 00 61 00 74 00 65 00 45 00 6e 00 .m.e.T...8D.u.p.l.i.c.a.t.e.E.n.
3940 74 00 69 00 74 00 79 00 43 00 6f 00 6e 00 74 00 61 00 69 00 6e 00 65 00 72 00 4e 00 61 00 6d 00 t.i.t.y.C.o.n.t.a.i.n.e.r.N.a.m.
3960 65 00 e0 05 00 00 3c 44 00 75 00 70 00 6c 00 69 00 63 00 61 00 74 00 65 00 45 00 6e 00 74 00 72 e.....<D.u.p.l.i.c.a.t.e.E.n.t.r
3980 00 79 00 49 00 6e 00 55 00 73 00 65 00 72 00 44 00 69 00 63 00 74 00 69 00 6f 00 6e 00 61 00 72 .y.I.n.U.s.e.r.D.i.c.t.i.o.n.a.r
39a0 00 79 00 8d 06 00 00 2a 45 00 64 00 6d 00 53 00 63 00 68 00 65 00 6d 00 61 00 46 00 69 00 6c 00 .y.....*E.d.m.S.c.h.e.m.a.F.i.l.
39c0 65 00 4e 00 6f 00 74 00 46 00 6f 00 75 00 6e 00 64 00 d1 06 00 00 22 45 00 64 00 6d 00 53 00 63 e.N.o.t.F.o.u.n.d....."E.d.m.S.c
39e0 00 68 00 65 00 6d 00 61 00 4e 00 6f 00 74 00 56 00 61 00 6c 00 69 00 64 00 ed 06 00 00 2e 45 00 .h.e.m.a.N.o.t.V.a.l.i.d......E.
3a00 6d 00 70 00 74 00 79 00 43 00 74 00 6f 00 72 00 53 00 75 00 6d 00 6d 00 61 00 72 00 79 00 43 00 m.p.t.y.C.t.o.r.S.u.m.m.a.r.y.C.
3a20 6f 00 6d 00 6d 00 65 00 6e 00 74 00 14 07 00 00 5a 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6c o.m.m.e.n.t.....ZE.n.t.i.t.y.C.l
3a40 00 69 00 65 00 6e 00 74 00 5f 00 44 00 6f 00 65 00 73 00 4e 00 6f 00 74 00 49 00 6d 00 70 00 6c .i.e.n.t._.D.o.e.s.N.o.t.I.m.p.l
3a60 00 65 00 6d 00 65 00 6e 00 74 00 49 00 53 00 65 00 72 00 76 00 69 00 63 00 65 00 50 00 72 00 6f .e.m.e.n.t.I.S.e.r.v.i.c.e.P.r.o
3a80 00 76 00 69 00 64 00 65 00 72 00 90 07 00 00 42 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6c 00 .v.i.d.e.r.....BE.n.t.i.t.y.C.l.
3aa0 69 00 65 00 6e 00 74 00 5f 00 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 53 00 74 00 6f 00 72 00 i.e.n.t._.I.n.v.a.l.i.d.S.t.o.r.
3ac0 65 00 50 00 72 00 6f 00 76 00 69 00 64 00 65 00 72 00 20 08 00 00 52 45 00 6e 00 74 00 69 00 74 e.P.r.o.v.i.d.e.r.....RE.n.t.i.t
3ae0 00 79 00 43 00 6c 00 69 00 65 00 6e 00 74 00 5f 00 52 00 65 00 74 00 75 00 72 00 6e 00 65 00 64 .y.C.l.i.e.n.t._.R.e.t.u.r.n.e.d
3b00 00 4e 00 75 00 6c 00 6c 00 4f 00 6e 00 50 00 72 00 6f 00 76 00 69 00 64 00 65 00 72 00 4d 00 65 .N.u.l.l.O.n.P.r.o.v.i.d.e.r.M.e
3b20 00 74 00 68 00 6f 00 64 00 81 08 00 00 32 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6f 00 64 00 .t.h.o.d.....2E.n.t.i.t.y.C.o.d.
3b40 65 00 47 00 65 00 6e 00 54 00 61 00 72 00 67 00 65 00 74 00 54 00 6f 00 6f 00 4c 00 6f 00 77 00 e.G.e.n.T.a.r.g.e.t.T.o.o.L.o.w.
3b60 19 09 00 00 46 45 00 6e 00 74 00 69 00 74 00 79 00 4d 00 6f 00 64 00 65 00 6c 00 47 00 65 00 6e ....FE.n.t.i.t.y.M.o.d.e.l.G.e.n
3b80 00 65 00 72 00 61 00 74 00 6f 00 72 00 53 00 63 00 68 00 65 00 6d 00 61 00 4e 00 6f 00 74 00 4c .e.r.a.t.o.r.S.c.h.e.m.a.N.o.t.L
3ba0 00 6f 00 61 00 64 00 65 00 64 00 9e 09 00 00 40 45 00 6e 00 74 00 69 00 74 00 79 00 53 00 65 00 .o.a.d.e.d.....@E.n.t.i.t.y.S.e.
3bc0 74 00 45 00 78 00 69 00 73 00 74 00 73 00 57 00 69 00 74 00 68 00 44 00 69 00 66 00 66 00 65 00 t.E.x.i.s.t.s.W.i.t.h.D.i.f.f.e.
3be0 72 00 65 00 6e 00 74 00 43 00 61 00 73 00 65 00 f0 09 00 00 46 45 00 6e 00 74 00 69 00 74 00 79 r.e.n.t.C.a.s.e.....FE.n.t.i.t.y
3c00 00 53 00 74 00 6f 00 72 00 65 00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 6f 00 72 00 53 00 63 .S.t.o.r.e.G.e.n.e.r.a.t.o.r.S.c
3c20 00 68 00 65 00 6d 00 61 00 4e 00 6f 00 74 00 4c 00 6f 00 61 00 64 00 65 00 64 00 70 0a 00 00 4a .h.e.m.a.N.o.t.L.o.a.d.e.d.p...J
3c40 45 00 6e 00 74 00 69 00 74 00 79 00 54 00 79 00 70 00 65 00 41 00 6e 00 64 00 53 00 65 00 74 00 E.n.t.i.t.y.T.y.p.e.A.n.d.S.e.t.
3c60 41 00 63 00 63 00 65 00 73 00 73 00 69 00 62 00 69 00 6c 00 69 00 74 00 79 00 43 00 6f 00 6e 00 A.c.c.e.s.s.i.b.i.l.i.t.y.C.o.n.
3c80 66 00 6c 00 69 00 63 00 74 00 c2 0a 00 00 54 45 00 78 00 63 00 6c 00 75 00 64 00 65 00 64 00 43 f.l.i.c.t.....TE.x.c.l.u.d.e.d.C
3ca0 00 6f 00 6c 00 75 00 6d 00 6e 00 57 00 61 00 73 00 41 00 4b 00 65 00 79 00 43 00 6f 00 6c 00 75 .o.l.u.m.n.W.a.s.A.K.e.y.C.o.l.u
3cc0 00 6d 00 6e 00 45 00 6e 00 74 00 69 00 74 00 79 00 49 00 73 00 49 00 6e 00 76 00 61 00 6c 00 69 .m.n.E.n.t.i.t.y.I.s.I.n.v.a.l.i
3ce0 00 64 00 9a 0b 00 00 56 45 00 78 00 63 00 6c 00 75 00 64 00 65 00 64 00 43 00 6f 00 6c 00 75 00 .d.....VE.x.c.l.u.d.e.d.C.o.l.u.
3d00 6d 00 6e 00 57 00 61 00 73 00 41 00 4b 00 65 00 79 00 43 00 6f 00 6c 00 75 00 6d 00 6e 00 45 00 m.n.W.a.s.A.K.e.y.C.o.l.u.m.n.E.
3d20 6e 00 74 00 69 00 74 00 79 00 49 00 73 00 52 00 65 00 61 00 64 00 4f 00 6e 00 6c 00 79 00 45 0c n.t.i.t.y.I.s.R.e.a.d.O.n.l.y.E.
3d40 00 00 36 46 00 61 00 63 00 74 00 6f 00 72 00 79 00 4d 00 65 00 74 00 68 00 6f 00 64 00 53 00 75 ..6F.a.c.t.o.r.y.M.e.t.h.o.d.S.u
3d60 00 6d 00 6d 00 61 00 72 00 79 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 e1 0c 00 00 34 46 00 .m.m.a.r.y.C.o.m.m.e.n.t.....4F.
3d80 61 00 63 00 74 00 6f 00 72 00 79 00 50 00 61 00 72 00 61 00 6d 00 43 00 6f 00 6d 00 6d 00 65 00 a.c.t.o.r.y.P.a.r.a.m.C.o.m.m.e.
3da0 6e 00 74 00 47 00 65 00 6e 00 65 00 72 00 61 00 6c 00 fb 0c 00 00 44 47 00 65 00 6e 00 65 00 72 n.t.G.e.n.e.r.a.l.....DG.e.n.e.r
3dc0 00 61 00 74 00 65 00 64 00 46 00 61 00 63 00 74 00 6f 00 72 00 79 00 4d 00 65 00 74 00 68 00 6f .a.t.e.d.F.a.c.t.o.r.y.M.e.t.h.o
3de0 00 64 00 4e 00 61 00 6d 00 65 00 43 00 6f 00 6e 00 66 00 6c 00 69 00 63 00 74 00 12 0d 00 00 4e .d.N.a.m.e.C.o.n.f.l.i.c.t.....N
3e00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 65 00 64 00 4e 00 61 00 76 00 69 00 67 00 61 00 74 00 G.e.n.e.r.a.t.e.d.N.a.v.i.g.a.t.
3e20 69 00 6f 00 6e 00 50 00 72 00 6f 00 70 00 65 00 72 00 74 00 79 00 4e 00 61 00 6d 00 65 00 43 00 i.o.n.P.r.o.p.e.r.t.y.N.a.m.e.C.
3e40 6f 00 6e 00 66 00 6c 00 69 00 63 00 74 00 63 0d 00 00 4c 47 00 65 00 6e 00 65 00 72 00 61 00 74 o.n.f.l.i.c.t.c...LG.e.n.e.r.a.t
3e60 00 65 00 64 00 50 00 72 00 6f 00 70 00 65 00 72 00 74 00 79 00 41 00 63 00 63 00 65 00 73 00 73 .e.d.P.r.o.p.e.r.t.y.A.c.c.e.s.s
3e80 00 69 00 62 00 69 00 6c 00 69 00 74 00 79 00 43 00 6f 00 6e 00 66 00 6c 00 69 00 63 00 74 00 f0 .i.b.i.l.i.t.y.C.o.n.f.l.i.c.t..
3ea0 0d 00 00 2e 47 00 65 00 74 00 56 00 69 00 65 00 77 00 41 00 74 00 4d 00 65 00 74 00 68 00 6f 00 ....G.e.t.V.i.e.w.A.t.M.e.t.h.o.
3ec0 64 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 73 00 8b 0e 00 00 2c 49 00 6e 00 64 00 69 00 76 d.C.o.m.m.e.n.t.s.....,I.n.d.i.v
3ee0 00 69 00 64 00 75 00 61 00 6c 00 56 00 69 00 65 00 77 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 .i.d.u.a.l.V.i.e.w.C.o.m.m.e.n.t
3f00 00 73 00 bd 0e 00 00 46 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 41 00 74 00 74 00 72 00 69 00 .s.....FI.n.v.a.l.i.d.A.t.t.r.i.
3f20 62 00 75 00 74 00 65 00 53 00 75 00 70 00 70 00 6c 00 69 00 65 00 64 00 46 00 6f 00 72 00 50 00 b.u.t.e.S.u.p.p.l.i.e.d.F.o.r.P.
3f40 72 00 6f 00 70 00 65 00 72 00 74 00 79 00 d2 0e 00 00 3e 49 00 6e 00 76 00 61 00 6c 00 69 00 64 r.o.p.e.r.t.y.....>I.n.v.a.l.i.d
3f60 00 41 00 74 00 74 00 72 00 69 00 62 00 75 00 74 00 65 00 53 00 75 00 70 00 70 00 6c 00 69 00 65 .A.t.t.r.i.b.u.t.e.S.u.p.p.l.i.e
3f80 00 64 00 46 00 6f 00 72 00 54 00 79 00 70 00 65 00 12 0f 00 00 44 49 00 6e 00 76 00 61 00 6c 00 .d.F.o.r.T.y.p.e.....DI.n.v.a.l.
3fa0 69 00 64 00 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6f 00 6e 00 74 00 61 00 69 00 6e 00 65 00 i.d.E.n.t.i.t.y.C.o.n.t.a.i.n.e.
3fc0 72 00 4e 00 61 00 6d 00 65 00 41 00 72 00 67 00 75 00 6d 00 65 00 6e 00 74 00 4e 0f 00 00 4c 49 r.N.a.m.e.A.r.g.u.m.e.n.t.N...LI
3fe0 00 6e 00 76 00 61 00 6c 00 69 00 64 00 47 00 65 00 74 00 53 00 74 00 61 00 74 00 65 00 6d 00 65 .n.v.a.l.i.d.G.e.t.S.t.a.t.e.m.e
4000 00 6e 00 74 00 53 00 75 00 70 00 70 00 6c 00 69 00 65 00 64 00 46 00 6f 00 72 00 50 00 72 00 6f .n.t.S.u.p.p.l.i.e.d.F.o.r.P.r.o
4020 00 70 00 65 00 72 00 74 00 79 00 a4 0f 00 00 3e 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 49 00 .p.e.r.t.y.....>I.n.v.a.l.i.d.I.
4040 6e 00 74 00 65 00 72 00 66 00 61 00 63 00 65 00 53 00 75 00 70 00 70 00 6c 00 69 00 65 00 64 00 n.t.e.r.f.a.c.e.S.u.p.p.l.i.e.d.
4060 46 00 6f 00 72 00 54 00 79 00 70 00 65 00 ec 0f 00 00 38 49 00 6e 00 76 00 61 00 6c 00 69 00 64 F.o.r.T.y.p.e.....8I.n.v.a.l.i.d
4080 00 4d 00 65 00 6d 00 62 00 65 00 72 00 53 00 75 00 70 00 70 00 6c 00 69 00 65 00 64 00 46 00 6f .M.e.m.b.e.r.S.u.p.p.l.i.e.d.F.o
40a0 00 72 00 54 00 79 00 70 00 65 00 2c 10 00 00 38 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 4e 00 .r.T.y.p.e.,...8I.n.v.a.l.i.d.N.
40c0 61 00 6d 00 65 00 73 00 70 00 61 00 63 00 65 00 4e 00 61 00 6d 00 65 00 41 00 72 00 67 00 75 00 a.m.e.s.p.a.c.e.N.a.m.e.A.r.g.u.
40e0 6d 00 65 00 6e 00 74 00 69 10 00 00 3c 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 4e 00 6f 00 6e m.e.n.t.i...<I.n.v.a.l.i.d.N.o.n
4100 00 53 00 74 00 6f 00 72 00 65 00 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6f 00 6e 00 74 00 61 .S.t.o.r.e.E.n.t.i.t.y.C.o.n.t.a
4120 00 69 00 6e 00 65 00 72 00 b4 10 00 00 4c 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 53 00 65 00 .i.n.e.r.....LI.n.v.a.l.i.d.S.e.
4140 74 00 53 00 74 00 61 00 74 00 65 00 6d 00 65 00 6e 00 74 00 53 00 75 00 70 00 70 00 6c 00 69 00 t.S.t.a.t.e.m.e.n.t.S.u.p.p.l.i.
4160 65 00 64 00 46 00 6f 00 72 00 50 00 72 00 6f 00 70 00 65 00 72 00 74 00 79 00 ef 10 00 00 2a 49 e.d.F.o.r.P.r.o.p.e.r.t.y.....*I
4180 00 6e 00 76 00 61 00 6c 00 69 00 64 00 53 00 74 00 72 00 69 00 6e 00 67 00 41 00 72 00 67 00 75 .n.v.a.l.i.d.S.t.r.i.n.g.A.r.g.u
41a0 00 6d 00 65 00 6e 00 74 00 37 11 00 00 30 49 00 6e 00 76 00 61 00 6c 00 69 00 64 00 54 00 79 00 .m.e.n.t.7...0I.n.v.a.l.i.d.T.y.
41c0 70 00 65 00 46 00 6f 00 72 00 50 00 72 00 69 00 6d 00 61 00 72 00 79 00 4b 00 65 00 79 00 78 11 p.e.F.o.r.P.r.i.m.a.r.y.K.e.y.x.
41e0 00 00 36 49 00 74 00 65 00 6d 00 45 00 78 00 69 00 73 00 74 00 73 00 57 00 69 00 74 00 68 00 44 ..6I.t.e.m.E.x.i.s.t.s.W.i.t.h.D
4200 00 69 00 66 00 66 00 65 00 72 00 65 00 6e 00 74 00 43 00 61 00 73 00 65 00 4a 12 00 00 4e 4d 00 .i.f.f.e.r.e.n.t.C.a.s.e.J...NM.
4220 65 00 74 00 61 00 64 00 61 00 74 00 61 00 49 00 74 00 65 00 6d 00 45 00 72 00 72 00 6f 00 72 00 e.t.a.d.a.t.a.I.t.e.m.E.r.r.o.r.
4240 73 00 46 00 6f 00 75 00 6e 00 64 00 44 00 75 00 72 00 69 00 6e 00 67 00 47 00 65 00 6e 00 65 00 s.F.o.u.n.d.D.u.r.i.n.g.G.e.n.e.
4260 72 00 61 00 74 00 69 00 6f 00 6e 00 bc 12 00 00 3e 4d 00 69 00 73 00 73 00 69 00 6e 00 67 00 43 r.a.t.i.o.n.....>M.i.s.s.i.n.g.C
4280 00 6f 00 6d 00 70 00 6c 00 65 00 78 00 54 00 79 00 70 00 65 00 44 00 6f 00 63 00 75 00 6d 00 65 .o.m.p.l.e.x.T.y.p.e.D.o.c.u.m.e
42a0 00 6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 dd 12 00 00 28 4d 00 69 00 73 00 73 00 69 00 6e 00 .n.t.a.t.i.o.n.....(M.i.s.s.i.n.
42c0 67 00 44 00 6f 00 63 00 75 00 6d 00 65 00 6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 17 13 00 00 g.D.o.c.u.m.e.n.t.a.t.i.o.n.....
42e0 34 4d 00 69 00 73 00 73 00 69 00 6e 00 67 00 44 00 6f 00 63 00 75 00 6d 00 65 00 6e 00 74 00 61 4M.i.s.s.i.n.g.D.o.c.u.m.e.n.t.a
4300 00 74 00 69 00 6f 00 6e 00 4e 00 6f 00 4e 00 61 00 6d 00 65 00 45 13 00 00 38 4d 00 69 00 73 00 .t.i.o.n.N.o.N.a.m.e.E...8M.i.s.
4320 73 00 69 00 6e 00 67 00 50 00 72 00 6f 00 70 00 65 00 72 00 74 00 79 00 44 00 6f 00 63 00 75 00 s.i.n.g.P.r.o.p.e.r.t.y.D.o.c.u.
4340 6d 00 65 00 6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 6b 13 00 00 42 4d 00 6f 00 64 00 65 00 6c m.e.n.t.a.t.i.o.n.k...BM.o.d.e.l
4360 00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 69 00 6f 00 6e 00 5f 00 55 00 6e 00 47 00 65 00 6e .G.e.n.e.r.a.t.i.o.n._.U.n.G.e.n
4380 00 65 00 72 00 61 00 74 00 61 00 62 00 6c 00 65 00 54 00 79 00 70 00 65 00 a2 13 00 00 22 4e 00 .e.r.a.t.a.b.l.e.T.y.p.e....."N.
43a0 61 00 6d 00 65 00 73 00 70 00 61 00 63 00 65 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 73 00 a.m.e.s.p.a.c.e.C.o.m.m.e.n.t.s.
43c0 ea 13 00 00 26 4e 00 6f 00 50 00 72 00 69 00 6d 00 61 00 72 00 79 00 4b 00 65 00 79 00 44 00 65 ....&N.o.P.r.i.m.a.r.y.K.e.y.D.e
43e0 00 66 00 69 00 6e 00 65 00 64 00 19 14 00 00 28 4e 00 75 00 6c 00 6c 00 41 00 64 00 64 00 69 00 .f.i.n.e.d.....(N.u.l.l.A.d.d.i.
4400 74 00 69 00 6f 00 6e 00 61 00 6c 00 53 00 63 00 68 00 65 00 6d 00 61 00 a9 14 00 00 34 50 00 61 t.i.o.n.a.l.S.c.h.e.m.a.....4P.a
4420 00 72 00 61 00 6d 00 65 00 74 00 65 00 72 00 44 00 69 00 72 00 65 00 63 00 74 00 69 00 6f 00 6e .r.a.m.e.t.e.r.D.i.r.e.c.t.i.o.n
4440 00 4e 00 6f 00 74 00 56 00 61 00 6c 00 69 00 64 00 df 14 00 00 3e 50 00 72 00 6f 00 70 00 65 00 .N.o.t.V.a.l.i.d.....>P.r.o.p.e.
4460 72 00 74 00 79 00 45 00 78 00 69 00 73 00 74 00 73 00 57 00 69 00 74 00 68 00 44 00 69 00 66 00 r.t.y.E.x.i.s.t.s.W.i.t.h.D.i.f.
4480 66 00 65 00 72 00 65 00 6e 00 74 00 43 00 61 00 73 00 65 00 6e 15 00 00 44 50 00 72 00 6f 00 76 f.e.r.e.n.t.C.a.s.e.n...DP.r.o.v
44a0 00 69 00 64 00 65 00 72 00 46 00 61 00 63 00 74 00 6f 00 72 00 79 00 52 00 65 00 74 00 75 00 72 .i.d.e.r.F.a.c.t.o.r.y.R.e.t.u.r
44c0 00 6e 00 65 00 64 00 4e 00 75 00 6c 00 6c 00 46 00 61 00 63 00 74 00 6f 00 72 00 79 00 ea 15 00 .n.e.d.N.u.l.l.F.a.c.t.o.r.y....
44e0 00 28 50 00 72 00 6f 00 76 00 69 00 64 00 65 00 72 00 53 00 63 00 68 00 65 00 6d 00 61 00 45 00 .(P.r.o.v.i.d.e.r.S.c.h.e.m.a.E.
4500 72 00 72 00 6f 00 72 00 73 00 3f 16 00 00 22 52 00 65 00 73 00 65 00 72 00 76 00 65 00 64 00 4e r.r.o.r.s.?..."R.e.s.e.r.v.e.d.N
4520 00 61 00 6d 00 65 00 73 00 70 00 61 00 63 00 65 00 84 16 00 00 3e 53 00 65 00 72 00 69 00 61 00 .a.m.e.s.p.a.c.e.....>S.e.r.i.a.
4540 6c 00 69 00 7a 00 61 00 74 00 69 00 6f 00 6e 00 5f 00 55 00 6e 00 6b 00 6e 00 6f 00 77 00 6e 00 l.i.z.a.t.i.o.n._.U.n.k.n.o.w.n.
4560 47 00 6c 00 6f 00 62 00 61 00 6c 00 49 00 74 00 65 00 6d 00 c4 16 00 00 20 53 00 68 00 61 00 72 G.l.o.b.a.l.I.t.e.m......S.h.a.r
4580 00 65 00 64 00 46 00 6f 00 72 00 65 00 69 00 67 00 6e 00 4b 00 65 00 79 00 fe 16 00 00 44 53 00 .e.d.F.o.r.e.i.g.n.K.e.y.....DS.
45a0 69 00 6e 00 67 00 6c 00 65 00 53 00 74 00 6f 00 72 00 65 00 45 00 6e 00 74 00 69 00 74 00 79 00 i.n.g.l.e.S.t.o.r.e.E.n.t.i.t.y.
45c0 43 00 6f 00 6e 00 74 00 61 00 69 00 6e 00 65 00 72 00 45 00 78 00 70 00 65 00 63 00 74 00 65 00 C.o.n.t.a.i.n.e.r.E.x.p.e.c.t.e.
45e0 64 00 ee 17 00 00 3a 53 00 74 00 6f 00 6e 00 67 00 6c 00 79 00 54 00 79 00 70 00 65 00 64 00 41 d.....:S.t.o.n.g.l.y.T.y.p.e.d.A
4600 00 63 00 63 00 65 00 73 00 73 00 54 00 6f 00 4e 00 75 00 6c 00 6c 00 56 00 61 00 6c 00 75 00 65 .c.c.e.s.s.T.o.N.u.l.l.V.a.l.u.e
4620 00 3c 18 00 00 4e 54 00 61 00 62 00 6c 00 65 00 52 00 65 00 66 00 65 00 72 00 65 00 6e 00 63 00 .<...NT.a.b.l.e.R.e.f.e.r.e.n.c.
4640 65 00 64 00 42 00 79 00 41 00 73 00 73 00 6f 00 63 00 69 00 61 00 74 00 69 00 6f 00 6e 00 57 00 e.d.B.y.A.s.s.o.c.i.a.t.i.o.n.W.
4660 61 00 73 00 4e 00 6f 00 74 00 46 00 6f 00 75 00 6e 00 64 00 72 18 00 00 3e 54 00 61 00 62 00 6c a.s.N.o.t.F.o.u.n.d.r...>T.a.b.l
4680 00 65 00 52 00 65 00 66 00 65 00 72 00 65 00 6e 00 63 00 65 00 64 00 42 00 79 00 54 00 76 00 66 .e.R.e.f.e.r.e.n.c.e.d.B.y.T.v.f
46a0 00 57 00 61 00 73 00 4e 00 6f 00 74 00 46 00 6f 00 75 00 6e 00 64 00 b9 18 00 00 70 54 00 61 00 .W.a.s.N.o.t.F.o.u.n.d.....pT.a.
46c0 72 00 67 00 65 00 74 00 45 00 6e 00 74 00 69 00 74 00 79 00 46 00 72 00 61 00 6d 00 65 00 77 00 r.g.e.t.E.n.t.i.t.y.F.r.a.m.e.w.
46e0 6f 00 72 00 6b 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 54 00 6f 00 4e 00 65 00 77 00 46 00 o.r.k.V.e.r.s.i.o.n.T.o.N.e.w.F.
4700 6f 00 72 00 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6c 00 61 00 73 00 73 00 47 00 65 00 6e 00 o.r.E.n.t.i.t.y.C.l.a.s.s.G.e.n.
4720 65 00 72 00 61 00 74 00 6f 00 72 00 ca 19 00 00 44 54 00 61 00 72 00 67 00 65 00 74 00 56 00 65 e.r.a.t.o.r.....DT.a.r.g.e.t.V.e
4740 00 72 00 73 00 69 00 6f 00 6e 00 53 00 63 00 68 00 65 00 6d 00 61 00 56 00 65 00 72 00 73 00 69 .r.s.i.o.n.S.c.h.e.m.a.V.e.r.s.i
4760 00 6f 00 6e 00 4d 00 69 00 73 00 6d 00 61 00 74 00 63 00 68 00 90 1a 00 00 52 54 00 65 00 6d 00 .o.n.M.i.s.m.a.t.c.h.....RT.e.m.
4780 70 00 6c 00 61 00 74 00 65 00 5f 00 43 00 61 00 73 00 65 00 49 00 6e 00 73 00 65 00 6e 00 73 00 p.l.a.t.e._.C.a.s.e.I.n.s.e.n.s.
47a0 69 00 74 00 69 00 76 00 65 00 45 00 6e 00 74 00 69 00 74 00 79 00 53 00 65 00 74 00 43 00 6f 00 i.t.i.v.e.E.n.t.i.t.y.S.e.t.C.o.
47c0 6e 00 66 00 6c 00 69 00 63 00 74 00 09 1b 00 00 4c 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 n.f.l.i.c.t.....LT.e.m.p.l.a.t.e
47e0 00 5f 00 43 00 61 00 73 00 65 00 49 00 6e 00 73 00 65 00 6e 00 73 00 69 00 74 00 69 00 76 00 65 ._.C.a.s.e.I.n.s.e.n.s.i.t.i.v.e
4800 00 4d 00 65 00 6d 00 62 00 65 00 72 00 43 00 6f 00 6e 00 66 00 6c 00 69 00 63 00 74 00 8c 1b 00 .M.e.m.b.e.r.C.o.n.f.l.i.c.t....
4820 00 48 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 43 00 61 00 73 00 65 00 49 00 6e 00 .HT.e.m.p.l.a.t.e._.C.a.s.e.I.n.
4840 73 00 65 00 6e 00 73 00 69 00 74 00 69 00 76 00 65 00 54 00 79 00 70 00 65 00 43 00 6f 00 6e 00 s.e.n.s.i.t.i.v.e.T.y.p.e.C.o.n.
4860 66 00 6c 00 69 00 63 00 74 00 08 1c 00 00 44 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f f.l.i.c.t.....DT.e.m.p.l.a.t.e._
4880 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 46 00 61 00 63 00 74 00 6f 00 72 00 79 00 4d 00 65 .C.o.m.m.e.n.t.F.a.c.t.o.r.y.M.e
48a0 00 74 00 68 00 6f 00 64 00 50 00 61 00 72 00 61 00 6d 00 9a 1c 00 00 3e 54 00 65 00 6d 00 70 00 .t.h.o.d.P.a.r.a.m.....>T.e.m.p.
48c0 6c 00 61 00 74 00 65 00 5f 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 4e 00 6f 00 44 00 6f 00 l.a.t.e._.C.o.m.m.e.n.t.N.o.D.o.
48e0 63 00 75 00 6d 00 65 00 6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 be 1c 00 00 50 54 00 65 00 6d c.u.m.e.n.t.a.t.i.o.n.....PT.e.m
4900 00 70 00 6c 00 61 00 74 00 65 00 5f 00 43 00 6f 00 6e 00 66 00 6c 00 69 00 63 00 74 00 69 00 6e .p.l.a.t.e._.C.o.n.f.l.i.c.t.i.n
4920 00 67 00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 65 00 64 00 4e 00 61 00 76 00 50 00 72 00 6f .g.G.e.n.e.r.a.t.e.d.N.a.v.P.r.o
4940 00 70 00 4e 00 61 00 6d 00 65 00 e4 1c 00 00 42 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 .p.N.a.m.e.....BT.e.m.p.l.a.t.e.
4960 5f 00 43 00 6f 00 6e 00 74 00 65 00 78 00 74 00 43 00 6f 00 6d 00 6d 00 6f 00 6e 00 43 00 74 00 _.C.o.n.t.e.x.t.C.o.m.m.o.n.C.t.
4980 6f 00 72 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 71 1d 00 00 44 54 00 65 00 6d 00 70 00 6c o.r.C.o.m.m.e.n.t.q...DT.e.m.p.l
49a0 00 61 00 74 00 65 00 5f 00 43 00 6f 00 6e 00 74 00 65 00 78 00 74 00 44 00 65 00 66 00 61 00 75 .a.t.e._.C.o.n.t.e.x.t.D.e.f.a.u
49c0 00 6c 00 74 00 43 00 74 00 6f 00 72 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 8f 1d 00 00 42 .l.t.C.t.o.r.C.o.m.m.e.n.t.....B
49e0 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 43 00 75 00 72 00 72 00 65 00 6e 00 74 00 T.e.m.p.l.a.t.e._.C.u.r.r.e.n.t.
4a00 6c 00 79 00 52 00 75 00 6e 00 6e 00 69 00 6e 00 67 00 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 l.y.R.u.n.n.i.n.g.T.e.m.p.l.a.t.
4a20 65 00 0b 1e 00 00 3c 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 44 00 75 00 70 00 6c e.....<T.e.m.p.l.a.t.e._.D.u.p.l
4a40 00 69 00 63 00 61 00 74 00 65 00 54 00 6f 00 70 00 4c 00 65 00 76 00 65 00 6c 00 54 00 79 00 70 .i.c.a.t.e.T.o.p.L.e.v.e.l.T.y.p
4a60 00 65 00 27 1e 00 00 3a 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 46 00 61 00 63 00 .e.'...:T.e.m.p.l.a.t.e._.F.a.c.
4a80 74 00 6f 00 72 00 79 00 4d 00 65 00 74 00 68 00 6f 00 64 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 t.o.r.y.M.e.t.h.o.d.C.o.m.m.e.n.
4aa0 74 00 aa 1e 00 00 44 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 46 00 61 00 63 00 74 t.....DT.e.m.p.l.a.t.e._.F.a.c.t
4ac0 00 6f 00 72 00 79 00 4d 00 65 00 74 00 68 00 6f 00 64 00 4e 00 61 00 6d 00 65 00 43 00 6f 00 6e .o.r.y.M.e.t.h.o.d.N.a.m.e.C.o.n
4ae0 00 66 00 6c 00 69 00 63 00 74 00 c4 1e 00 00 40 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 .f.l.i.c.t.....@T.e.m.p.l.a.t.e.
4b00 5f 00 47 00 65 00 6e 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 41 00 64 00 64 00 54 00 6f 00 _.G.e.n.C.o.m.m.e.n.t.A.d.d.T.o.
4b20 4d 00 65 00 74 00 68 00 6f 00 64 00 43 00 73 00 15 1f 00 00 40 54 00 65 00 6d 00 70 00 6c 00 61 M.e.t.h.o.d.C.s.....@T.e.m.p.l.a
4b40 00 74 00 65 00 5f 00 47 00 65 00 6e 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 41 00 64 00 64 .t.e._.G.e.n.C.o.m.m.e.n.t.A.d.d
4b60 00 54 00 6f 00 4d 00 65 00 74 00 68 00 6f 00 64 00 56 00 62 00 ad 1f 00 00 44 54 00 65 00 6d 00 .T.o.M.e.t.h.o.d.V.b.....DT.e.m.
4b80 70 00 6c 00 61 00 74 00 65 00 5f 00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 65 00 64 00 43 00 p.l.a.t.e._.G.e.n.e.r.a.t.e.d.C.
4ba0 6f 00 64 00 65 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 4c 00 69 00 6e 00 65 00 31 00 42 20 o.d.e.C.o.m.m.e.n.t.L.i.n.e.1.B.
4bc0 00 00 44 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 47 00 65 00 6e 00 65 00 72 00 61 ..DT.e.m.p.l.a.t.e._.G.e.n.e.r.a
4be0 00 74 00 65 00 64 00 43 00 6f 00 64 00 65 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 4c 00 69 .t.e.d.C.o.d.e.C.o.m.m.e.n.t.L.i
4c00 00 6e 00 65 00 32 00 6f 20 00 00 44 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 47 00 .n.e.2.o...DT.e.m.p.l.a.t.e._.G.
4c20 65 00 6e 00 65 00 72 00 61 00 74 00 65 00 64 00 43 00 6f 00 64 00 65 00 43 00 6f 00 6d 00 6d 00 e.n.e.r.a.t.e.d.C.o.d.e.C.o.m.m.
4c40 65 00 6e 00 74 00 4c 00 69 00 6e 00 65 00 33 00 c2 20 00 00 36 54 00 65 00 6d 00 70 00 6c 00 61 e.n.t.L.i.n.e.3.....6T.e.m.p.l.a
4c60 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 41 00 64 00 64 00 54 00 6f 00 4d 00 65 .t.e._.R.e.g.i.o.n.A.d.d.T.o.M.e
4c80 00 74 00 68 00 6f 00 64 00 73 00 12 21 00 00 40 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 .t.h.o.d.s..!..@T.e.m.p.l.a.t.e.
4ca0 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 43 00 6f 00 6d 00 70 00 6c 00 65 00 78 00 50 00 72 00 _.R.e.g.i.o.n.C.o.m.p.l.e.x.P.r.
4cc0 6f 00 70 00 65 00 72 00 74 00 69 00 65 00 73 00 21 21 00 00 36 54 00 65 00 6d 00 70 00 6c 00 61 o.p.e.r.t.i.e.s.!!..6T.e.m.p.l.a
4ce0 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 43 00 6f 00 6d 00 70 00 6c 00 65 00 78 .t.e._.R.e.g.i.o.n.C.o.m.p.l.e.x
4d00 00 54 00 79 00 70 00 65 00 73 00 35 21 00 00 36 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 .T.y.p.e.s.5!..6T.e.m.p.l.a.t.e.
4d20 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 43 00 6f 00 6e 00 73 00 74 00 72 00 75 00 63 00 74 00 _.R.e.g.i.o.n.C.o.n.s.t.r.u.c.t.
4d40 6f 00 72 00 73 00 43 21 00 00 2e 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 o.r.s.C!...T.e.m.p.l.a.t.e._.R.e
4d60 00 67 00 69 00 6f 00 6e 00 43 00 6f 00 6e 00 74 00 65 00 78 00 74 00 73 00 51 21 00 00 2e 54 00 .g.i.o.n.C.o.n.t.e.x.t.s.Q!...T.
4d80 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 45 00 6e 00 e.m.p.l.a.t.e._.R.e.g.i.o.n.E.n.
4da0 74 00 69 00 74 00 69 00 65 00 73 00 5b 21 00 00 30 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 t.i.t.i.e.s.[!..0T.e.m.p.l.a.t.e
4dc0 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 45 00 6e 00 75 00 6d 00 54 00 79 00 70 00 65 00 73 ._.R.e.g.i.o.n.E.n.u.m.T.y.p.e.s
4de0 00 65 21 00 00 38 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 .e!..8T.e.m.p.l.a.t.e._.R.e.g.i.
4e00 6f 00 6e 00 46 00 61 00 63 00 74 00 6f 00 72 00 79 00 4d 00 65 00 74 00 68 00 6f 00 64 00 6c 21 o.n.F.a.c.t.o.r.y.M.e.t.h.o.d.l!
4e20 00 00 3c 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e ..<T.e.m.p.l.a.t.e._.R.e.g.i.o.n
4e40 00 46 00 75 00 6e 00 63 00 74 00 69 00 6f 00 6e 00 49 00 6d 00 70 00 6f 00 72 00 74 00 73 00 7c .F.u.n.c.t.i.o.n.I.m.p.o.r.t.s.|
4e60 21 00 00 46 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 !..FT.e.m.p.l.a.t.e._.R.e.g.i.o.
4e80 6e 00 4e 00 61 00 76 00 69 00 67 00 61 00 74 00 69 00 6f 00 6e 00 50 00 72 00 6f 00 70 00 65 00 n.N.a.v.i.g.a.t.i.o.n.P.r.o.p.e.
4ea0 72 00 74 00 69 00 65 00 73 00 8e 21 00 00 44 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f r.t.i.e.s..!..DT.e.m.p.l.a.t.e._
4ec0 00 52 00 65 00 67 00 69 00 6f 00 6e 00 4f 00 62 00 6a 00 65 00 63 00 74 00 53 00 65 00 74 00 50 .R.e.g.i.o.n.O.b.j.e.c.t.S.e.t.P
4ee0 00 72 00 6f 00 70 00 65 00 72 00 74 00 69 00 65 00 73 00 a5 21 00 00 3a 54 00 65 00 6d 00 70 00 .r.o.p.e.r.t.i.e.s..!..:T.e.m.p.
4f00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 50 00 61 00 72 00 74 00 69 00 l.a.t.e._.R.e.g.i.o.n.P.a.r.t.i.
4f20 61 00 6c 00 4d 00 65 00 74 00 68 00 6f 00 64 00 73 00 bb 21 00 00 44 54 00 65 00 6d 00 70 00 6c a.l.M.e.t.h.o.d.s..!..DT.e.m.p.l
4f40 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 50 00 72 00 69 00 6d 00 69 00 74 .a.t.e._.R.e.g.i.o.n.P.r.i.m.i.t
4f60 00 69 00 76 00 65 00 50 00 72 00 6f 00 70 00 65 00 72 00 74 00 69 00 65 00 73 00 cc 21 00 00 38 .i.v.e.P.r.o.p.e.r.t.i.e.s..!..8
4f80 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 52 00 T.e.m.p.l.a.t.e._.R.e.g.i.o.n.R.
4fa0 65 00 6c 00 61 00 74 00 69 00 6f 00 6e 00 73 00 68 00 69 00 70 00 73 00 e2 21 00 00 3e 54 00 65 e.l.a.t.i.o.n.s.h.i.p.s..!..>T.e
4fc0 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 67 00 69 00 6f 00 6e 00 53 00 69 00 6d .m.p.l.a.t.e._.R.e.g.i.o.n.S.i.m
4fe0 00 70 00 6c 00 65 00 50 00 72 00 6f 00 70 00 65 00 72 00 74 00 69 00 65 00 73 00 fd 21 00 00 46 .p.l.e.P.r.o.p.e.r.t.i.e.s..!..F
5000 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 52 00 65 00 70 00 6c 00 61 00 63 00 65 00 T.e.m.p.l.a.t.e._.R.e.p.l.a.c.e.
5020 56 00 73 00 49 00 74 00 65 00 6d 00 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 54 00 6f 00 V.s.I.t.e.m.T.e.m.p.l.a.t.e.T.o.
5040 6b 00 65 00 6e 00 10 22 00 00 34 54 00 65 00 6d 00 70 00 6c 00 61 00 74 00 65 00 5f 00 55 00 6e k.e.n.."..4T.e.m.p.l.a.t.e._.U.n
5060 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 00 64 00 53 00 63 00 68 00 65 00 6d 00 61 00 93 .s.u.p.p.o.r.t.e.d.S.c.h.e.m.a..
5080 22 00 00 18 54 00 79 00 70 00 65 00 43 00 6f 00 6d 00 6d 00 65 00 6e 00 74 00 73 00 4a 23 00 00 "...T.y.p.e.C.o.m.m.e.n.t.s.J#..
50a0 52 55 00 6e 00 61 00 62 00 6c 00 65 00 54 00 6f 00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 65 RU.n.a.b.l.e.T.o.G.e.n.e.r.a.t.e
50c0 00 46 00 6f 00 72 00 65 00 69 00 67 00 6e 00 4b 00 65 00 79 00 50 00 72 00 6f 00 70 00 65 00 72 .F.o.r.e.i.g.n.K.e.y.P.r.o.p.e.r
50e0 00 74 00 69 00 65 00 73 00 46 00 6f 00 72 00 56 00 31 00 aa 23 00 00 56 55 00 6e 00 61 00 62 00 .t.i.e.s.F.o.r.V.1..#..VU.n.a.b.
5100 6c 00 65 00 54 00 6f 00 47 00 65 00 6e 00 65 00 72 00 61 00 74 00 65 00 46 00 75 00 6e 00 63 00 l.e.T.o.G.e.n.e.r.a.t.e.F.u.n.c.
5120 74 00 69 00 6f 00 6e 00 49 00 6d 00 70 00 6f 00 72 00 74 00 50 00 61 00 72 00 61 00 6d 00 65 00 t.i.o.n.I.m.p.o.r.t.P.a.r.a.m.e.
5140 74 00 65 00 72 00 4e 00 61 00 6d 00 65 00 0a 24 00 00 2c 55 00 6e 00 6d 00 61 00 70 00 70 00 65 t.e.r.N.a.m.e..$..,U.n.m.a.p.p.e
5160 00 64 00 46 00 75 00 6e 00 63 00 74 00 69 00 6f 00 6e 00 49 00 6d 00 70 00 6f 00 72 00 74 00 c5 .d.F.u.n.c.t.i.o.n.I.m.p.o.r.t..
5180 24 00 00 26 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 00 64 00 44 00 61 00 74 00 $..&U.n.s.u.p.p.o.r.t.e.d.D.a.t.
51a0 61 00 54 00 79 00 70 00 65 00 42 25 00 00 38 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 a.T.y.p.e.B%..8U.n.s.u.p.p.o.r.t
51c0 00 65 00 64 00 44 00 61 00 74 00 61 00 54 00 79 00 70 00 65 00 46 00 6f 00 72 00 54 00 61 00 72 .e.d.D.a.t.a.T.y.p.e.F.o.r.T.a.r
51e0 00 67 00 65 00 74 00 c8 25 00 00 3c 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 00 .g.e.t..%..<U.n.s.u.p.p.o.r.t.e.
5200 64 00 44 00 61 00 74 00 61 00 54 00 79 00 70 00 65 00 55 00 6e 00 6b 00 6e 00 6f 00 77 00 6e 00 d.D.a.t.a.T.y.p.e.U.n.k.n.o.w.n.
5220 54 00 79 00 70 00 65 00 9c 26 00 00 32 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 T.y.p.e..&..2U.n.s.u.p.p.o.r.t.e
5240 00 64 00 44 00 62 00 52 00 65 00 6c 00 61 00 74 00 69 00 6f 00 6e 00 73 00 68 00 69 00 70 00 0b .d.D.b.R.e.l.a.t.i.o.n.s.h.i.p..
5260 27 00 00 38 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 00 64 00 46 00 6f 00 72 00 '..8U.n.s.u.p.p.o.r.t.e.d.F.o.r.
5280 65 00 69 00 67 00 6e 00 4b 00 65 00 79 00 50 00 61 00 74 00 74 00 65 00 72 00 6e 00 a2 27 00 00 e.i.g.n.K.e.y.P.a.t.t.e.r.n..'..
52a0 48 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 00 64 00 46 00 75 00 6e 00 63 00 74 HU.n.s.u.p.p.o.r.t.e.d.F.u.n.c.t
52c0 00 69 00 6f 00 6e 00 50 00 61 00 72 00 61 00 6d 00 65 00 74 00 65 00 72 00 44 00 61 00 74 00 61 .i.o.n.P.a.r.a.m.e.t.e.r.D.a.t.a
52e0 00 54 00 79 00 70 00 65 00 c8 28 00 00 5a 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 .T.y.p.e..(..ZU.n.s.u.p.p.o.r.t.
5300 65 00 64 00 46 00 75 00 6e 00 63 00 74 00 69 00 6f 00 6e 00 50 00 61 00 72 00 61 00 6d 00 65 00 e.d.F.u.n.c.t.i.o.n.P.a.r.a.m.e.
5320 74 00 65 00 72 00 44 00 61 00 74 00 61 00 54 00 79 00 70 00 65 00 46 00 6f 00 72 00 54 00 61 00 t.e.r.D.a.t.a.T.y.p.e.F.o.r.T.a.
5340 72 00 67 00 65 00 74 00 88 29 00 00 42 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 r.g.e.t..)..BU.n.s.u.p.p.o.r.t.e
5360 00 64 00 46 00 75 00 6e 00 63 00 74 00 69 00 6f 00 6e 00 52 00 65 00 74 00 75 00 72 00 6e 00 44 .d.F.u.n.c.t.i.o.n.R.e.t.u.r.n.D
5380 00 61 00 74 00 61 00 54 00 79 00 70 00 65 00 9a 2a 00 00 54 55 00 6e 00 73 00 75 00 70 00 70 00 .a.t.a.T.y.p.e..*..TU.n.s.u.p.p.
53a0 6f 00 72 00 74 00 65 00 64 00 46 00 75 00 6e 00 63 00 74 00 69 00 6f 00 6e 00 52 00 65 00 74 00 o.r.t.e.d.F.u.n.c.t.i.o.n.R.e.t.
53c0 75 00 72 00 6e 00 44 00 61 00 74 00 61 00 54 00 79 00 70 00 65 00 46 00 6f 00 72 00 54 00 61 00 u.r.n.D.a.t.a.T.y.p.e.F.o.r.T.a.
53e0 72 00 67 00 65 00 74 00 2e 2b 00 00 52 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 r.g.e.t..+..RU.n.s.u.p.p.o.r.t.e
5400 00 64 00 4c 00 6f 00 63 00 61 00 6c 00 65 00 46 00 6f 00 72 00 50 00 6c 00 75 00 72 00 61 00 6c .d.L.o.c.a.l.e.F.o.r.P.l.u.r.a.l
5420 00 69 00 7a 00 61 00 74 00 69 00 6f 00 6e 00 53 00 65 00 72 00 76 00 69 00 63 00 65 00 73 00 0b .i.z.a.t.i.o.n.S.e.r.v.i.c.e.s..
5440 2c 00 00 58 55 00 6e 00 73 00 75 00 70 00 70 00 6f 00 72 00 74 00 65 00 64 00 51 00 75 00 65 00 ,..XU.n.s.u.p.p.o.r.t.e.d.Q.u.e.
5460 72 00 79 00 56 00 69 00 65 00 77 00 49 00 6e 00 45 00 6e 00 74 00 69 00 74 00 79 00 43 00 6f 00 r.y.V.i.e.w.I.n.E.n.t.i.t.y.C.o.
5480 6e 00 74 00 61 00 69 00 6e 00 65 00 72 00 4d 00 61 00 70 00 70 00 69 00 6e 00 67 00 76 2c 00 00 n.t.a.i.n.e.r.M.a.p.p.i.n.g.v,..
54a0 01 a2 01 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 62 65 74 77 65 65 6e 20 27 7b 30 7d 27 ...The.association.between.'{0}'
54c0 20 61 6e 64 20 27 7b 31 7d 27 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 63 72 65 61 74 65 64 20 62 .and.'{1}'.will.not.be.created.b
54e0 65 63 61 75 73 65 20 74 68 65 20 6b 65 79 20 63 6f 6c 75 6d 6e 20 27 7b 32 7d 27 20 77 61 73 20 ecause.the.key.column.'{2}'.was.
5500 6e 6f 74 20 66 6f 75 6e 64 20 74 6f 20 62 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 74 61 62 6c not.found.to.be.part.of.the.tabl
5520 65 20 64 65 66 69 6e 69 74 69 6f 6e 20 28 73 65 65 20 70 72 65 76 69 6f 75 73 20 77 61 72 6e 69 e.definition.(see.previous.warni
5540 6e 67 73 29 2e 01 4b 54 68 65 20 72 65 74 75 72 6e 20 64 61 74 61 20 74 79 70 65 20 6f 66 20 70 ngs)..KThe.return.data.type.of.p
5560 72 6f 70 65 72 74 79 20 27 7b 30 7d 27 20 6f 6e 20 74 68 65 20 74 79 70 65 20 27 7b 31 7d 27 20 roperty.'{0}'.on.the.type.'{1}'.
5580 63 61 6e 6e 6f 74 20 62 65 20 63 68 61 6e 67 65 64 2e 01 53 54 68 65 20 72 65 74 75 72 6e 20 64 cannot.be.changed..SThe.return.d
55a0 61 74 61 20 74 79 70 65 20 6f 66 20 70 72 6f 70 65 72 74 79 20 27 7b 30 7d 27 20 6f 6e 20 74 68 ata.type.of.property.'{0}'.on.th
55c0 65 20 74 79 70 65 20 27 7b 31 7d 27 20 63 61 6e 6e 6f 74 20 62 65 20 63 68 61 6e 67 65 64 20 74 e.type.'{1}'.cannot.be.changed.t
55e0 6f 20 6e 75 6c 6c 2e 01 e7 01 54 68 65 20 74 61 62 6c 65 2f 76 69 65 77 20 27 7b 30 7d 27 20 64 o.null....The.table/view.'{0}'.d
5600 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 61 20 70 72 69 6d 61 72 79 20 6b 65 79 20 64 65 66 69 6e oes.not.have.a.primary.key.defin
5620 65 64 20 61 6e 64 20 6e 6f 20 76 61 6c 69 64 20 70 72 69 6d 61 72 79 20 6b 65 79 20 63 6f 75 6c ed.and.no.valid.primary.key.coul
5640 64 20 62 65 20 69 6e 66 65 72 72 65 64 2e 20 54 68 69 73 20 74 61 62 6c 65 2f 76 69 65 77 20 68 d.be.inferred..This.table/view.h
5660 61 73 20 62 65 65 6e 20 65 78 63 6c 75 64 65 64 2e 20 54 6f 20 75 73 65 20 74 68 65 20 65 6e 74 as.been.excluded..To.use.the.ent
5680 69 74 79 2c 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 72 65 76 69 65 77 20 79 6f 75 ity,.you.will.need.to.review.you
56a0 72 20 73 63 68 65 6d 61 2c 20 61 64 64 20 74 68 65 20 63 6f 72 72 65 63 74 20 6b 65 79 73 2c 20 r.schema,.add.the.correct.keys,.
56c0 61 6e 64 20 75 6e 63 6f 6d 6d 65 6e 74 20 69 74 2e 01 37 54 68 65 20 70 61 72 61 6d 65 74 65 72 and.uncomment.it..7The.parameter
56e0 20 6d 75 73 74 20 73 70 65 63 69 66 79 20 61 20 73 69 6e 67 6c 65 20 66 69 6c 65 2c 20 6e 6f 74 .must.specify.a.single.file,.not
5700 20 6d 75 6c 74 69 70 6c 65 2e 01 96 01 54 68 65 20 66 61 63 65 74 20 27 7b 30 7d 27 20 77 69 74 .multiple....The.facet.'{0}'.wit
5720 68 20 61 20 76 61 6c 75 65 20 27 7b 31 7d 27 20 69 73 20 6f 75 74 73 69 64 65 20 74 68 65 20 72 h.a.value.'{1}'.is.outside.the.r
5740 61 6e 67 65 20 7b 32 7d 2d 7b 33 7d 20 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 20 66 61 ange.{2}-{3}.specified.by.the.fa
5760 63 65 74 20 64 65 73 63 72 69 70 74 69 6f 6e 2e 20 20 54 68 65 20 63 6f 6c 75 6d 6e 20 27 7b 34 cet.description...The.column.'{4
5780 7d 27 20 69 6e 20 74 68 65 20 74 61 62 6c 65 20 27 7b 35 7d 27 20 77 61 73 20 65 78 63 6c 75 64 }'.in.the.table.'{5}'.was.exclud
57a0 65 64 2e 01 88 01 54 68 65 20 63 6f 6e 73 74 72 75 63 74 6f 72 20 73 74 6f 72 65 73 20 74 68 65 ed....The.constructor.stores.the
57c0 20 76 69 65 77 73 20 66 6f 72 20 74 68 65 20 65 78 74 65 6e 74 73 20 61 6e 64 20 61 6c 73 6f 20 .views.for.the.extents.and.also.
57e0 74 68 65 20 68 61 73 68 20 76 61 6c 75 65 73 20 67 65 6e 65 72 61 74 65 64 20 62 61 73 65 64 20 the.hash.values.generated.based.
5800 6f 6e 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 61 6e 64 20 6d 61 70 70 69 6e 67 20 63 6c 6f 73 on.the.metadata.and.mapping.clos
5820 75 72 65 20 61 6e 64 20 76 69 65 77 73 2e 01 1c 49 6e 69 74 69 61 6c 69 7a 65 20 61 20 6e 65 77 ure.and.views...Initialize.a.new
5840 20 7b 30 7d 20 6f 62 6a 65 63 74 2e 01 1c 44 62 50 72 6f 76 69 64 65 72 53 65 72 76 69 63 65 73 .{0}.object...DbProviderServices
5860 3a 2f 2f 7b 30 7d 2f 7b 31 7d 01 87 03 54 68 65 20 64 65 66 61 75 6c 74 20 74 61 72 67 65 74 20 ://{0}/{1}...The.default.target.
5880 45 6e 74 69 74 79 20 46 72 61 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 20 72 65 71 75 69 72 65 Entity.Framework.version.require
58a0 73 20 74 68 65 20 65 64 6d 78 20 73 63 68 65 6d 61 20 76 65 72 73 69 6f 6e 20 7b 30 7d 20 6f 72 s.the.edmx.schema.version.{0}.or
58c0 20 6c 6f 77 65 72 2e 20 54 68 65 20 73 70 65 63 69 66 69 65 64 20 73 63 68 65 6d 61 20 69 73 20 .lower..The.specified.schema.is.
58e0 76 65 72 73 69 6f 6e 20 7b 31 7d 2e 20 54 6f 20 61 76 6f 69 64 20 74 68 69 73 20 77 61 72 6e 69 version.{1}..To.avoid.this.warni
5900 6e 67 20 73 70 65 63 69 66 79 20 74 68 65 20 74 61 72 67 65 74 20 45 6e 74 69 74 79 20 46 72 61 ng.specify.the.target.Entity.Fra
5920 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 20 65 78 70 6c 69 63 69 74 6c 79 2e 20 59 6f 75 20 63 mework.version.explicitly..You.c
5940 61 6e 20 64 6f 20 74 68 69 73 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 45 64 6d 47 65 6e 2e 65 an.do.this.by.using.the.EdmGen.e
5960 78 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 20 74 6f 6f 6c 20 77 69 74 68 20 74 68 65 20 74 61 xe.command-line.tool.with.the.ta
5980 72 67 65 74 56 65 72 73 69 6f 6e 20 6f 70 74 69 6f 6e 2c 20 6f 72 20 62 79 20 69 6e 63 6c 75 64 rgetVersion.option,.or.by.includ
59a0 69 6e 67 20 74 68 65 20 74 61 72 67 65 74 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 ing.the.targetEntityFrameworkVer
59c0 73 69 6f 6e 20 70 61 72 61 6d 65 74 65 72 20 77 68 65 6e 20 63 61 6c 6c 69 6e 67 20 74 68 65 20 sion.parameter.when.calling.the.
59e0 47 65 6e 65 72 61 74 65 43 6f 64 65 20 6d 65 74 68 6f 64 2e 01 89 01 54 68 65 20 7b 30 7d 20 27 GenerateCode.method....The.{0}.'
5a00 7b 31 7d 27 20 68 61 73 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 20 61 73 20 74 68 65 20 7b 32 {1}'.has.the.same.name.as.the.{2
5a20 7d 20 27 7b 31 7d 27 2e 20 44 75 70 6c 69 63 61 74 65 20 6e 61 6d 65 73 20 61 72 65 20 6e 6f 74 }.'{1}'..Duplicate.names.are.not
5a40 20 61 6c 6c 6f 77 65 64 2e 20 59 6f 75 20 6d 75 73 74 20 63 68 61 6e 67 65 20 74 68 65 20 6e 61 .allowed..You.must.change.the.na
5a60 6d 65 20 6f 66 20 65 69 74 68 65 72 20 74 68 65 20 7b 30 7d 20 6f 72 20 74 68 65 20 7b 32 7d 2e me.of.either.the.{0}.or.the.{2}.
5a80 01 aa 01 41 6e 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 77 69 74 68 20 74 68 65 20 6e ...An.EntityContainer.with.the.n
5aa0 61 6d 65 20 27 7b 30 7d 27 20 61 6c 72 65 61 64 79 20 65 78 69 73 74 73 20 69 6e 20 74 68 65 20 ame.'{0}'.already.exists.in.the.
5ac0 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 EdmItemCollection.containing.the
5ae0 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 27 7b 31 7d 27 2e 20 50 6c 65 61 73 65 20 63 .EntityContainer.'{1}'..Please.c
5b00 68 6f 6f 73 65 20 61 20 64 69 66 66 65 72 65 6e 74 20 6d 6f 64 65 6c 20 45 6e 74 69 74 79 43 6f hoose.a.different.model.EntityCo
5b20 6e 74 61 69 6e 65 72 20 6e 61 6d 65 2e 01 42 54 68 65 20 7b 30 7d 20 76 61 6c 75 65 20 27 7b 31 ntainer.name..BThe.{0}.value.'{1
5b40 7d 27 20 61 6c 72 65 61 64 79 20 65 78 69 73 74 73 20 69 6e 20 74 68 65 20 75 73 65 72 2d 64 65 }'.already.exists.in.the.user-de
5b60 66 69 6e 65 64 20 64 69 63 74 69 6f 6e 61 72 79 2e 01 1a 43 6f 75 6c 64 20 6e 6f 74 20 66 69 6e fined.dictionary...Could.not.fin
5b80 64 20 66 69 6c 65 20 27 7b 30 7d 27 2e 01 25 54 68 65 20 45 44 4d 20 53 63 68 65 6d 61 20 61 72 d.file.'{0}'..%The.EDM.Schema.ar
5ba0 67 75 6d 65 6e 74 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 2e 01 7a 49 6e 69 74 69 61 6c 69 7a 65 gument.is.not.valid..zInitialize
5bc0 73 20 61 20 6e 65 77 20 7b 30 7d 20 6f 62 6a 65 63 74 20 75 73 69 6e 67 20 74 68 65 20 63 6f 6e s.a.new.{0}.object.using.the.con
5be0 6e 65 63 74 69 6f 6e 20 73 74 72 69 6e 67 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 27 7b 31 7d nection.string.found.in.the.'{1}
5c00 27 20 73 65 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 63 6f 6e '.section.of.the.application.con
5c20 66 69 67 75 72 61 74 69 6f 6e 20 66 69 6c 65 2e 01 8d 01 54 68 65 20 73 74 6f 72 65 20 70 72 6f figuration.file....The.store.pro
5c40 76 69 64 65 72 20 66 61 63 74 6f 72 79 20 74 79 70 65 20 27 7b 30 7d 27 20 64 6f 65 73 20 6e 6f vider.factory.type.'{0}'.does.no
5c60 74 20 69 6d 70 6c 65 6d 65 6e 74 20 74 68 65 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 t.implement.the.IServiceProvider
5c80 20 69 6e 74 65 72 66 61 63 65 2e 20 55 73 65 20 61 20 73 74 6f 72 65 20 70 72 6f 76 69 64 65 72 .interface..Use.a.store.provider
5ca0 20 74 68 61 74 20 69 6d 70 6c 65 6d 65 6e 74 73 20 74 68 69 73 20 69 6e 74 65 72 66 61 63 65 2e .that.implements.this.interface.
5cc0 01 5f 54 68 65 20 73 70 65 63 69 66 69 65 64 20 73 74 6f 72 65 20 70 72 6f 76 69 64 65 72 20 27 ._The.specified.store.provider.'
5ce0 7b 30 7d 27 20 63 61 6e 6e 6f 74 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 6f 6e 66 {0}'.cannot.be.found.in.the.conf
5d00 69 67 75 72 61 74 69 6f 6e 2c 20 6f 72 20 27 7b 30 7d 27 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 iguration,.or.'{0}'.is.not.valid
5d20 2e 01 95 01 41 20 6e 75 6c 6c 20 77 61 73 20 72 65 74 75 72 6e 65 64 20 61 66 74 65 72 20 63 61 ....A.null.was.returned.after.ca
5d40 6c 6c 69 6e 67 20 74 68 65 20 27 7b 30 7d 27 20 6d 65 74 68 6f 64 20 6f 6e 20 61 20 73 74 6f 72 lling.the.'{0}'.method.on.a.stor
5d60 65 20 70 72 6f 76 69 64 65 72 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 79 70 65 20 27 7b 31 7d e.provider.instance.of.type.'{1}
5d80 27 2e 20 54 68 65 20 73 74 6f 72 65 20 70 72 6f 76 69 64 65 72 20 6d 69 67 68 74 20 6e 6f 74 20 '..The.store.provider.might.not.
5da0 62 65 20 66 75 6e 63 74 69 6f 6e 69 6e 67 20 63 6f 72 72 65 63 74 6c 79 2e 01 82 01 54 68 65 20 be.functioning.correctly....The.
5dc0 45 6e 74 69 74 79 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 20 69 73 20 6e 6f 74 20 66 6f 72 20 74 EntityCodeGenerator.is.not.for.t
5de0 61 72 67 65 74 69 6e 67 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f 6e 73 argeting.EntityFrameworkVersions
5e00 2e 56 65 72 73 69 6f 6e 31 2e 20 20 43 6f 6e 73 69 64 65 72 20 75 73 69 6e 67 20 45 6e 74 69 74 .Version1...Consider.using.Entit
5e20 79 43 6c 61 73 73 47 65 6e 65 72 61 74 6f 72 20 6f 72 20 61 20 74 65 6d 70 6c 61 74 65 2e 01 50 yClassGenerator.or.a.template..P
5e40 54 68 65 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 The.model.metadata.has.not.been.
5e60 67 65 6e 65 72 61 74 65 64 20 79 65 74 2e 20 43 61 6c 6c 20 47 65 6e 65 72 61 74 65 4d 6f 64 65 generated.yet..Call.GenerateMode
5e80 6c 4d 65 74 61 64 61 74 61 20 66 69 72 73 74 2e 01 7e 54 68 65 20 65 6e 74 69 74 79 20 73 65 74 lMetadata.first..~The.entity.set
5ea0 20 27 7b 30 7d 27 20 64 69 66 66 65 72 73 20 6f 6e 6c 79 20 69 6e 20 63 61 73 65 20 66 72 6f 6d .'{0}'.differs.only.in.case.from
5ec0 20 61 6e 20 65 78 69 73 74 69 6e 67 20 65 6e 74 69 74 79 20 73 65 74 2c 20 61 6e 64 20 69 73 20 .an.existing.entity.set,.and.is.
5ee0 6e 6f 74 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 not.compatible.with.the.current.
5f00 6c 61 6e 67 75 61 67 65 20 6f 70 74 69 6f 6e 2e 01 50 54 68 65 20 73 74 6f 72 65 20 6d 65 74 61 language.option..PThe.store.meta
5f20 64 61 74 61 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 67 65 6e 65 72 61 74 65 64 20 79 65 74 2e data.has.not.been.generated.yet.
5f40 20 43 61 6c 6c 20 47 65 6e 65 72 61 74 65 53 74 6f 72 65 4d 65 74 61 64 61 74 61 20 66 69 72 73 .Call.GenerateStoreMetadata.firs
5f60 74 2e 01 d5 01 45 6e 74 69 74 79 54 79 70 65 20 27 7b 30 7d 27 20 68 61 73 20 27 7b 31 7d 27 20 t....EntityType.'{0}'.has.'{1}'.
5f80 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 61 6e 64 20 45 6e 74 69 74 79 53 65 74 20 27 7b 32 7d accessibility.and.EntitySet.'{2}
5fa0 27 20 68 61 73 20 61 20 67 65 74 20 70 72 6f 70 65 72 74 79 20 77 69 74 68 20 27 7b 33 7d 27 20 '.has.a.get.property.with.'{3}'.
5fc0 61 63 63 65 73 73 69 62 69 6c 69 74 79 2e 20 54 68 65 20 67 65 74 20 70 72 6f 70 65 72 74 79 20 accessibility..The.get.property.
5fe0 6f 66 20 74 68 65 20 45 6e 74 69 74 79 53 65 74 20 6d 75 73 74 20 6e 6f 74 20 68 61 76 65 20 6c of.the.EntitySet.must.not.have.l
6000 65 73 73 20 72 65 73 74 72 69 63 74 69 76 65 20 61 63 63 65 73 73 20 74 68 61 6e 20 74 68 65 20 ess.restrictive.access.than.the.
6020 63 6f 6e 74 61 69 6e 69 6e 67 20 45 6e 74 69 74 79 54 79 70 65 20 68 61 73 2e 01 a8 01 54 68 65 containing.EntityType.has....The
6040 20 63 6f 6c 75 6d 6e 20 27 7b 30 7d 27 20 6f 6e 20 74 68 65 20 74 61 62 6c 65 2f 76 69 65 77 20 .column.'{0}'.on.the.table/view.
6060 27 7b 31 7d 27 20 77 61 73 20 65 78 63 6c 75 64 65 64 2c 20 61 6e 64 20 69 73 20 61 20 6b 65 79 '{1}'.was.excluded,.and.is.a.key
6080 20 63 6f 6c 75 6d 6e 2e 20 20 54 68 65 20 74 61 62 6c 65 2f 76 69 65 77 20 68 61 73 20 62 65 65 .column...The.table/view.has.bee
60a0 6e 20 65 78 63 6c 75 64 65 64 2e 20 20 50 6c 65 61 73 65 20 66 69 78 20 74 68 65 20 65 6e 74 69 n.excluded...Please.fix.the.enti
60c0 74 79 20 69 6e 20 74 68 65 20 73 63 68 65 6d 61 20 66 69 6c 65 2c 20 61 6e 64 20 75 6e 63 6f 6d ty.in.the.schema.file,.and.uncom
60e0 6d 65 6e 74 2e 01 99 01 54 68 65 20 63 6f 6c 75 6d 6e 20 27 7b 30 7d 27 20 6f 6e 20 74 68 65 20 ment....The.column.'{0}'.on.the.
6100 74 61 62 6c 65 2f 76 69 65 77 20 27 7b 31 7d 27 20 77 61 73 20 65 78 63 6c 75 64 65 64 2c 20 61 table/view.'{1}'.was.excluded,.a
6120 6e 64 20 69 73 20 61 20 6b 65 79 20 63 6f 6c 75 6d 6e 2e 20 20 54 68 65 20 72 65 6d 61 69 6e 69 nd.is.a.key.column...The.remaini
6140 6e 67 20 6b 65 79 28 73 29 20 77 65 72 65 20 75 73 65 64 20 61 6e 64 20 74 61 62 6c 65 2f 76 69 ng.key(s).were.used.and.table/vi
6160 65 77 20 68 61 73 20 62 65 65 6e 20 63 72 65 61 74 65 64 20 61 73 20 72 65 61 64 2d 6f 6e 6c 79 ew.has.been.created.as.read-only
6180 2e 01 18 43 72 65 61 74 65 20 61 20 6e 65 77 20 7b 30 7d 20 6f 62 6a 65 63 74 2e 01 15 49 6e 69 ...Create.a.new.{0}.object...Ini
61a0 74 69 61 6c 20 76 61 6c 75 65 20 6f 66 20 7b 30 7d 2e 01 4f 54 68 65 20 6d 65 6d 62 65 72 20 27 tial.value.of.{0}..OThe.member.'
61c0 7b 30 7d 27 20 6f 6e 20 74 68 65 20 74 79 70 65 20 27 7b 31 7d 27 20 63 6f 6e 66 6c 69 63 74 73 {0}'.on.the.type.'{1}'.conflicts
61e0 20 77 69 74 68 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 66 61 63 74 6f 72 79 20 6d 65 74 68 .with.the.generated.factory.meth
6200 6f 64 2e 01 8a 01 54 68 65 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 27 7b 30 od....The.NavigationProperty.'{0
6220 7d 27 20 6f 6e 20 74 68 65 20 74 79 70 65 20 27 7b 31 7d 27 20 69 73 20 74 68 65 20 73 6f 75 72 }'.on.the.type.'{1}'.is.the.sour
6240 63 65 20 6f 66 20 61 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 70 65 72 74 79 20 27 7b 32 7d 27 ce.of.a.generated.property.'{2}'
6260 20 77 68 69 63 68 20 63 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 61 20 6d 65 6d 62 65 72 20 6f .which.conflicts.with.a.member.o
6280 66 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 2e 01 98 01 50 72 6f 70 65 72 74 79 20 27 7b 30 7d f.the.same.name....Property.'{0}
62a0 27 20 68 61 73 20 27 7b 31 7d 27 20 47 65 74 20 70 72 6f 70 65 72 74 79 20 61 6e 64 20 27 7b 32 '.has.'{1}'.Get.property.and.'{2
62c0 7d 27 20 53 65 74 20 70 72 6f 70 65 72 74 79 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 73 70 }'.Set.property.accessibility.sp
62e0 65 63 69 66 69 65 64 2e 20 7b 31 7d 20 61 6e 64 20 7b 32 7d 20 6d 6f 64 69 66 69 65 72 73 20 63 ecified..{1}.and.{2}.modifiers.c
6300 61 6e 6e 6f 74 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 77 69 74 68 69 6e 20 61 20 73 69 6e 67 6c annot.be.combined.within.a.singl
6320 65 20 50 72 6f 70 65 72 74 79 2e 01 30 54 68 65 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 20 e.Property..0The.method.returns.
6340 74 68 65 20 76 69 65 77 20 66 6f 72 20 74 68 65 20 69 6e 64 65 78 20 67 69 76 65 6e 2e 01 13 72 the.view.for.the.index.given...r
6360 65 74 75 72 6e 20 76 69 65 77 20 66 6f 72 20 7b 30 7d 01 3e 54 68 65 20 63 75 73 74 6f 6d 20 61 eturn.view.for.{0}.>The.custom.a
6380 74 74 72 69 62 75 74 65 20 73 75 70 70 6c 69 65 64 20 66 6f 72 20 70 72 6f 70 65 72 74 79 20 27 ttribute.supplied.for.property.'
63a0 7b 30 7d 27 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 2e 01 3a 54 68 65 20 63 75 73 74 6f 6d 20 61 {0}'.is.not.valid..:The.custom.a
63c0 74 74 72 69 62 75 74 65 20 73 75 70 70 6c 69 65 64 20 66 6f 72 20 74 79 70 65 20 27 7b 30 7d 27 ttribute.supplied.for.type.'{0}'
63e0 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 2e 01 54 54 68 65 20 6d 6f 64 65 6c 45 6e 74 69 74 79 43 .is.not.valid..TThe.modelEntityC
6400 6f 6e 74 61 69 6e 65 72 4e 61 6d 65 20 70 61 72 61 6d 65 74 65 72 20 27 7b 30 7d 27 20 63 6f 6e ontainerName.parameter.'{0}'.con
6420 74 61 69 6e 73 20 63 68 61 72 61 63 74 65 72 73 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 76 61 tains.characters.that.are.not.va
6440 6c 69 64 2e 01 46 54 68 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 67 65 74 20 73 74 61 74 65 6d 65 lid..FThe.additional.get.stateme
6460 6e 74 20 73 75 70 70 6c 69 65 64 20 66 6f 72 20 70 72 6f 70 65 72 74 79 20 27 7b 30 7d 27 20 69 nt.supplied.for.property.'{0}'.i
6480 73 20 6e 6f 74 20 76 61 6c 69 64 2e 01 3e 54 68 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e 74 s.not.valid..>The.additional.int
64a0 65 72 66 61 63 65 20 73 75 70 70 6c 69 65 64 20 66 6f 72 20 74 79 70 65 20 27 7b 30 7d 27 20 69 erface.supplied.for.type.'{0}'.i
64c0 73 20 6e 6f 74 20 76 61 6c 69 64 2e 01 3b 54 68 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 6d 65 6d s.not.valid..;The.additional.mem
64e0 62 65 72 20 73 75 70 70 6c 69 65 64 20 66 6f 72 20 74 79 70 65 20 27 7b 30 7d 27 20 69 73 20 6e ber.supplied.for.type.'{0}'.is.n
6500 6f 74 20 76 61 6c 69 64 2e 01 49 54 68 65 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 70 61 72 ot.valid..IThe.namespaceName.par
6520 61 6d 65 74 65 72 20 27 7b 30 7d 27 20 63 6f 6e 74 61 69 6e 73 20 63 68 61 72 61 63 74 65 72 73 ameter.'{0}'.contains.characters
6540 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 76 61 6c 69 64 2e 01 39 54 68 65 20 45 6e 74 69 74 79 .that.are.not.valid..9The.Entity
6560 43 6f 6e 74 61 69 6e 65 72 20 27 7b 30 7d 27 20 69 73 20 6e 6f 74 20 61 20 73 74 6f 72 65 20 45 Container.'{0}'.is.not.a.store.E
6580 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 2e 01 46 54 68 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 ntityContainer..FThe.additional.
65a0 53 65 74 20 73 74 61 74 65 6d 65 6e 74 20 73 75 70 70 6c 69 65 64 20 66 6f 72 20 70 72 6f 70 65 Set.statement.supplied.for.prope
65c0 72 74 79 20 27 7b 30 7d 27 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 2e 01 3f 50 61 72 61 6d 65 74 rty.'{0}'.is.not.valid..?Paramet
65e0 65 72 20 27 7b 30 7d 27 20 69 73 20 6e 6f 74 20 76 61 6c 69 64 2e 20 53 74 72 69 6e 67 20 61 72 er.'{0}'.is.not.valid..String.ar
6600 67 75 6d 65 6e 74 73 20 63 61 6e 6e 6f 74 20 62 65 20 65 6d 70 74 79 2e 01 cf 01 54 68 65 20 74 guments.cannot.be.empty....The.t
6620 61 62 6c 65 2f 76 69 65 77 20 27 7b 30 7d 27 20 68 61 73 20 63 6f 6c 75 6d 6e 20 27 7b 31 7d 27 able/view.'{0}'.has.column.'{1}'
6640 20 64 65 66 69 6e 65 64 20 61 73 20 61 20 70 72 69 6d 61 72 79 20 6b 65 79 2c 20 62 75 74 20 74 .defined.as.a.primary.key,.but.t
6660 68 65 20 63 6f 6c 75 6d 6e 20 74 79 70 65 20 27 7b 32 7d 27 20 69 73 20 6e 6f 74 20 61 20 76 61 he.column.type.'{2}'.is.not.a.va
6680 6c 69 64 20 74 79 70 65 20 66 6f 72 20 61 20 6b 65 79 20 69 6e 20 74 68 65 20 45 44 4d 2e 20 41 lid.type.for.a.key.in.the.EDM..A
66a0 6e 20 61 74 74 65 6d 70 74 20 77 69 6c 6c 20 62 65 20 6d 61 64 65 20 74 6f 20 64 65 66 69 6e 65 n.attempt.will.be.made.to.define
66c0 20 74 68 65 20 74 61 62 6c 65 2f 76 69 65 77 20 61 73 20 61 20 72 65 61 64 2d 6f 6e 6c 79 20 74 .the.table/view.as.a.read-only.t
66e0 61 62 6c 65 2f 76 69 65 77 2e 01 70 54 68 65 20 7b 30 7d 20 27 7b 31 7d 27 20 64 69 66 66 65 72 able/view..pThe.{0}.'{1}'.differ
6700 73 20 6f 6e 6c 79 20 69 6e 20 63 61 73 65 20 66 72 6f 6d 20 61 6e 20 65 78 69 73 74 69 6e 67 20 s.only.in.case.from.an.existing.
6720 7b 30 7d 2c 20 61 6e 64 20 69 73 20 6e 6f 74 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 {0},.and.is.not.compatible.with.
6740 74 68 65 20 63 75 72 72 65 6e 74 20 6c 61 6e 67 75 61 67 65 20 6f 70 74 69 6f 6e 2e 01 1f 45 72 the.current.language.option...Er
6760 72 6f 72 73 20 46 6f 75 6e 64 20 44 75 72 69 6e 67 20 47 65 6e 65 72 61 74 69 6f 6e 3a 01 38 54 rors.Found.During.Generation:.8T
6780 68 65 72 65 20 61 72 65 20 6e 6f 20 63 6f 6d 6d 65 6e 74 73 20 66 6f 72 20 43 6f 6d 70 6c 65 78 here.are.no.comments.for.Complex
67a0 54 79 70 65 20 7b 30 7d 20 69 6e 20 74 68 65 20 73 63 68 65 6d 61 2e 01 2c 54 68 65 72 65 20 61 Type.{0}.in.the.schema..,There.a
67c0 72 65 20 6e 6f 20 63 6f 6d 6d 65 6e 74 73 20 66 6f 72 20 7b 30 7d 20 69 6e 20 74 68 65 20 73 63 re.no.comments.for.{0}.in.the.sc
67e0 68 65 6d 61 2e 01 24 54 68 65 72 65 20 61 72 65 20 6e 6f 20 63 6f 6d 6d 65 6e 74 73 20 69 6e 20 hema..$There.are.no.comments.in.
6800 74 68 65 20 73 63 68 65 6d 61 2e 01 35 54 68 65 72 65 20 61 72 65 20 6e 6f 20 63 6f 6d 6d 65 6e the.schema..5There.are.no.commen
6820 74 73 20 66 6f 72 20 70 72 6f 70 65 72 74 79 20 7b 30 7d 20 69 6e 20 74 68 65 20 73 63 68 65 6d ts.for.property.{0}.in.the.schem
6840 61 2e 01 46 54 68 65 20 47 6c 6f 62 61 6c 49 74 65 6d 20 6f 66 20 74 79 70 65 20 27 7b 30 7d 27 a..FThe.GlobalItem.of.type.'{0}'
6860 20 68 61 73 20 6e 6f 20 6d 6f 64 65 6c 20 67 65 6e 65 72 61 74 69 6f 6e 20 70 61 74 74 65 72 6e .has.no.model.generation.pattern
6880 73 20 64 65 66 69 6e 65 64 2e 01 2d 4f 72 69 67 69 6e 61 6c 20 66 69 6c 65 20 6e 61 6d 65 3a 20 s.defined..-Original.file.name:.
68a0 7b 30 7d 0a 47 65 6e 65 72 61 74 69 6f 6e 20 64 61 74 65 3a 20 7b 31 7d 0a 01 8d 01 54 68 65 20 {0}.Generation.date:.{1}....The.
68c0 74 61 62 6c 65 2f 76 69 65 77 20 27 7b 30 7d 27 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 61 table/view.'{0}'.does.not.have.a
68e0 20 70 72 69 6d 61 72 79 20 6b 65 79 20 64 65 66 69 6e 65 64 2e 20 54 68 65 20 6b 65 79 20 68 61 .primary.key.defined..The.key.ha
6900 73 20 62 65 65 6e 20 69 6e 66 65 72 72 65 64 20 61 6e 64 20 74 68 65 20 64 65 66 69 6e 69 74 69 s.been.inferred.and.the.definiti
6920 6f 6e 20 77 61 73 20 63 72 65 61 74 65 64 20 61 73 20 61 20 72 65 61 64 2d 6f 6e 6c 79 20 74 61 on.was.created.as.a.read-only.ta
6940 62 6c 65 2f 76 69 65 77 2e 01 34 54 68 65 20 76 61 6c 75 65 20 69 6e 20 74 68 65 20 70 61 72 61 ble/view..4The.value.in.the.para
6960 6d 65 74 65 72 20 7b 30 7d 20 61 74 20 69 6e 64 65 78 20 7b 31 7d 20 69 73 20 6e 75 6c 6c 2e 01 meter.{0}.at.index.{1}.is.null..
6980 8c 01 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 27 7b 30 7d 27 20 68 61 73 20 61 20 70 61 72 61 6d ..The.function.'{0}'.has.a.param
69a0 65 74 65 72 20 27 7b 31 7d 27 20 74 68 61 74 20 68 61 73 20 61 20 70 61 72 61 6d 65 74 65 72 20 eter.'{1}'.that.has.a.parameter.
69c0 64 69 72 65 63 74 69 6f 6e 20 76 61 6c 75 65 20 27 7b 32 7d 27 2c 20 77 68 69 63 68 20 69 73 20 direction.value.'{2}',.which.is.
69e0 6e 6f 74 20 76 61 6c 69 64 2e 20 50 6c 65 61 73 65 20 75 73 65 20 27 49 4e 27 2c 20 27 4f 55 54 not.valid..Please.use.'IN',.'OUT
6a00 27 2c 20 6f 72 20 27 49 4e 4f 55 54 27 2e 01 7a 54 68 65 20 70 72 6f 70 65 72 74 79 20 27 7b 30 ',.or.'INOUT'..zThe.property.'{0
6a20 7d 27 20 64 69 66 66 65 72 73 20 6f 6e 6c 79 20 69 6e 20 63 61 73 65 20 66 72 6f 6d 20 61 6e 20 }'.differs.only.in.case.from.an.
6a40 65 78 69 73 74 69 6e 67 20 70 72 6f 70 65 72 74 79 2c 20 61 6e 64 20 69 73 20 6e 6f 74 20 63 6f existing.property,.and.is.not.co
6a60 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 6c 61 6e 67 75 61 mpatible.with.the.current.langua
6a80 67 65 20 6f 70 74 69 6f 6e 2e 01 53 54 68 65 20 27 7b 30 7d 27 20 44 62 50 72 6f 76 69 64 65 72 ge.option..SThe.'{0}'.DbProvider
6aa0 46 61 63 74 6f 72 79 20 72 65 74 75 72 6e 65 64 20 61 20 6e 75 6c 6c 20 76 61 6c 75 65 20 66 72 Factory.returned.a.null.value.fr
6ac0 6f 6d 20 74 68 65 20 43 72 65 61 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 20 6d 65 74 68 6f 64 2e 01 om.the.CreateConnection.method..
6ae0 43 54 68 65 20 70 72 6f 76 69 64 65 72 20 72 65 74 75 72 6e 65 64 20 73 63 68 65 6d 61 20 6d 61 CThe.provider.returned.schema.ma
6b00 70 70 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 74 68 61 74 20 69 73 20 6e 6f 74 20 76 61 pping.information.that.is.not.va
6b20 6c 69 64 2e 01 3e 54 68 65 20 6e 61 6d 65 73 70 61 63 65 20 27 7b 30 7d 27 20 69 73 20 61 20 73 lid..>The.namespace.'{0}'.is.a.s
6b40 79 73 74 65 6d 20 6e 61 6d 65 73 70 61 63 65 2c 20 61 6e 64 20 63 61 6e 6e 6f 74 20 62 65 20 75 ystem.namespace,.and.cannot.be.u
6b60 73 65 64 2e 01 38 54 68 65 20 47 6c 6f 62 61 6c 49 74 65 6d 20 6f 66 20 74 79 70 65 20 27 7b 30 sed..8The.GlobalItem.of.type.'{0
6b80 7d 27 20 69 73 20 6e 6f 74 20 61 20 73 65 72 69 61 6c 69 7a 61 62 6c 65 20 74 79 70 65 2e 01 ed }'.is.not.a.serializable.type...
6ba0 01 46 6f 72 65 69 67 6e 20 6b 65 79 20 63 6f 6e 73 74 72 61 69 6e 74 20 27 7b 30 7d 27 20 68 61 .Foreign.key.constraint.'{0}'.ha
6bc0 73 20 62 65 65 6e 20 6f 6d 69 74 74 65 64 20 66 72 6f 6d 20 74 68 65 20 73 74 6f 72 61 67 65 20 s.been.omitted.from.the.storage.
6be0 6d 6f 64 65 6c 2e 20 43 6f 6c 75 6d 6e 20 27 7b 31 7d 27 20 6f 66 20 74 61 62 6c 65 20 27 7b 32 model..Column.'{1}'.of.table.'{2
6c00 7d 27 20 69 73 20 61 20 66 6f 72 65 69 67 6e 20 6b 65 79 20 70 61 72 74 69 63 69 70 61 74 69 6e }'.is.a.foreign.key.participatin
6c20 67 20 69 6e 20 6d 75 6c 74 69 70 6c 65 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 2e 20 41 20 6f g.in.multiple.relationships..A.o
6c40 6e 65 2d 74 6f 2d 6f 6e 65 20 45 6e 74 69 74 79 20 4d 6f 64 65 6c 20 77 69 6c 6c 20 6e 6f 74 20 ne-to-one.Entity.Model.will.not.
6c60 76 61 6c 69 64 61 74 65 20 73 69 6e 63 65 20 64 61 74 61 20 69 6e 63 6f 6e 73 69 73 74 65 6e 63 validate.since.data.inconsistenc
6c80 79 20 69 73 20 70 6f 73 73 69 62 6c 65 2e 01 4c 54 68 65 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c y.is.possible..LThe.StoreItemCol
6ca0 6c 65 63 74 69 6f 6e 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6d 75 73 74 20 63 6f 6e 74 61 69 6e 20 lection.collection.must.contain.
6cc0 65 78 61 63 74 6c 79 20 6f 6e 65 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 2e 01 34 54 68 exactly.one.EntityContainer..4Th
6ce0 65 20 76 61 6c 75 65 20 66 6f 72 20 63 6f 6c 75 6d 6e 20 27 7b 30 7d 27 20 69 6e 20 74 61 62 6c e.value.for.column.'{0}'.in.tabl
6d00 65 20 27 7b 31 7d 27 20 69 73 20 44 42 4e 75 6c 6c 2e 01 45 54 68 65 20 74 61 62 6c 65 20 27 7b e.'{1}'.is.DBNull..EThe.table.'{
6d20 30 7d 27 20 69 73 20 72 65 66 65 72 65 6e 63 65 64 20 62 79 20 61 20 72 65 6c 61 74 69 6f 6e 73 0}'.is.referenced.by.a.relations
6d40 68 69 70 2c 20 62 75 74 20 63 61 6e 6e 6f 74 20 62 65 20 66 6f 75 6e 64 2e 01 8e 02 54 68 65 20 hip,.but.cannot.be.found....The.
6d60 72 65 74 75 72 6e 20 74 61 62 6c 65 20 6f 66 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 27 7b 30 return.table.of.the.function.'{0
6d80 7d 27 20 69 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 2e 20 45 69 74 68 65 72 20 61 6c 6c 20 63 6f }'.is.not.defined..Either.all.co
6da0 6c 75 6d 6e 73 20 68 61 76 65 20 62 65 65 6e 20 65 78 63 6c 75 64 65 64 20 6f 72 20 74 68 65 20 lumns.have.been.excluded.or.the.
6dc0 74 61 62 6c 65 20 68 61 73 20 6e 6f 20 63 6f 6c 75 6d 6e 73 2e 20 54 68 65 20 66 75 6e 63 74 69 table.has.no.columns..The.functi
6de0 6f 6e 20 68 61 73 20 62 65 65 6e 20 65 78 63 6c 75 64 65 64 2e 20 54 6f 20 75 73 65 20 74 68 65 on.has.been.excluded..To.use.the
6e00 20 66 75 6e 63 74 69 6f 6e 2c 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 72 65 76 69 .function,.you.will.need.to.revi
6e20 65 77 20 79 6f 75 72 20 73 63 68 65 6d 61 2c 20 73 70 65 63 69 66 79 20 74 68 65 20 72 65 74 75 ew.your.schema,.specify.the.retu
6e40 72 6e 20 74 79 70 65 20 6f 66 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 2c 20 61 6e 64 20 75 6e 63 rn.type.of.the.function,.and.unc
6e60 6f 6d 6d 65 6e 74 20 69 74 2e 01 c3 01 54 68 65 20 45 6e 74 69 74 79 43 6c 61 73 73 47 65 6e 65 omment.it....The.EntityClassGene
6e80 72 61 74 6f 72 20 69 73 20 6f 6e 6c 79 20 66 6f 72 20 75 73 65 20 77 69 74 68 20 45 6e 74 69 74 rator.is.only.for.use.with.Entit
6ea0 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f 6e 73 2e 56 65 72 73 69 6f 6e 31 20 61 6e 64 20 yFrameworkVersions.Version1.and.
6ec0 74 68 65 20 73 63 68 65 6d 61 73 20 70 72 6f 76 69 64 65 64 20 68 61 76 65 20 6e 65 77 65 72 20 the.schemas.provided.have.newer.
6ee0 76 65 72 73 69 6f 6e 73 20 6f 66 20 74 68 65 20 4d 6f 64 65 6c 20 73 63 68 65 6d 61 2e 20 20 43 versions.of.the.Model.schema...C
6f00 6f 6e 73 69 64 65 72 20 75 73 69 6e 67 20 45 6e 74 69 74 79 43 6f 64 65 47 65 6e 65 72 61 74 6f onsider.using.EntityCodeGenerato
6f20 72 20 6f 72 20 61 20 74 65 6d 70 6c 61 74 65 2e 01 77 54 68 65 20 74 61 72 67 65 74 20 45 6e 74 r.or.a.template..wThe.target.Ent
6f40 69 74 79 20 46 72 61 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 ity.Framework.version.requires.t
6f60 68 65 20 65 64 6d 78 20 73 63 68 65 6d 61 20 76 65 72 73 69 6f 6e 20 7b 30 7d 20 6f 72 20 6c 6f he.edmx.schema.version.{0}.or.lo
6f80 77 65 72 2e 20 54 68 65 20 73 70 65 63 69 66 69 65 64 20 73 63 68 65 6d 61 20 69 73 20 76 65 72 wer..The.specified.schema.is.ver
6fa0 73 69 6f 6e 20 7b 31 7d 2e 01 80 01 54 68 65 20 45 6e 74 69 74 79 53 65 74 20 27 7b 30 7d 2e 7b sion.{1}....The.EntitySet.'{0}.{
6fc0 31 7d 27 20 64 69 66 66 65 72 73 20 6f 6e 6c 79 20 69 6e 20 63 61 73 65 20 66 72 6f 6d 20 61 6e 1}'.differs.only.in.case.from.an
6fe0 20 65 78 69 73 74 69 6e 67 20 45 6e 74 69 74 79 53 65 74 2c 20 61 6e 64 20 69 73 20 6e 6f 74 20 .existing.EntitySet,.and.is.not.
7000 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 6c 61 6e 67 compatible.with.the.current.lang
7020 75 61 67 65 20 6f 70 74 69 6f 6e 2e 01 7a 54 68 65 20 4d 65 6d 62 65 72 20 27 7b 30 7d 2e 7b 31 uage.option..zThe.Member.'{0}.{1
7040 7d 27 20 64 69 66 66 65 72 73 20 6f 6e 6c 79 20 69 6e 20 63 61 73 65 20 66 72 6f 6d 20 61 6e 20 }'.differs.only.in.case.from.an.
7060 65 78 69 73 74 69 6e 67 20 4d 65 6d 62 65 72 2c 20 61 6e 64 20 69 73 20 6e 6f 74 20 63 6f 6d 70 existing.Member,.and.is.not.comp
7080 61 74 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 6c 61 6e 67 75 61 67 65 atible.with.the.current.language
70a0 20 6f 70 74 69 6f 6e 2e 01 8f 01 54 68 65 20 54 79 70 65 20 27 7b 30 7d 27 20 69 73 20 6e 6f 74 .option....The.Type.'{0}'.is.not
70c0 20 75 6e 69 71 75 65 2e 20 20 54 68 69 73 20 6d 61 79 20 62 65 20 63 61 75 73 65 64 20 62 79 20 .unique...This.may.be.caused.by.
70e0 74 68 65 20 74 79 70 65 73 20 6f 6e 6c 79 20 64 69 66 66 65 72 69 6e 67 20 69 6e 20 63 61 73 65 the.types.only.differing.in.case
7100 20 77 68 69 63 68 20 69 73 20 6e 6f 74 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 74 68 .which.is.not.compatible.with.th
7120 65 20 63 75 72 72 65 6e 74 20 6c 61 6e 67 75 61 67 65 20 6f 70 74 69 6f 6e 2e 01 22 49 6e 69 74 e.current.language.option.."Init
7140 69 61 6c 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 7b 30 7d 20 70 72 6f 70 65 72 74 79 2e 01 24 ial.value.of.the.{0}.property..$
7160 4e 6f 20 4d 65 74 61 64 61 74 61 20 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 61 76 61 69 6c 61 No.Metadata.Documentation.availa
7180 62 6c 65 2e 01 8a 01 54 68 65 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 27 7b ble....The.NavigationProperty.'{
71a0 30 7d 27 20 6f 6e 20 74 68 65 20 74 79 70 65 20 27 7b 31 7d 27 20 69 73 20 74 68 65 20 73 6f 75 0}'.on.the.type.'{1}'.is.the.sou
71c0 72 63 65 20 6f 66 20 61 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 70 65 72 74 79 20 27 7b 32 7d rce.of.a.generated.property.'{2}
71e0 27 20 77 68 69 63 68 20 63 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 61 20 6d 65 6d 62 65 72 20 '.which.conflicts.with.a.member.
7200 6f 66 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 2e 01 1c 49 6e 69 74 69 61 6c 69 7a 65 20 61 20 of.the.same.name...Initialize.a.
7220 6e 65 77 20 7b 30 7d 20 6f 62 6a 65 63 74 2e 01 7a 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 20 6e new.{0}.object..zInitializes.a.n
7240 65 77 20 7b 30 7d 20 6f 62 6a 65 63 74 20 75 73 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 ew.{0}.object.using.the.connecti
7260 6f 6e 20 73 74 72 69 6e 67 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 27 7b 31 7d 27 20 73 65 63 on.string.found.in.the.'{1}'.sec
7280 74 69 6f 6e 20 6f 66 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 tion.of.the.application.configur
72a0 61 74 69 6f 6e 20 66 69 6c 65 2e 01 1a 43 75 72 72 65 6e 74 6c 79 20 52 75 6e 6e 69 6e 67 20 54 ation.file...Currently.Running.T
72c0 65 6d 70 6c 61 74 65 01 80 01 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 27 7b 30 7d 27 20 69 73 emplate...The.type.name.'{0}'.is
72e0 20 75 73 65 64 20 66 6f 72 20 62 6f 74 68 20 61 6e 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 .used.for.both.an.EntityContaine
7300 72 20 61 6e 64 20 61 20 74 79 70 65 2e 20 20 44 75 70 6c 69 63 61 74 65 73 20 61 72 65 20 6e 6f r.and.a.type...Duplicates.are.no
7320 74 20 61 6c 6c 6f 77 65 64 2c 20 70 6c 65 61 73 65 20 63 68 61 6e 67 65 20 6f 6e 65 20 6f 66 20 t.allowed,.please.change.one.of.
7340 74 68 65 20 6e 61 6d 65 73 2e 01 18 43 72 65 61 74 65 20 61 20 6e 65 77 20 7b 30 7d 20 6f 62 6a the.names...Create.a.new.{0}.obj
7360 65 63 74 2e 01 4f 54 68 65 20 6d 65 6d 62 65 72 20 27 7b 30 7d 27 20 6f 6e 20 74 68 65 20 74 79 ect..OThe.member.'{0}'.on.the.ty
7380 70 65 20 27 7b 31 7d 27 20 63 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 74 68 65 20 67 65 6e 65 pe.'{1}'.conflicts.with.the.gene
73a0 72 61 74 65 64 20 66 61 63 74 6f 72 79 20 6d 65 74 68 6f 64 2e 01 95 01 44 65 70 72 65 63 61 74 rated.factory.method....Deprecat
73c0 65 64 20 4d 65 74 68 6f 64 20 66 6f 72 20 61 64 64 69 6e 67 20 61 20 6e 65 77 20 6f 62 6a 65 63 ed.Method.for.adding.a.new.objec
73e0 74 20 74 6f 20 74 68 65 20 7b 30 7d 20 45 6e 74 69 74 79 53 65 74 2e 20 43 6f 6e 73 69 64 65 72 t.to.the.{0}.EntitySet..Consider
7400 20 75 73 69 6e 67 20 74 68 65 20 2e 41 64 64 20 6d 65 74 68 6f 64 20 6f 66 20 74 68 65 20 61 73 .using.the..Add.method.of.the.as
7420 73 6f 63 69 61 74 65 64 20 4f 62 6a 65 63 74 53 65 74 26 6c 74 3b 54 26 67 74 3b 20 70 72 6f 70 sociated.ObjectSet&lt;T&gt;.prop
7440 65 72 74 79 20 69 6e 73 74 65 61 64 2e 01 92 01 44 65 70 72 65 63 61 74 65 64 20 4d 65 74 68 6f erty.instead....Deprecated.Metho
7460 64 20 66 6f 72 20 61 64 64 69 6e 67 20 61 20 6e 65 77 20 6f 62 6a 65 63 74 20 74 6f 20 74 68 65 d.for.adding.a.new.object.to.the
7480 20 7b 30 7d 20 45 6e 74 69 74 79 53 65 74 2e 20 43 6f 6e 73 69 64 65 72 20 75 73 69 6e 67 20 74 .{0}.EntitySet..Consider.using.t
74a0 68 65 20 2e 41 64 64 20 6d 65 74 68 6f 64 20 6f 66 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 he..Add.method.of.the.associated
74c0 20 4f 62 6a 65 63 74 53 65 74 28 4f 66 20 54 29 20 70 72 6f 70 65 72 74 79 20 69 6e 73 74 65 61 .ObjectSet(Of.T).property.instea
74e0 64 2e 01 2b 20 20 20 54 68 69 73 20 63 6f 64 65 20 77 61 73 20 67 65 6e 65 72 61 74 65 64 20 66 d..+...This.code.was.generated.f
7500 72 6f 6d 20 61 20 74 65 6d 70 6c 61 74 65 2e 01 51 20 20 20 4d 61 6e 75 61 6c 20 63 68 61 6e 67 rom.a.template..Q...Manual.chang
7520 65 73 20 74 6f 20 74 68 69 73 20 66 69 6c 65 20 6d 61 79 20 63 61 75 73 65 20 75 6e 65 78 70 65 es.to.this.file.may.cause.unexpe
7540 63 74 65 64 20 62 65 68 61 76 69 6f 72 20 69 6e 20 79 6f 75 72 20 61 70 70 6c 69 63 61 74 69 6f cted.behavior.in.your.applicatio
7560 6e 2e 01 4e 20 20 20 4d 61 6e 75 61 6c 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 69 73 20 66 69 n..N...Manual.changes.to.this.fi
7580 6c 65 20 77 69 6c 6c 20 62 65 20 6f 76 65 72 77 72 69 74 74 65 6e 20 69 66 20 74 68 65 20 63 6f le.will.be.overwritten.if.the.co
75a0 64 65 20 69 73 20 72 65 67 65 6e 65 72 61 74 65 64 2e 01 0d 41 64 64 54 6f 20 4d 65 74 68 6f 64 de.is.regenerated...AddTo.Method
75c0 73 01 12 43 6f 6d 70 6c 65 78 20 50 72 6f 70 65 72 74 69 65 73 01 0c 43 6f 6d 70 6c 65 78 54 79 s..Complex.Properties..ComplexTy
75e0 70 65 73 01 0c 43 6f 6e 73 74 72 75 63 74 6f 72 73 01 08 43 6f 6e 74 65 78 74 73 01 08 45 6e 74 pes..Constructors..Contexts..Ent
7600 69 74 69 65 73 01 05 45 6e 75 6d 73 01 0e 46 61 63 74 6f 72 79 20 4d 65 74 68 6f 64 01 10 46 75 ities..Enums..Factory.Method..Fu
7620 6e 63 74 69 6f 6e 20 49 6d 70 6f 72 74 73 01 15 4e 61 76 69 67 61 74 69 6f 6e 20 50 72 6f 70 65 nction.Imports..Navigation.Prope
7640 72 74 69 65 73 01 14 4f 62 6a 65 63 74 53 65 74 20 50 72 6f 70 65 72 74 69 65 73 01 0f 50 61 72 rties..ObjectSet.Properties..Par
7660 74 69 61 6c 20 4d 65 74 68 6f 64 73 01 14 50 72 69 6d 69 74 69 76 65 20 50 72 6f 70 65 72 74 69 tial.Methods..Primitive.Properti
7680 65 73 01 19 45 44 4d 20 52 65 6c 61 74 69 6f 6e 73 68 69 70 20 4d 65 74 61 64 61 74 61 01 11 53 es..EDM.Relationship.Metadata..S
76a0 69 6d 70 6c 65 20 50 72 6f 70 65 72 74 69 65 73 01 80 01 50 6c 65 61 73 65 20 6f 76 65 72 77 72 imple.Properties...Please.overwr
76c0 69 74 65 20 74 68 65 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 74 6f 6b 65 6e 20 27 24 65 64 6d 78 ite.the.replacement.token.'$edmx
76e0 49 6e 70 75 74 46 69 6c 65 24 27 20 77 69 74 68 20 74 68 65 20 61 63 74 75 61 6c 20 6e 61 6d 65 InputFile$'.with.the.actual.name
7700 20 6f 66 20 74 68 65 20 2e 65 64 6d 78 20 66 69 6c 65 20 79 6f 75 20 77 6f 75 6c 64 20 6c 69 6b .of.the..edmx.file.you.would.lik
7720 65 20 74 6f 20 67 65 6e 65 72 61 74 65 20 66 72 6f 6d 2e 01 b4 01 54 68 65 20 69 6e 70 75 74 20 e.to.generate.from....The.input.
7740 66 69 6c 65 20 61 70 70 65 61 72 73 20 74 6f 20 62 65 20 75 73 69 6e 67 20 61 20 73 63 68 65 6d file.appears.to.be.using.a.schem
7760 61 20 76 65 72 73 69 6f 6e 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 74 68 69 73 20 a.version.not.supported.by.this.
7780 74 65 6d 70 6c 61 74 65 2e 20 54 68 69 73 20 6d 61 79 20 6c 65 61 64 20 74 6f 20 63 6f 6d 70 69 template..This.may.lead.to.compi
77a0 6c 65 20 65 72 72 6f 72 73 2e 20 50 6c 65 61 73 65 20 75 73 65 20 27 41 64 64 20 4e 65 77 20 47 le.errors..Please.use.'Add.New.G
77c0 65 6e 65 72 61 74 65 64 20 49 74 65 6d 27 20 74 6f 20 61 64 64 20 61 6e 20 75 70 64 61 74 65 64 enerated.Item'.to.add.an.updated
77e0 20 74 65 6d 70 6c 61 74 65 2e 01 5e 54 68 65 20 74 79 70 65 20 63 6f 6e 74 61 69 6e 73 20 76 69 .template..^The.type.contains.vi
7800 65 77 73 20 66 6f 72 20 45 6e 74 69 74 79 53 65 74 73 20 61 6e 64 20 41 73 73 6f 63 69 61 74 69 ews.for.EntitySets.and.Associati
7820 6f 6e 53 65 74 73 20 74 68 61 74 20 77 65 72 65 20 67 65 6e 65 72 61 74 65 64 20 61 74 20 64 65 onSets.that.were.generated.at.de
7840 73 69 67 6e 20 74 69 6d 65 2e 01 5e 46 6f 72 65 69 67 6e 20 6b 65 79 73 20 6d 61 79 20 6f 6e 6c sign.time..^Foreign.keys.may.onl
7860 79 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 77 68 65 6e 20 74 61 72 67 65 74 69 6e 67 20 76 65 y.be.generated.when.targeting.ve
7880 72 73 69 6f 6e 20 34 2e 30 20 6f 66 20 74 68 65 20 2e 4e 45 54 20 46 72 61 6d 65 77 6f 72 6b 20 rsion.4.0.of.the..NET.Framework.
78a0 6f 72 20 68 69 67 68 65 72 2e 01 b8 01 55 6e 61 62 6c 65 20 74 6f 20 67 65 6e 65 72 61 74 65 20 or.higher....Unable.to.generate.
78c0 66 75 6e 63 74 69 6f 6e 20 69 6d 70 6f 72 74 20 70 61 72 61 6d 65 74 65 72 20 6e 61 6d 65 20 66 function.import.parameter.name.f
78e0 6f 72 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 20 27 7b 30 7d 27 20 6f 66 20 74 68 65 20 73 74 or.the.parameter.'{0}'.of.the.st
7900 6f 72 65 20 66 75 6e 63 74 69 6f 6e 20 27 7b 31 7d 27 2e 20 54 68 65 20 73 74 6f 72 65 20 66 75 ore.function.'{1}'..The.store.fu
7920 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 69 67 6e 6f 72 65 64 20 61 6e 64 20 74 68 65 20 66 nction.will.be.ignored.and.the.f
7940 75 6e 63 74 69 6f 6e 20 69 6d 70 6f 72 74 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 67 65 6e 65 72 unction.import.will.not.be.gener
7960 61 74 65 64 2e 01 7b 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 69 6d 70 6f 72 74 20 27 7b 30 7d 27 ated..{The.function.import.'{0}'
7980 20 69 73 20 6e 6f 74 20 6d 61 70 70 65 64 20 74 6f 20 61 20 73 74 6f 72 65 20 66 75 6e 63 74 69 .is.not.mapped.to.a.store.functi
79a0 6f 6e 2e 20 41 20 66 75 6e 63 74 69 6f 6e 20 69 6d 70 6f 72 74 20 6e 65 65 64 73 20 74 6f 20 62 on..A.function.import.needs.to.b
79c0 65 20 6d 61 70 70 65 64 20 66 6f 72 20 73 75 63 63 65 73 73 66 75 6c 20 65 78 65 63 75 74 69 6f e.mapped.for.successful.executio
79e0 6e 2e 01 83 01 54 68 65 20 64 61 74 61 20 74 79 70 65 20 27 7b 30 7d 27 20 69 73 20 63 75 72 72 n....The.data.type.'{0}'.is.curr
7a00 65 6e 74 6c 79 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 65 20 74 61 72 67 ently.not.supported.for.the.targ
7a20 65 74 20 2e 4e 45 54 20 46 72 61 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 3b 20 74 68 65 20 63 et..NET.Framework.version;.the.c
7a40 6f 6c 75 6d 6e 20 27 7b 32 7d 27 20 69 6e 20 74 61 62 6c 65 20 27 7b 31 7d 27 20 77 61 73 20 65 olumn.'{2}'.in.table.'{1}'.was.e
7a60 78 63 6c 75 64 65 64 2e 01 d1 01 54 68 65 20 64 61 74 61 20 74 79 70 65 20 27 7b 30 7d 27 20 69 xcluded....The.data.type.'{0}'.i
7a80 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 65 20 74 61 72 67 65 74 20 2e s.not.supported.for.the.target..
7aa0 4e 45 54 20 46 72 61 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 2e 20 54 68 65 20 63 6f 6c 75 6d NET.Framework.version..The.colum
7ac0 6e 20 27 7b 32 7d 27 20 69 6e 20 74 68 65 20 74 61 62 6c 65 20 27 7b 31 7d 27 20 77 61 73 20 65 n.'{2}'.in.the.table.'{1}'.was.e
7ae0 78 63 6c 75 64 65 64 20 66 72 6f 6d 20 74 68 65 20 6d 6f 64 65 6c 2e 20 54 6f 20 75 73 65 20 74 xcluded.from.the.model..To.use.t
7b00 68 65 20 64 61 74 61 20 74 79 70 65 20 27 7b 30 7d 27 2c 20 74 61 72 67 65 74 20 74 68 65 20 2e he.data.type.'{0}',.target.the..
7b20 4e 45 54 20 46 72 61 6d 65 77 6f 72 6b 20 34 2e 35 20 6f 72 20 68 69 67 68 65 72 2e 01 6d 54 68 NET.Framework.4.5.or.higher..mTh
7b40 65 20 64 61 74 61 20 74 79 70 65 20 6f 66 20 74 68 65 20 63 6f 6c 75 6d 6e 20 27 7b 30 7d 27 20 e.data.type.of.the.column.'{0}'.
7b60 69 73 20 63 75 72 72 65 6e 74 6c 79 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 73 6f 20 74 68 is.currently.not.supported.so.th
7b80 65 20 63 6f 6c 75 6d 6e 20 27 7b 30 7d 27 20 69 6e 20 74 61 62 6c 65 20 27 7b 31 7d 27 20 77 61 e.column.'{0}'.in.table.'{1}'.wa
7ba0 73 20 65 78 63 6c 75 64 65 64 2e 01 94 01 54 68 65 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 20 27 s.excluded....The.relationship.'
7bc0 7b 30 7d 27 20 68 61 73 20 63 6f 6c 75 6d 6e 73 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 70 61 {0}'.has.columns.that.are.not.pa
7be0 72 74 20 6f 66 20 74 68 65 20 6b 65 79 20 6f 66 20 74 68 65 20 74 61 62 6c 65 20 6f 6e 20 74 68 rt.of.the.key.of.the.table.on.th
7c00 65 20 70 72 69 6d 61 72 79 20 73 69 64 65 20 6f 66 20 74 68 65 20 72 65 6c 61 74 69 6f 6e 73 68 e.primary.side.of.the.relationsh
7c20 69 70 2e 20 54 68 65 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 20 77 61 73 20 65 78 63 6c 75 64 65 ip..The.relationship.was.exclude
7c40 64 2e 01 a3 02 54 68 65 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 20 27 7b 30 7d 27 20 75 73 65 73 d....The.relationship.'{0}'.uses
7c60 20 74 68 65 20 73 65 74 20 6f 66 20 66 6f 72 65 69 67 6e 20 6b 65 79 73 20 27 7b 31 7d 27 20 74 .the.set.of.foreign.keys.'{1}'.t
7c80 68 61 74 20 61 72 65 20 70 61 72 74 69 61 6c 6c 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 hat.are.partially.contained.in.t
7ca0 68 65 20 73 65 74 20 6f 66 20 70 72 69 6d 61 72 79 20 6b 65 79 73 20 27 7b 32 7d 27 20 6f 66 20 he.set.of.primary.keys.'{2}'.of.
7cc0 74 68 65 20 74 61 62 6c 65 20 27 7b 33 7d 27 2e 20 20 54 68 65 20 73 65 74 20 6f 66 20 66 6f 72 the.table.'{3}'...The.set.of.for
7ce0 65 69 67 6e 20 6b 65 79 73 20 6d 75 73 74 20 62 65 20 66 75 6c 6c 79 20 63 6f 6e 74 61 69 6e 65 eign.keys.must.be.fully.containe
7d00 64 20 69 6e 20 74 68 65 20 73 65 74 20 6f 66 20 70 72 69 6d 61 72 79 20 6b 65 79 73 2c 20 6f 72 d.in.the.set.of.primary.keys,.or
7d20 20 66 75 6c 6c 79 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 73 65 74 20 .fully.not.contained.in.the.set.
7d40 6f 66 20 70 72 69 6d 61 72 79 20 6b 65 79 73 20 74 6f 20 62 65 20 6d 61 70 70 65 64 20 74 6f 20 of.primary.keys.to.be.mapped.to.
7d60 61 20 6d 6f 64 65 6c 2e 01 bd 01 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 27 7b 30 7d 27 20 68 61 a.model....The.function.'{0}'.ha
7d80 73 20 61 20 70 61 72 61 6d 65 74 65 72 20 27 7b 31 7d 27 20 61 74 20 70 61 72 61 6d 65 74 65 72 s.a.parameter.'{1}'.at.parameter
7da0 20 69 6e 64 65 78 20 7b 32 7d 20 74 68 61 74 20 68 61 73 20 61 20 64 61 74 61 20 74 79 70 65 20 .index.{2}.that.has.a.data.type.
7dc0 27 7b 33 7d 27 20 77 68 69 63 68 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 6e 6f 74 20 73 75 70 '{3}'.which.is.currently.not.sup
7de0 70 6f 72 74 65 64 20 66 6f 72 20 74 68 65 20 74 61 72 67 65 74 20 2e 4e 45 54 20 46 72 61 6d 65 ported.for.the.target..NET.Frame
7e00 77 6f 72 6b 20 76 65 72 73 69 6f 6e 2e 20 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 77 61 73 20 65 work.version..The.function.was.e
7e20 78 63 6c 75 64 65 64 2e 01 8f 02 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 27 7b 30 7d 27 20 68 61 xcluded....The.function.'{0}'.ha
7e40 73 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 20 27 7b 31 7d 27 20 61 74 20 74 68 65 20 70 61 72 s.the.parameter.'{1}'.at.the.par
7e60 61 6d 65 74 65 72 20 69 6e 64 65 78 20 7b 32 7d 20 74 68 61 74 20 68 61 73 20 74 68 65 20 64 61 ameter.index.{2}.that.has.the.da
7e80 74 61 20 74 79 70 65 20 27 7b 33 7d 27 20 77 68 69 63 68 20 69 73 20 6e 6f 74 20 73 75 70 70 6f ta.type.'{3}'.which.is.not.suppo
7ea0 72 74 65 64 20 66 6f 72 20 74 68 65 20 74 61 72 67 65 74 20 2e 4e 45 54 20 46 72 61 6d 65 77 6f rted.for.the.target..NET.Framewo
7ec0 72 6b 20 76 65 72 73 69 6f 6e 2e 20 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 77 61 73 20 65 78 63 rk.version..The.function.was.exc
7ee0 6c 75 64 65 64 20 66 72 6f 6d 20 74 68 65 20 6d 6f 64 65 6c 2e 20 54 6f 20 75 73 65 20 74 68 65 luded.from.the.model..To.use.the
7f00 20 64 61 74 61 20 74 79 70 65 20 27 7b 30 7d 27 2c 20 74 61 72 67 65 74 20 74 68 65 20 2e 4e 45 .data.type.'{0}',.target.the..NE
7f20 54 20 46 72 61 6d 65 77 6f 72 6b 20 34 2e 35 20 6f 72 20 68 69 67 68 65 72 2e 01 91 01 54 68 65 T.Framework.4.5.or.higher....The
7f40 20 66 75 6e 63 74 69 6f 6e 20 27 7b 30 7d 27 20 68 61 73 20 61 20 72 65 74 75 72 6e 20 64 61 74 .function.'{0}'.has.a.return.dat
7f60 61 20 74 79 70 65 20 27 7b 31 7d 27 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 6e a.type.'{1}'.that.is.currently.n
7f80 6f 74 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 65 20 74 61 72 67 65 74 20 2e 4e 45 54 ot.supported.for.the.target..NET
7fa0 20 46 72 61 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 2e 20 54 68 65 20 66 75 6e 63 74 69 6f 6e .Framework.version..The.function
7fc0 20 77 61 73 20 65 78 63 6c 75 64 65 64 2e 01 da 01 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 27 7b .was.excluded....The.function.'{
7fe0 30 7d 27 20 72 65 74 75 72 6e 73 20 74 68 65 20 64 61 74 61 20 74 79 70 65 20 27 7b 31 7d 27 20 0}'.returns.the.data.type.'{1}'.
8000 74 68 61 74 20 69 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 74 68 65 20 74 61 that.is.not.supported.for.the.ta
8020 72 67 65 74 20 2e 4e 45 54 20 46 72 61 6d 65 77 6f 72 6b 20 76 65 72 73 69 6f 6e 2e 20 54 68 65 rget..NET.Framework.version..The
8040 20 66 75 6e 63 74 69 6f 6e 20 77 61 73 20 65 78 63 6c 75 64 65 64 20 66 72 6f 6d 20 74 68 65 20 .function.was.excluded.from.the.
8060 6d 6f 64 65 6c 2e 20 54 6f 20 75 73 65 20 74 68 65 20 64 61 74 61 20 74 79 70 65 20 27 7b 30 7d model..To.use.the.data.type.'{0}
8080 27 2c 20 74 61 72 67 65 74 20 74 68 65 20 2e 4e 45 54 20 46 72 61 6d 65 77 6f 72 6b 20 34 2e 35 ',.target.the..NET.Framework.4.5
80a0 20 6f 72 20 68 69 67 68 65 72 2e 01 69 54 68 65 20 63 75 6c 74 75 72 65 20 27 7b 30 7d 27 20 69 .or.higher..iThe.culture.'{0}'.i
80c0 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 2e 20 20 20 50 6c 75 72 61 6c 69 7a 61 74 69 6f 6e s.not.supported....Pluralization
80e0 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 .is.currently.only.supported.for
8100 20 74 68 65 20 45 6e 67 6c 69 73 68 20 6c 61 6e 67 75 61 67 65 2e 01 e0 01 54 68 65 20 45 6e 74 .the.English.language....The.Ent
8120 69 74 79 53 65 74 4d 61 70 70 69 6e 67 20 69 6e 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 itySetMapping.in.EntityContainer
8140 4d 61 70 70 69 6e 67 20 66 6f 72 20 65 6e 74 69 74 79 20 63 6f 6e 74 61 69 6e 65 72 20 27 7b 30 Mapping.for.entity.container.'{0
8160 7d 27 20 63 6f 6e 74 61 69 6e 73 20 61 20 71 75 65 72 79 20 76 69 65 77 2e 20 51 75 65 72 79 20 }'.contains.a.query.view..Query.
8180 76 69 65 77 73 20 61 72 65 20 6e 6f 74 20 61 6c 6c 6f 77 65 64 20 69 6e 20 63 6f 6d 70 69 6c 65 views.are.not.allowed.in.compile
81a0 20 74 69 6d 65 20 76 69 65 77 20 67 65 6e 65 72 61 74 69 6f 6e 2c 20 73 6f 20 74 68 65 20 76 69 .time.view.generation,.so.the.vi
81c0 65 77 20 66 6f 72 20 74 68 69 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 4d 61 70 70 69 ew.for.this.EntityContainerMappi
81e0 6e 67 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 67 65 6e 65 72 61 74 65 64 2e 00 00 00 00 00 00 00 ng.will.not.be.generated........
8200 29 8d 02 00 2f 2f 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d )...//.-------------------------
8220 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8240 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 2f 2f 20 3c 61 75 74 6f 2d ---------------------..//.<auto-
8260 67 65 6e 65 72 61 74 65 64 3e 0d 0a 2f 2f 20 20 20 20 20 54 68 69 73 20 63 6f 64 65 20 77 61 73 generated>..//.....This.code.was
8280 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 61 20 74 6f 6f 6c 2e 0d 0a 2f 2f 20 20 20 20 20 52 75 .generated.by.a.tool...//.....Ru
82a0 6e 74 69 6d 65 20 56 65 72 73 69 6f 6e 3a 20 31 31 2e 30 2e 30 2e 30 0d 0a 2f 2f 20 20 0d 0a 2f ntime.Version:.11.0.0.0..//..../
82c0 2f 20 20 20 20 20 43 68 61 6e 67 65 73 20 74 6f 20 74 68 69 73 20 66 69 6c 65 20 6d 61 79 20 63 /.....Changes.to.this.file.may.c
82e0 61 75 73 65 20 69 6e 63 6f 72 72 65 63 74 20 62 65 68 61 76 69 6f 72 20 61 6e 64 20 77 69 6c 6c ause.incorrect.behavior.and.will
8300 20 62 65 20 6c 6f 73 74 20 69 66 0d 0a 2f 2f 20 20 20 20 20 74 68 65 20 63 6f 64 65 20 69 73 20 .be.lost.if..//.....the.code.is.
8320 72 65 67 65 6e 65 72 61 74 65 64 2e 0d 0a 2f 2f 20 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 regenerated...//.</auto-generate
8340 64 3e 0d 0a 2f 2f 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d d>..//.-------------------------
8360 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8380 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 6e 61 6d 65 73 70 61 63 65 ---------------------..namespace
83a0 20 54 65 6d 70 6c 61 74 65 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 73 0d 0a 7b 0d 0a 20 20 20 20 .TemplateCodeGenerators..{......
83c0 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e using.System;......using.System.
83e0 4c 69 6e 71 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 49 4f 3b 0d 0a 20 20 20 Linq;......using.System.IO;.....
8400 20 75 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 .using.System.Collections.Generi
8420 63 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 c;......using.System.Data.Object
8440 73 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 s;......using.System.Data.Object
8460 73 2e 44 61 74 61 43 6c 61 73 73 65 73 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d s.DataClasses;......using.System
8480 2e 58 6d 6c 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 58 6d 6c 2e 4c 69 6e 71 .Xml;......using.System.Xml.Linq
84a0 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f ;......using.System.Globalizatio
84c0 6e 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f 6e 3b n;......using.System.Reflection;
84e0 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4d 65 74 61 64 61 74 61 ......using.System.Data.Metadata
8500 2e 45 64 6d 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4d 61 70 .Edm;......using.System.Data.Map
8520 70 69 6e 67 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 ping;......using.System.Data.Ent
8540 69 74 79 2e 44 65 73 69 67 6e 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f ity.Design;......using.System.Co
8560 64 65 44 6f 6d 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d deDom;......using.System.CodeDom
8580 2e 43 6f 6d 70 69 6c 65 72 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 4d 69 63 72 6f 73 6f 66 74 2e .Compiler;......using.Microsoft.
85a0 43 53 68 61 72 70 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 54 65 78 74 3b 0d CSharp;......using.System.Text;.
85c0 0a 20 20 20 20 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ...........///.<summary>......//
85e0 2f 20 43 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 63 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 /.Class.to.produce.the.template.
8600 6f 75 74 70 75 74 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 0a 20 20 20 output......///.</summary>......
8620 20 5b 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 .[global::System.CodeDom.Compile
8640 72 2e 47 65 6e 65 72 61 74 65 64 43 6f 64 65 41 74 74 72 69 62 75 74 65 28 22 4d 69 63 72 6f 73 r.GeneratedCodeAttribute("Micros
8660 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 22 oft.VisualStudio.TextTemplating"
8680 2c 20 22 31 31 2e 30 2e 30 2e 30 22 29 5d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 70 61 72 74 69 ,."11.0.0.0")]......public.parti
86a0 61 6c 20 63 6c 61 73 73 20 43 53 68 61 72 70 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 20 3a al.class.CSharpCodeGenTemplate.:
86c0 20 43 53 68 61 72 70 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 42 61 73 65 0d 0a 20 20 20 20 .CSharpCodeGenTemplateBase......
86e0 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 0a 20 20 20 20 20 20 {..........///.<summary>........
8700 20 20 2f 2f 2f 20 43 72 65 61 74 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 ..///.Create.the.template.output
8720 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>........
8740 20 20 70 75 62 6c 69 63 20 76 69 72 74 75 61 6c 20 73 74 72 69 6e 67 20 54 72 61 6e 73 66 6f 72 ..public.virtual.string.Transfor
8760 6d 54 65 78 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0d 0a 2f 2f 20 0d 0a 2f 2f 20 0d mText()..........{.....//...//..
8780 0a 2f 2f 20 0d 0a 2f 2f 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 .//...//..//....//....//....//..
87a0 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 0d 0a 2f 2f ..//....//....//....//....//..//
87c0 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 0a 0a 0a 0d 0a 0d 0a 44 65 66 ....//....//....//...........Def
87e0 69 6e 65 4d 65 74 61 64 61 74 61 28 29 3b 0d 0a 0d 0a 55 73 65 72 53 65 74 74 69 6e 67 73 20 75 ineMetadata();....UserSettings.u
8800 73 65 72 53 65 74 74 69 6e 67 73 20 3d 0d 0a 20 20 20 20 20 20 20 20 6e 65 77 20 55 73 65 72 53 serSettings.=..........new.UserS
8820 65 74 74 69 6e 67 73 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 ettings..........{..............
8840 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 40 22 24 65 64 6d 78 49 6e 70 75 74 46 69 6c SourceCsdlPath.=.@"$edmxInputFil
8860 65 24 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 e$",..............ReferenceCsdlP
8880 61 74 68 73 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 5d 20 7b 7d 2c 0d 0a 20 20 20 20 20 20 20 aths.=.new.string[].{},.........
88a0 20 20 20 20 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 74 .....FullyQualifySystemTypes.=.t
88c0 72 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 rue,..............CreateContextA
88e0 64 64 54 6f 4d 65 74 68 6f 64 73 20 3d 20 74 72 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ddToMethods.=.true,.............
8900 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 .CamelCaseFields.=.false,.......
8920 20 20 20 7d 3b 0d 0a 0d 0a 41 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 75 73 65 72 53 ...};....ApplyUserSettings(userS
8940 65 74 74 69 6e 67 73 29 3b 0d 0a 69 66 28 45 72 72 6f 72 73 2e 48 61 73 45 72 72 6f 72 73 29 0d ettings);..if(Errors.HasErrors).
8960 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 7d 0d .{......return.String.Empty;..}.
8980 0a 0d 0a 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 20 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 4d ...MetadataLoader.loader.=.new.M
89a0 65 74 61 64 61 74 61 4c 6f 61 64 65 72 28 74 68 69 73 29 3b 0d 0a 4d 65 74 61 64 61 74 61 54 6f etadataLoader(this);..MetadataTo
89c0 6f 6c 73 20 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 68 69 73 29 ols.ef.=.new.MetadataTools(this)
89e0 3b 0d 0a 43 6f 64 65 52 65 67 69 6f 6e 20 72 65 67 69 6f 6e 20 3d 20 6e 65 77 20 43 6f 64 65 52 ;..CodeRegion.region.=.new.CodeR
8a00 65 67 69 6f 6e 28 74 68 69 73 29 3b 0d 0a 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c egion(this);..CodeGenerationTool
8a20 73 20 63 6f 64 65 20 3d 20 6e 65 77 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 s.code.=.new.CodeGenerationTools
8a40 28 74 68 69 73 29 7b 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d (this){FullyQualifySystemTypes.=
8a60 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d .userSettings.FullyQualifySystem
8a80 54 79 70 65 73 2c 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 75 73 65 72 53 65 74 Types,.CamelCaseFields.=.userSet
8aa0 74 69 6e 67 73 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 7d 3b 0d 0a 0d 0a 49 74 65 6d 43 tings.CamelCaseFields};....ItemC
8ac0 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6c 6f 61 64 65 72 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d ollection.=.loader.CreateEdmItem
8ae0 43 6f 6c 6c 65 63 74 69 6f 6e 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 52 65 66 65 72 Collection(SourceCsdlPath,.Refer
8b00 65 6e 63 65 43 73 64 6c 50 61 74 68 73 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a 4d 6f 64 65 6c enceCsdlPaths.ToArray());..Model
8b20 4e 61 6d 65 73 70 61 63 65 20 3d 20 6c 6f 61 64 65 72 2e 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 Namespace.=.loader.GetModelNames
8b40 70 61 63 65 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 3b 0d 0a 73 74 72 69 6e 67 20 6e 61 pace(SourceCsdlPath);..string.na
8b60 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 47 65 74 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 28 63 mespaceName.=.GetNamespaceName(c
8b80 6f 64 65 29 3b 0d 0a 55 70 64 61 74 65 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 28 ode);..UpdateObjectNamespaceMap(
8ba0 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 namespaceName);................t
8bc0 68 69 73 2e 57 72 69 74 65 28 22 2f 2f 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d his.Write("//-------------------
8be0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8c00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 5c 72 22 20 2b ---------------------------\r".+
8c20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 5c 6e 2f 2f 20 3c 61 75 74 ......................"\n//.<aut
8c40 6f 2d 67 65 6e 65 72 61 74 65 64 3e 5c 72 5c 6e 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 o-generated>\r\n//.");..........
8c60 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
8c80 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 65 74 52 65 73 6f 75 per.ToStringWithCulture(GetResou
8ca0 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 74 65 64 43 6f 64 rceString("Template_GeneratedCod
8cc0 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 31 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 eCommentLine1")));..............
8ce0 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 5c 72 5c 6e 2f 2f 20 22 29 3b 0d 0a ..this.Write("\r\n//\r\n//.");..
8d00 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
8d20 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
8d40 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 GetResourceString("Template_Gene
8d60 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 32 22 29 29 29 3b 0d 0a 0a 0a 20 20 ratedCodeCommentLine2")));......
8d80 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 20 22 29 3b ..........this.Write("\r\n//.");
8da0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
8dc0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
8de0 65 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 e(GetResourceString("Template_Ge
8e00 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 33 22 29 29 29 3b 0d 0a 0a 0a neratedCodeCommentLine3")));....
8e20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 40 22 0d 0a 2f 2f 20 3c 2f ............this.Write(@"..//.</
8e40 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 0d 0a 2f 2f 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d auto-generated>..//-------------
8e60 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8e80 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8ea0 2d 0d 0a 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d -....using.System;..using.System
8ec0 2e 43 6f 6d 70 6f 6e 65 6e 74 4d 6f 64 65 6c 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 .ComponentModel;..using.System.D
8ee0 61 74 61 2e 45 6e 74 69 74 79 43 6c 69 65 6e 74 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e ata.EntityClient;..using.System.
8f00 44 61 74 61 2e 4f 62 6a 65 63 74 73 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 Data.Objects;..using.System.Data
8f20 2e 4f 62 6a 65 63 74 73 2e 44 61 74 61 43 6c 61 73 73 65 73 3b 0d 0a 75 73 69 6e 67 20 53 79 73 .Objects.DataClasses;..using.Sys
8f40 74 65 6d 2e 4c 69 6e 71 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e tem.Linq;..using.System.Runtime.
8f60 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 58 6d 6c Serialization;..using.System.Xml
8f80 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 3b 0d 0a 0d 0a 5b 61 73 73 65 6d 62 6c 79 3a 20 45 64 .Serialization;....[assembly:.Ed
8fa0 6d 53 63 68 65 6d 61 41 74 74 72 69 62 75 74 65 28 29 5d 0d 0a 22 29 3b 0d 0a 0a 0d 0a 20 20 20 mSchemaAttribute()]..");........
8fc0 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f .////////......////////.......//
8fe0 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f //////......region.Begin(GetReso
9000 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 52 65 6c 61 74 urceString("Template_RegionRelat
9020 69 6f 6e 73 68 69 70 73 22 29 29 3b 0d 0a 20 20 20 20 62 6f 6f 6c 20 66 69 72 73 74 20 3d 20 74 ionships"));......bool.first.=.t
9040 72 75 65 3b 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 rue;......foreach.(AssociationTy
9060 70 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d pe.association.in.GetSourceSchem
9080 61 54 79 70 65 73 3c 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 3e 28 29 29 0d 0a 20 20 20 20 aTypes<AssociationType>())......
90a0 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 69 72 73 74 29 0d 0a 20 20 20 20 20 20 20 20 7b {..........if.(first)..........{
90c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 69 6e 65 28 73 74 72 69 6e 67 2e 45 ..............WriteLine(string.E
90e0 6d 70 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 72 73 74 20 3d 20 66 61 6c 73 mpty);..............first.=.fals
9100 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 e;..........}................thi
9120 73 2e 57 72 69 74 65 28 22 5b 61 73 73 65 6d 62 6c 79 3a 20 45 64 6d 52 65 6c 61 74 69 6f 6e 73 s.Write("[assembly:.EdmRelations
9140 68 69 70 41 74 74 72 69 62 75 74 65 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 hipAttribute(\"");..............
9160 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
9180 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e ToStringWithCulture(association.
91a0 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 NamespaceName));................
91c0 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 this.Write("\",.\"");...........
91e0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
9200 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 73 73 6f 63 69 61 74 69 er.ToStringWithCulture(associati
9220 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 on.Name));................this.W
9240 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 rite("\",.\"");...............th
9260 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
9280 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 73 73 6f 63 69 61 tringWithCulture(EndName(associa
92a0 74 69 6f 6e 2c 20 30 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e tion,.0)));................this.
92c0 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 Write("\",.");...............thi
92e0 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
9300 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 28 ringWithCulture(EndMultiplicity(
9320 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 30 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 association,.0,.code)));........
9340 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 74 79 70 65 6f 66 28 22 29 3b ........this.Write(",.typeof(");
9360 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
9380 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
93a0 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c e(EscapeEndTypeName(association,
93c0 20 30 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 .0,.code)));................this
93e0 2e 57 72 69 74 65 28 22 29 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 .Write("),.\"");...............t
9400 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
9420 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 73 73 6f 63 69 StringWithCulture(EndName(associ
9440 61 74 69 6f 6e 2c 20 31 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 ation,.1)));................this
9460 2e 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 .Write("\",.");...............th
9480 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
94a0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 tringWithCulture(EndMultiplicity
94c0 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 31 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 (association,.1,.code)));.......
94e0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 74 79 70 65 6f 66 28 22 29 .........this.Write(",.typeof(")
9500 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ;...............this.Write(this.
9520 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
9540 72 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 69 6f 6e re(EscapeEndTypeName(association
9560 2c 20 31 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 ,.1,.code)));................thi
9580 73 2e 57 72 69 74 65 28 22 29 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 s.Write(")");...............this
95a0 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
95c0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 ingWithCulture(code.StringBefore
95e0 28 22 2c 20 22 2c 20 61 73 73 6f 63 69 61 74 69 6f 6e 2e 49 73 46 6f 72 65 69 67 6e 4b 65 79 20 (",.",.association.IsForeignKey.
9600 3f 20 22 74 72 75 65 22 20 3a 20 6e 75 6c 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 ?."true".:.null)));.............
9620 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 ...this.Write(")]\r\n");........
9640 20 7d 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 69 66 20 .}......region.End();........if.
9660 28 21 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 (!String.IsNullOrEmpty(namespace
9680 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 Name))......{................thi
96a0 73 2e 57 72 69 74 65 28 22 6e 61 6d 65 73 70 61 63 65 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 s.Write("namespace.");..........
96c0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
96e0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 6d 65 73 70 61 63 per.ToStringWithCulture(namespac
9700 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 eName));................this.Wri
9720 74 65 28 22 5c 72 5c 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 73 te("\r\n{\r\n");.............Pus
9740 68 49 6e 64 65 6e 74 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 31 29 29 hIndent(CodeRegion.GetIndent(1))
9760 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f ;......}........////////......//
9780 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 72 65 67 //////.......////////........reg
97a0 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d ion.Begin(GetResourceString("Tem
97c0 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6e 74 65 78 74 73 22 29 29 3b 0d 0a 20 20 20 20 66 6f plate_RegionContexts"));......fo
97e0 72 65 61 63 68 20 28 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 63 6f 6e 74 61 69 6e 65 72 reach.(EntityContainer.container
9800 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 3c 45 6e 74 69 74 79 43 .in.GetSourceSchemaTypes<EntityC
9820 6f 6e 74 61 69 6e 65 72 3e 28 29 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 ontainer>())......{.............
9840 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ...this.Write("\r\n///.<summary>
9860 5c 72 5c 6e 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 \r\n///.");...............this.W
9880 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
98a0 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6e 74 gWithCulture(SummaryComment(cont
98c0 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 ainer)));................this.Wr
98e0 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 ite("\r\n///.</summary>");......
9900 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
9920 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 gHelper.ToStringWithCulture(Long
9940 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6e 74 61 69 DescriptionCommentElement(contai
9960 6e 65 72 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 ner,.region.CurrentIndentLevel))
9980 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 );................this.Write("\r
99a0 5c 6e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 \n");...............this.Write(t
99c0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
99e0 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 63 6f 6e ulture(Accessibility.ForType(con
9a00 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 tainer)));................this.W
9a20 72 69 74 65 28 22 20 70 61 72 74 69 61 6c 20 63 6c 61 73 73 20 22 29 3b 0d 0a 0a 20 20 20 20 20 rite(".partial.class.");........
9a40 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
9a60 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 elper.ToStringWithCulture(code.E
9a80 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 scape(container)));.............
9aa0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 3a 20 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 5c ...this.Write(".:.ObjectContext\
9ac0 72 5c 6e 7b 5c 72 5c 6e 20 20 20 20 23 72 65 67 69 6f 6e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 r\n{\r\n....#region.");.........
9ae0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
9b00 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 65 74 52 65 73 6f lper.ToStringWithCulture(GetReso
9b20 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6e 73 74 urceString("Template_RegionConst
9b40 72 75 63 74 6f 72 73 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 ructors")));................this
9b60 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 .Write("\r\n\r\n....///.<summary
9b80 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 >\r\n....///.");...............t
9ba0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
9bc0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 StringWithCulture(String.Format(
9be0 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 CultureInfo.CurrentCulture,.GetR
9c00 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 74 44 esourceString("Template_ContextD
9c20 65 66 61 75 6c 74 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e efaultCtorComment"),.container.N
9c40 61 6d 65 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 ame,.container.Name)));.........
9c60 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c .......this.Write("\r\n....///.<
9c80 2f 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 22 29 3b 0d 0a 0a 20 20 /summary>\r\n....public.");.....
9ca0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
9cc0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
9ce0 65 2e 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 e.Escape(container)));..........
9d00 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 20 3a 20 62 61 73 65 28 5c 22 6e 61 ......this.Write("().:.base(\"na
9d20 6d 65 3d 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 me=");...............this.Write(
9d40 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
9d60 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 Culture(container.Name));.......
9d80 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a .........this.Write("\",.\"");..
9da0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
9dc0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
9de0 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 container.Name));...............
9e00 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 29 3b .this.Write("\")\r\n....{\r\n");
9e20 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 .............WriteLazyLoadingEna
9e40 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 bled(container);................
9e60 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 this.Write("........OnContextCre
9e80 61 74 65 64 28 29 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 ated();\r\n....}\r\n\r\n....///.
9ea0 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 <summary>\r\n....///.");........
9ec0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
9ee0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 elper.ToStringWithCulture(String
9f00 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 .Format(CultureInfo.CurrentCultu
9f20 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f re,.GetResourceString("Template_
9f40 43 6f 6e 74 65 78 74 43 6f 6d 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 ContextCommonCtorComment"),.cont
9f60 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 ainer.Name)));................th
9f80 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e is.Write("\r\n....///.</summary>
9fa0 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 \r\n....public.");..............
9fc0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
9fe0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 ToStringWithCulture(code.Escape(
a000 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 container)));................thi
a020 73 2e 57 72 69 74 65 28 22 28 73 74 72 69 6e 67 20 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e s.Write("(string.connectionStrin
a040 67 29 20 3a 20 62 61 73 65 28 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e 67 2c 20 5c 22 22 29 g).:.base(connectionString,.\"")
a060 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ;...............this.Write(this.
a080 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
a0a0 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 re(container.Name));............
a0c0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e ....this.Write("\")\r\n....{\r\n
a0e0 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 ");.............WriteLazyLoading
a100 45 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 Enabled(container);.............
a120 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 ...this.Write("........OnContext
a140 43 72 65 61 74 65 64 28 29 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 2f Created();\r\n....}\r\n\r\n..../
a160 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 //.<summary>\r\n....///.");.....
a180 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
a1a0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 ngHelper.ToStringWithCulture(Str
a1c0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 ing.Format(CultureInfo.CurrentCu
a1e0 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 lture,.GetResourceString("Templa
a200 74 65 5f 43 6f 6e 74 65 78 74 43 6f 6d 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 te_ContextCommonCtorComment"),.c
a220 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ontainer.Name)));...............
a240 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .this.Write("\r\n....///.</summa
a260 72 79 3e 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 ry>\r\n....public.");...........
a280 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
a2a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 er.ToStringWithCulture(code.Esca
a2c0 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 pe(container)));................
a2e0 74 68 69 73 2e 57 72 69 74 65 28 22 28 45 6e 74 69 74 79 43 6f 6e 6e 65 63 74 69 6f 6e 20 63 6f this.Write("(EntityConnection.co
a300 6e 6e 65 63 74 69 6f 6e 29 20 3a 20 62 61 73 65 28 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 5c 22 22 nnection).:.base(connection,.\""
a320 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 );...............this.Write(this
a340 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
a360 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 ure(container.Name));...........
a380 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c .....this.Write("\")\r\n....{\r\
a3a0 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e n");.............WriteLazyLoadin
a3c0 67 45 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 gEnabled(container);............
a3e0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 ....this.Write("........OnContex
a400 74 43 72 65 61 74 65 64 28 29 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 tCreated();\r\n....}\r\n\r\n....
a420 23 65 6e 64 72 65 67 69 6f 6e 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 23 72 65 67 69 6f 6e 20 22 29 #endregion\r\n\r\n....#region.")
a440 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ;...............this.Write(this.
a460 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
a480 72 65 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 re(GetResourceString("Template_R
a4a0 65 67 69 6f 6e 50 61 72 74 69 61 6c 4d 65 74 68 6f 64 73 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 egionPartialMethods")));........
a4c0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 ........this.Write("\r\n\r\n....
a4e0 70 61 72 74 69 61 6c 20 76 6f 69 64 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 3b partial.void.OnContextCreated();
a500 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 5c 72 5c 6e 5c 72 5c 6e 22 29 \r\n\r\n....#endregion\r\n\r\n")
a520 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 ;.............////////..........
a540 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 ////////...........////////.....
a560 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 .....region.Begin(GetResourceStr
a580 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 4f 62 6a 65 63 74 53 65 74 50 72 6f ing("Template_RegionObjectSetPro
a5a0 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e perties"));..........foreach.(En
a5c0 74 69 74 79 53 65 74 20 73 65 74 20 69 6e 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 titySet.set.in.container.BaseEnt
a5e0 69 74 79 53 65 74 73 2e 4f 66 54 79 70 65 3c 45 6e 74 69 74 79 53 65 74 3e 28 29 29 0d 0a 20 20 itySets.OfType<EntitySet>())....
a600 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 45 6e 74 69 74 ......{..............VerifyEntit
a620 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 yTypeAndSetAccessibilityCompatab
a640 69 6c 69 74 79 28 73 65 74 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ility(set);................this.
a660 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e Write("\r\n....///.<summary>\r\n
a680 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 ....///.");...............this.W
a6a0 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
a6c0 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 73 65 74 29 gWithCulture(SummaryComment(set)
a6e0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c ));................this.Write("\
a700 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 r\n....///.</summary>");........
a720 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
a740 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 elper.ToStringWithCulture(LongDe
a760 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 73 65 74 2c 20 72 65 67 scriptionCommentElement(set,.reg
a780 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 ion.CurrentIndentLevel)));......
a7a0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 22 29 ..........this.Write("\r\n....")
a7c0 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ;...............this.Write(this.
a7e0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
a800 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 73 re(code.SpaceAfter(NewModifier(s
a820 65 74 29 29 29 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 et))));.................this.Wri
a840 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
a860 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 ithCulture(Accessibility.ForRead
a880 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 OnlyProperty(set)));............
a8a0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 4f 62 6a 65 63 74 53 65 74 3c 22 29 3b 0d 0a ....this.Write(".ObjectSet<");..
a8c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
a8e0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
a900 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 MultiSchemaEscape(set.ElementTyp
a920 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e e,.code)));................this.
a940 57 72 69 74 65 28 22 3e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e Write(">.");...............this.
a960 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
a980 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 65 74 29 29 29 ngWithCulture(code.Escape(set)))
a9a0 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c ;................this.Write("\r\
a9c0 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 n....{\r\n........get\r\n.......
a9e0 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 22 29 3b 0d 0a 0a 20 20 20 .{\r\n............if.((");......
aa00 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
aa20 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 gHelper.ToStringWithCulture(code
aa40 2e 46 69 65 6c 64 4e 61 6d 65 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 .FieldName(set)));..............
aa60 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 3d 20 6e 75 6c 6c 29 29 5c 72 5c 6e 20 20 20 20 ..this.Write(".==.null))\r\n....
aa80 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b ........{\r\n................");
aaa0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
aac0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
aae0 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 e(code.FieldName(set)));........
ab00 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 62 61 73 65 2e 43 72 65 61 ........this.Write(".=.base.Crea
ab20 74 65 4f 62 6a 65 63 74 53 65 74 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 teObjectSet<");...............th
ab40 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
ab60 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 tringWithCulture(MultiSchemaEsca
ab80 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a pe(set.ElementType,.code)));....
aba0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d ............this.Write(">(\"");.
abc0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
abe0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
ac00 28 73 65 74 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 (set.Name));................this
ac20 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 7d 5c 72 5c .Write("\");\r\n............}\r\
ac40 6e 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 n............return.");.........
ac60 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
ac80 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 lper.ToStringWithCulture(code.Fi
aca0 65 6c 64 4e 61 6d 65 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 eldName(set)));................t
acc0 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 his.Write(";\r\n........}\r\n...
ace0 20 7d 5c 72 5c 6e 20 20 20 20 70 72 69 76 61 74 65 20 4f 62 6a 65 63 74 53 65 74 3c 22 29 3b 0d .}\r\n....private.ObjectSet<");.
ad00 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
ad20 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
ad40 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 (MultiSchemaEscape(set.ElementTy
ad60 70 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 pe,.code)));................this
ad80 2e 57 72 69 74 65 28 22 3e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 .Write(">.");...............this
ada0 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
adc0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 65 ingWithCulture(code.FieldName(se
ade0 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 t)));................this.Write(
ae00 22 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ";\r\n");.............}.........
ae20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f .region.End();............//////
ae40 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f //..........////////.........../
ae60 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 ///////..........////////.......
ae80 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d ....////////...........////////.
aea0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f .........////////...........////
aec0 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 ////...........////////.........
aee0 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e ..////////..........region.Begin
af00 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 (GetResourceString("Template_Reg
af20 69 6f 6e 41 64 64 54 6f 4d 65 74 68 6f 64 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 49 45 6e ionAddToMethods"));..........IEn
af40 75 6d 65 72 61 62 6c 65 3c 45 6e 74 69 74 79 53 65 74 3e 20 61 64 64 54 6f 4d 65 74 68 6f 64 73 umerable<EntitySet>.addToMethods
af60 20 3d 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 2e 56 61 6c .=.CreateContextAddToMethods.Val
af80 75 65 20 3f 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 73 2e 4f 66 ue.?.container.BaseEntitySets.Of
afa0 54 79 70 65 3c 45 6e 74 69 74 79 53 65 74 3e 28 29 20 3a 20 45 6e 75 6d 65 72 61 62 6c 65 2e 45 Type<EntitySet>().:.Enumerable.E
afc0 6d 70 74 79 3c 45 6e 74 69 74 79 53 65 74 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 mpty<EntitySet>();..........fore
afe0 61 63 68 20 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 20 69 6e 20 61 64 64 54 6f 4d 65 74 68 6f ach.(EntitySet.set.in.addToMetho
b000 64 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 73 74 72 69 ds)..........{..............stri
b020 6e 67 20 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 46 ng.parameterName.=.code.Escape(F
b040 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2e ixParameterName(set.ElementType.
b060 4e 61 6d 65 2c 20 63 6f 64 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 Name,.code));................thi
b080 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 s.Write("\r\n....///.<summary>\r
b0a0 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 \n....///.");...............this
b0c0 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
b0e0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c ingWithCulture(String.Format(Cul
b100 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f tureInfo.CurrentCulture,.GetReso
b120 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 43 6f 6d 6d 65 6e 74 41 urceString("Template_GenCommentA
b140 64 64 54 6f 4d 65 74 68 6f 64 43 73 22 29 2c 20 73 65 74 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a ddToMethodCs"),.set.Name)));....
b160 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 ............this.Write("\r\n....
b180 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 ///.</summary>\r\n....");.......
b1a0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
b1c0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 Helper.ToStringWithCulture(Acces
b1e0 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 sibility.ForType(set.ElementType
b200 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
b220 20 76 6f 69 64 20 41 64 64 54 6f 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 .void.AddTo");...............thi
b240 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
b260 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 65 74 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 ringWithCulture(set.Name));.....
b280 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 20 20 ...........this.Write("(");.....
b2a0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
b2c0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c ngHelper.ToStringWithCulture(Mul
b2e0 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 tiSchemaEscape(set.ElementType,.
b300 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 code)));................this.Wri
b320 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 te(".");...............this.Writ
b340 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
b360 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 thCulture(parameterName));......
b380 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 7b ..........this.Write(")\r\n....{
b3a0 5c 72 5c 6e 20 20 20 20 20 20 20 20 62 61 73 65 2e 41 64 64 4f 62 6a 65 63 74 28 5c 22 22 29 3b \r\n........base.AddObject(\"");
b3c0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
b3e0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
b400 65 28 73 65 74 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 e(set.Name));................thi
b420 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 s.Write("\",.");...............t
b440 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
b460 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 StringWithCulture(parameterName)
b480 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b );................this.Write(");
b4a0 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a \r\n....}\r\n");.............}..
b4c0 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ........region.End();...........
b4e0 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 .////////..........////////.....
b500 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 ......////////..........region.B
b520 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 egin(GetResourceString("Template
b540 5f 52 65 67 69 6f 6e 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 73 22 29 29 3b 0d 0a 20 20 20 20 _RegionFunctionImports"));......
b560 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 46 75 6e 63 74 69 6f 6e 20 65 64 6d 46 75 6e 63 ....foreach.(EdmFunction.edmFunc
b580 74 69 6f 6e 20 69 6e 20 63 6f 6e 74 61 69 6e 65 72 2e 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 tion.in.container.FunctionImport
b5a0 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 45 6e s)..........{................IEn
b5c0 75 6d 65 72 61 62 6c 65 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 umerable<FunctionImportParameter
b5e0 3e 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 >.parameters.=.FunctionImportPar
b600 61 6d 65 74 65 72 2e 43 72 65 61 74 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 50 61 72 61 6d 65 ameter.Create(edmFunction.Parame
b620 74 65 72 73 2c 20 63 6f 64 65 2c 20 65 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 ters,.code,.ef);..............st
b640 72 69 6e 67 20 70 61 72 61 6d 4c 69 73 74 20 3d 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 ring.paramList.=.string.Join(",.
b660 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 70 2e 46 75 6e 63 ",.parameters.Select(p.=>.p.Func
b680 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 2b 20 22 20 22 20 2b 20 70 2e 46 75 6e 63 tionParameterType.+.".".+.p.Func
b6a0 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a tionParameterName).ToArray());..
b6c0 20 20 20 20 20 20 20 20 20 20 20 20 54 79 70 65 55 73 61 67 65 20 72 65 74 75 72 6e 54 79 70 65 ............TypeUsage.returnType
b6e0 20 3d 20 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 72 73 2e .=.edmFunction.ReturnParameters.
b700 43 6f 75 6e 74 20 3d 3d 20 30 20 3f 20 6e 75 6c 6c 20 3a 20 65 66 2e 47 65 74 45 6c 65 6d 65 6e Count.==.0.?.null.:.ef.GetElemen
b720 74 54 79 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 tType(edmFunction.ReturnParamete
b740 72 73 5b 30 5d 2e 54 79 70 65 55 73 61 67 65 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 rs[0].TypeUsage);...............
b760 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 .this.Write("\r\n....///.<summar
b780 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 y>\r\n....///.");...............
b7a0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
b7c0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e oStringWithCulture(SummaryCommen
b7e0 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 t(edmFunction)));...............
b800 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .this.Write("\r\n....///.</summa
b820 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ry>");...............this.Write(
b840 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
b860 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c Culture(LongDescriptionCommentEl
b880 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e ement(edmFunction,.region.Curren
b8a0 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 tIndentLevel)));................
b8c0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
b8e0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d ToStringWithCulture(ParameterCom
b900 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 ments(parameters.Select(p.=>.new
b920 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 70 2e 52 61 77 46 75 6e 63 .Tuple<string,.string>(p.RawFunc
b940 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e tionParameterName,.SummaryCommen
b960 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 t(p.Source))),.region.CurrentInd
b980 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 entLevel)));................this
b9a0 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 .Write("\r\n....");.............
b9c0 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
b9e0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
ba00 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 fter(NewModifier(edmFunction))))
ba20 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 ;.................this.Write(thi
ba40 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
ba60 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d ture(Accessibility.ForMethod(edm
ba80 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 Function)));................this
baa0 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e .Write(".");...............this.
bac0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
bae0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c ngWithCulture(returnType.==.null
bb00 20 3f 20 22 69 6e 74 22 20 3a 20 22 4f 62 6a 65 63 74 52 65 73 75 6c 74 3c 22 20 2b 20 4d 75 6c .?."int".:."ObjectResult<".+.Mul
bb20 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 tiSchemaEscape(returnType,.code)
bb40 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 .+.">"));................this.Wr
bb60 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 ite(".");...............this.Wri
bb80 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
bba0 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 ithCulture(code.Escape(edmFuncti
bbc0 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 on)));................this.Write
bbe0 28 22 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ("(");...............this.Write(
bc00 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
bc20 43 75 6c 74 75 72 65 28 70 61 72 61 6d 4c 69 73 74 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 Culture(paramList));............
bc40 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 29 ....this.Write(")\r\n....{\r\n")
bc60 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 46 75 6e 63 74 ;.................foreach.(Funct
bc80 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 70 61 72 61 6d 65 74 65 72 20 69 6e 20 ionImportParameter.parameter.in.
bca0 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 parameters)..............{......
bcc0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 70 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 ............if.(!parameter.Needs
bce0 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 LocalVariable)..................
bd00 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 ....continue;................thi
bd20 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 s.Write("........ObjectParameter
bd40 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 .");...............this.Write(th
bd60 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
bd80 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d lture(parameter.LocalVariableNam
bda0 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 e));................this.Write("
bdc0 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 69 66 20 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 ;\r\n........if.(");............
bde0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
be00 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e r.ToStringWithCulture(parameter.
be20 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 3f 20 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 IsNullableOfT.?.parameter.Functi
be40 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 2e 48 61 73 56 61 6c 75 65 22 20 3a 20 onParameterName.+.".HasValue".:.
be60 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 parameter.FunctionParameterName.
be80 2b 20 22 20 21 3d 20 6e 75 6c 6c 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 +.".!=.null"));................t
bea0 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 his.Write(")\r\n........{\r\n...
bec0 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e .........");...............this.
bee0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
bf00 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 ngWithCulture(parameter.LocalVar
bf20 69 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 iableName));................this
bf40 2e 57 72 69 74 65 28 22 20 3d 20 6e 65 77 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 28 5c .Write(".=.new.ObjectParameter(\
bf60 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 "");...............this.Write(th
bf80 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
bfa0 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d lture(parameter.EsqlParameterNam
bfc0 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 e));................this.Write("
bfe0 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 \",.");...............this.Write
c000 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
c020 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d hCulture(parameter.FunctionParam
c040 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e eterName));................this.
c060 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 Write(");\r\n........}\r\n......
c080 20 20 65 6c 73 65 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 ..else\r\n........{\r\n.........
c0a0 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ...");...............this.Write(
c0c0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
c0e0 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e Culture(parameter.LocalVariableN
c100 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ame));................this.Write
c120 28 22 20 3d 20 6e 65 77 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 28 5c 22 22 29 3b 0d 0a (".=.new.ObjectParameter(\"");..
c140 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
c160 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
c180 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a parameter.EsqlParameterName));..
c1a0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 74 79 ..............this.Write("\",.ty
c1c0 70 65 6f 66 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 peof(");...............this.Writ
c1e0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
c200 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e 61 thCulture(parameter.RawClrTypeNa
c220 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 me));................this.Write(
c240 22 29 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d "));\r\n........}\r\n\r\n");....
c260 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 .........}................this.W
c280 72 69 74 65 28 22 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 61 73 65 2e 45 78 65 63 75 74 rite("........return.base.Execut
c2a0 65 46 75 6e 63 74 69 6f 6e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e eFunction");...............this.
c2c0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
c2e0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c ngWithCulture(returnType.==.null
c300 20 3f 20 22 22 20 3a 20 22 3c 22 20 2b 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 .?."".:."<".+.MultiSchemaEscape(
c320 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 returnType,.code).+.">"));......
c340 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 5c 22 22 29 3b 0d 0a 0a 20 ..........this.Write("(\"");....
c360 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
c380 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 ingHelper.ToStringWithCulture(ed
c3a0 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 mFunction.Name));...............
c3c0 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 .this.Write("\"");..............
c3e0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
c400 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 ToStringWithCulture(code.StringB
c420 65 66 6f 72 65 28 22 2c 20 22 2c 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 efore(",.",.string.Join(",.",.pa
c440 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 70 2e 45 78 65 63 75 74 65 50 61 rameters.Select(p.=>.p.ExecutePa
c460 72 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 3b 0d 0a 0a 0a 20 rameterName).ToArray()))));.....
c480 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 ...........this.Write(");\r\n...
c4a0 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 69 66 28 72 65 74 75 .}\r\n");................if(retu
c4c0 72 6e 54 79 70 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 72 65 74 75 72 6e 54 79 70 65 2e 45 64 6d rnType.!=.null.&&.returnType.Edm
c4e0 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 3d 20 42 75 69 6c 74 49 6e 54 Type.BuiltInTypeKind.==.BuiltInT
c500 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ypeKind.EntityType).............
c520 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 {................this.Write("...
c540 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a .///.<summary>\r\n....///.");...
c560 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
c580 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 ringHelper.ToStringWithCulture(S
c5a0 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a ummaryComment(edmFunction)));...
c5c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 .............this.Write("\r\n...
c5e0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 .///.</summary>");..............
c600 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
c620 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 ToStringWithCulture(LongDescript
c640 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2c 20 72 ionCommentElement(edmFunction,.r
c660 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a egion.CurrentIndentLevel)));....
c680 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 ............this.Write("\r\n....
c6a0 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 5c 22 6d 65 72 67 65 4f 70 74 69 6f 6e 5c 22 3e ///.<param.name=\"mergeOption\">
c6c0 3c 2f 70 61 72 61 6d 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 </param>");...............this.W
c6e0 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
c700 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 gWithCulture(ParameterComments(p
c720 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 20 54 75 70 6c 65 3c arameters.Select(p.=>.new.Tuple<
c740 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 70 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 string,.string>(p.RawFunctionPar
c760 61 6d 65 74 65 72 4e 61 6d 65 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 ameterName,.SummaryComment(p.Sou
c780 72 63 65 29 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 rce))),.region.CurrentIndentLeve
c7a0 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 l)));................this.Write(
c7c0 22 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e "\r\n....");...............this.
c7e0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
c800 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 ngWithCulture(code.SpaceAfter(Ne
c820 77 4d 6f 64 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 3b 0d 0a 0a 0a 0a 20 wModifier(edmFunction))));......
c840 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
c860 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 ingHelper.ToStringWithCulture(Ac
c880 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d 46 75 6e 63 74 69 6f cessibility.ForMethod(edmFunctio
c8a0 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 n)));................this.Write(
c8c0 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 ".");...............this.Write(t
c8e0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
c900 75 6c 74 75 72 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 22 69 6e 74 ulture(returnType.==.null.?."int
c920 22 20 3a 20 22 4f 62 6a 65 63 74 52 65 73 75 6c 74 3c 22 20 2b 20 4d 75 6c 74 69 53 63 68 65 6d ".:."ObjectResult<".+.MultiSchem
c940 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 2b 20 22 3e 22 29 aEscape(returnType,.code).+.">")
c960 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 );................this.Write("."
c980 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 );...............this.Write(this
c9a0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
c9c0 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d ure(code.Escape(edmFunction)));.
c9e0 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d ...............this.Write("(");.
ca00 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
ca20 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
ca40 28 63 6f 64 65 2e 53 74 72 69 6e 67 41 66 74 65 72 28 70 61 72 61 6d 4c 69 73 74 2c 20 22 2c 20 (code.StringAfter(paramList,.",.
ca60 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ")));................this.Write(
ca80 22 4d 65 72 67 65 4f 70 74 69 6f 6e 20 6d 65 72 67 65 4f 70 74 69 6f 6e 29 5c 72 5c 6e 20 20 20 "MergeOption.mergeOption)\r\n...
caa0 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 .{\r\n");.................foreac
cac0 68 20 28 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 70 61 72 61 6d h.(FunctionImportParameter.param
cae0 65 74 65 72 20 69 6e 20 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 eter.in.parameters).............
cb00 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 70 61 72 61 6d 65 74 .{..................if.(!paramet
cb20 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 er.NeedsLocalVariable)..........
cb40 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 ............continue;...........
cb60 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 50 .....this.Write("........ObjectP
cb80 61 72 61 6d 65 74 65 72 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e arameter.");...............this.
cba0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
cbc0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 ngWithCulture(parameter.LocalVar
cbe0 69 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 iableName));................this
cc00 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 69 66 20 28 22 29 3b 0d 0a 0a 20 .Write(";\r\n........if.(");....
cc20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
cc40 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 ingHelper.ToStringWithCulture(pa
cc60 72 61 6d 65 74 65 72 2e 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 3f 20 70 61 72 61 6d 65 74 65 rameter.IsNullableOfT.?.paramete
cc80 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 2e 48 61 73 56 r.FunctionParameterName.+.".HasV
cca0 61 6c 75 65 22 20 3a 20 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 alue".:.parameter.FunctionParame
ccc0 74 65 72 4e 61 6d 65 20 2b 20 22 20 21 3d 20 6e 75 6c 6c 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 terName.+.".!=.null"));.........
cce0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 20 20 20 20 .......this.Write(")\r\n........
cd00 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 {\r\n............");............
cd20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
cd40 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e r.ToStringWithCulture(parameter.
cd60 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 LocalVariableName));............
cd80 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 6e 65 77 20 4f 62 6a 65 63 74 50 61 72 ....this.Write(".=.new.ObjectPar
cda0 61 6d 65 74 65 72 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ameter(\"");...............this.
cdc0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
cde0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 ngWithCulture(parameter.EsqlPara
ce00 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 meterName));................this
ce20 2e 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 .Write("\",.");...............th
ce40 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
ce60 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 tringWithCulture(parameter.Funct
ce80 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 ionParameterName));.............
cea0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 ...this.Write(");\r\n........}\r
cec0 5c 6e 20 20 20 20 20 20 20 20 65 6c 73 65 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 \n........else\r\n........{\r\n.
cee0 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 ...........");...............thi
cf00 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
cf20 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 ringWithCulture(parameter.LocalV
cf40 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 ariableName));................th
cf60 69 73 2e 57 72 69 74 65 28 22 20 3d 20 6e 65 77 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 is.Write(".=.new.ObjectParameter
cf80 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 (\"");...............this.Write(
cfa0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
cfc0 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e Culture(parameter.EsqlParameterN
cfe0 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ame));................this.Write
d000 28 22 5c 22 2c 20 74 79 70 65 6f 66 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ("\",.typeof(");...............t
d020 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
d040 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 43 StringWithCulture(parameter.RawC
d060 6c 72 54 79 70 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 lrTypeName));................thi
d080 73 2e 57 72 69 74 65 28 22 29 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c s.Write("));\r\n........}\r\n\r\
d0a0 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 20 20 20 n");.................}..........
d0c0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ......this.Write("........return
d0e0 20 62 61 73 65 2e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 .base.");...............this.Wri
d100 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
d120 69 74 68 43 75 6c 74 75 72 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 ithCulture(returnType.==.null.?.
d140 22 45 78 65 63 75 74 65 46 75 6e 63 74 69 6f 6e 22 20 3a 20 22 45 78 65 63 75 74 65 46 75 6e 63 "ExecuteFunction".:."ExecuteFunc
d160 74 69 6f 6e 3c 22 20 2b 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 tion<".+.MultiSchemaEscape(retur
d180 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 nType,.code).+.">"));...........
d1a0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 .....this.Write("(\"");.........
d1c0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
d1e0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 lper.ToStringWithCulture(edmFunc
d200 74 69 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 tion.Name));................this
d220 2e 57 72 69 74 65 28 22 5c 22 2c 20 6d 65 72 67 65 4f 70 74 69 6f 6e 22 29 3b 0d 0a 0a 20 20 20 .Write("\",.mergeOption");......
d240 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
d260 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 gHelper.ToStringWithCulture(code
d280 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 .StringBefore(",.",.string.Join(
d2a0 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 70 2e 45 ",.",.parameters.Select(p.=>.p.E
d2c0 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 xecuteParameterName).ToArray()))
d2e0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 ));................this.Write(")
d300 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d ;\r\n....}\r\n");.............}.
d320 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 .........}..........region.End()
d340 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 ;................this.Write("}\r
d360 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 \n");.........}......region.End(
d380 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f );........////////......////////
d3a0 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 .......////////......region.Begi
d3c0 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 n(GetResourceString("Template_Re
d3e0 67 69 6f 6e 45 6e 74 69 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 gionEntities"));......foreach.(E
d400 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 ntityType.entity.in.GetSourceSch
d420 65 6d 61 54 79 70 65 73 3c 45 6e 74 69 74 79 54 79 70 65 3e 28 29 2e 4f 72 64 65 72 42 79 28 65 emaTypes<EntityType>().OrderBy(e
d440 20 3d 3e 20 65 2e 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 .=>.e.Name))......{.............
d460 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ...this.Write("\r\n///.<summary>
d480 5c 72 5c 6e 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 \r\n///.");...............this.W
d4a0 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
d4c0 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 6e 74 69 gWithCulture(SummaryComment(enti
d4e0 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ty)));................this.Write
d500 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 ("\r\n///.</summary>");.........
d520 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
d540 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 lper.ToStringWithCulture(LongDes
d560 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 6e 74 69 74 79 2c 20 72 criptionCommentElement(entity,.r
d580 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a egion.CurrentIndentLevel)));....
d5a0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5b 45 64 6d ............this.Write("\r\n[Edm
d5c0 45 6e 74 69 74 79 54 79 70 65 41 74 74 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d EntityTypeAttribute(NamespaceNam
d5e0 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 e=\"");...............this.Write
d600 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
d620 68 43 75 6c 74 75 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b hCulture(entity.NamespaceName));
d640 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 ................this.Write("\",.
d660 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 Name=\"");...............this.Wr
d680 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
d6a0 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 WithCulture(entity.Name));......
d6c0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 5b 53 ..........this.Write("\")]\r\n[S
d6e0 65 72 69 61 6c 69 7a 61 62 6c 65 28 29 5d 5c 72 5c 6e 5b 44 61 74 61 43 6f 6e 74 72 61 63 74 41 erializable()]\r\n[DataContractA
d700 74 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3d 74 72 75 65 29 5d 5c 72 5c 6e 22 ttribute(IsReference=true)]\r\n"
d720 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 74 69 74 79 54 79 );.............foreach.(EntityTy
d740 70 65 20 73 75 62 54 79 70 65 20 69 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 pe.subType.in.ItemCollection.Get
d760 49 74 65 6d 73 3c 45 6e 74 69 74 79 54 79 70 65 3e 28 29 2e 57 68 65 72 65 28 62 20 3d 3e 20 62 Items<EntityType>().Where(b.=>.b
d780 2e 42 61 73 65 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 29 29 0d 0a 20 20 20 20 20 20 20 20 7b .BaseType.==.entity))..........{
d7a0 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5b 4b 6e 6f ................this.Write("[Kno
d7c0 77 6e 54 79 70 65 41 74 74 72 69 62 75 74 65 28 74 79 70 65 6f 66 28 22 29 3b 0d 0a 0a 20 20 20 wnTypeAttribute(typeof(");......
d7e0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
d800 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 gHelper.ToStringWithCulture(Mult
d820 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 75 62 54 79 70 65 2c 20 63 6f 64 65 29 29 29 3b 0d iSchemaEscape(subType,.code)));.
d840 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 29 5d 5c 72 ...............this.Write("))]\r
d860 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 \n");.............}.............
d880 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
d8a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 er.ToStringWithCulture(Accessibi
d8c0 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 65 6e 74 69 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 lity.ForType(entity)));.........
d8e0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 .......this.Write(".");.........
d900 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
d920 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 lper.ToStringWithCulture(code.Sp
d940 61 63 65 41 66 74 65 72 28 63 6f 64 65 2e 41 62 73 74 72 61 63 74 4f 70 74 69 6f 6e 28 65 6e 74 aceAfter(code.AbstractOption(ent
d960 69 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 ity))));................this.Wri
d980 74 65 28 22 70 61 72 74 69 61 6c 20 63 6c 61 73 73 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 te("partial.class.");...........
d9a0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
d9c0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 er.ToStringWithCulture(code.Esca
d9e0 70 65 28 65 6e 74 69 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 pe(entity)));................thi
da00 73 2e 57 72 69 74 65 28 22 20 3a 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 s.Write(".:.");...............th
da20 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
da40 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 42 61 73 65 54 79 70 65 4e 61 6d 65 28 65 6e tringWithCulture(BaseTypeName(en
da60 74 69 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 tity,.code)));................th
da80 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 is.Write("\r\n{\r\n");..........
daa0 20 20 20 69 66 20 28 21 65 6e 74 69 74 79 2e 41 62 73 74 72 61 63 74 29 0d 0a 20 20 20 20 20 20 ...if.(!entity.Abstract)........
dac0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 ..{..............WriteFactoryMet
dae0 68 6f 64 28 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d hod(entity,.code);..........}...
db00 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 .........region.Begin(GetResourc
db20 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 50 72 69 6d 69 74 69 76 eString("Template_RegionPrimitiv
db40 65 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 eProperties"));..........foreach
db60 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 79 .(EdmProperty.property.in.entity
db80 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 70 20 3d 3e 20 70 2e 44 65 63 6c 61 72 69 .Properties.Where(p.=>.p.Declari
dba0 6e 67 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 20 26 26 20 70 2e 54 79 70 65 55 73 61 67 65 2e ngType.==.entity.&&.p.TypeUsage.
dbc0 45 64 6d 54 79 70 65 20 69 73 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 29 29 0d 0a 20 20 20 20 EdmType.is.PrimitiveType))......
dbe0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 ....{..............VerifyGetterA
dc00 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 ndSetterAccessibilityCompatabili
dc20 74 79 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 ty(property);..............Write
dc40 50 72 69 6d 69 74 69 76 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 70 72 6f 70 65 72 74 79 2c 20 PrimitiveTypeProperty(property,.
dc60 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f code);..........}..........regio
dc80 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e n.End();............region.Begin
dca0 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 (GetResourceString("Template_Reg
dcc0 69 6f 6e 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 ionComplexProperties"));........
dce0 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 20 ..foreach.(EdmProperty.property.
dd00 69 6e 20 65 6e 74 69 74 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 70 20 3d 3e 20 in.entity.Properties.Where(p.=>.
dd20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 20 26 26 20 70 2e 54 p.DeclaringType.==.entity.&&.p.T
dd40 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 29 ypeUsage.EdmType.is.ComplexType)
dd60 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 56 65 72 69 66 79 )..........{..............Verify
dd80 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 GetterAndSetterAccessibilityComp
dda0 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 atability(property);............
ddc0 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 79 28 70 72 6f 70 65 ..WriteComplexTypeProperty(prope
dde0 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 rty,.code);..........}..........
de00 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 region.End();................thi
de20 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f s.Write("\r\n");.............///
de40 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 /////..........////////.........
de60 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e ..////////..........region.Begin
de80 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 (GetResourceString("Template_Reg
dea0 69 6f 6e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 ionNavigationProperties"));.....
dec0 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 .....foreach.(NavigationProperty
dee0 20 6e 61 76 50 72 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f .navProperty.in.entity.Navigatio
df00 6e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 6e 20 3d 3e 20 6e 2e 44 65 63 6c 61 72 69 nProperties.Where(n.=>.n.Declari
df20 6e 67 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 ngType.==.entity))..........{...
df40 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 ...........VerifyGetterAndSetter
df60 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 6e 61 76 50 72 AccessibilityCompatability(navPr
df80 6f 70 65 72 74 79 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 operty);................this.Wri
dfa0 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 te("\r\n....///.<summary>\r\n...
dfc0 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 .///.");...............this.Writ
dfe0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
e000 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 6e 61 76 50 72 6f 70 thCulture(SummaryComment(navProp
e020 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 erty)));................this.Wri
e040 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a te("\r\n....///.</summary>");...
e060 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
e080 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c ringHelper.ToStringWithCulture(L
e0a0 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6e 61 76 ongDescriptionCommentElement(nav
e0c0 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 Property,.region.CurrentIndentLe
e0e0 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 vel)));................this.Writ
e100 65 28 22 5c 72 5c 6e 20 20 20 20 5b 58 6d 6c 49 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 e("\r\n....[XmlIgnoreAttribute()
e120 5d 5c 72 5c 6e 20 20 20 20 5b 53 6f 61 70 49 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 5d ]\r\n....[SoapIgnoreAttribute()]
e140 5c 72 5c 6e 20 20 20 20 5b 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 22 20 2b 0d 0a 20 \r\n....[DataMemberAttribu".+...
e160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 65 28 29 5d 5c 72 5c 6e 20 20 20 ..................."te()]\r\n...
e180 20 5b 45 64 6d 52 65 6c 61 74 69 6f 6e 73 68 69 70 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 .[EdmRelationshipNavigationPrope
e1a0 72 74 79 41 74 74 72 69 62 75 74 65 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 rtyAttribute(\"");..............
e1c0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
e1e0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e ToStringWithCulture(navProperty.
e200 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 RelationshipType.NamespaceName))
e220 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c ;................this.Write("\",
e240 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 .\"");...............this.Write(
e260 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
e280 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 Culture(navProperty.Relationship
e2a0 54 79 70 65 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 Type.Name));................this
e2c0 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 .Write("\",.\"");...............
e2e0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
e300 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 oStringWithCulture(navProperty.T
e320 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 oEndMember.Name));..............
e340 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 ..this.Write("\")]\r\n");.......
e360 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d ..........if.(navProperty.ToEndM
e380 65 6d 62 65 72 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 20 3d ember.RelationshipMultiplicity.=
e3a0 3d 20 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 2e 4d 61 6e 79 29 =.RelationshipMultiplicity.Many)
e3c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ..............{................t
e3e0 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 his.Write("....");..............
e400 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
e420 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 ToStringWithCulture(code.SpaceAf
e440 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b ter(NewModifier(navProperty))));
e460 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 .................this.Write(this
e480 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
e4a0 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 6e 61 ure(Accessibility.ForProperty(na
e4c0 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 vProperty)));................thi
e4e0 73 2e 57 72 69 74 65 28 22 20 45 6e 74 69 74 79 43 6f 6c 6c 65 63 74 69 6f 6e 3c 22 29 3b 0d 0a s.Write(".EntityCollection<");..
e500 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
e520 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
e540 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f MultiSchemaEscape(navProperty.To
e560 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 EndMember.GetEntityType(),.code)
e580 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e ));................this.Write(">
e5a0 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 .");...............this.Write(th
e5c0 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
e5e0 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 lture(code.Escape(navProperty)))
e600 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c ;................this.Write("\r\
e620 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 n....{\r\n........");...........
e640 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
e660 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 er.ToStringWithCulture(code.Spac
e680 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e eAfter(Accessibility.ForGetter(n
e6a0 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 avProperty))));................t
e6c0 68 69 73 2e 57 72 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 his.Write("get\r\n........{\r\n.
e6e0 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 ...........return.((IEntityWithR
e700 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d elationships)this).RelationshipM
e720 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 6e 61 67 65 72 ".+......................"anager
e740 2e 47 65 74 52 65 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e 3c 22 29 3b 0d 0a 0a 20 20 20 20 .GetRelatedCollection<");.......
e760 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
e780 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 Helper.ToStringWithCulture(Multi
e7a0 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 SchemaEscape(navProperty.ToEndMe
e7c0 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a mber.GetEntityType(),.code)));..
e7e0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 ..............this.Write(">(\"")
e800 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ;...............this.Write(this.
e820 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
e840 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e re(navProperty.RelationshipType.
e860 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e FullName));................this.
e880 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 Write("\",.\"");...............t
e8a0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
e8c0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f StringWithCulture(navProperty.To
e8e0 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 EndMember.Name));...............
e900 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 .this.Write("\");\r\n........}\r
e920 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 \n........");...............this
e940 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
e960 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 ingWithCulture(code.SpaceAfter(A
e980 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 ccessibility.ForSetter(navProper
e9a0 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 ty))));................this.Writ
e9c0 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 e("set\r\n........{\r\n.........
e9e0 20 20 20 69 66 20 28 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 29 5c 72 5c 6e 20 20 20 20 20 ...if.((value.!=.null))\r\n.....
ea00 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 2b 0d .......{\r\n................".+.
ea20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 28 28 49 45 6e 74 69 74 79 57 ....................."((IEntityW
ea40 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 ithRelationships)this).Relations
ea60 68 69 70 4d 61 6e 61 67 65 72 2e 49 6e 69 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 43 6f 6c 6c hipManager.InitializeRelatedColl
ea80 65 63 74 69 6f 6e 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 ection".+......................"
eaa0 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 <");...............this.Write(th
eac0 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
eae0 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 lture(MultiSchemaEscape(navPrope
eb00 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c rty.ToEndMember.GetEntityType(),
eb20 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 .code)));................this.Wr
eb40 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ite(">(\"");...............this.
eb60 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
eb80 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 ngWithCulture(navProperty.Relati
eba0 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 onshipType.FullName));..........
ebc0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 ......this.Write("\",.\"");.....
ebe0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
ec00 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 ngHelper.ToStringWithCulture(nav
ec20 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a Property.ToEndMember.Name));....
ec40 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 76 61 6c 75 ............this.Write("\",.valu
ec60 65 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 e);\r\n............}\r\n........
ec80 7d 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 }\r\n....}\r\n");...............
eca0 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .}.............else.............
ecc0 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 {................this.Write("...
ece0 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 .");...............this.Write(th
ed00 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
ed20 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 lture(code.SpaceAfter(NewModifie
ed40 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 r(navProperty))));..............
ed60 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
ed80 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c r.ToStringWithCulture(Accessibil
eda0 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d ity.ForProperty(navProperty)));.
edc0 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d ...............this.Write(".");.
ede0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
ee00 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
ee20 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 (MultiSchemaEscape(navProperty.T
ee40 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 oEndMember.GetEntityType(),.code
ee60 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
ee80 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 .");...............this.Write(th
eea0 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
eec0 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 lture(code.Escape(navProperty)))
eee0 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c ;................this.Write("\r\
ef00 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 n....{\r\n........");...........
ef20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
ef40 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 er.ToStringWithCulture(code.Spac
ef60 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e eAfter(Accessibility.ForGetter(n
ef80 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 avProperty))));................t
efa0 68 69 73 2e 57 72 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 his.Write("get\r\n........{\r\n.
efc0 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 ...........return.((IEntityWithR
efe0 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d elationships)this).RelationshipM
f000 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 6e 61 67 65 72 ".+......................"anager
f020 2e 47 65 74 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 .GetRelatedReference<");........
f040 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
f060 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 elper.ToStringWithCulture(MultiS
f080 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d chemaEscape(navProperty.ToEndMem
f0a0 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a ber.GetEntityType(),.code)));...
f0c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b .............this.Write(">(\"");
f0e0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
f100 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
f120 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 e(navProperty.RelationshipType.F
f140 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 ullName));................this.W
f160 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 rite("\",.\"");...............th
f180 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
f1a0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 tringWithCulture(navProperty.ToE
f1c0 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ndMember.Name));................
f1e0 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 2e 56 61 6c 75 65 3b 5c 72 5c 6e 20 20 20 20 20 20 this.Write("\").Value;\r\n......
f200 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ..}\r\n........");..............
f220 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
f240 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 ToStringWithCulture(code.SpaceAf
f260 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 ter(Accessibility.ForSetter(navP
f280 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 roperty))));................this
f2a0 2e 57 72 69 74 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 .Write("set\r\n........{\r\n....
f2c0 20 20 20 20 20 20 20 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 ........((IEntityWithRelationshi
f2e0 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 22 20 2b ps)this).RelationshipManager.".+
f300 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 47 65 74 52 65 6c 61 74 65 ......................"GetRelate
f320 64 52 65 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 dReference<");...............thi
f340 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
f360 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 ringWithCulture(MultiSchemaEscap
f380 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 e(navProperty.ToEndMember.GetEnt
f3a0 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 ityType(),.code)));.............
f3c0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 ...this.Write(">(\"");..........
f3e0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
f400 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 per.ToStringWithCulture(navPrope
f420 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b rty.RelationshipType.FullName));
f440 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 ................this.Write("\",.
f460 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 \"");...............this.Write(t
f480 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
f4a0 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e ulture(navProperty.ToEndMember.N
f4c0 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ame));................this.Write
f4e0 28 22 5c 22 29 2e 56 61 6c 75 65 20 3d 20 76 61 6c 75 65 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 ("\").Value.=.value;\r\n........
f500 7d 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 }\r\n....}\r\n");.............st
f520 72 69 6e 67 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 20 3d 20 6e 61 76 50 72 6f 70 65 72 ring.refPropertyName.=.navProper
f540 74 79 2e 4e 61 6d 65 20 2b 20 22 52 65 66 65 72 65 6e 63 65 22 3b 0d 0a 20 20 20 20 20 20 20 20 ty.Name.+."Reference";..........
f560 69 66 20 28 65 6e 74 69 74 79 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 6d 20 3d 3e 20 6d 2e 4e 61 if.(entity.Members.Any(m.=>.m.Na
f580 6d 65 20 3d 3d 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 me.==.refPropertyName)).........
f5a0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .{.............//...............
f5c0 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f Errors.Add(new.System.CodeDom.Co
f5e0 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 mpiler.CompilerError(SourceCsdlP
f600 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 31 37 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d ath,.-1,.-1,."6017",.String.Form
f620 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a at(CultureInfo.CurrentCulture,..
f640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 ....................GetResourceS
f660 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 66 6c 69 63 74 69 6e 67 47 65 6e 65 72 tring("Template_ConflictingGener
f680 61 74 65 64 4e 61 76 50 72 6f 70 4e 61 6d 65 22 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 atedNavPropName"),..............
f6a0 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 2c 20 65 6e ............navProperty.Name,.en
f6c0 74 69 74 79 2e 46 75 6c 6c 4e 61 6d 65 2c 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 tity.FullName,.refPropertyName))
f6e0 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 );..........}................thi
f700 73 2e 57 72 69 74 65 28 22 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 s.Write("....///.<summary>\r\n..
f720 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 ..///.");...............this.Wri
f740 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
f760 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 6e 61 76 50 72 6f ithCulture(SummaryComment(navPro
f780 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 perty)));................this.Wr
f7a0 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a ite("\r\n....///.</summary>");..
f7c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
f7e0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
f800 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6e 61 LongDescriptionCommentElement(na
f820 76 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c vProperty,.region.CurrentIndentL
f840 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 evel)));................this.Wri
f860 74 65 28 22 5c 72 5c 6e 20 20 20 20 5b 42 72 6f 77 73 61 62 6c 65 41 74 74 72 69 62 75 74 65 28 te("\r\n....[BrowsableAttribute(
f880 66 61 6c 73 65 29 5d 5c 72 5c 6e 20 20 20 20 5b 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 false)]\r\n....[DataMemberAttrib
f8a0 75 74 65 28 29 5d 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ute()]\r\n....");...............
f8c0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
f8e0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 oStringWithCulture(Accessibility
f900 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a .ForProperty(navProperty)));....
f920 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 45 6e 74 69 74 79 52 ............this.Write(".EntityR
f940 65 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e eference<");...............this.
f960 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
f980 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 ngWithCulture(MultiSchemaEscape(
f9a0 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 navProperty.ToEndMember.GetEntit
f9c0 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 yType(),.code)));...............
f9e0 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 .this.Write(">.");..............
fa00 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
fa20 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 72 65 66 50 72 6f 70 65 72 74 79 4e ToStringWithCulture(refPropertyN
fa40 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ame));................this.Write
fa60 28 22 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 ("\r\n....{\r\n........");......
fa80 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
faa0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 gHelper.ToStringWithCulture(code
fac0 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 .SpaceAfter(Accessibility.ForGet
fae0 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 ter(navProperty))));............
fb00 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b ....this.Write("get\r\n........{
fb20 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 49 45 6e 74 69 74 79 \r\n............return.((IEntity
fb40 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e WithRelationships)this).Relation
fb60 73 68 69 70 4d 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 shipM".+......................"a
fb80 6e 61 67 65 72 2e 47 65 74 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a nager.GetRelatedReference<");...
fba0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
fbc0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d ringHelper.ToStringWithCulture(M
fbe0 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 ultiSchemaEscape(navProperty.ToE
fc00 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 ndMember.GetEntityType(),.code))
fc20 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 );................this.Write(">(
fc40 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 \"");...............this.Write(t
fc60 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
fc80 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 ulture(navProperty.RelationshipT
fca0 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ype.FullName));................t
fcc0 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 his.Write("\",.\"");............
fce0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
fd00 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 r.ToStringWithCulture(navPropert
fd20 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 y.ToEndMember.Name));...........
fd40 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 .....this.Write("\");\r\n.......
fd60 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 .}\r\n........");...............
fd80 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
fda0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 oStringWithCulture(code.SpaceAft
fdc0 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 er(Accessibility.ForSetter(navPr
fde0 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e operty))));................this.
fe00 57 72 69 74 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 Write("set\r\n........{\r\n.....
fe20 20 20 20 20 20 20 20 69 66 20 28 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 29 5c 72 5c 6e 20 .......if.((value.!=.null))\r\n.
fe40 20 20 20 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{\r\n................
fe60 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 28 28 49 45 6e 74 ".+......................"((IEnt
fe80 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 ityWithRelationships)this).Relat
fea0 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 49 6e 69 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 ionshipManager.InitializeRelated
fec0 52 65 66 65 72 65 6e 63 65 3c 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Reference<".+...................
fee0 20 20 20 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ..."");...............this.Write
ff00 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
ff20 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 hCulture(MultiSchemaEscape(navPr
ff40 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 operty.ToEndMember.GetEntityType
ff60 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 (),.code)));................this
ff80 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 .Write(">(\"");...............th
ffa0 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
ffc0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c tringWithCulture(navProperty.Rel
ffe0 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 ationshipType.FullName));.......
10000 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a .........this.Write("\",.\"");..
10020 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
10040 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
10060 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d navProperty.ToEndMember.Name));.
10080 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 76 ...............this.Write("\",.v
100a0 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 alue);\r\n............}\r\n.....
100c0 20 20 20 7d 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 ...}\r\n....}\r\n");............
100e0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f .....}..........}..........regio
10100 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 n.End();................this.Wri
10120 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 67 69 te("}\r\n");.........}......regi
10140 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f on.End();........////////....../
10160 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 72 65 67 69 ///////.......////////......regi
10180 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 on.Begin(GetResourceString("Temp
101a0 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 6c 65 78 54 79 70 65 73 22 29 29 3b 0d 0a 20 20 20 late_RegionComplexTypes"));.....
101c0 20 66 6f 72 65 61 63 68 20 28 43 6f 6d 70 6c 65 78 54 79 70 65 20 63 6f 6d 70 6c 65 78 20 69 6e .foreach.(ComplexType.complex.in
101e0 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 3c 43 6f 6d 70 6c 65 78 54 79 70 .GetSourceSchemaTypes<ComplexTyp
10200 65 3e 28 29 2e 4f 72 64 65 72 42 79 28 63 20 3d 3e 20 63 2e 4e 61 6d 65 29 29 0d 0a 20 20 20 20 e>().OrderBy(c.=>.c.Name))......
10220 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c {................this.Write("\r\
10240 6e 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 n///.<summary>\r\n///.");.......
10260 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
10280 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 Helper.ToStringWithCulture(Summa
102a0 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 ryComment(complex)));...........
102c0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .....this.Write("\r\n///.</summa
102e0 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ry>");...............this.Write(
10300 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
10320 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c Culture(LongDescriptionCommentEl
10340 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 ement(complex,.region.CurrentInd
10360 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 entLevel)));................this
10380 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5b 45 64 6d 43 6f 6d 70 6c 65 78 54 79 70 65 41 74 74 72 69 .Write("\r\n[EdmComplexTypeAttri
103a0 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 bute(NamespaceName=\"");........
103c0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
103e0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 elper.ToStringWithCulture(comple
10400 78 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 x.NamespaceName));..............
10420 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 ..this.Write("\",.Name=\"");....
10440 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
10460 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f ingHelper.ToStringWithCulture(co
10480 6d 70 6c 65 78 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 mplex.Name));................thi
104a0 73 2e 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 5b 44 61 74 61 43 6f 6e 74 72 61 63 74 41 74 s.Write("\")]\r\n[DataContractAt
104c0 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3d 74 72 75 65 29 5d 5c 72 5c 6e 5b 53 tribute(IsReference=true)]\r\n[S
104e0 65 72 69 61 6c 69 7a 61 62 6c 65 28 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 erializable()]\r\n");...........
10500 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
10520 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 er.ToStringWithCulture(Accessibi
10540 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 63 6f 6d 70 6c 65 78 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 lity.ForType(complex)));........
10560 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 70 61 72 74 69 61 6c 20 63 6c 61 ........this.Write(".partial.cla
10580 73 73 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ss.");...............this.Write(
105a0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
105c0 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 29 29 29 3b 0d Culture(code.Escape(complex)));.
105e0 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 3a 20 43 6f ...............this.Write(".:.Co
10600 6d 70 6c 65 78 4f 62 6a 65 63 74 5c 72 5c 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 mplexObject\r\n{\r\n");.........
10620 20 20 20 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 63 6f 6d 70 6c 65 78 2c 20 ....WriteFactoryMethod(complex,.
10640 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 code);..........region.Begin(Get
10660 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 50 ResourceString("Template_RegionP
10680 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 rimitiveProperties"));..........
106a0 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 20 69 6e foreach.(EdmProperty.property.in
106c0 20 63 6f 6d 70 6c 65 78 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 70 20 3d 3e 20 70 .complex.Properties.Where(p.=>.p
106e0 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 63 6f 6d 70 6c 65 78 20 26 26 20 70 2e 54 .DeclaringType.==.complex.&&.p.T
10700 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 50 72 69 6d 69 74 69 76 65 54 79 70 ypeUsage.EdmType.is.PrimitiveTyp
10720 65 29 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 56 65 72 69 e))..........{..............Veri
10740 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f fyGetterAndSetterAccessibilityCo
10760 6d 70 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 mpatability(property);..........
10780 20 20 20 20 57 72 69 74 65 50 72 69 6d 69 74 69 76 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 70 ....WritePrimitiveTypeProperty(p
107a0 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 roperty,.code);..........}......
107c0 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f ....region.End();..........regio
107e0 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c n.Begin(GetResourceString("Templ
10800 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d ate_RegionComplexProperties"));.
10820 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 .........foreach.(EdmProperty.pr
10840 6f 70 65 72 74 79 20 69 6e 20 63 6f 6d 70 6c 65 78 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 operty.in.complex.Properties.Whe
10860 72 65 28 70 20 3d 3e 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 63 6f 6d 70 6c re(p.=>.p.DeclaringType.==.compl
10880 65 78 20 26 26 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d ex.&&.p.TypeUsage.EdmType.is.Com
108a0 70 6c 65 78 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 plexType))..........{...........
108c0 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 ...VerifyGetterAndSetterAccessib
108e0 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 ilityCompatability(property);...
10900 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 ...........WriteComplexTypePrope
10920 72 74 79 28 70 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d rty(property,.code);..........}.
10940 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 .........region.End();..........
10960 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 ......this.Write("}\r\n");......
10980 20 20 20 7d 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 ...}......region.End();.........
109a0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 .......this.Write("\r\n");......
109c0 20 20 20 69 66 20 28 21 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d ...if.(!String.IsNullOrEmpty(nam
109e0 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 50 6f 70 espaceName))......{..........Pop
10a00 49 6e 64 65 6e 74 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 Indent();................this.Wr
10a20 69 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 56 65 72 ite("}\r\n");.........}......Ver
10a40 69 66 79 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 ifyTypeUniqueness();............
10a60 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f ....return.this.GenerationEnviro
10a80 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0d nment.ToString();..........}....
10aa0 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a .......////////......////////...
10ac0 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 ....////////........////////....
10ae0 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 70 ..////////.......////////......p
10b00 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 53 rivate.void.WriteFactoryMethod(S
10b20 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2c 20 43 6f tructuralType.structuralType,.Co
10b40 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 20 20 20 20 7b 0d 0a deGenerationTools.code)......{..
10b60 20 20 20 20 20 20 20 20 43 6f 64 65 52 65 67 69 6f 6e 20 72 65 67 69 6f 6e 20 3d 20 6e 65 77 20 ........CodeRegion.region.=.new.
10b80 43 6f 64 65 52 65 67 69 6f 6e 28 74 68 69 73 2c 20 31 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 CodeRegion(this,.1);............
10ba0 73 74 72 69 6e 67 20 6d 65 74 68 6f 64 4e 61 6d 65 20 3d 20 22 43 72 65 61 74 65 22 20 2b 20 73 string.methodName.=."Create".+.s
10bc0 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 55 6e 69 tructuralType.Name;..........Uni
10be0 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 75 6e 69 71 75 65 49 64 65 6e 74 queIdentifierService.uniqueIdent
10c00 69 66 69 65 72 20 3d 20 6e 65 77 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 ifier.=.new.UniqueIdentifierServ
10c20 69 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 69 6e 73 74 61 6e 63 65 4e ice();..........string.instanceN
10c40 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 75 6e 69 71 75 65 49 64 65 6e 74 69 66 69 ame.=.code.Escape(uniqueIdentifi
10c60 65 72 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 28 63 6f 64 65 2e 43 61 6d 65 6c 43 er.AdjustIdentifier((code.CamelC
10c80 61 73 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 29 29 29 29 3b 0d 0a 20 20 ase(structuralType.Name))));....
10ca0 20 20 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 ......IEnumerable<FactoryMethodP
10cc0 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 46 61 63 74 6f 72 79 4d 65 arameter>.parameters.=.FactoryMe
10ce0 74 68 6f 64 50 61 72 61 6d 65 74 65 72 2e 43 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 73 28 73 thodParameter.CreateParameters(s
10d00 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 4f 66 54 79 70 65 3c 45 64 6d tructuralType.Members.OfType<Edm
10d20 50 72 6f 70 65 72 74 79 3e 28 29 2e 57 68 65 72 65 28 70 20 3d 3e 20 49 6e 63 6c 75 64 65 50 72 Property>().Where(p.=>.IncludePr
10d40 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 73 74 72 75 63 74 75 72 61 6c opertyInFactoryMethod(structural
10d60 54 79 70 65 2c 20 70 29 29 2c 20 75 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 2c 20 4d 75 6c Type,.p)),.uniqueIdentifier,.Mul
10d80 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 2c 20 63 6f 64 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 tiSchemaEscape,.code);..........
10da0 20 20 69 66 20 28 70 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 28 29 20 3d 3d 20 30 29 0d 0a ..if.(parameters.Count().==.0)..
10dc0 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 20 69 ............return;............i
10de0 66 20 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 6d 20 f.(structuralType.Members.Any(m.
10e00 3d 3e 20 6d 2e 4e 61 6d 65 20 3d 3d 20 6d 65 74 68 6f 64 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 =>.m.Name.==.methodName)).......
10e20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 20 ...{..............//............
10e40 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d ...Errors.Add(new.System.CodeDom
10e60 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 .Compiler.CompilerError(SourceCs
10e80 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 32 39 22 2c 0d 0a 20 20 20 20 20 20 20 dlPath,.-1,.-1,."6029",.........
10ea0 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e .........String.Format(CultureIn
10ec0 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 fo.CurrentCulture,..............
10ee0 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 ............GetResourceString("T
10f00 65 6d 70 6c 61 74 65 5f 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 4e 61 6d 65 43 6f 6e 66 6c 69 63 emplate_FactoryMethodNameConflic
10f20 74 22 29 2c 20 6d 65 74 68 6f 64 4e 61 6d 65 2c 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e t"),.methodName,.structuralType.
10f40 46 75 6c 6c 4e 61 6d 65 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 FullName)));..........}.........
10f60 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e ...region.Begin(GetResourceStrin
10f80 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 22 g("Template_RegionFactoryMethod"
10fa0 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 ));.....this.Write("\r\n....///.
10fc0 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 <summary>\r\n....///.");.....thi
10fe0 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
11000 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 ringWithCulture(String.Format(Cu
11020 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 ltureInfo.CurrentCulture,.GetRes
11040 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 46 61 63 74 6f 72 79 4d 65 74 ourceString("Template_FactoryMet
11060 68 6f 64 43 6f 6d 6d 65 6e 74 22 29 2c 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d hodComment"),.structuralType.Nam
11080 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f e)));.....this.Write("\r\n....//
110a0 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 /.</summary>");.....this.Write(t
110c0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
110e0 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 ulture(ParameterComments(paramet
11100 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 ers.Select(p.=>.new.Tuple<string
11120 2c 20 73 74 72 69 6e 67 3e 28 70 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 70 2e ,.string>(p.RawParameterName,.p.
11140 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 ParameterComment)),.region.Curre
11160 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 ntIndentLevel)));.....this.Write
11180 28 22 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 22 29 3b 0d 0a 0a 0a 0a ("\r\n....public.static.");.....
111a0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
111c0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 oStringWithCulture(code.Escape(s
111e0 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 tructuralType)));.....this.Write
11200 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 (".");.....this.Write(this.ToStr
11220 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6d 65 ingHelper.ToStringWithCulture(me
11240 74 68 6f 64 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b thodName));.....this.Write("(");
11260 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
11280 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 74 72 69 6e 67 2e 4a per.ToStringWithCulture(string.J
112a0 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e oin(",.",.parameters.Select(p.=>
112c0 20 70 2e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 2b 20 22 20 22 20 2b 20 70 2e 50 61 72 61 6d .p.ParameterType.+.".".+.p.Param
112e0 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 eterName).ToArray())));.....this
11300 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 .Write(")\r\n....{\r\n........")
11320 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
11340 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 lper.ToStringWithCulture(code.Es
11360 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 cape(structuralType)));.....this
11380 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 .Write(".");.....this.Write(this
113a0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
113c0 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 ure(instanceName));.....this.Wri
113e0 74 65 28 22 20 3d 20 6e 65 77 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 te(".=.new.");.....this.Write(th
11400 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
11420 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 lture(code.Escape(structuralType
11440 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b 0d )));.....this.Write("();\r\n");.
11460 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 46 61 63 74 6f 72 79 4d 65 ..............foreach.(FactoryMe
11480 74 68 6f 64 50 61 72 61 6d 65 74 65 72 20 70 61 72 61 6d 65 74 65 72 20 69 6e 20 70 61 72 61 6d thodParameter.parameter.in.param
114a0 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 eters)..........{..............i
114c0 66 20 28 70 61 72 61 6d 65 74 65 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 29 0d 0a 20 20 20 f.(parameter.IsComplexType).....
114e0 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d .........{..................//..
11500 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a ....this.Write("........");.....
11520 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
11540 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 oStringWithCulture(instanceName)
11560 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 );.....this.Write(".");.....this
11580 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
115a0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 61 72 61 6d ingWithCulture(code.Escape(param
115c0 65 74 65 72 2e 53 6f 75 72 63 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 eter.Source)));.....this.Write("
115e0 20 3d 20 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 56 65 72 69 66 79 43 6f 6d 70 6c 65 .=.StructuralObject.VerifyComple
11600 78 4f 62 6a 65 63 74 49 73 4e 6f 74 4e 75 6c 6c 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 xObjectIsNotNull(");.....this.Wr
11620 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
11640 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e WithCulture(parameter.ParameterN
11660 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 5c 22 22 29 3b 0d 0a ame));.....this.Write(",.\"");..
11680 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
116a0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e r.ToStringWithCulture(parameter.
116c0 53 6f 75 72 63 65 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c Source.Name));.....this.Write("\
116e0 22 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ");\r\n");...................}..
11700 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 7b 0d ............else..............{.
11720 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 .................//......this.Wr
11740 69 74 65 28 22 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 ite("........");.....this.Write(
11760 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
11780 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 Culture(instanceName));.....this
117a0 2e 57 72 69 74 65 28 22 2e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 .Write(".");.....this.Write(this
117c0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
117e0 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 ure(code.Escape(parameter.Source
11800 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 22 29 3b 0d 0a 0a 0a 0a )));.....this.Write(".=.");.....
11820 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
11840 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 50 61 72 oStringWithCulture(parameter.Par
11860 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c ameterName));.....this.Write(";\
11880 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 r\n");...................}......
118a0 20 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 72 65 ....}.....this.Write("........re
118c0 74 75 72 6e 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 turn.");.....this.Write(this.ToS
118e0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
11900 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 instanceName));.....this.Write("
11920 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 ;\r\n....}\r\n");...............
11940 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 2f 2f region.End();......}..........//
11960 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f //////......////////......./////
11980 2f 2f 2f 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 50 72 69 6d 69 ///......private.void.WritePrimi
119a0 74 69 76 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 69 tiveTypeProperty(EdmProperty.pri
119c0 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f mitiveProperty,.CodeGenerationTo
119e0 6f 6c 73 20 63 6f 64 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 61 64 61 ols.code)......{..........Metada
11a00 74 61 54 6f 6f 6c 73 20 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 taTools.ef.=.new.MetadataTools(t
11a20 68 69 73 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f his);.....this.Write("\r\n....//
11a40 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 0a 0a 74 /.<summary>\r\n....///.");.....t
11a60 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
11a80 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 StringWithCulture(SummaryComment
11aa0 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e (primitiveProperty)));.....this.
11ac0 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b Write("\r\n....///.</summary>");
11ae0 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
11b00 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 per.ToStringWithCulture(LongDesc
11b20 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 70 72 69 6d 69 74 69 76 65 50 riptionCommentElement(primitiveP
11b40 72 6f 70 65 72 74 79 2c 20 31 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c roperty,.1)));.....this.Write("\
11b60 72 5c 6e 20 20 20 20 5b 45 64 6d 53 63 61 6c 61 72 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 r\n....[EdmScalarPropertyAttribu
11b80 74 65 28 45 6e 74 69 74 79 4b 65 79 50 72 6f 70 65 72 74 79 3d 22 29 3b 0d 0a 0a 0a 0a 74 68 69 te(EntityKeyProperty=");.....thi
11ba0 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
11bc0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 ringWithCulture(code.CreateLiter
11be0 61 6c 28 65 66 2e 49 73 4b 65 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 al(ef.IsKey(primitiveProperty)))
11c00 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 49 73 4e 75 6c 6c 61 62 6c 65 3d );.....this.Write(",.IsNullable=
11c20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ");.....this.Write(this.ToString
11c40 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e Helper.ToStringWithCulture(code.
11c60 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 70 72 69 6d CreateLiteral(ef.IsNullable(prim
11c80 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 itiveProperty))));.....this.Writ
11ca0 65 28 22 29 5d 5c 72 5c 6e 20 20 20 20 5b 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 e(")]\r\n....[DataMemberAttribut
11cc0 65 28 29 5d 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 e()]\r\n....");.....this.Write(t
11ce0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
11d00 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 ulture(code.SpaceAfter(NewModifi
11d20 65 72 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 er(primitiveProperty))));.....th
11d40 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
11d60 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 tringWithCulture(Accessibility.F
11d80 6f 72 50 72 6f 70 65 72 74 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b orProperty(primitiveProperty)));
11da0 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 .....this.Write(".");.....this.W
11dc0 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
11de0 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d 69 74 69 gWithCulture(code.Escape(primiti
11e00 76 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 veProperty.TypeUsage)));.....thi
11e20 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 s.Write(".");.....this.Write(thi
11e40 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
11e60 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 ture(code.Escape(primitiveProper
11e80 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b ty)));.....this.Write("\r\n....{
11ea0 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 \r\n........");.....this.Write(t
11ec0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
11ee0 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 ulture(code.SpaceAfter(Accessibi
11f00 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 lity.ForGetter(primitiveProperty
11f20 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 ))));.....this.Write("get\r\n...
11f40 20 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 69 .....{\r\n");..................i
11f60 66 20 28 65 66 2e 43 6c 72 54 79 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e f.(ef.ClrType(primitiveProperty.
11f80 54 79 70 65 55 73 61 67 65 29 20 3d 3d 20 74 79 70 65 6f 66 28 62 79 74 65 5b 5d 29 29 0d 0a 20 TypeUsage).==.typeof(byte[]))...
11fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 ...............{.....this.Write(
11fc0 22 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 75 63 74 75 72 61 6c 4f 62 "............return.StructuralOb
11fe0 6a 65 63 74 2e 47 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e ject.GetValidValue(");.....this.
12000 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
12020 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 ngWithCulture(code.FieldName(pri
12040 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 mitiveProperty)));.....this.Writ
12060 65 28 22 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 e(");\r\n");....................
12080 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 20 20 ...}..................else......
120a0 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 ............{.....this.Write("..
120c0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 ..........return.");.....this.Wr
120e0 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
12100 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 WithCulture(code.FieldName(primi
12120 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 tiveProperty)));.....this.Write(
12140 22 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ";\r\n");.......................
12160 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 }.....this.Write("........}\r\n.
12180 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 .......");.....this.Write(this.T
121a0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
121c0 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e e(code.SpaceAfter(Accessibility.
121e0 46 6f 72 53 65 74 74 65 72 28 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 ForSetter((primitiveProperty))))
12200 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 );.....this.Write("set\r\n......
12220 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 66 2e ..{\r\n");...............if.(ef.
12240 49 73 4b 65 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 0d 0a 20 20 20 20 20 IsKey(primitiveProperty)).......
12260 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 28 65 66 .......{..................if.(ef
12280 2e 43 6c 72 54 79 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 .ClrType(primitiveProperty.TypeU
122a0 73 61 67 65 29 20 3d 3d 20 74 79 70 65 6f 66 28 62 79 74 65 5b 5d 29 29 0d 0a 20 20 20 20 20 20 sage).==.typeof(byte[]))........
122c0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 ..........{.....this.Write("....
122e0 20 20 20 20 20 20 20 20 69 66 20 28 21 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 42 69 ........if.(!StructuralObject.Bi
12300 6e 61 72 79 45 71 75 61 6c 73 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 naryEquals(");.....this.Write(th
12320 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
12340 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 lture(code.FieldName(primitivePr
12360 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 76 61 6c operty)));.....this.Write(",.val
12380 75 65 29 29 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ue))\r\n");.....................
123a0 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 20 20 20 ..}..................else.......
123c0 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 ...........{.....this.Write("...
123e0 20 20 20 20 20 20 20 20 20 69 66 20 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 .........if.(");.....this.Write(
12400 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
12420 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 Culture(code.FieldName(primitive
12440 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 21 3d Property)));.....this.Write(".!=
12460 20 76 61 6c 75 65 29 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .value)\r\n");..................
12480 20 20 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 .....}.....this.Write(".........
124a0 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 73 68 49 6e ...{\r\n");...............PushIn
124c0 64 65 6e 74 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 31 29 29 3b 0d 0a dent(CodeRegion.GetIndent(1));..
124e0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 ............}.....this.Write("..
12500 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 ..........");.....this.Write(thi
12520 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
12540 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 ture(ChangingMethodName(primitiv
12560 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 76 eProperty)));.....this.Write("(v
12580 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 alue);\r\n............ReportProp
125a0 65 72 74 79 43 68 61 6e 67 69 6e 67 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 ertyChanging(\"");.....this.Writ
125c0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
125e0 74 68 43 75 6c 74 75 72 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 thCulture(primitiveProperty.Name
12600 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 ));.....this.Write("\");\r\n....
12620 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ........");.....this.Write(this.
12640 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
12660 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 re(code.FieldName(primitivePrope
12680 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 53 74 72 75 63 rty)));.....this.Write(".=.Struc
126a0 74 75 72 61 6c 4f 62 6a 65 63 74 2e 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 76 61 6c 75 65 22 turalObject.SetValidValue(value"
126c0 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 );.....this.Write(this.ToStringH
126e0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4f 70 74 69 6f 6e elper.ToStringWithCulture(Option
12700 61 6c 4e 75 6c 6c 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 53 65 74 56 61 6c 69 64 56 61 alNullableParameterForSetValidVa
12720 6c 75 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d lue(primitiveProperty,.code)));.
12740 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 ....this.Write(");\r\n..........
12760 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 65 64 28 5c 22 22 29 3b 0d 0a 0a ..ReportPropertyChanged(\"");...
12780 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
127a0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 72 69 6d 69 74 69 76 65 50 72 .ToStringWithCulture(primitivePr
127c0 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c operty.Name));.....this.Write("\
127e0 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e ");\r\n............");.....this.
12800 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
12820 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 ngWithCulture(ChangedMethodName(
12840 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 primitiveProperty)));.....this.W
12860 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 69 rite("();\r\n");...............i
12880 66 20 28 65 66 2e 49 73 4b 65 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 0d f.(ef.IsKey(primitiveProperty)).
128a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 50 6f 70 49 6e 64 65 6e .............{..........PopInden
128c0 74 28 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 t();.....this.Write("...........
128e0 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0a .}\r\n");...................}...
12900 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 7d ..this.Write("........}\r\n....}
12920 5c 72 5c 6e 20 20 20 20 70 72 69 76 61 74 65 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 \r\n....private.");.....this.Wri
12940 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
12960 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d 69 74 69 76 65 ithCulture(code.Escape(primitive
12980 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e Property.TypeUsage)));.....this.
129a0 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e Write(".");.....this.Write(this.
129c0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
129e0 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 re(code.FieldName(primitivePrope
12a00 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 rty)));.....this.Write(this.ToSt
12a20 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
12a40 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 20 3d 20 22 2c 20 63 6f 64 65 2e 43 72 65 ode.StringBefore(".=.",.code.Cre
12a60 61 74 65 4c 69 74 65 72 61 6c 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 44 65 66 ateLiteral(primitiveProperty.Def
12a80 61 75 6c 74 56 61 6c 75 65 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b aultValue))));.....this.Write(";
12aa0 5c 72 5c 6e 20 20 20 20 70 61 72 74 69 61 6c 20 76 6f 69 64 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 \r\n....partial.void.");.....thi
12ac0 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
12ae0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 ringWithCulture(ChangingMethodNa
12b00 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 me(primitiveProperty)));.....thi
12b20 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 s.Write("(");.....this.Write(thi
12b40 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
12b60 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 ture(code.Escape(primitiveProper
12b80 74 79 2e 54 79 70 65 55 73 61 67 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 ty.TypeUsage)));.....this.Write(
12ba0 22 20 76 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 70 61 72 74 69 61 6c 20 76 6f 69 64 20 22 29 ".value);\r\n....partial.void.")
12bc0 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
12be0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 lper.ToStringWithCulture(Changed
12c00 4d 65 74 68 6f 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 3b MethodName(primitiveProperty)));
12c20 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a .....this.Write("();\r\n");.....
12c40 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f ......}........////////......///
12c60 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 70 72 69 76 61 74 /////.......////////......privat
12c80 65 20 76 6f 69 64 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 79 28 e.void.WriteComplexTypeProperty(
12ca0 45 64 6d 50 72 6f 70 65 72 74 79 20 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 43 6f 64 EdmProperty.complexProperty,.Cod
12cc0 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 20 20 20 20 7b 0d 0a 0a eGenerationTools.code)......{...
12ce0 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 ..this.Write("\r\n....///.<summa
12d00 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 ry>\r\n....///.");.....this.Writ
12d20 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
12d40 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 thCulture(SummaryComment(complex
12d60 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c Property)));.....this.Write("\r\
12d80 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e n....///.</summary>");.....this.
12da0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
12dc0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d ngWithCulture(LongDescriptionCom
12de0 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 31 29 29 mentElement(complexProperty,.1))
12e00 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 5b 45 64 6d 43 );.....this.Write("\r\n....[EdmC
12e20 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 20 20 omplexPropertyAttribute()]\r\n..
12e40 20 20 5b 44 65 73 69 67 6e 65 72 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 56 69 73 69 62 69 6c 69 ..[DesignerSerializationVisibili
12e60 74 79 28 44 65 73 69 67 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 22 6e 65 72 53 65 72 69 61 6c 69 ty(Desig".+.........."nerSeriali
12e80 7a 61 74 69 6f 6e 56 69 73 69 62 69 6c 69 74 79 2e 43 6f 6e 74 65 6e 74 29 5d 5c 72 5c 6e 20 20 zationVisibility.Content)]\r\n..
12ea0 20 20 5b 58 6d 6c 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c 6c 61 62 6c 65 3d 74 72 75 65 29 5d 5c ..[XmlElement(IsNullable=true)]\
12ec0 72 5c 6e 20 20 20 20 5b 53 6f 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 22 61 70 45 6c 65 6d 65 6e r\n....[So".+.........."apElemen
12ee0 74 28 49 73 4e 75 6c 6c 61 62 6c 65 3d 74 72 75 65 29 5d 5c 72 5c 6e 20 20 20 20 5b 44 61 74 61 t(IsNullable=true)]\r\n....[Data
12f00 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a MemberAttribute()]\r\n....");...
12f20 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
12f40 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
12f60 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 fter(NewModifier(complexProperty
12f80 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ))));.....this.Write(this.ToStri
12fa0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 ngHelper.ToStringWithCulture(Acc
12fc0 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 63 6f 6d 70 6c 65 78 50 72 essibility.ForProperty(complexPr
12fe0 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d operty)));.....this.Write(".");.
13000 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
13020 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 er.ToStringWithCulture(MultiSche
13040 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 maEscape(complexProperty.TypeUsa
13060 67 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 ge,.code)));.....this.Write(".")
13080 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
130a0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 lper.ToStringWithCulture(code.Es
130c0 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 cape(complexProperty)));.....thi
130e0 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 s.Write("\r\n....{\r\n........")
13100 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
13120 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 lper.ToStringWithCulture(code.Sp
13140 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 aceAfter(Accessibility.ForGetter
13160 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 (complexProperty))));.....this.W
13180 72 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 rite("get\r\n........{\r\n......
131a0 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ......");.....this.Write(this.To
131c0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
131e0 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 (code.FieldName(complexProperty)
13200 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 47 65 74 56 61 6c 69 64 56 ));.....this.Write(".=.GetValidV
13220 61 6c 75 65 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 alue(");.....this.Write(this.ToS
13240 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
13260 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 code.FieldName(complexProperty))
13280 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 );.....this.Write(",.\"");.....t
132a0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
132c0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 StringWithCulture(complexPropert
132e0 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 66 61 y.Name));.....this.Write("\",.fa
13300 6c 73 65 2c 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 lse,.");.....this.Write(this.ToS
13320 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
13340 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 InitializedTrackingField(complex
13360 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 Property,.code)));.....this.Writ
13380 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 e(");\r\n............");.....thi
133a0 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
133c0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b ringWithCulture(InitializedTrack
133e0 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 ingField(complexProperty,.code))
13400 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 74 72 75 65 3b 5c 72 5c 6e 20 );.....this.Write(".=.true;\r\n.
13420 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 ...........return.");.....this.W
13440 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
13460 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 gWithCulture(code.FieldName(comp
13480 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 lexProperty)));.....this.Write("
134a0 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a ;\r\n........}\r\n........");...
134c0 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
134e0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
13500 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 63 6f 6d fter(Accessibility.ForSetter(com
13520 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 plexProperty))));.....this.Write
13540 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 ("set\r\n........{\r\n..........
13560 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..");.....this.Write(this.ToStri
13580 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 ngHelper.ToStringWithCulture(Cha
135a0 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 ngingMethodName(complexProperty)
135c0 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 76 61 6c 75 65 29 3b 5c 72 5c 6e ));.....this.Write("(value);\r\n
135e0 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 69 ............ReportPropertyChangi
13600 6e 67 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 ng(\"");.....this.Write(this.ToS
13620 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
13640 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 complexProperty.Name));.....this
13660 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d .Write("\");\r\n............");.
13680 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
136a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c er.ToStringWithCulture(code.Fiel
136c0 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 dName(complexProperty)));.....th
136e0 69 73 2e 57 72 69 74 65 28 22 20 3d 20 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 3b 0d 0a is.Write(".=.SetValidValue(");..
13700 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
13720 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 r.ToStringWithCulture(code.Field
13740 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 Name(complexProperty)));.....thi
13760 73 2e 57 72 69 74 65 28 22 2c 20 76 61 6c 75 65 2c 20 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 s.Write(",.value,.\"");.....this
13780 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
137a0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e ingWithCulture(complexProperty.N
137c0 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 ame));.....this.Write("\");\r\n.
137e0 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 ...........");.....this.Write(th
13800 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
13820 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 lture(InitializedTrackingField(c
13840 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 omplexProperty,.code)));.....thi
13860 73 2e 57 72 69 74 65 28 22 20 3d 20 74 72 75 65 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 s.Write(".=.true;\r\n...........
13880 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 65 64 28 5c 22 22 29 3b 0d 0a 0a 0a .ReportPropertyChanged(\"");....
138a0 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
138c0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 ToStringWithCulture(complexPrope
138e0 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b rty.Name));.....this.Write("\");
13900 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 \r\n............");.....this.Wri
13920 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
13940 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d ithCulture(ChangedMethodName(com
13960 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 plexProperty)));.....this.Write(
13980 22 28 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 20 20 "();\r\n........}\r\n....}\r\n..
139a0 20 20 70 72 69 76 61 74 65 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 ..private.");.....this.Write(thi
139c0 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
139e0 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 ture(MultiSchemaEscape(complexPr
13a00 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 operty.TypeUsage,.code)));.....t
13a20 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 his.Write(".");.....this.Write(t
13a40 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
13a60 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f ulture(code.FieldName(complexPro
13a80 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 perty)));.....this.Write(";\r\n.
13aa0 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 ...private.bool.");.....this.Wri
13ac0 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
13ae0 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 ithCulture(InitializedTrackingFi
13b00 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a eld(complexProperty,.code)));...
13b20 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 70 61 72 74 69 61 6c 20 76 ..this.Write(";\r\n....partial.v
13b40 6f 69 64 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 oid.");.....this.Write(this.ToSt
13b60 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 ringHelper.ToStringWithCulture(C
13b80 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 hangingMethodName(complexPropert
13ba0 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 0a 0a 74 y)));.....this.Write("(");.....t
13bc0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
13be0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 StringWithCulture(MultiSchemaEsc
13c00 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 ape(complexProperty.TypeUsage,.c
13c20 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 76 61 6c 75 65 29 3b ode)));.....this.Write(".value);
13c40 5c 72 5c 6e 20 20 20 20 70 61 72 74 69 61 6c 20 76 6f 69 64 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 \r\n....partial.void.");.....thi
13c60 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
13c80 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d ringWithCulture(ChangedMethodNam
13ca0 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 e(complexProperty)));.....this.W
13cc0 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a rite("();\r\n");...........}....
13ce0 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e ....private.void.WriteLazyLoadin
13d00 67 45 6e 61 62 6c 65 64 28 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 63 6f 6e 74 61 69 6e gEnabled(EntityContainer.contain
13d20 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 6c 61 7a 79 4c er)......{..........string.lazyL
13d40 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 oadingAttributeValue.=.null;....
13d60 20 20 20 20 20 20 73 74 72 69 6e 67 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 ......string.lazyLoadingAttribut
13d80 65 4e 61 6d 65 20 3d 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 45 44 4d 5f 41 4e eName.=.MetadataConstants.EDM_AN
13da0 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 2b 20 22 3a 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e NOTATION_09_02.+.":LazyLoadingEn
13dc0 61 62 6c 65 64 22 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 4d 65 74 61 64 61 74 61 54 6f 6f 6c abled";..........if(MetadataTool
13de0 73 2e 54 72 79 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 s.TryGetStringMetadataPropertySe
13e00 74 74 69 6e 67 28 63 6f 6e 74 61 69 6e 65 72 2c 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 tting(container,.lazyLoadingAttr
13e20 69 62 75 74 65 4e 61 6d 65 2c 20 6f 75 74 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 ibuteName,.out.lazyLoadingAttrib
13e40 75 74 65 56 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 uteValue))..........{...........
13e60 20 20 20 62 6f 6f 6c 20 69 73 4c 61 7a 79 4c 6f 61 64 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0d 0a ...bool.isLazyLoading.=.false;..
13e80 20 20 20 20 20 20 20 20 20 20 20 20 69 66 28 62 6f 6f 6c 2e 54 72 79 50 61 72 73 65 28 6c 61 7a ............if(bool.TryParse(laz
13ea0 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 2c 20 6f 75 74 20 69 73 4c 61 yLoadingAttributeValue,.out.isLa
13ec0 7a 79 4c 6f 61 64 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 zyLoading))..............{.....t
13ee0 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 74 68 69 73 2e 43 6f 6e 74 65 78 74 4f his.Write("........this.ContextO
13f00 70 74 69 6f 6e 73 2e 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 22 29 3b 0d ptions.LazyLoadingEnabled.=.");.
13f20 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
13f40 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 73 4c 61 7a 79 4c 6f 61 er.ToStringWithCulture(isLazyLoa
13f60 64 69 6e 67 2e 54 6f 53 74 72 69 6e 67 28 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 ding.ToString().ToLowerInvariant
13f80 28 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 22 29 3b 0d 0a ()));.....this.Write(";\r\n");..
13fa0 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 .................}..........}...
13fc0 20 20 20 7d 0d 0a 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 2f 2f 2f ...}....////////..////////...///
13fe0 2f 2f 2f 2f 2f 0d 0a 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 6f 75 72 63 65 43 73 64 6c 50 /////..public.string.SourceCsdlP
14000 61 74 68 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 ath{.get;.set;.}..public.string.
14020 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 ModelNamespace{.get;.set;.}..pub
14040 6c 69 63 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 lic.EdmItemCollection.ItemCollec
14060 74 69 6f 6e 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 tion{.get;.set;.}..public.IEnume
14080 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 rable<string>.ReferenceCsdlPaths
140a0 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 4e 75 6c 6c 61 62 6c 65 3c 62 {.get;.set;.}..public.Nullable<b
140c0 6f 6f 6c 3e 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 7b 20 ool>.CreateContextAddToMethods{.
140e0 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 get;.set;.}..public.Dictionary<s
14100 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 tring,.string>.EdmToObjectNamesp
14120 61 63 65 4d 61 70 0d 0a 7b 0d 0a 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 65 64 6d aceMap..{......get.{.return._edm
14140 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 3b 20 7d 0d 0a 20 20 20 20 73 65 74 ToObjectNamespaceMap;.}......set
14160 20 7b 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 20 3d 20 76 61 .{._edmToObjectNamespaceMap.=.va
14180 6c 75 65 3b 20 7d 0d 0a 7d 0d 0a 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 lue;.}..}..public.Dictionary<str
141a0 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 ing,.string>._edmToObjectNamespa
141c0 63 65 4d 61 70 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 ceMap.=.new.Dictionary<string,.s
141e0 74 72 69 6e 67 3e 28 29 3b 0d 0a 70 75 62 6c 69 63 20 44 6f 75 62 6c 65 20 53 6f 75 72 63 65 45 tring>();..public.Double.SourceE
14200 64 6d 56 65 72 73 69 6f 6e 0d 0a 7b 0d 0a 20 20 20 20 67 65 74 0d 0a 20 20 20 20 7b 0d 0a 20 20 dmVersion..{......get......{....
14220 20 20 20 20 20 20 69 66 20 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c ......if.(ItemCollection.!=.null
14240 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e )..........{..............return
14260 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 45 64 6d 56 65 72 73 69 6f 6e 3b 0d 0a 20 20 20 .ItemCollection.EdmVersion;.....
14280 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 30 2e 30 3b 0d 0a 20 .....}............return.0.0;...
142a0 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a ...}..}....////////..////////...
142c0 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 73 74 61 74 69 63 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 ////////..static.System.Resource
142e0 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 s.ResourceManager.ResourceManage
14300 72 0d 0a 7b 0d 0a 20 20 20 20 67 65 74 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 r..{......get......{..........if
14320 20 28 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 .(_resourceManager.==.null).....
14340 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 .....{..............System.Resou
14360 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 72 65 73 6f 75 72 63 65 4d 61 6e rces.ResourceManager.resourceMan
14380 61 67 65 72 20 3d 20 6e 65 77 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f ager.=.new.System.Resources.Reso
143a0 75 72 63 65 4d 61 6e 61 67 65 72 28 22 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e urceManager("System.Data.Entity.
143c0 44 65 73 69 67 6e 22 2c 20 74 79 70 65 6f 66 28 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 Design",.typeof(System.Data.Enti
143e0 74 79 2e 44 65 73 69 67 6e 2e 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ty.Design.MetadataItemCollection
14400 46 61 63 74 6f 72 79 29 2e 41 73 73 65 6d 62 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Factory).Assembly);.............
14420 20 53 79 73 74 65 6d 2e 54 68 72 65 61 64 69 6e 67 2e 49 6e 74 65 72 6c 6f 63 6b 65 64 2e 43 6f .System.Threading.Interlocked.Co
14440 6d 70 61 72 65 45 78 63 68 61 6e 67 65 28 72 65 66 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 mpareExchange(ref._resourceManag
14460 65 72 2c 20 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2c 20 6e 75 6c 6c 29 3b 0d 0a 20 20 20 er,.resourceManager,.null);.....
14480 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f 72 65 73 6f 75 72 63 65 .....}..........return._resource
144a0 4d 61 6e 61 67 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 73 74 61 74 69 63 20 53 79 73 74 65 Manager;......}..}..static.Syste
144c0 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 5f 72 65 73 m.Resources.ResourceManager._res
144e0 6f 75 72 63 65 4d 61 6e 61 67 65 72 3b 0d 0a 0a 0a 0a 0d 0a 0d 0a 0d 0a 70 72 69 76 61 74 65 20 ourceManager;...........private.
14500 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 static.string.GetResourceString(
14520 73 74 72 69 6e 67 20 72 65 73 6f 75 72 63 65 4e 61 6d 65 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 string.resourceName)..{......ret
14540 75 72 6e 20 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 47 65 74 53 74 72 69 6e 67 28 72 65 urn.ResourceManager.GetString(re
14560 73 6f 75 72 63 65 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 6e 75 6c 6c 29 3b 20 2f 2f 20 sourceName,...........null);.//.
14580 0d 0a 7d 0d 0a 0d 0a 0d 0a 0d 0a 70 72 69 76 61 74 65 20 76 6f 69 64 20 56 65 72 69 66 79 54 79 ..}........private.void.VerifyTy
145a0 70 65 55 6e 69 71 75 65 6e 65 73 73 28 29 0d 0a 7b 0d 0a 20 20 20 20 48 61 73 68 53 65 74 3c 73 peUniqueness()..{......HashSet<s
145c0 74 72 69 6e 67 3e 20 68 61 73 68 20 3d 20 6e 65 77 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 tring>.hash.=.new.HashSet<string
145e0 3e 28 29 3b 0d 0a 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 47 6c 6f 62 61 6c 49 74 65 6d >();......IEnumerable<GlobalItem
14600 3e 20 61 6c 6c 54 79 70 65 73 20 3d 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 >.allTypes.=.GetSourceSchemaType
14620 73 3c 47 6c 6f 62 61 6c 49 74 65 6d 3e 28 29 2e 57 68 65 72 65 28 69 20 3d 3e 20 69 20 69 73 20 s<GlobalItem>().Where(i.=>.i.is.
14640 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 7c 7c 20 69 20 69 73 20 45 6e 74 69 74 79 43 6f 6e StructuralType.||.i.is.EntityCon
14660 74 61 69 6e 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 28 47 6c 6f 62 61 6c 49 tainer);........foreach.(GlobalI
14680 74 65 6d 20 74 79 70 65 20 69 6e 20 61 6c 6c 54 79 70 65 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 tem.type.in.allTypes)......{....
146a0 20 20 20 20 20 20 69 66 20 28 21 68 61 73 68 2e 41 64 64 28 47 65 74 47 6c 6f 62 61 6c 49 74 65 ......if.(!hash.Add(GetGlobalIte
146c0 6d 4e 61 6d 65 28 74 79 70 65 29 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 mName(type)))..........{........
146e0 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 ......//...............Errors.Ad
14700 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f d(new.System.CodeDom.Compiler.Co
14720 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 mpilerError(SourceCsdlPath,.-1,.
14740 2d 31 2c 20 22 36 30 33 34 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 -1,."6034",...............String
14760 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 .Format(CultureInfo.CurrentCultu
14780 72 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 re,..................GetResource
147a0 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 44 75 70 6c 69 63 61 74 65 54 6f 70 4c 65 76 String("Template_DuplicateTopLev
147c0 65 6c 54 79 70 65 22 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 47 6c 6f 62 61 elType"),...............GetGloba
147e0 6c 49 74 65 6d 4e 61 6d 65 28 74 79 70 65 29 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a lItemName(type))));..........}..
14800 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 70 72 6f 74 65 63 74 65 64 20 73 74 72 69 6e 67 20 47 65 74 ....}..}....protected.string.Get
14820 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 28 47 6c 6f 62 61 6c 49 74 65 6d 20 69 74 65 6d 29 0d GlobalItemName(GlobalItem.item).
14840 0a 7b 0d 0a 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 45 64 6d 54 79 70 65 29 0d 0a 20 20 .{......if.(item.is.EdmType)....
14860 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ..{..........//...........return
14880 20 28 28 45 64 6d 54 79 70 65 29 69 74 65 6d 29 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 7d 0d 0a 20 .((EdmType)item).Name;......}...
148a0 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 ...else......{..........//......
148c0 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 69 74 .....return.((EntityContainer)it
148e0 65 6d 29 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 0d 0a 0d 0a 76 6f 69 64 20 em).Name;......}..}........void.
14900 41 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 55 73 65 72 53 65 74 74 69 6e 67 73 20 75 ApplyUserSettings(UserSettings.u
14920 73 65 72 53 65 74 74 69 6e 67 73 29 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 69 66 serSettings)..{......//.......if
14940 20 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b .(SourceCsdlPath.==.null)......{
14960 0d 0a 23 69 66 20 21 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 ..#if.!PREPROCESSED_TEMPLATE....
14980 20 20 20 20 20 20 69 66 28 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c ......if(userSettings.SourceCsdl
149a0 50 61 74 68 20 3d 3d 20 22 24 22 20 2b 20 22 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 22 20 2b 20 Path.==."$".+."edmxInputFile".+.
149c0 22 24 22 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 45 72 72 "$")..........{..............Err
149e0 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 ors.Add(new.System.CodeDom.Compi
14a00 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 ler.CompilerError(Host.TemplateF
14a20 69 6c 65 2c 20 2d 31 2c 20 2d 31 2c 20 22 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ile,.-1,.-1,."",................
14a40 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 ..GetResourceString("Template_Re
14a60 70 6c 61 63 65 56 73 49 74 65 6d 54 65 6d 70 6c 61 74 65 54 6f 6b 65 6e 22 29 29 29 3b 0d 0a 20 placeVsItemTemplateToken")));...
14a80 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ...........return;..........}...
14aa0 0a 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 48 6f 73 74 2e 52 .........SourceCsdlPath.=.Host.R
14ac0 65 73 6f 6c 76 65 50 61 74 68 28 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 esolvePath(userSettings.SourceCs
14ae0 64 6c 50 61 74 68 29 3b 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 dlPath);..#else..........SourceC
14b00 73 64 6c 50 61 74 68 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 sdlPath.=.userSettings.SourceCsd
14b20 6c 50 61 74 68 3b 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 20 lPath;..#endif......}........//.
14b40 6e 6f 72 6d 61 6c 69 7a 65 20 74 68 65 20 70 61 74 68 2c 20 72 65 6d 6f 76 65 20 2e 2e 5c 20 66 normalize.the.path,.remove...\.f
14b60 72 6f 6d 20 69 74 0d 0a 20 20 20 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 50 61 74 rom.it......SourceCsdlPath.=.Pat
14b80 68 2e 47 65 74 46 75 6c 6c 50 61 74 68 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 3b 0d 0a h.GetFullPath(SourceCsdlPath);..
14ba0 0d 0a 0d 0a 20 20 20 20 69 66 20 28 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 3d ........if.(ReferenceCsdlPaths.=
14bc0 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 63 =.null)......{..........Referenc
14be0 65 43 73 64 6c 50 61 74 68 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 52 65 66 65 72 65 eCsdlPaths.=.userSettings.Refere
14c00 6e 63 65 43 73 64 6c 50 61 74 68 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 nceCsdlPaths;......}........if.(
14c20 21 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 2e 48 61 73 56 61 !CreateContextAddToMethods.HasVa
14c40 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 43 72 65 61 74 65 43 6f 6e 74 65 lue)......{..........CreateConte
14c60 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 72 xtAddToMethods.=.userSettings.Cr
14c80 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 3b 0d 0a 20 20 20 20 7d 0d eateContextAddToMethods;......}.
14ca0 0a 0d 0a 20 20 20 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 20 3d 20 47 .......DefaultSummaryComment.=.G
14cc0 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6d 6d 65 etResourceString("Template_Comme
14ce0 6e 74 4e 6f 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 22 29 3b 0d 0a 7d 0d 0a 0d 0a 63 6c 61 73 73 ntNoDocumentation");..}....class
14d00 20 55 73 65 72 53 65 74 74 69 6e 67 73 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 .UserSettings..{......public.str
14d20 69 6e 67 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d ing.SourceCsdlPath{.get;.set;.}.
14d40 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 5b 5d 20 52 65 66 65 72 65 6e 63 65 43 73 .....public.string[].ReferenceCs
14d60 64 6c 50 61 74 68 73 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 dlPaths{.get;.set;.}......public
14d80 20 62 6f 6f 6c 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 7b 20 67 .bool.FullyQualifySystemTypes{.g
14da0 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 43 72 65 61 et;.set;.}......public.bool.Crea
14dc0 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 7b 20 67 65 74 3b 20 73 65 74 3b teContextAddToMethods{.get;.set;
14de0 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 43 61 6d 65 6c 43 61 73 65 46 69 65 .}......public.bool.CamelCaseFie
14e00 6c 64 73 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 47 65 lds{.get;.set;.}..}....string.Ge
14e20 74 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f tNamespaceName(CodeGenerationToo
14e40 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 6e 61 6d 65 73 70 61 63 ls.code)..{......string.namespac
14e60 65 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 56 73 4e 61 6d 65 73 70 61 63 65 53 75 67 67 65 73 74 69 eName.=.code.VsNamespaceSuggesti
14e80 6f 6e 28 29 3b 0d 0a 0d 0a 23 69 66 20 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 on();....#if.PREPROCESSED_TEMPLA
14ea0 54 45 0d 0a 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 TE......if.(String.IsNullOrEmpty
14ec0 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 (namespaceName))......{.........
14ee0 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 .namespaceName.=.GetObjectNamesp
14f00 61 63 65 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 23 65 6e ace(ModelNamespace);......}..#en
14f20 64 69 66 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3b 0d 0a dif......return.namespaceName;..
14f40 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 54 79 }....string.MultiSchemaEscape(Ty
14f60 70 65 55 73 61 67 65 20 75 73 61 67 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f peUsage.usage,.CodeGenerationToo
14f80 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 ls.code)..{......StructuralType.
14fa0 73 74 72 75 63 74 75 72 61 6c 20 3d 20 75 73 61 67 65 2e 45 64 6d 54 79 70 65 20 61 73 20 53 74 structural.=.usage.EdmType.as.St
14fc0 72 75 63 74 75 72 61 6c 54 79 70 65 3b 0d 0a 20 20 20 20 69 66 20 28 73 74 72 75 63 74 75 72 61 ructuralType;......if.(structura
14fe0 6c 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 l.!=.null)......{..........retur
15000 6e 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 2c 20 n.MultiSchemaEscape(structural,.
15020 63 6f 64 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 45 code);......}......return.code.E
15040 73 63 61 70 65 28 75 73 61 67 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4d 75 6c 74 69 scape(usage);..}....string.Multi
15060 53 63 68 65 6d 61 45 73 63 61 70 65 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 74 79 70 65 SchemaEscape(StructuralType.type
15080 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a ,.CodeGenerationTools.code)..{..
150a0 20 20 20 20 69 66 20 28 74 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 21 3d 20 4d 6f ....if.(type.NamespaceName.!=.Mo
150c0 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 delNamespace)......{..........re
150e0 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e 45 73 turn.code.CreateFullName(code.Es
15100 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 capeNamespace(GetObjectNamespace
15120 28 74 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 63 61 (type.NamespaceName)),.code.Esca
15140 70 65 28 74 79 70 65 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 pe(type));......}........return.
15160 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 code.Escape(type);..}....string.
15180 4e 65 77 4d 6f 64 69 66 69 65 72 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e NewModifier(NavigationProperty.n
151a0 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 0d 0a 7b 0d 0a 20 20 20 20 54 79 70 65 20 avigationProperty)..{......Type.
151c0 62 61 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 45 6e 74 69 74 79 4f 62 6a 65 63 74 29 3b baseType.=.typeof(EntityObject);
151e0 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 ......return.NewModifier(baseTyp
15200 65 2c 20 6e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d e,.navigationProperty.Name);..}.
15220 0a 0d 0a 73 74 72 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 45 64 6d 46 75 6e 63 74 69 6f ...string.NewModifier(EdmFunctio
15240 6e 20 65 64 6d 46 75 6e 63 74 69 6f 6e 29 0d 0a 7b 0d 0a 20 20 20 20 54 79 70 65 20 62 61 73 65 n.edmFunction)..{......Type.base
15260 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 29 3b 0d 0a 20 Type.=.typeof(ObjectContext);...
15280 20 20 20 72 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 ...return.NewModifier(baseType,.
152a0 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 edmFunction.Name);..}....string.
152c0 4e 65 77 4d 6f 64 69 66 69 65 72 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 7b 0d 0a 20 NewModifier(EntitySet.set)..{...
152e0 20 20 20 54 79 70 65 20 62 61 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 4f 62 6a 65 63 74 ...Type.baseType.=.typeof(Object
15300 43 6f 6e 74 65 78 74 29 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 Context);......return.NewModifie
15320 72 28 62 61 73 65 54 79 70 65 2c 20 73 65 74 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 r(baseType,.set.Name);..}....str
15340 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 ing.NewModifier(EdmProperty.prop
15360 65 72 74 79 29 0d 0a 7b 0d 0a 20 20 20 20 54 79 70 65 20 62 61 73 65 54 79 70 65 3b 0d 0a 20 20 erty)..{......Type.baseType;....
15380 20 20 69 66 20 28 70 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 75 69 ..if.(property.DeclaringType.Bui
153a0 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e ltInTypeKind.==.BuiltInTypeKind.
153c0 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 61 73 65 EntityType)......{..........base
153e0 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 45 6e 74 69 74 79 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 Type.=.typeof(EntityObject);....
15400 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 61 ..}......else......{..........ba
15420 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 29 3b 0d seType.=.typeof(ComplexObject);.
15440 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 .....}......return.NewModifier(b
15460 61 73 65 54 79 70 65 2c 20 70 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 aseType,.property.Name);..}....s
15480 74 72 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 54 79 70 65 20 74 79 70 65 2c 20 73 74 72 tring.NewModifier(Type.type,.str
154a0 69 6e 67 20 6d 65 6d 62 65 72 4e 61 6d 65 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 48 61 73 42 ing.memberName)..{......if.(HasB
154c0 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d 61 74 63 68 69 6e 67 4e 61 6d 65 28 74 79 70 65 2c 20 aseMemberWithMatchingName(type,.
154e0 6d 65 6d 62 65 72 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 memberName))......{..........ret
15500 75 72 6e 20 22 6e 65 77 22 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 urn."new";......}......return.st
15520 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 7d 0d 0a 0d 0a 73 74 61 74 69 63 20 62 6f 6f 6c 20 48 61 ring.Empty;..}....static.bool.Ha
15540 73 42 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d 61 74 63 68 69 6e 67 4e 61 6d 65 28 54 79 70 65 sBaseMemberWithMatchingName(Type
15560 20 74 79 70 65 2c 20 73 74 72 69 6e 67 20 6d 65 6d 62 65 72 4e 61 6d 65 29 0d 0a 7b 0d 0a 20 20 .type,.string.memberName)..{....
15580 20 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 20 62 69 6e 64 69 6e 67 46 6c 61 67 73 20 3d 20 42 69 ..BindingFlags.bindingFlags.=.Bi
155a0 6e 64 69 6e 67 46 6c 61 67 73 2e 46 6c 61 74 74 65 6e 48 69 65 72 61 72 63 68 79 20 7c 20 42 69 ndingFlags.FlattenHierarchy.|.Bi
155c0 6e 64 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 62 6c 69 63 20 7c 20 42 69 6e 64 69 6e 67 46 6c ndingFlags.NonPublic.|.BindingFl
155e0 61 67 73 2e 50 75 62 6c 69 63 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 42 69 ags.Public..................|.Bi
15600 6e 64 69 6e 67 46 6c 61 67 73 2e 49 6e 73 74 61 6e 63 65 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 ndingFlags.Instance.|.BindingFla
15620 67 73 2e 53 74 61 74 69 63 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 2e 47 65 74 4d gs.Static;......return.type.GetM
15640 65 6d 62 65 72 73 28 62 69 6e 64 69 6e 67 46 6c 61 67 73 29 2e 57 68 65 72 65 28 6d 20 3d 3e 20 embers(bindingFlags).Where(m.=>.
15660 49 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 28 6d 29 29 2e 41 6e 79 28 6d 20 3d 3e 20 6d 2e 4e IsVisibleMember(m)).Any(m.=>.m.N
15680 61 6d 65 20 3d 3d 20 6d 65 6d 62 65 72 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 ame.==.memberName);..}....string
156a0 20 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 .ChangingMethodName(EdmMember.me
156c0 6d 62 65 72 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d mber)..{......return.string.Form
156e0 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c at(CultureInfo.InvariantCulture,
15700 20 22 4f 6e 7b 30 7d 43 68 61 6e 67 69 6e 67 22 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 3b 0d ."On{0}Changing",.member.Name);.
15720 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 45 .}....string.ChangedMethodName(E
15740 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 dmMember.member)..{......return.
15760 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 string.Format(CultureInfo.Invari
15780 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4f 6e 7b 30 7d 43 68 61 6e 67 65 64 22 2c 20 6d 65 6d 62 antCulture,."On{0}Changed",.memb
157a0 65 72 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 49 6e 69 74 69 61 6c 69 7a er.Name);..}....string.Initializ
157c0 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 edTrackingField(EdmProperty.prop
157e0 65 72 74 79 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d erty,.CodeGenerationTools.code).
15800 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 6e 61 6d 65 50 61 72 74 20 3d 20 70 72 6f 70 65 72 .{......string.namePart.=.proper
15820 74 79 2e 4e 61 6d 65 20 2b 20 22 49 6e 69 74 69 61 6c 69 7a 65 64 22 3b 0d 0a 20 20 20 20 69 66 ty.Name.+."Initialized";......if
15840 20 28 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 29 0d 0a 20 20 20 20 7b 0d 0a .(code.CamelCaseFields)......{..
15860 20 20 20 20 20 20 20 20 6e 61 6d 65 50 61 72 74 20 3d 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 ........namePart.=.code.CamelCas
15880 65 28 6e 61 6d 65 50 61 72 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 e(namePart);......}......return.
158a0 22 5f 22 20 2b 20 6e 61 6d 65 50 61 72 74 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4f 70 74 "_".+.namePart;..}....string.Opt
158c0 69 6f 6e 61 6c 4e 75 6c 6c 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 53 65 74 56 61 6c 69 ionalNullableParameterForSetVali
158e0 64 56 61 6c 75 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 2c 20 43 6f 64 65 47 65 6e dValue(EdmMember.member,.CodeGen
15900 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 4d 65 74 61 64 erationTools.code)..{......Metad
15920 61 74 61 54 6f 6f 6c 73 20 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 ataTools.ef.=.new.MetadataTools(
15940 74 68 69 73 29 3b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 6c 69 73 74 20 3d 20 73 74 72 69 6e 67 this);......string.list.=.string
15960 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 69 66 20 28 28 28 50 72 69 6d 69 74 69 76 65 54 79 70 65 .Empty;......if.(((PrimitiveType
15980 29 6d 65 6d 62 65 72 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 43 6c 72 45 71 )member.TypeUsage.EdmType).ClrEq
159a0 75 69 76 61 6c 65 6e 74 54 79 70 65 2e 49 73 43 6c 61 73 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 uivalentType.IsClass)......{....
159c0 20 20 20 20 20 20 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 20 73 74 6f 72 65 47 65 6e 65 ......MetadataProperty.storeGene
159e0 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 ratedPatternProperty.=.null;....
15a00 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3d 20 65 66 2e 49 73 4e 75 6c ......bool.isNullable.=.ef.IsNul
15a20 6c 61 62 6c 65 28 6d 65 6d 62 65 72 2e 54 79 70 65 55 73 61 67 65 29 20 7c 7c 0d 0a 20 20 20 20 lable(member.TypeUsage).||......
15a40 20 20 20 20 20 20 20 20 28 6d 65 6d 62 65 72 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 ........(member.MetadataProperti
15a60 65 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 es.TryGetValue(MetadataConstants
15a80 2e 45 44 4d 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 2b 20 22 3a 53 74 6f 72 65 47 .EDM_ANNOTATION_09_02.+.":StoreG
15aa0 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 22 2c 20 66 61 6c 73 65 2c 20 6f 75 74 20 73 74 6f eneratedPattern",.false,.out.sto
15ac0 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 29 20 26 26 0d 0a reGeneratedPatternProperty).&&..
15ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 2e 45 71 75 61 6c 73 28 73 74 6f 72 65 .............Object.Equals(store
15b00 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 2e 56 61 6c 75 65 2c 20 GeneratedPatternProperty.Value,.
15b20 22 43 6f 6d 70 75 74 65 64 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 6c 69 73 74 20 2b 3d 20 22 "Computed"));..........list.+=."
15b40 2c 20 22 20 2b 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 69 73 4e 75 6c 6c 61 ,.".+.code.CreateLiteral(isNulla
15b60 62 6c 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 6c 69 73 74 3b 0d 0a ble);......}......return.list;..
15b80 7d 0d 0a 0d 0a 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 }....static.bool.IsVisibleMember
15ba0 28 4d 65 6d 62 65 72 49 6e 66 6f 20 6d 65 6d 62 65 72 49 6e 66 6f 29 0d 0a 7b 0d 0a 20 20 20 20 (MemberInfo.memberInfo)..{......
15bc0 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f 20 69 73 20 45 76 65 6e 74 49 6e 66 6f 29 0d 0a 20 20 if.(memberInfo.is.EventInfo)....
15be0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 45 76 65 6e 74 49 6e 66 6f 20 65 69 20 3d 20 28 45 76 65 ..{..........EventInfo.ei.=.(Eve
15c00 6e 74 49 6e 66 6f 29 6d 65 6d 62 65 72 49 6e 66 6f 3b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 68 ntInfo)memberInfo;..........Meth
15c20 6f 64 49 6e 66 6f 20 61 64 64 20 3d 20 65 69 2e 47 65 74 41 64 64 4d 65 74 68 6f 64 28 29 3b 0d odInfo.add.=.ei.GetAddMethod();.
15c40 0a 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 49 6e 66 6f 20 72 65 6d 6f 76 65 20 3d 20 65 69 2e .........MethodInfo.remove.=.ei.
15c60 47 65 74 52 65 6d 6f 76 65 4d 65 74 68 6f 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 GetRemoveMethod();..........retu
15c80 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 61 64 64 29 20 7c 7c 20 49 73 56 69 73 rn.IsVisibleMethod(add).||.IsVis
15ca0 69 62 6c 65 4d 65 74 68 6f 64 28 72 65 6d 6f 76 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 ibleMethod(remove);......}......
15cc0 65 6c 73 65 20 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f 20 69 73 20 46 69 65 6c 64 49 6e 66 6f else.if.(memberInfo.is.FieldInfo
15ce0 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 46 69 65 6c 64 49 6e 66 6f 20 66 69 20 3d )......{..........FieldInfo.fi.=
15d00 20 28 46 69 65 6c 64 49 6e 66 6f 29 6d 65 6d 62 65 72 49 6e 66 6f 3b 0d 0a 20 20 20 20 20 20 20 .(FieldInfo)memberInfo;.........
15d20 20 72 65 74 75 72 6e 20 21 66 69 2e 49 73 50 72 69 76 61 74 65 20 26 26 20 21 66 69 2e 49 73 41 .return.!fi.IsPrivate.&&.!fi.IsA
15d40 73 73 65 6d 62 6c 79 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 65 ssembly;......}......else.if.(me
15d60 6d 62 65 72 49 6e 66 6f 20 69 73 20 4d 65 74 68 6f 64 42 61 73 65 29 0d 0a 20 20 20 20 7b 0d 0a mberInfo.is.MethodBase)......{..
15d80 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 42 61 73 65 20 6d 62 20 3d 20 28 4d 65 74 68 6f 64 42 ........MethodBase.mb.=.(MethodB
15da0 61 73 65 29 6d 65 6d 62 65 72 49 6e 66 6f 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 62 2e ase)memberInfo;..........if.(mb.
15dc0 49 73 53 70 65 63 69 61 6c 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 IsSpecialName)..............retu
15de0 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 73 56 69 73 69 rn.false;..........return.IsVisi
15e00 62 6c 65 4d 65 74 68 6f 64 28 6d 62 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 20 bleMethod(mb);......}......else.
15e20 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f 20 69 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 29 0d if.(memberInfo.is.PropertyInfo).
15e40 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 70 69 20 .....{..........PropertyInfo.pi.
15e60 3d 20 28 50 72 6f 70 65 72 74 79 49 6e 66 6f 29 6d 65 6d 62 65 72 49 6e 66 6f 3b 0d 0a 20 20 20 =.(PropertyInfo)memberInfo;.....
15e80 20 20 20 20 20 4d 65 74 68 6f 64 49 6e 66 6f 20 67 65 74 20 3d 20 70 69 2e 47 65 74 47 65 74 4d .....MethodInfo.get.=.pi.GetGetM
15ea0 65 74 68 6f 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 49 6e 66 6f 20 73 65 74 ethod();..........MethodInfo.set
15ec0 20 3d 20 70 69 2e 47 65 74 53 65 74 4d 65 74 68 6f 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 .=.pi.GetSetMethod();..........r
15ee0 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 67 65 74 29 20 7c 7c 20 49 73 eturn.IsVisibleMethod(get).||.Is
15f00 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 73 65 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 VisibleMethod(set);......}......
15f20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 7d 0d 0a 0d 0a 73 74 61 74 69 63 20 62 6f 6f ..return.false;..}....static.boo
15f40 6c 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 4d 65 74 68 6f 64 42 61 73 65 20 6d 65 74 l.IsVisibleMethod(MethodBase.met
15f60 68 6f 64 42 61 73 65 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 6d 65 74 68 6f 64 42 61 73 65 20 hodBase)..{......if.(methodBase.
15f80 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d ==.null)..........return.false;.
15fa0 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 21 6d 65 74 68 6f 64 42 61 73 65 2e 49 73 50 72 69 76 .......return.!methodBase.IsPriv
15fc0 61 74 65 20 26 26 20 21 6d 65 74 68 6f 64 42 61 73 65 2e 49 73 41 73 73 65 6d 62 6c 79 3b 0d 0a ate.&&.!methodBase.IsAssembly;..
15fe0 7d 0d 0a 0d 0a 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 3e 20 47 65 74 53 6f 75 72 63 65 53 63 68 }....IEnumerable<T>.GetSourceSch
16000 65 6d 61 54 79 70 65 73 3c 54 3e 28 29 20 77 68 65 72 65 20 54 20 3a 20 47 6c 6f 62 61 6c 49 74 emaTypes<T>().where.T.:.GlobalIt
16020 65 6d 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 50 61 74 68 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e em..{......if.(Path.GetExtension
16040 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 21 3d 20 22 2e 65 64 6d 78 22 29 0d 0a 20 20 (SourceCsdlPath).!=.".edmx")....
16060 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 ..{..........return.ItemCollecti
16080 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 54 3e 28 29 2e 57 68 65 72 65 28 65 20 3d 3e 20 65 2e 4d 65 on.GetItems<T>().Where(e.=>.e.Me
160a0 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 41 6e 79 28 6d 70 20 3d 3e 20 6d 70 2e 4e 61 tadataProperties.Any(mp.=>.mp.Na
160c0 6d 65 20 3d 3d 20 22 53 63 68 65 6d 61 53 6f 75 72 63 65 22 20 26 26 20 28 73 74 72 69 6e 67 29 me.==."SchemaSource".&&.(string)
160e0 6d 70 2e 56 61 6c 75 65 20 3d 3d 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 29 3b 0d 0a 20 mp.Value.==.SourceCsdlPath));...
16100 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 ...}......else......{..........r
16120 65 74 75 72 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 54 3e eturn.ItemCollection.GetItems<T>
16140 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 45 6e 64 4e 61 6d 65 28 ();......}..}....string.EndName(
16160 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 69 6e 74 AssociationType.association,.int
16180 20 69 6e 64 65 78 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 61 73 73 6f 63 69 61 74 69 .index)..{......return.associati
161a0 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 69 6e 64 65 78 5d 2e on.AssociationEndMembers[index].
161c0 4e 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 Name;..}....string.EndMultiplici
161e0 74 79 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 ty(AssociationType.association,.
16200 69 6e 74 20 69 6e 64 65 78 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 int.index,.CodeGenerationTools.c
16220 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 4c ode)..{......return.code.CreateL
16240 69 74 65 72 61 6c 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e iteral(association.AssociationEn
16260 64 4d 65 6d 62 65 72 73 5b 69 6e 64 65 78 5d 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 dMembers[index].RelationshipMult
16280 69 70 6c 69 63 69 74 79 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 45 73 63 61 70 65 45 6e iplicity);..}....string.EscapeEn
162a0 64 54 79 70 65 4e 61 6d 65 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 61 73 73 6f 63 69 dTypeName(AssociationType.associ
162c0 61 74 69 6f 6e 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e ation,.int.index,.CodeGeneration
162e0 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 45 6e 74 69 74 79 54 79 70 65 20 65 Tools.code)..{......EntityType.e
16300 6e 74 69 74 79 20 3d 20 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 ntity.=.association.AssociationE
16320 6e 64 4d 65 6d 62 65 72 73 5b 69 6e 64 65 78 5d 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 ndMembers[index].GetEntityType()
16340 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d ;......return.code.CreateFullNam
16360 65 28 63 6f 64 65 2e 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 47 65 74 4f 62 6a 65 63 74 e(code.EscapeNamespace(GetObject
16380 4e 61 6d 65 73 70 61 63 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 Namespace(entity.NamespaceName))
163a0 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 74 69 74 79 29 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 ,.code.Escape(entity));..}....st
163c0 72 69 6e 67 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 73 74 72 69 6e 67 20 63 ring.GetObjectNamespace(string.c
163e0 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 0d 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 sdlNamespaceName)..{......string
16400 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 69 66 20 28 45 64 6d 54 6f .objectNamespace;......if.(EdmTo
16420 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 54 72 79 47 65 74 56 61 6c 75 65 28 63 ObjectNamespaceMap.TryGetValue(c
16440 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2c 20 6f 75 74 20 6f 62 6a 65 63 74 4e 61 6d 65 sdlNamespaceName,.out.objectName
16460 73 70 61 63 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6f space))......{..........return.o
16480 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 bjectNamespace;......}........re
164a0 74 75 72 6e 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 76 6f turn.csdlNamespaceName;..}....vo
164c0 69 64 20 55 70 64 61 74 65 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 28 73 74 72 69 id.UpdateObjectNamespaceMap(stri
164e0 6e 67 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 28 6f ng.objectNamespace)..{......if(o
16500 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 20 21 3d 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 bjectNamespace.!=.ModelNamespace
16520 20 26 26 20 21 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 43 6f 6e .&&.!EdmToObjectNamespaceMap.Con
16540 74 61 69 6e 73 4b 65 79 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 29 0d 0a 20 20 20 20 7b tainsKey(ModelNamespace))......{
16560 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 ..........EdmToObjectNamespaceMa
16580 70 2e 41 64 64 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 2c 20 6f 62 6a 65 63 74 4e 61 6d 65 p.Add(ModelNamespace,.objectName
165a0 73 70 61 63 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 73 74 61 74 69 63 20 73 74 72 69 space);......}..}....static.stri
165c0 6e 67 20 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 73 74 72 69 6e 67 20 6e 61 6d 65 2c ng.FixParameterName(string.name,
165e0 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 .CodeGenerationTools.code)..{...
16600 20 20 20 2f 2f 20 0d 0a 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 43 ...//.......//.......if.(StringC
16620 6f 6d 70 61 72 65 72 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 2e 45 71 75 61 6c 73 omparer.OrdinalIgnoreCase.Equals
16640 28 6e 61 6d 65 2c 20 22 69 64 22 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f (name,."id"))......{..........//
16660 20 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 69 64 22 3b 0d 0a 20 20 20 20 7d 0d 0a ...........return."id";......}..
16680 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 6e 61 6d 65 29 3b ....return.code.CamelCase(name);
166a0 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 42 61 73 65 54 79 70 65 4e 61 6d 65 28 45 6e 74 69 74 ..}....string.BaseTypeName(Entit
166c0 79 54 79 70 65 20 65 6e 74 69 74 79 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c yType.entity,.CodeGenerationTool
166e0 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 65 6e 74 69 74 79 2e 42 61 s.code)..{......return.entity.Ba
16700 73 65 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 22 45 6e 74 69 74 79 4f 62 6a 65 63 74 22 20 seType.==.null.?."EntityObject".
16720 3a 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 28 53 74 72 75 63 74 75 72 61 6c 54 :.MultiSchemaEscape((StructuralT
16740 79 70 65 29 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 2c 20 63 6f 64 65 29 3b 0d 0a 7d 0d 0a ype)entity.BaseType,.code);..}..
16760 0d 0a 62 6f 6f 6c 20 49 6e 63 6c 75 64 65 50 72 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d ..bool.IncludePropertyInFactoryM
16780 65 74 68 6f 64 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 66 61 63 74 6f 72 79 54 79 70 65 ethod(StructuralType.factoryType
167a0 2c 20 45 64 6d 50 72 6f 70 65 72 74 79 20 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 7b 0d 0a 20 ,.EdmProperty.edmProperty)..{...
167c0 20 20 20 69 66 20 28 65 64 6d 50 72 6f 70 65 72 74 79 2e 4e 75 6c 6c 61 62 6c 65 29 0d 0a 20 20 ...if.(edmProperty.Nullable)....
167e0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 ..{..........return.false;......
16800 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 65 64 6d 50 72 6f 70 65 72 74 79 2e 44 65 66 61 75 6c 74 }........if.(edmProperty.Default
16820 56 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 Value.!=.null)......{..........r
16840 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 28 eturn.false;......}........if.((
16860 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 Accessibility.ForReadOnlyPropert
16880 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 20 21 3d 20 22 70 75 62 6c 69 63 22 20 26 26 20 41 63 y(edmProperty).!=."public".&&.Ac
168a0 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 cessibility.ForWriteOnlyProperty
168c0 28 65 64 6d 50 72 6f 70 65 72 74 79 29 20 21 3d 20 22 70 75 62 6c 69 63 22 29 20 7c 7c 0d 0a 20 (edmProperty).!=."public").||...
168e0 20 20 20 20 20 20 20 28 66 61 63 74 6f 72 79 54 79 70 65 20 21 3d 20 65 64 6d 50 72 6f 70 65 72 .......(factoryType.!=.edmProper
16900 74 79 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 26 26 20 41 63 63 65 73 73 69 62 69 6c 69 74 ty.DeclaringType.&&.Accessibilit
16920 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 y.ForWriteOnlyProperty(edmProper
16940 74 79 29 20 3d 3d 20 22 70 72 69 76 61 74 65 22 29 0d 0a 20 20 20 20 20 20 20 29 0d 0a 20 20 20 ty).==."private").........).....
16960 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 .{..........//...........return.
16980 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 false;......}........return.true
169a0 3b 0d 0a 7d 0d 0a 0d 0a 0d 0a 63 6c 61 73 73 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 ;..}......class.FactoryMethodPar
169c0 61 6d 65 74 65 72 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 50 72 6f 70 65 72 74 ameter..{......public.EdmPropert
169e0 79 20 53 6f 75 72 63 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 61 77 y.Source;......public.string.Raw
16a00 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e ParameterName;......public.strin
16a20 67 20 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 g.ParameterName;......public.str
16a40 69 6e 67 20 50 61 72 61 6d 65 74 65 72 54 79 70 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 ing.ParameterType;......public.s
16a60 74 72 69 6e 67 20 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 3b 0d 0a 20 20 20 20 70 75 62 tring.ParameterComment;......pub
16a80 6c 69 63 20 62 6f 6f 6c 20 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 70 lic.bool.IsComplexType;........p
16aa0 75 62 6c 69 63 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 61 63 74 6f 72 79 ublic.static.IEnumerable<Factory
16ac0 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 3e 20 43 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 MethodParameter>.CreateParameter
16ae0 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 70 72 6f 70 65 s(IEnumerable<EdmProperty>.prope
16b00 72 74 69 65 73 2c 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 75 rties,.UniqueIdentifierService.u
16b20 6e 69 71 75 65 2c 20 46 75 6e 63 3c 54 79 70 65 55 73 61 67 65 2c 20 43 6f 64 65 47 65 6e 65 72 nique,.Func<TypeUsage,.CodeGener
16b40 61 74 69 6f 6e 54 6f 6f 6c 73 2c 20 73 74 72 69 6e 67 3e 20 6d 75 6c 74 69 53 63 68 65 6d 61 45 ationTools,.string>.multiSchemaE
16b60 73 63 61 70 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 scape,.CodeGenerationTools.code)
16b80 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 4c 69 73 74 3c 46 61 63 74 6f 72 79 4d 65 74 ......{..........List<FactoryMet
16ba0 68 6f 64 50 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 4c hodParameter>.parameters.=.new.L
16bc0 69 73 74 3c 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 3e 28 29 3b 0d 0a ist<FactoryMethodParameter>();..
16be0 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f ........foreach.(EdmProperty.pro
16c00 70 65 72 74 79 20 69 6e 20 70 72 6f 70 65 72 74 69 65 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d perty.in.properties)..........{.
16c20 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 .............FactoryMethodParame
16c40 74 65 72 20 70 61 72 61 6d 65 74 65 72 20 3d 20 6e 65 77 20 46 61 63 74 6f 72 79 4d 65 74 68 6f ter.parameter.=.new.FactoryMetho
16c60 64 50 61 72 61 6d 65 74 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d dParameter();..............param
16c80 65 74 65 72 2e 53 6f 75 72 63 65 20 3d 20 70 72 6f 70 65 72 74 79 3b 0d 0a 20 20 20 20 20 20 20 eter.Source.=.property;.........
16ca0 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 20 3d 20 70 .....parameter.IsComplexType.=.p
16cc0 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d roperty.TypeUsage.EdmType.is.Com
16ce0 70 6c 65 78 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 plexType;..............parameter
16d00 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 .RawParameterName.=.unique.Adjus
16d20 74 49 64 65 6e 74 69 66 69 65 72 28 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 70 72 6f tIdentifier(FixParameterName(pro
16d40 70 65 72 74 79 2e 4e 61 6d 65 2c 20 63 6f 64 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 perty.Name,.code));.............
16d60 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e .parameter.ParameterName.=.code.
16d80 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d Escape(parameter.RawParameterNam
16da0 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d e);..............parameter.Param
16dc0 65 74 65 72 54 79 70 65 20 3d 20 6d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 70 72 6f eterType.=.multiSchemaEscape(pro
16de0 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 perty.TypeUsage,.code);.........
16e00 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 20 .....parameter.ParameterComment.
16e20 3d 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 =.String.Format(CultureInfo.Curr
16e40 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 entCulture,.GetResourceString("T
16e60 65 6d 70 6c 61 74 65 5f 43 6f 6d 6d 65 6e 74 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 emplate_CommentFactoryMethodPara
16e80 6d 22 29 2c 20 70 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 m"),.property.Name);............
16ea0 20 20 70 61 72 61 6d 65 74 65 72 73 2e 41 64 64 28 70 61 72 61 6d 65 74 65 72 29 3b 0d 0a 20 20 ..parameters.Add(parameter);....
16ec0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 61 72 61 6d 65 ......}............return.parame
16ee0 74 65 72 73 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 44 65 66 61 75 6c ters;......}..}....string.Defaul
16f00 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a tSummaryComment{.get;.set;.}....
16f20 73 74 72 69 6e 67 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 4d 65 74 61 64 61 74 61 49 74 string.SummaryComment(MetadataIt
16f40 65 6d 20 69 74 65 6d 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 69 74 65 6d 2e 44 6f 63 75 6d 65 em.item)..{......if.(item.Docume
16f60 6e 74 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 20 26 26 20 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 ntation.!=.null.&&.item.Document
16f80 61 74 69 6f 6e 2e 53 75 6d 6d 61 72 79 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 ation.Summary.!=.null)......{...
16fa0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 .......return.PrefixLinesOfMulti
16fc0 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 20 2b 20 22 lineComment(XMLCOMMENT_START.+."
16fe0 20 22 2c 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 .",.XmlEntityize(item.Documentat
17000 69 6f 6e 2e 53 75 6d 6d 61 72 79 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 ion.Summary));......}........if.
17020 28 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d (DefaultSummaryComment.!=.null).
17040 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 44 65 66 61 75 6c 74 53 75 .....{..........return.DefaultSu
17060 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 mmaryComment;......}........retu
17080 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4c 6f rn.string.Empty;..}....string.Lo
170a0 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 4d 65 74 61 ngDescriptionCommentElement(Meta
170c0 64 61 74 61 49 74 65 6d 20 69 74 65 6d 2c 20 69 6e 74 20 69 6e 64 65 6e 74 4c 65 76 65 6c 29 0d dataItem.item,.int.indentLevel).
170e0 0a 7b 0d 0a 20 20 20 20 69 66 20 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 21 .{......if.(item.Documentation.!
17100 3d 20 6e 75 6c 6c 20 26 26 20 21 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 =.null.&&.!String.IsNullOrEmpty(
17120 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 item.Documentation.LongDescripti
17140 6f 6e 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 63 6f 6d 6d on))......{..........string.comm
17160 65 6e 74 20 3d 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 3b 0d 0a 20 20 20 20 ent.=.Environment.NewLine;......
17180 20 20 20 20 73 74 72 69 6e 67 20 6c 69 6e 65 53 74 61 72 74 20 3d 20 43 6f 64 65 52 65 67 69 6f ....string.lineStart.=.CodeRegio
171a0 6e 2e 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 29 20 2b 20 58 4d 4c 43 4f n.GetIndent(indentLevel).+.XMLCO
171c0 4d 4d 45 4e 54 5f 53 54 41 52 54 20 2b 20 22 20 22 3b 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d MMENT_START.+.".";..........comm
171e0 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 2b 20 22 3c 4c 6f 6e 67 44 65 73 63 72 69 70 ent.+=.lineStart.+."<LongDescrip
17200 74 69 6f 6e 3e 22 20 2b 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 3b 0d 0a 20 tion>".+.Environment.NewLine;...
17220 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 2b 20 50 72 .......comment.+=.lineStart.+.Pr
17240 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 6c 69 6e 65 efixLinesOfMultilineComment(line
17260 53 74 61 72 74 2c 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e Start,.XmlEntityize(item.Documen
17280 74 61 74 69 6f 6e 2e 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 29 29 20 2b 20 45 6e 76 69 72 tation.LongDescription)).+.Envir
172a0 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 onment.NewLine;..........comment
172c0 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 2b 20 22 3c 2f 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 .+=.lineStart.+."</LongDescripti
172e0 6f 6e 3e 22 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6d 6d 65 6e 74 3b 0d 0a on>";..........return.comment;..
17300 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d ....}......return.string.Empty;.
17320 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c .}....string.PrefixLinesOfMultil
17340 69 6e 65 43 6f 6d 6d 65 6e 74 28 73 74 72 69 6e 67 20 70 72 65 66 69 78 2c 20 73 74 72 69 6e 67 ineComment(string.prefix,.string
17360 20 63 6f 6d 6d 65 6e 74 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6d 6d 65 6e 74 .comment)..{......return.comment
17380 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 45 6e .Replace(Environment.NewLine,.En
173a0 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 20 2b 20 70 72 65 66 69 78 29 3b 0d 0a 7d 0d vironment.NewLine.+.prefix);..}.
173c0 0a 0d 0a 73 74 72 69 6e 67 20 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 49 45 6e 75 ...string.ParameterComments(IEnu
173e0 6d 65 72 61 62 6c 65 3c 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 3e 20 70 merable<Tuple<string,.string>>.p
17400 61 72 61 6d 65 74 65 72 73 2c 20 69 6e 74 20 69 6e 64 65 6e 74 4c 65 76 65 6c 29 0d 0a 7b 0d 0a arameters,.int.indentLevel)..{..
17420 20 20 20 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 62 75 ....System.Text.StringBuilder.bu
17440 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 ilder.=.new.System.Text.StringBu
17460 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 28 54 75 70 6c 65 3c 73 74 72 ilder();......foreach.(Tuple<str
17480 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 70 61 72 61 6d 65 74 65 72 20 69 6e 20 70 61 72 61 6d 65 ing,.string>.parameter.in.parame
174a0 74 65 72 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 ters)......{..........builder.Ap
174c0 70 65 6e 64 4c 69 6e 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 pendLine();..........builder.App
174e0 65 6e 64 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c end(CodeRegion.GetIndent(indentL
17500 65 76 65 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 evel));..........builder.Append(
17520 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 29 3b 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c XMLCOMMENT_START);..........buil
17540 64 65 72 2e 41 70 70 65 6e 64 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 der.Append(String.Format(Culture
17560 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 20 3c 70 61 72 61 6d 20 Info.InvariantCulture,.".<param.
17580 6e 61 6d 65 3d 5c 22 7b 30 7d 5c 22 3e 7b 31 7d 3c 2f 70 61 72 61 6d 3e 22 2c 20 70 61 72 61 6d name=\"{0}\">{1}</param>",.param
175a0 65 74 65 72 2e 49 74 65 6d 31 2c 20 70 61 72 61 6d 65 74 65 72 2e 49 74 65 6d 32 29 29 3b 0d 0a eter.Item1,.parameter.Item2));..
175c0 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 ....}......return.builder.ToStri
175e0 6e 67 28 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 ng();..}....string.XmlEntityize(
17600 73 74 72 69 6e 67 20 74 65 78 74 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e string.text)..{......if.(string.
17620 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 65 78 74 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 IsNullOrEmpty(text))......{.....
17640 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 7d .....return.string.Empty;......}
17660 0d 0a 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 26 22 2c ........text.=.text.Replace("&",
17680 22 26 61 6d 70 3b 22 29 3b 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 "&amp;");......text.=.text.Repla
176a0 63 65 28 22 3c 22 2c 22 26 6c 74 3b 22 29 2e 52 65 70 6c 61 63 65 28 22 3e 22 2c 22 26 67 74 3b ce("<","&lt;").Replace(">","&gt;
176c0 22 29 3b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 69 64 20 3d 20 47 75 69 64 2e 4e 65 77 47 75 69 ");......string.id.=.Guid.NewGui
176e0 64 28 29 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 d().ToString();......text.=.text
17700 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 69 64 .Replace(Environment.NewLine,.id
17720 29 3b 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 5c 72 22 );......text.=.text.Replace("\r"
17740 2c 20 22 26 23 78 44 3b 22 29 2e 52 65 70 6c 61 63 65 28 22 5c 6e 22 2c 22 26 23 78 41 3b 22 29 ,."&#xD;").Replace("\n","&#xA;")
17760 3b 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 69 64 2c 20 45 ;......text.=.text.Replace(id,.E
17780 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 29 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e nvironment.NewLine);......return
177a0 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 5c 27 22 2c 22 26 61 70 6f 73 3b 22 29 2e 52 65 70 .text.Replace("\'","&apos;").Rep
177c0 6c 61 63 65 28 22 5c 22 22 2c 22 26 71 75 6f 74 3b 22 29 3b 0d 0a 7d 0d 0a 0d 0a 63 6f 6e 73 74 lace("\"","&quot;");..}....const
177e0 20 73 74 72 69 6e 67 20 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 20 3d 20 22 2f 2f 2f 22 .string.XMLCOMMENT_START.=."///"
17800 3b 0d 0a 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 47 65 74 50 ;..IEnumerable<EdmProperty>.GetP
17820 72 6f 70 65 72 74 69 65 73 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 74 79 70 65 29 0d 0a roperties(StructuralType.type)..
17840 7b 0d 0a 20 20 20 20 69 66 20 28 74 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 {......if.(type.BuiltInTypeKind.
17860 3d 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 29 0d 0a ==.BuiltInTypeKind.EntityType)..
17880 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 45 6e 74 69 74 79 54 79 ....{..........return.((EntityTy
178a0 70 65 29 74 79 70 65 29 2e 50 72 6f 70 65 72 74 69 65 73 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 pe)type).Properties;......}.....
178c0 20 65 6c 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 43 .else......{..........return.((C
178e0 6f 6d 70 6c 65 78 54 79 70 65 29 74 79 70 65 29 2e 50 72 6f 70 65 72 74 69 65 73 3b 0d 0a 20 20 omplexType)type).Properties;....
17900 20 20 7d 0d 0a 7d 0d 0a 0d 0a 70 72 6f 74 65 63 74 65 64 20 76 6f 69 64 20 56 65 72 69 66 79 47 ..}..}....protected.void.VerifyG
17920 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 etterAndSetterAccessibilityCompa
17940 74 61 62 69 6c 69 74 79 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 7b 0d 0a 20 tability(EdmMember.member)..{...
17960 20 20 20 73 74 72 69 6e 67 20 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 ...string.rawGetterAccessibility
17980 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 .=.Accessibility.ForReadOnlyProp
179a0 65 72 74 79 28 6d 65 6d 62 65 72 29 3b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 72 61 77 53 65 74 erty(member);......string.rawSet
179c0 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 terAccessibility.=.Accessibility
179e0 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 6d 65 6d 62 65 72 29 3b 0d 0a .ForWriteOnlyProperty(member);..
17a00 0d 0a 20 20 20 20 69 66 20 28 28 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 ......if.((rawGetterAccessibilit
17a20 79 20 3d 3d 20 22 69 6e 74 65 72 6e 61 6c 22 20 26 26 20 72 61 77 53 65 74 74 65 72 41 63 63 65 y.==."internal".&&.rawSetterAcce
17a40 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 20 20 22 70 72 6f 74 65 63 74 65 64 22 29 20 7c 7c 0d 0a ssibility.==..."protected").||..
17a60 20 20 20 20 20 20 20 20 28 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 ........(rawGetterAccessibility.
17a80 3d 3d 20 22 70 72 6f 74 65 63 74 65 64 22 20 26 26 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 ==."protected".&&.rawSetterAcces
17aa0 73 69 62 69 6c 69 74 79 20 3d 3d 20 22 69 6e 74 65 72 6e 61 6c 22 29 29 0d 0a 0d 0a 20 20 20 20 sibility.==."internal"))........
17ac0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 {.............Errors.Add(new.Sys
17ae0 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 tem.CodeDom.Compiler.CompilerErr
17b00 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 33 33 or(SourceCsdlPath,.-1,.-1,."6033
17b20 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 ",.String.Format(CultureInfo.Cur
17b40 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rentCulture,....................
17b60 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 47 65 6e 65 72 61 74 65 64 50 72 6f .GetResourceString("GeneratedPro
17b80 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e 66 6c 69 63 74 22 29 2c 0d 0a 20 pertyAccessibilityConflict"),...
17ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 6d 62 65 72 2e 4e 61 6d ......................member.Nam
17bc0 65 2c 20 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 2c 20 72 61 77 53 65 e,.rawGetterAccessibility,.rawSe
17be0 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d tterAccessibility)));......}..}.
17c00 0a 0d 0a 70 72 69 76 61 74 65 20 76 6f 69 64 20 56 65 72 69 66 79 45 6e 74 69 74 79 54 79 70 65 ...private.void.VerifyEntityType
17c20 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 AndSetAccessibilityCompatability
17c40 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 74 (EntitySet.set)..{......string.t
17c60 79 70 65 41 63 63 65 73 73 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 ypeAccess.=.Accessibility.ForTyp
17c80 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 29 3b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 e(set.ElementType);......string.
17ca0 73 65 74 41 63 63 65 73 73 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 setAccess.=.Accessibility.ForRea
17cc0 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 73 65 74 29 3b 0d 0a 0d 0a 20 20 20 20 69 66 28 74 79 dOnlyProperty(set);........if(ty
17ce0 70 65 41 63 63 65 73 73 20 3d 3d 20 22 69 6e 74 65 72 6e 61 6c 22 20 26 26 20 28 73 65 74 41 63 peAccess.==."internal".&&.(setAc
17d00 63 65 73 73 20 3d 3d 20 22 70 75 62 6c 69 63 22 20 7c 7c 20 73 65 74 41 63 63 65 73 73 20 3d 3d cess.==."public".||.setAccess.==
17d20 20 22 70 72 6f 74 65 63 74 65 64 22 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 45 72 ."protected"))......{.........Er
17d40 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 rors.Add(new.System.CodeDom.Comp
17d60 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 iler.CompilerError(SourceCsdlPat
17d80 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 33 36 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 h,.-1,.-1,."6036",.String.Format
17da0 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 (CultureInfo.CurrentCulture,....
17dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 .............GetResourceString("
17de0 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e EntityTypeAndSetAccessibilityCon
17e00 66 6c 69 63 74 22 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 flict"),.....................set
17e20 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2e 4e 61 6d 65 2c 20 74 79 70 65 41 63 63 65 73 73 2c 20 73 .ElementType.Name,.typeAccess,.s
17e40 65 74 2e 4e 61 6d 65 2c 20 73 65 74 41 63 63 65 73 73 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d et.Name,.setAccess)));......}..}
17e60 0d 0a 0d 0a 70 72 69 76 61 74 65 20 76 6f 69 64 20 44 65 66 69 6e 65 4d 65 74 61 64 61 74 61 28 ....private.void.DefineMetadata(
17e80 29 0d 0a 7b 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 5b 4d 65 74 61 64 )..{......TemplateMetadata[Metad
17ea0 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 4e 41 4d 45 5d 20 3d ataConstants.TT_TEMPLATE_NAME].=
17ec0 20 22 43 53 68 61 72 70 43 6f 64 65 47 65 6e 22 3b 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d ."CSharpCodeGen";......TemplateM
17ee0 65 74 61 64 61 74 61 5b 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d etadata[MetadataConstants.TT_TEM
17f00 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 5d 20 3d 20 22 34 2e 30 22 3b 0d 0a 20 20 20 20 54 65 6d PLATE_VERSION].=."4.0";......Tem
17f20 70 6c 61 74 65 4d 65 74 61 64 61 74 61 5b 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e plateMetadata[MetadataConstants.
17f40 54 54 5f 4d 49 4e 49 4d 55 4d 5f 45 4e 54 49 54 59 5f 46 52 41 4d 45 57 4f 52 4b 5f 56 45 52 53 TT_MINIMUM_ENTITY_FRAMEWORK_VERS
17f60 49 4f 4e 5d 20 3d 20 22 34 2e 30 22 3b 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 2f 2f ION].=."4.0";..}....////////..//
17f80 2f 2f 2f 2f 2f 2f 20 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 73 65 61 6c 65 64 20 63 6c 61 73 73 20 //////...////////..sealed.class.
17fa0 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 0d 0a 7b 0d 0a 20 20 20 20 UniqueIdentifierService..{......
17fc0 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e private.readonly.HashSet<string>
17fe0 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 ._knownIdentifiers;........publi
18000 63 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 0d 0a 20 20 20 c.UniqueIdentifierService().....
18020 20 7b 0d 0a 20 20 20 20 20 20 20 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 3d 20 .{.........._knownIdentifiers.=.
18040 6e 65 77 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 new.HashSet<string>(StringCompar
18060 65 72 2e 4f 72 64 69 6e 61 6c 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c er.Ordinal);......}........///.<
18080 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 20 0d 0a 20 20 summary>......///.......///.....
180a0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 ..///.</summary>......public.str
180c0 69 6e 67 20 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 73 74 72 69 6e 67 20 69 64 65 6e ing.AdjustIdentifier(string.iden
180e0 74 69 66 69 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 tifier)......{..........//......
18100 20 20 20 20 20 76 61 72 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 3d 20 30 3b 0d .....var.numberOfConflicts.=.0;.
18120 0a 20 20 20 20 20 20 20 20 76 61 72 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 .........var.adjustedIdentifier.
18140 3d 20 69 64 65 6e 74 69 66 69 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 =.identifier;............while.(
18160 21 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 !_knownIdentifiers.Add(adjustedI
18180 64 65 6e 74 69 66 69 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 dentifier))..........{..........
181a0 20 20 20 20 2b 2b 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 3b 0d 0a 20 20 20 20 20 20 ....++numberOfConflicts;........
181c0 20 20 20 20 20 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 ......adjustedIdentifier.=.ident
181e0 69 66 69 65 72 20 2b 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 2e 54 6f 53 74 72 69 ifier.+.numberOfConflicts.ToStri
18200 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 ng(CultureInfo.InvariantCulture)
18220 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 ;..........}............return.a
18240 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0a 0a djustedIdentifier;......}..}....
18260 0a 0d 0a 2f 2f 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 4d 69 63 72 6f 73 6f 66 74 20 43 6f ...//.Copyright.(c).Microsoft.Co
18280 72 70 6f 72 61 74 69 6f 6e 2e 20 20 41 6c 6c 20 72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 2e rporation...All.rights.reserved.
182a0 0d 0a 0d 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 ....public.static.Dictionary<str
182c0 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 20 3d 20 ing,.string>.TemplateMetadata.=.
182e0 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 29 new.Dictionary<string,.string>()
18300 3b 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 ;....///.<summary>..///.Responsi
18320 62 6c 65 20 66 6f 72 20 68 65 6c 70 69 6e 67 20 74 6f 20 63 72 65 61 74 65 20 73 6f 75 72 63 65 ble.for.helping.to.create.source
18340 20 63 6f 64 65 20 74 68 61 74 20 69 73 0d 0a 2f 2f 2f 20 63 6f 72 72 65 63 74 6c 79 20 66 6f 72 .code.that.is..///.correctly.for
18360 6d 61 74 65 64 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e 61 6c 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d mated.and.functional..///.</summ
18380 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f ary>..public.class.CodeGeneratio
183a0 6e 54 6f 6f 6c 73 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 nTools..{......private.readonly.
183c0 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 DynamicTextTransformation._textT
183e0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 ransformation;......private.read
18400 6f 6e 6c 79 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 20 5f 63 6f 64 65 3b 0d 0a only.CSharpCodeProvider._code;..
18420 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 61 64 61 74 61 54 6f 6f ....private.readonly.MetadataToo
18440 6c 73 20 5f 65 66 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ls._ef;........///.<summary>....
18460 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 20 6e 65 77 20 43 6f 64 65 47 65 6e 65 ..///.Initializes.a.new.CodeGene
18480 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 6f 62 6a 65 63 74 20 77 69 74 68 20 74 68 65 20 54 65 78 74 rationTools.object.with.the.Text
184a0 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 Transformation.(T4.generated.cla
184c0 73 73 29 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 ss)......///.that.is.currently.r
184e0 75 6e 6e 69 6e 67 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 20 unning......///.</summary>......
18500 70 75 62 6c 69 63 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 28 6f 62 6a 65 63 public.CodeGenerationTools(objec
18520 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 t.textTransformation)......{....
18540 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 ......if.(textTransformation.==.
18560 6e 75 6c 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 74 68 null)..........{..............th
18580 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 22 74 row.new.ArgumentNullException("t
185a0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d extTransformation");..........}.
185c0 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d ..........._textTransformation.=
185e0 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 .DynamicTextTransformation.Creat
18600 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 e(textTransformation);..........
18620 5f 63 6f 64 65 20 3d 20 6e 65 77 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 _code.=.new.CSharpCodeProvider()
18640 3b 0d 0a 20 20 20 20 20 20 20 20 5f 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f ;.........._ef.=.new.MetadataToo
18660 6c 73 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 ls(_textTransformation);........
18680 20 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 66 61 6c 73 ..FullyQualifySystemTypes.=.fals
186a0 65 3b 0d 0a 20 20 20 20 20 20 20 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 74 72 e;..........CamelCaseFields.=.tr
186c0 75 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ue;......}........///.<summary>.
186e0 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 74 72 75 65 2c 20 61 6c 6c 20 74 79 70 65 73 20 74 68 .....///.When.true,.all.types.th
18700 61 74 20 61 72 65 20 6e 6f 74 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 0d 0a 20 20 20 20 at.are.not.being.generated......
18720 2f 2f 2f 20 61 72 65 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 74 6f 20 6b 65 65 70 20 ///.are.fully.qualified.to.keep.
18740 74 68 65 6d 20 66 72 6f 6d 20 63 6f 6e 66 6c 69 63 74 69 6e 67 20 77 69 74 68 0d 0a 20 20 20 20 them.from.conflicting.with......
18760 2f 2f 2f 20 74 79 70 65 73 20 74 68 61 74 20 61 72 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 ///.types.that.are.being.generat
18780 65 64 2e 20 55 73 65 66 75 6c 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 0d 0a 20 20 20 20 2f 2f ed..Useful.when.you.have......//
187a0 2f 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 61 20 74 79 70 65 20 62 65 69 6e 67 20 67 65 /.something.like.a.type.being.ge
187c0 6e 65 72 61 74 65 64 20 6e 61 6d 65 64 20 53 79 73 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a nerated.named.System.......///..
187e0 20 20 20 20 2f 2f 2f 20 44 65 66 61 75 6c 74 20 69 73 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 2f ....///.Default.is.false......./
18800 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 46 //.</summary>......public.bool.F
18820 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 7b 20 67 65 74 3b 20 73 65 ullyQualifySystemTypes.{.get;.se
18840 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f t;.}........///.<summary>....../
18860 2f 2f 20 57 68 65 6e 20 74 72 75 65 2c 20 74 68 65 20 66 69 65 6c 64 20 6e 61 6d 65 73 20 61 72 //.When.true,.the.field.names.ar
18880 65 20 43 61 6d 65 6c 20 43 61 73 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 e.Camel.Cased,......///.otherwis
188a0 65 20 74 68 65 79 20 77 69 6c 6c 20 70 72 65 73 65 72 76 65 20 74 68 65 20 63 61 73 65 20 74 68 e.they.will.preserve.the.case.th
188c0 65 79 0d 0a 20 20 20 20 2f 2f 2f 20 73 74 61 72 74 20 77 69 74 68 2e 0d 0a 20 20 20 20 2f 2f 2f ey......///.start.with.......///
188e0 0d 0a 20 20 20 20 2f 2f 2f 20 44 65 66 61 75 6c 74 20 69 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 ......///.Default.is.true.......
18900 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 ///.</summary>......public.bool.
18920 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d CamelCaseFields.{.get;.set;.}...
18940 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 .....///.<summary>......///.Retu
18960 72 6e 73 20 74 68 65 20 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 73 75 67 67 65 73 74 65 64 20 rns.the.NamespaceName.suggested.
18980 62 79 20 56 53 20 69 66 20 72 75 6e 6e 69 6e 67 20 69 6e 73 69 64 65 20 56 53 2e 20 20 4f 74 68 by.VS.if.running.inside.VS...Oth
189a0 65 72 77 69 73 65 2c 20 72 65 74 75 72 6e 73 0d 0a 20 20 20 20 2f 2f 2f 20 6e 75 6c 6c 2e 0d 0a erwise,.returns......///.null...
189c0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 ....///.</summary>......public.s
189e0 74 72 69 6e 67 20 56 73 4e 61 6d 65 73 70 61 63 65 53 75 67 67 65 73 74 69 6f 6e 28 29 0d 0a 20 tring.VsNamespaceSuggestion()...
18a00 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 73 75 67 67 65 73 74 69 6f 6e 20 ...{..........string.suggestion.
18a20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c =._textTransformation.Host.Resol
18a40 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 22 64 69 72 65 63 74 69 76 65 49 64 22 2c 20 veParameterValue("directiveId",.
18a60 22 6e 61 6d 65 73 70 61 63 65 44 69 72 65 63 74 69 76 65 50 72 6f 63 65 73 73 6f 72 22 2c 20 22 "namespaceDirectiveProcessor",."
18a80 6e 61 6d 65 73 70 61 63 65 48 69 6e 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 namespaceHint");..........if.(St
18aa0 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 75 67 67 65 73 74 69 6f 6e 29 29 0d ring.IsNullOrEmpty(suggestion)).
18ac0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e .........{..............return.n
18ae0 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 ull;..........}............retur
18b00 6e 20 73 75 67 67 65 73 74 69 6f 6e 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 n.suggestion;......}........///.
18b20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 61 20 73 74 72 <summary>......///.Returns.a.str
18b40 69 6e 67 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 20 75 73 65 20 61 73 20 61 6e 20 69 ing.that.is.safe.for.use.as.an.i
18b60 64 65 6e 74 69 66 69 65 72 20 69 6e 20 43 23 2e 0d 0a 20 20 20 20 2f 2f 2f 20 4b 65 79 77 6f 72 dentifier.in.C#.......///.Keywor
18b80 64 73 20 61 72 65 20 65 73 63 61 70 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ds.are.escaped.......///.</summa
18ba0 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 73 74 ry>......public.string.Escape(st
18bc0 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e ring.name)......{..........if.(n
18be0 61 6d 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ame.==.null)..........{.........
18c00 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .....return.null;..........}....
18c20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f 63 6f 64 65 2e 43 72 65 61 74 65 45 73 63 61 70 ........return._code.CreateEscap
18c40 65 64 49 64 65 6e 74 69 66 69 65 72 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 edIdentifier(name);......}......
18c60 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 ..///.<summary>......///.Returns
18c80 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 27 73 20 45 64 6d .the.name.of.the.TypeUsage's.Edm
18ca0 54 79 70 65 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 Type.that.is.safe.for......///.u
18cc0 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f se.as.an.identifier.......///.</
18ce0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 summary>......public.string.Esca
18d00 70 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d 0a pe(TypeUsage.typeUsage)......{..
18d20 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 55 73 61 67 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ........if.(typeUsage.==.null)..
18d40 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 ........{..............return.nu
18d60 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 ll;..........}............if.(ty
18d80 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 7c peUsage.EdmType.is.ComplexType.|
18da0 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 |..............typeUsage.EdmType
18dc0 20 69 73 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .is.EntityType)..........{......
18de0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 55 73 61 67 65 2e ........return.Escape(typeUsage.
18e00 45 64 6d 54 79 70 65 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 EdmType.Name);..........}.......
18e20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 ...else.if.(typeUsage.EdmType.is
18e40 20 53 69 6d 70 6c 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .SimpleType)..........{.........
18e60 20 20 20 20 20 54 79 70 65 20 63 6c 72 54 79 70 65 20 3d 20 5f 65 66 2e 55 6e 64 65 72 6c 79 69 .....Type.clrType.=._ef.Underlyi
18e80 6e 67 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 3b 0d 0a 20 ngClrType(typeUsage.EdmType);...
18ea0 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 74 79 70 65 4e 61 6d 65 20 3d 20 74 79 70 ...........string.typeName.=.typ
18ec0 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 79 70 65 20 3f 20 45 73 63 eUsage.EdmType.is.EnumType.?.Esc
18ee0 61 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2e 4e 61 6d 65 29 20 3a 20 45 73 ape(typeUsage.EdmType.Name).:.Es
18f00 63 61 70 65 28 63 6c 72 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 cape(clrType);..............if.(
18f20 63 6c 72 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 20 26 26 20 5f 65 66 2e 49 73 4e 75 6c clrType.IsValueType.&&._ef.IsNul
18f40 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b lable(typeUsage))..............{
18f60 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 2e ..................return.String.
18f80 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 Format(CultureInfo.InvariantCult
18fa0 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 3c 7b 30 7d 3e 22 2c 20 74 79 70 65 4e 61 6d 65 29 3b ure,."Nullable<{0}>",.typeName);
18fc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 ..............}................r
18fe0 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 eturn.typeName;..........}......
19000 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 ....else.if.(typeUsage.EdmType.i
19020 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 s.CollectionType)..........{....
19040 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 ..........return.String.Format(C
19060 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 49 43 ultureInfo.InvariantCulture,."IC
19080 6f 6c 6c 65 63 74 69 6f 6e 3c 7b 30 7d 3e 22 2c 20 45 73 63 61 70 65 28 28 28 43 6f 6c 6c 65 63 ollection<{0}>",.Escape(((Collec
190a0 74 69 6f 6e 54 79 70 65 29 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 54 79 70 65 tionType)typeUsage.EdmType).Type
190c0 55 73 61 67 65 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 74 Usage));..........}............t
190e0 68 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 22 74 79 70 65 hrow.new.ArgumentException("type
19100 55 73 61 67 65 22 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d Usage");......}........///.<summ
19120 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f ary>......///.Returns.the.name.o
19140 66 20 74 68 65 20 45 64 6d 4d 65 6d 62 65 72 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 f.the.EdmMember.that.is.safe.for
19160 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d ......///.use.as.an.identifier..
19180 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 .....///.</summary>......public.
191a0 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d string.Escape(EdmMember.member).
191c0 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 .....{..........if.(member.==.nu
191e0 6c 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 72 65 74 75 ll)..........{..............retu
19200 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 rn.null;..........}............r
19220 65 74 75 72 6e 20 45 73 63 61 70 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 eturn.Escape(member.Name);......
19240 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
19260 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 54 79 70 65 20 Returns.the.name.of.the.EdmType.
19280 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 that.is.safe.for......///.use.as
192a0 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .an.identifier.......///.</summa
192c0 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 64 ry>......public.string.Escape(Ed
192e0 6d 54 79 70 65 20 74 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 mType.type)......{..........if.(
19300 74 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 type.==.null)..........{........
19320 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ......return.null;..........}...
19340 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 .........return.Escape(type.Name
19360 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a );......}........///.<summary>..
19380 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 ....///.Returns.the.name.of.the.
193a0 45 64 6d 46 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 EdmFunction.that.is.safe.for....
193c0 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 ..///.use.as.an.identifier......
193e0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 .///.</summary>......public.stri
19400 6e 67 20 45 73 63 61 70 65 28 45 64 6d 46 75 6e 63 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 29 0d ng.Escape(EdmFunction.function).
19420 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 75 6e 63 74 69 6f 6e 20 3d 3d 20 .....{..........if.(function.==.
19440 6e 75 6c 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 72 65 null)..........{..............re
19460 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 turn.null;..........}...........
19480 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 66 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 3b 0d 0a .return.Escape(function.Name);..
194a0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
194c0 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 75 6d ///.Returns.the.name.of.the.Enum
194e0 4d 65 6d 62 65 72 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f Member.that.is.safe.for......///
19500 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 .use.as.an.identifier.......///.
19520 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 </summary>......public.string.Es
19540 63 61 70 65 28 45 6e 75 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a cape(EnumMember.member)......{..
19560 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ........if.(member.==.null).....
19580 20 20 20 20 20 7b 0d 0a 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;
195a0 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 ..........}............return.Es
195c0 63 61 70 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 cape(member.Name);......}.......
195e0 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 .///.<summary>......///.Returns.
19600 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 the.name.of.the.EntityContainer.
19620 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 that.is.safe.for......///.use.as
19640 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .an.identifier.......///.</summa
19660 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 6e ry>......public.string.Escape(En
19680 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 63 6f 6e 74 61 69 6e 65 72 29 0d 0a 20 20 20 20 7b 0d tityContainer.container)......{.
196a0 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 61 69 6e 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d .........if.(container.==.null).
196c0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e .........{..............return.n
196e0 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 ull;..........}............retur
19700 6e 20 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d n.Escape(container.Name);......}
19720 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 ........///.<summary>......///.R
19740 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 53 65 74 eturns.the.name.of.the.EntitySet
19760 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 .that.is.safe.for......///.use.a
19780 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d s.an.identifier.......///.</summ
197a0 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 ary>......public.string.Escape(E
197c0 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 ntitySet.set)......{..........if
197e0 20 28 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .(set.==.null)..........{.......
19800 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a .......return.null;..........}..
19820 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 73 65 74 2e 4e 61 6d 65 ..........return.Escape(set.Name
19840 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a );......}........///.<summary>..
19860 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 ....///.Returns.the.name.of.the.
19880 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d StructuralType.that.is.safe.for.
198a0 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a .....///.use.as.an.identifier...
198c0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 ....///.</summary>......public.s
198e0 74 72 69 6e 67 20 45 73 63 61 70 65 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 74 79 70 65 tring.Escape(StructuralType.type
19900 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 6e 75 )......{..........if.(type.==.nu
19920 6c 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 72 65 74 75 ll)..........{..............retu
19940 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 rn.null;..........}............r
19960 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d eturn.Escape(type.Name);......}.
19980 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 .......///.<summary>......///.Re
199a0 74 75 72 6e 73 20 74 68 65 20 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 77 69 74 68 20 65 61 63 turns.the.NamespaceName.with.eac
199c0 68 20 73 65 67 6d 65 6e 74 20 73 61 66 65 20 74 6f 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 h.segment.safe.to......///.use.a
199e0 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d s.an.identifier.......///.</summ
19a00 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 4e 61 ary>......public.string.EscapeNa
19a20 6d 65 73 70 61 63 65 28 73 74 72 69 6e 67 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 0d 0a 20 mespace(string.namespaceName)...
19a40 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f ...{..........if.(String.IsNullO
19a60 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 rEmpty(namespaceName))..........
19a80 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e {..............return.namespaceN
19aa0 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e ame;..........}............strin
19ac0 67 5b 5d 20 70 61 72 74 73 20 3d 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2e 53 70 6c 69 74 28 g[].parts.=.namespaceName.Split(
19ae0 27 2e 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 53 '.');..........namespaceName.=.S
19b00 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 73 tring.Empty;..........foreach.(s
19b20 74 72 69 6e 67 20 70 61 72 74 20 69 6e 20 70 61 72 74 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d tring.part.in.parts)..........{.
19b40 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 21 .............if.(namespaceName.!
19b60 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a =.String.Empty)..............{..
19b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 2b 3d ................namespaceName.+=
19ba0 20 22 2e 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .".";..............}............
19bc0 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 2b 3d 20 45 73 63 61 70 65 28 70 61 72 74 ....namespaceName.+=.Escape(part
19be0 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 72 65 74 75 72 6e 20 );..........}............return.
19c00 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f namespaceName;......}........///
19c20 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 .<summary>......///.Returns.the.
19c40 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 4d 65 6d 62 65 72 20 66 6f 72 6d 61 74 74 65 64 20 name.of.the.EdmMember.formatted.
19c60 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e for......///.use.as.a.field.iden
19c80 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d tifier.......///......///.This.m
19ca0 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 ethod.changes.behavior.based.on.
19cc0 74 68 65 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 2f 2f 2f 20 73 65 74 the.CamelCaseFields......///.set
19ce0 74 69 6e 67 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 20 70 ting.......///.</summary>......p
19d00 75 62 6c 69 63 20 73 74 72 69 6e 67 20 46 69 65 6c 64 4e 61 6d 65 28 45 64 6d 4d 65 6d 62 65 72 ublic.string.FieldName(EdmMember
19d20 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d .member)......{..........if.(mem
19d40 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ber.==.null)..........{.........
19d60 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .....return.null;..........}....
19d80 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 46 69 65 6c 64 4e 61 6d 65 28 6d 65 6d 62 65 72 2e ........return.FieldName(member.
19da0 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 Name);......}........///.<summar
19dc0 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 y>......///.Returns.the.name.of.
19de0 74 68 65 20 45 6e 74 69 74 79 53 65 74 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 the.EntitySet.formatted.for.....
19e00 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d .///.use.as.a.field.identifier..
19e20 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 68 .....///......///.This.method.ch
19e40 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 43 61 6d 65 anges.behavior.based.on.the.Came
19e60 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 2f 2f 2f 20 73 65 74 74 69 6e 67 2e 0d 0a 20 lCaseFields......///.setting....
19e80 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 ...///.</summary>......public.st
19ea0 72 69 6e 67 20 46 69 65 6c 64 4e 61 6d 65 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 20 ring.FieldName(EntitySet.set)...
19ec0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ...{..........if.(set.==.null)..
19ee0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 ........{..............return.nu
19f00 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ll;..........}............return
19f20 20 46 69 65 6c 64 4e 61 6d 65 28 73 65 74 2e 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 7d 0d 0a .FieldName(set.Name);........}..
19f40 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 46 69 65 6c 64 4e 61 6d 65 28 73 ......private.string.FieldName(s
19f60 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 tring.name)......{..........if.(
19f80 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 CamelCaseFields)..........{.....
19fa0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 5f 22 20 2b 20 43 61 6d 65 6c 43 61 73 65 28 .........return."_".+.CamelCase(
19fc0 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 0d name);..........}..........else.
19fe0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 .........{..............return."
1a000 5f 22 20 2b 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a _".+.name;..........}......}....
1a020 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 ....///.<summary>......///.Retur
1a040 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 20 6f 62 6a 65 63 74 20 66 ns.the.name.of.the.Type.object.f
1a060 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 69 6e 20 73 6f 75 ormatted.for......///.use.in.sou
1a080 72 63 65 20 63 6f 64 65 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 rce.code.......///......///.This
1a0a0 20 6d 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f .method.changes.behavior.based.o
1a0c0 6e 20 74 68 65 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 n.the.FullyQualifySystemTypes...
1a0e0 20 20 20 2f 2f 2f 20 73 65 74 74 69 6e 67 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ...///.setting.......///.</summa
1a100 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 54 79 ry>......public.string.Escape(Ty
1a120 70 65 20 63 6c 72 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 pe.clrType)......{..........retu
1a140 72 6e 20 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 2c 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 rn.Escape(clrType,.FullyQualifyS
1a160 79 73 74 65 6d 54 79 70 65 73 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c ystemTypes);......}........///.<
1a180 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 summary>......///.Returns.the.na
1a1a0 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 20 6f 62 6a 65 63 74 20 66 6f 72 6d 61 74 74 65 64 20 me.of.the.Type.object.formatted.
1a1c0 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 63 6f 64 65 2e for......///.use.in.source.code.
1a1e0 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 20 70 75 62 6c 69 63 ......///.</summary>......public
1a200 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 54 79 70 65 20 63 6c 72 54 79 70 65 2c 20 62 6f 6f .string.Escape(Type.clrType,.boo
1a220 6c 20 66 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 29 0d 0a 20 20 20 20 l.fullyQualifySystemTypes)......
1a240 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 63 6c 72 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a {..........if(clrType.==.null)..
1a260 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 ........{..............return.nu
1a280 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 ll;..........}............string
1a2a0 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 75 6c 6c 79 51 75 61 .typeName;..........if.(fullyQua
1a2c0 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 lifySystemTypes)..........{.....
1a2e0 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 22 67 6c 6f 62 61 6c 3a 3a 22 20 2b .........typeName.=."global::".+
1a300 20 63 6c 72 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 .clrType.FullName;..........}...
1a320 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .......else..........{..........
1a340 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 5f 63 6f 64 65 2e 47 65 74 54 79 70 65 4f 75 74 70 ....typeName.=._code.GetTypeOutp
1a360 75 74 28 6e 65 77 20 43 6f 64 65 54 79 70 65 52 65 66 65 72 65 6e 63 65 28 63 6c 72 54 79 70 65 ut(new.CodeTypeReference(clrType
1a380 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 ));..........}..........return.t
1a3a0 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ypeName;......}........///.<summ
1a3c0 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 61 62 73 74 72 61 ary>......///.Returns.the.abstra
1a3e0 63 74 20 6f 70 74 69 6f 6e 20 69 66 20 74 68 65 20 65 6e 74 69 74 79 20 69 73 20 41 62 73 74 72 ct.option.if.the.entity.is.Abstr
1a400 61 63 74 2c 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 53 74 72 69 6e 67 2e 45 6d act,.otherwise.returns.String.Em
1a420 70 74 79 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 20 70 75 62 pty......///.</summary>......pub
1a440 6c 69 63 20 73 74 72 69 6e 67 20 41 62 73 74 72 61 63 74 4f 70 74 69 6f 6e 28 45 6e 74 69 74 79 lic.string.AbstractOption(Entity
1a460 54 79 70 65 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 Type.entity)......{..........if.
1a480 28 65 6e 74 69 74 79 2e 41 62 73 74 72 61 63 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 (entity.Abstract)..........{....
1a4a0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 61 62 73 74 72 61 63 74 22 3b 0d 0a 20 20 ..........return."abstract";....
1a4c0 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 ......}..........return.String.E
1a4e0 6d 70 74 79 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 mpty;......}........///.<summary
1a500 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 70 61 73 73 65 64 20 69 6e >......///.Returns.the.passed.in
1a520 20 69 64 65 6e 74 69 66 69 65 72 20 77 69 74 68 20 74 68 65 20 66 69 72 73 74 20 6c 65 74 74 65 .identifier.with.the.first.lette
1a540 72 20 63 68 61 6e 67 65 64 20 74 6f 20 6c 6f 77 65 72 63 61 73 65 0d 0a 20 20 20 20 2f 2f 2f 20 r.changed.to.lowercase......///.
1a560 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 61 </summary>......public.string.Ca
1a580 6d 65 6c 43 61 73 65 28 73 74 72 69 6e 67 20 69 64 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 20 20 melCase(string.identifier)......
1a5a0 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d {..........if.(String.IsNullOrEm
1a5c0 70 74 79 28 69 64 65 6e 74 69 66 69 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 pty(identifier))..........{.....
1a5e0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 3b 0d 0a 20 20 20 .........return.identifier;.....
1a600 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 64 65 6e 74 69 66 69 65 72 .....}............if.(identifier
1a620 2e 4c 65 6e 67 74 68 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .Length.==.1)..........{........
1a640 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 5b 30 5d 2e 54 6f 53 74 72 ......return.identifier[0].ToStr
1a660 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 ing(CultureInfo.InvariantCulture
1a680 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d ).ToLowerInvariant();..........}
1a6a0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 5b 30 5d ............return.identifier[0]
1a6c0 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 .ToString(CultureInfo.InvariantC
1a6e0 75 6c 74 75 72 65 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 20 2b 20 69 64 65 ulture).ToLowerInvariant().+.ide
1a700 6e 74 69 66 69 65 72 2e 53 75 62 73 74 72 69 6e 67 28 31 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a ntifier.Substring(1);......}....
1a720 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 ....///.<summary>......///.If.th
1a740 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 e.value.parameter.is.null.or.emp
1a760 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d ty.an.empty.string.is.returned,.
1a780 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c .....///.otherwise.it.retuns.val
1a7a0 75 65 20 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 65 6e 61 ue.with.a.single.space.concatena
1a7c0 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ted.on.the.end.......///.</summa
1a7e0 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 70 61 63 65 41 66 74 65 ry>......public.string.SpaceAfte
1a800 72 28 73 74 72 69 6e 67 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 r(string.value)......{..........
1a820 72 65 74 75 72 6e 20 53 74 72 69 6e 67 41 66 74 65 72 28 76 61 6c 75 65 2c 20 22 20 22 29 3b 0d return.StringAfter(value,.".");.
1a840 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .....}........///.<summary>.....
1a860 20 2f 2f 2f 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e .///.If.the.value.parameter.is.n
1a880 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 ull.or.empty.an.empty.string.is.
1a8a0 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 returned,......///.otherwise.it.
1a8c0 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 73 70 61 63 65 retuns.value.with.a.single.space
1a8e0 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 2f .concatenated.on.the.end......./
1a900 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 //.</summary>......public.string
1a920 20 53 70 61 63 65 42 65 66 6f 72 65 28 73 74 72 69 6e 67 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 .SpaceBefore(string.value)......
1a940 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 {..........return.StringBefore("
1a960 20 22 2c 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 .",.value);......}........///.<s
1a980 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 ummary>......///.If.the.value.pa
1a9a0 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 rameter.is.null.or.empty.an.empt
1a9c0 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f y.string.is.returned,......///.o
1a9e0 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 61 70 therwise.it.retuns.value.with.ap
1aa00 70 65 6e 64 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 pend.concatenated.on.the.end....
1aa20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 ...///.</summary>......public.st
1aa40 72 69 6e 67 20 53 74 72 69 6e 67 41 66 74 65 72 28 73 74 72 69 6e 67 20 76 61 6c 75 65 2c 20 73 ring.StringAfter(string.value,.s
1aa60 74 72 69 6e 67 20 61 70 70 65 6e 64 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 tring.append)......{..........if
1aa80 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 76 61 6c 75 65 29 29 0d 0a .(String.IsNullOrEmpty(value))..
1aaa0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 ........{..............return.St
1aac0 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ring.Empty;..........}..........
1aae0 20 20 20 20 20 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 2b 20 61 70 70 65 6e 64 3b 0d 0a 20 20 ......return.value.+.append;....
1ab00 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
1ab20 2f 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c /.If.the.value.parameter.is.null
1ab40 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 .or.empty.an.empty.string.is.ret
1ab60 75 72 6e 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 urned,......///.otherwise.it.ret
1ab80 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 70 72 65 70 65 6e 64 20 63 6f 6e 63 61 74 65 6e 61 uns.value.with.prepend.concatena
1aba0 74 65 64 20 6f 6e 20 74 68 65 20 66 72 6f 6e 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ted.on.the.front.......///.</sum
1abc0 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 74 72 69 6e 67 42 mary>......public.string.StringB
1abe0 65 66 6f 72 65 28 73 74 72 69 6e 67 20 70 72 65 70 65 6e 64 2c 20 73 74 72 69 6e 67 20 76 61 6c efore(string.prepend,.string.val
1ac00 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 ue)......{..........if.(String.I
1ac20 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 76 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d sNullOrEmpty(value))..........{.
1ac40 0a 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 2e 45 6d 70 74 79 .............return.String.Empty
1ac60 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 ;..........}............return.p
1ac80 72 65 70 65 6e 64 20 2b 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f repend.+.value;......}........//
1aca0 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 66 61 6c /.<summary>......///.Returns.fal
1acc0 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 se.and.shows.an.error.if.the.sup
1ace0 70 6c 69 65 64 20 74 79 70 65 20 6e 61 6d 65 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 plied.type.names.aren't.case-ins
1ad00 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 ensitively.unique,......///.othe
1ad20 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 rwise.returns.true.......///.</s
1ad40 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 56 65 72 69 66 79 43 ummary>......public.bool.VerifyC
1ad60 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 28 49 45 6e aseInsensitiveTypeUniqueness(IEn
1ad80 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 74 79 70 65 73 2c 20 73 74 72 69 6e 67 20 73 umerable<string>.types,.string.s
1ada0 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 ourceFile)......{..........retur
1adc0 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 n.VerifyCaseInsensitiveUniquenes
1ade0 73 28 74 79 70 65 73 2c 20 74 20 3d 3e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 s(types,.t.=>.string.Format(Cult
1ae00 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 ureInfo.CurrentCulture,.GetResou
1ae20 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 rceString("Template_CaseInsensit
1ae40 69 76 65 54 79 70 65 43 6f 6e 66 6c 69 63 74 22 29 2c 20 74 29 2c 20 73 6f 75 72 63 65 46 69 6c iveTypeConflict"),.t),.sourceFil
1ae60 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d e);......}........///.<summary>.
1ae80 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 .....///.Returns.false.and.shows
1aea0 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 73 74 72 69 6e 67 .an.error.if.the.supplied.string
1aec0 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 s.aren't.case-insensitively.uniq
1aee0 75 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 ue,......///.otherwise.returns.t
1af00 72 75 65 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 20 70 72 rue.......///.</summary>......pr
1af20 69 76 61 74 65 20 62 6f 6f 6c 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 ivate.bool.VerifyCaseInsensitive
1af40 55 6e 69 71 75 65 6e 65 73 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 69 Uniqueness(IEnumerable<string>.i
1af60 74 65 6d 73 2c 20 46 75 6e 63 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 66 6f 72 6d 61 tems,.Func<string,.string>.forma
1af80 74 4d 65 73 73 61 67 65 2c 20 73 74 72 69 6e 67 20 73 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 tMessage,.string.sourceFile)....
1afa0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 20 68 61 73 ..{..........HashSet<string>.has
1afc0 68 20 3d 20 6e 65 77 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 28 53 74 72 69 6e 67 43 6f h.=.new.HashSet<string>(StringCo
1afe0 6d 70 61 72 65 72 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 mparer.InvariantCultureIgnoreCas
1b000 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 73 74 72 69 6e 67 20 69 74 65 e);..........foreach.(string.ite
1b020 6d 20 69 6e 20 69 74 65 6d 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 m.in.items)..........{..........
1b040 20 20 20 20 69 66 20 28 21 68 61 73 68 2e 41 64 64 28 69 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 ....if.(!hash.Add(item))........
1b060 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 5f 74 65 78 74 54 72 ......{.................._textTr
1b080 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 ansformation.Errors.Add(new.Syst
1b0a0 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f em.CodeDom.Compiler.CompilerErro
1b0c0 72 28 73 6f 75 72 63 65 46 69 6c 65 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 32 33 22 2c 20 66 6f r(sourceFile,.-1,.-1,."6023",.fo
1b0e0 72 6d 61 74 4d 65 73 73 61 67 65 28 69 74 65 6d 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 rmatMessage(item)));............
1b100 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ......return.false;.............
1b120 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 .}..........}..........return.tr
1b140 75 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ue;......}........///.<summary>.
1b160 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 74 68 .....///.Returns.the.names.of.th
1b180 65 20 69 74 65 6d 73 20 69 6e 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6c 6c 65 63 74 69 e.items.in.the.supplied.collecti
1b1a0 6f 6e 20 74 68 61 74 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 4f 2d 53 70 61 63 65 20 74 79 on.that.correspond.to.O-Space.ty
1b1c0 70 65 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 20 70 75 pes.......///.</summary>......pu
1b1e0 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 47 65 74 41 6c 6c 47 blic.IEnumerable<string>.GetAllG
1b200 6c 6f 62 61 6c 49 74 65 6d 73 28 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 lobalItems(EdmItemCollection.ite
1b220 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 mCollection)......{..........ret
1b240 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 47 6c 6f 62 urn.itemCollection.GetItems<Glob
1b260 61 6c 49 74 65 6d 3e 28 29 2e 57 68 65 72 65 28 69 20 3d 3e 20 69 20 69 73 20 45 6e 74 69 74 79 alItem>().Where(i.=>.i.is.Entity
1b280 54 79 70 65 20 7c 7c 20 69 20 69 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 7c 7c 20 69 20 69 73 Type.||.i.is.ComplexType.||.i.is
1b2a0 20 45 6e 75 6d 54 79 70 65 20 7c 7c 20 69 20 69 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 .EnumType.||.i.is.EntityContaine
1b2c0 72 29 2e 53 65 6c 65 63 74 28 67 20 3d 3e 20 47 65 74 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 r).Select(g.=>.GetGlobalItemName
1b2e0 28 67 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 (g));......}........///.<summary
1b300 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 >......///.Returns.the.name.of.t
1b320 68 65 20 73 75 70 70 6c 69 65 64 20 47 6c 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f 2f he.supplied.GlobalItem.......///
1b340 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 47 .</summary>......public.string.G
1b360 65 74 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 28 47 6c 6f 62 61 6c 49 74 65 6d 20 69 74 65 6d etGlobalItemName(GlobalItem.item
1b380 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 45 64 )......{..........if.(item.is.Ed
1b3a0 6d 54 79 70 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 72 mType)..........{..............r
1b3c0 65 74 75 72 6e 20 28 28 45 64 6d 54 79 70 65 29 69 74 65 6d 29 2e 4e 61 6d 65 3b 0d 0a 20 20 20 eturn.((EdmType)item).Name;.....
1b3e0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d .....}..........else..........{.
1b400 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 45 6e 74 69 74 79 43 6f 6e 74 .............return.((EntityCont
1b420 61 69 6e 65 72 29 69 74 65 6d 29 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ainer)item).Name;..........}....
1b440 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
1b460 2f 20 52 65 74 75 6e 73 20 61 73 20 66 75 6c 6c 20 6f 66 20 61 20 6e 61 6d 65 20 61 73 20 70 6f /.Retuns.as.full.of.a.name.as.po
1b480 73 73 69 62 6c 65 2c 20 69 66 20 61 20 6e 61 6d 65 73 70 61 63 65 20 69 73 20 70 72 6f 76 69 64 ssible,.if.a.namespace.is.provid
1b4a0 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6e 61 6d 65 73 70 61 63 65 20 61 6e 64 20 6e 61 ed......///.the.namespace.and.na
1b4c0 6d 65 20 61 72 65 20 63 6f 6d 62 69 6e 65 64 20 77 69 74 68 20 61 20 70 65 72 69 6f 64 2c 20 6f me.are.combined.with.a.period,.o
1b4e0 74 68 65 72 77 69 73 65 20 6a 75 73 74 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6e 61 6d 65 20 therwise.just......///.the.name.
1b500 69 73 20 72 65 74 75 72 6e 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e is.returned.......///.</summary>
1b520 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 72 65 61 74 65 46 75 6c 6c 4e 61 ......public.string.CreateFullNa
1b540 6d 65 28 73 74 72 69 6e 67 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 me(string.namespaceName,.string.
1b560 6e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 name)......{..........if.(String
1b580 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a .IsNullOrEmpty(namespaceName))..
1b5a0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 61 ........{..............return.na
1b5c0 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e me;..........}............return
1b5e0 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 2b 20 22 2e 22 20 2b 20 6e 61 6d 65 3b 0d 0a 20 20 .namespaceName.+.".".+.name;....
1b600 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
1b620 2f 20 52 65 74 75 6e 73 20 61 20 6c 69 74 65 72 61 6c 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 /.Retuns.a.literal.representing.
1b640 74 68 65 20 73 75 70 70 6c 69 65 64 20 76 61 6c 75 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 the.supplied.value.......///.</s
1b660 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 72 65 61 74 ummary>......public.string.Creat
1b680 65 4c 69 74 65 72 61 6c 28 6f 62 6a 65 63 74 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 eLiteral(object.value)......{...
1b6a0 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .......if.(value.==.null).......
1b6c0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e ...{..............return.string.
1b6e0 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 54 79 70 Empty;..........}............Typ
1b700 65 20 74 79 70 65 20 3d 20 76 61 6c 75 65 2e 47 65 74 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 e.type.=.value.GetType();.......
1b720 20 20 20 69 66 20 28 74 79 70 65 2e 49 73 45 6e 75 6d 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a ...if.(type.IsEnum)..........{..
1b740 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 ............return.type.FullName
1b760 20 2b 20 22 2e 22 20 2b 20 76 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 .+.".".+.value.ToString();......
1b780 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f ....}..........if.(type.==.typeo
1b7a0 66 28 47 75 69 64 29 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 f(Guid))..........{.............
1b7c0 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 .return.string.Format(CultureInf
1b7e0 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 47 75 69 64 28 5c 22 o.InvariantCulture,."new.Guid(\"
1b800 7b 30 7d 5c 22 29 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 {0}\")",........................
1b820 20 20 20 20 20 20 20 20 20 20 20 28 28 47 75 69 64 29 76 61 6c 75 65 29 2e 54 6f 53 74 72 69 6e ...........((Guid)value).ToStrin
1b840 67 28 22 44 22 2c 20 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 g("D",.CultureInfo.InvariantCult
1b860 75 72 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 ure));..........}..........else.
1b880 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 44 61 74 65 54 69 6d 65 29 29 0d 0a 20 if.(type.==.typeof(DateTime))...
1b8a0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 .......{..............return.str
1b8c0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 ing.Format(CultureInfo.Invariant
1b8e0 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 44 61 74 65 54 69 6d 65 28 7b 30 7d 2c 20 44 61 74 65 Culture,."new.DateTime({0},.Date
1b900 54 69 6d 65 4b 69 6e 64 2e 55 6e 73 70 65 63 69 66 69 65 64 29 22 2c 0d 0a 20 20 20 20 20 20 20 TimeKind.Unspecified)",.........
1b920 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 28 28 44 61 74 65 ..........................((Date
1b940 54 69 6d 65 29 76 61 6c 75 65 29 2e 54 69 63 6b 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a Time)value).Ticks);..........}..
1b960 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 ........else.if.(type.==.typeof(
1b980 62 79 74 65 5b 5d 29 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 byte[]))..........{.............
1b9a0 20 76 61 72 20 61 72 72 61 79 49 6e 69 74 20 3d 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 .var.arrayInit.=.string.Join(",.
1b9c0 22 2c 20 28 28 62 79 74 65 5b 5d 29 76 61 6c 75 65 29 2e 53 65 6c 65 63 74 28 62 20 3d 3e 20 62 ",.((byte[])value).Select(b.=>.b
1b9e0 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 .ToString(CultureInfo.InvariantC
1ba00 75 6c 74 75 72 65 29 29 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ulture)).ToArray());............
1ba20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e ..return.string.Format(CultureIn
1ba40 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 42 79 74 65 5b 5d fo.InvariantCulture,."new.Byte[]
1ba60 20 7b 7b 7b 30 7d 7d 7d 22 2c 20 61 72 72 61 79 49 6e 69 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 .{{{0}}}",.arrayInit);..........
1ba80 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 }..........else.if.(type.==.type
1baa0 6f 66 28 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a of(DateTimeOffset))..........{..
1bac0 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 74 6f 20 3d 20 28 44 61 74 65 54 69 6d 65 4f ............var.dto.=.(DateTimeO
1bae0 66 66 73 65 74 29 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ffset)value;..............return
1bb00 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 .string.Format(CultureInfo.Invar
1bb20 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 iantCulture,."new.DateTimeOffset
1bb40 28 7b 30 7d 2c 20 6e 65 77 20 54 69 6d 65 53 70 61 6e 28 7b 31 7d 29 29 22 2c 0d 0a 20 20 20 20 ({0},.new.TimeSpan({1}))",......
1bb60 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 64 74 6f .............................dto
1bb80 2e 54 69 63 6b 73 2c 20 64 74 6f 2e 4f 66 66 73 65 74 2e 54 69 63 6b 73 29 3b 0d 0a 20 20 20 20 .Ticks,.dto.Offset.Ticks);......
1bba0 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 20 3d 3d 20 ....}..........else.if.(type.==.
1bbc0 74 79 70 65 6f 66 28 54 69 6d 65 53 70 61 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 typeof(TimeSpan))..........{....
1bbe0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 ..........return.string.Format(C
1bc00 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 ultureInfo.InvariantCulture,."ne
1bc20 77 20 54 69 6d 65 53 70 61 6e 28 7b 30 7d 29 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 w.TimeSpan({0})",...............
1bc40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 54 69 6d 65 53 70 61 6e 29 76 ....................((TimeSpan)v
1bc60 61 6c 75 65 29 2e 54 69 63 6b 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 alue).Ticks);..........}........
1bc80 20 20 20 20 76 61 72 20 65 78 70 72 65 73 73 69 6f 6e 20 3d 20 6e 65 77 20 43 6f 64 65 50 72 69 ....var.expression.=.new.CodePri
1bca0 6d 69 74 69 76 65 45 78 70 72 65 73 73 69 6f 6e 28 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 mitiveExpression(value);........
1bcc0 20 20 76 61 72 20 77 72 69 74 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 57 72 69 74 65 72 28 ..var.writer.=.new.StringWriter(
1bce0 29 3b 0d 0a 20 20 20 20 20 20 20 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 20 63 );..........CSharpCodeProvider.c
1bd00 6f 64 65 20 3d 20 6e 65 77 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 3b 0d ode.=.new.CSharpCodeProvider();.
1bd20 0a 20 20 20 20 20 20 20 20 63 6f 64 65 2e 47 65 6e 65 72 61 74 65 43 6f 64 65 46 72 6f 6d 45 78 .........code.GenerateCodeFromEx
1bd40 70 72 65 73 73 69 6f 6e 28 65 78 70 72 65 73 73 69 6f 6e 2c 20 77 72 69 74 65 72 2c 20 6e 65 77 pression(expression,.writer,.new
1bd60 20 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 4f 70 74 69 6f 6e 73 28 29 29 3b 0d 0a 20 20 20 20 20 .CodeGeneratorOptions());.......
1bd80 20 20 20 72 65 74 75 72 6e 20 77 72 69 74 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 ...return.writer.ToString();....
1bda0 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
1bdc0 2f 20 52 65 74 75 72 6e 73 20 61 20 72 65 73 6f 75 72 63 65 20 73 74 72 69 6e 67 20 66 72 6f 6d /.Returns.a.resource.string.from
1bde0 20 74 68 65 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 20 61 .the.System.Data.Entity.Design.a
1be00 73 73 65 6d 62 6c 79 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 ssembly.......///.</summary>....
1be20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 52 65 73 6f 75 72 ..public.static.string.GetResour
1be40 63 65 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 72 65 73 6f 75 72 63 65 4e 61 6d 65 2c 20 43 75 ceString(string.resourceName,.Cu
1be60 6c 74 75 72 65 49 6e 66 6f 20 63 75 6c 74 75 72 65 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b ltureInfo.culture.=.null)......{
1be80 0d 0a 20 20 20 20 20 20 20 20 69 66 28 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 3d 3d ..........if(_resourceManager.==
1bea0 20 6e 75 6c 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 5f .null)..........{.............._
1bec0 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 3d 20 6e 65 77 20 53 79 73 74 65 6d 2e 52 65 73 resourceManager.=.new.System.Res
1bee0 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 28 22 53 79 73 74 65 6d 2e 44 ources.ResourceManager("System.D
1bf00 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ata.Entity.Design",.............
1bf20 20 20 20 20 20 74 79 70 65 6f 66 28 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 .....typeof(System.Data.Entity.D
1bf40 65 73 69 67 6e 2e 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 esign.MetadataItemCollectionFact
1bf60 6f 72 79 29 2e 41 73 73 65 6d 62 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ory).Assembly);..........}......
1bf80 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 47 65 ......return._resourceManager.Ge
1bfa0 74 53 74 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d 65 2c 20 63 75 6c 74 75 72 65 29 3b 0d tString(resourceName,.culture);.
1bfc0 0a 20 20 20 20 7d 0d 0a 20 20 20 20 73 74 61 74 69 63 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 .....}......static.System.Resour
1bfe0 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e ces.ResourceManager._resourceMan
1c000 61 67 65 72 3b 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e ager;........private.const.strin
1c020 67 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 20 g.ExternalTypeNameAttributeName.
1c040 3d 20 40 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d =.@"http://schemas.microsoft.com
1c060 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 45 78 74 65 /ado/2006/04/codegeneration:Exte
1c080 72 6e 61 6c 54 79 70 65 4e 61 6d 65 22 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 rnalTypeName";........///.<summa
1c0a0 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 65 6e 74 69 74 79 2c 20 63 6f ry>......///.Gets.the.entity,.co
1c0c0 6d 70 6c 65 78 2c 20 6f 72 20 65 6e 75 6d 20 74 79 70 65 73 20 66 6f 72 20 77 68 69 63 68 20 63 mplex,.or.enum.types.for.which.c
1c0e0 6f 64 65 20 73 68 6f 75 6c 64 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 ode.should.be.generated.from.the
1c100 20 67 69 76 65 6e 20 69 74 65 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f .given.item.collection.......///
1c120 20 41 6e 79 20 74 79 70 65 73 20 66 6f 72 20 77 68 69 63 68 20 61 6e 20 45 78 74 65 72 6e 61 6c .Any.types.for.which.an.External
1c140 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 70 70 TypeName.annotation.has.been.app
1c160 6c 69 65 64 20 69 6e 20 74 68 65 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 0d 0a 20 20 lied.in.the.conceptual.model....
1c180 20 20 2f 2f 2f 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 20 61 72 65 20 66 69 6c 74 65 72 ..///.metadata.(CSDL).are.filter
1c1a0 65 64 20 6f 75 74 20 6f 66 20 74 68 65 20 72 65 74 75 72 6e 65 64 20 6c 69 73 74 2e 0d 0a 20 20 ed.out.of.the.returned.list.....
1c1c0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 74 79 70 65 70 ..///.</summary>......///.<typep
1c1e0 61 72 61 6d 20 6e 61 6d 65 3d 22 54 22 3e 54 68 65 20 74 79 70 65 20 6f 66 20 69 74 65 6d 20 74 aram.name="T">The.type.of.item.t
1c200 6f 20 72 65 74 75 72 6e 2e 3c 2f 74 79 70 65 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c o.return.</typeparam>......///.<
1c220 70 61 72 61 6d 20 6e 61 6d 65 3d 22 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 3e 54 68 65 20 param.name="itemCollection">The.
1c240 69 74 65 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 6f 20 6c 6f 6f 6b 20 69 6e 2e 3c 2f 70 61 72 item.collection.to.look.in.</par
1c260 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 69 74 65 6d 73 20 am>......///.<returns>The.items.
1c280 74 6f 20 67 65 6e 65 72 61 74 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c to.generate.</returns>......publ
1c2a0 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 3e 20 47 65 74 49 74 65 6d 73 54 6f 47 65 6e 65 ic.IEnumerable<T>.GetItemsToGene
1c2c0 72 61 74 65 3c 54 3e 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 rate<T>(ItemCollection.itemColle
1c2e0 63 74 69 6f 6e 29 20 77 68 65 72 65 20 54 3a 20 47 6c 6f 62 61 6c 49 74 65 6d 0d 0a 20 20 20 20 ction).where.T:.GlobalItem......
1c300 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e {..........return.itemCollection
1c320 2e 47 65 74 49 74 65 6d 73 3c 54 3e 28 29 2e 57 68 65 72 65 28 69 20 3d 3e 20 21 69 2e 4d 65 74 .GetItems<T>().Where(i.=>.!i.Met
1c340 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 41 6e 79 28 70 20 3d 3e 20 70 2e 4e 61 6d 65 20 adataProperties.Any(p.=>.p.Name.
1c360 3d 3d 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 ==.ExternalTypeNameAttributeName
1c380 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ));......}........///.<summary>.
1c3a0 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 .....///.Returns.the.escaped.typ
1c3c0 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 73 61 67 e.name.to.use.for.the.given.usag
1c3e0 65 20 6f 66 20 61 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 e.of.a.c-space.type.in.o-space..
1c400 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e This.might.be......///.an.extern
1c420 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 al.type.name.if.the.ExternalType
1c440 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 Name.annotation.has.been.specifi
1c460 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f ed.in.the......///.conceptual.mo
1c480 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f del.metadata.(CSDL).......///.</
1c4a0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 summary>......///.<param.name="t
1c4c0 79 70 65 55 73 61 67 65 22 3e 54 68 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 ypeUsage">The.c-space.type.usage
1c4e0 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 .to.get.a.name.for.</param>.....
1c500 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 .///.<returns>The.type.name.to.u
1c520 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 se.</returns>......public.string
1c540 20 47 65 74 54 79 70 65 4e 61 6d 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 .GetTypeName(TypeUsage.typeUsage
1c560 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 55 73 61 )......{..........return.typeUsa
1c580 67 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 6e 75 6c 6c 20 3a 20 47 65 74 54 79 70 65 4e 61 6d 65 28 ge.==.null.?.null.:.GetTypeName(
1c5a0 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c typeUsage.EdmType,._ef.IsNullabl
1c5c0 65 28 74 79 70 65 55 73 61 67 65 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 3a 20 6e 75 e(typeUsage),.modelNamespace:.nu
1c5e0 6c 6c 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ll);......}........///.<summary>
1c600 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 ......///.Returns.the.escaped.ty
1c620 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 63 2d 73 pe.name.to.use.for.the.given.c-s
1c640 70 61 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 pace.type.in.o-space..This.might
1c660 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 .be......///.an.external.type.na
1c680 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 me.if.the.ExternalTypeName.annot
1c6a0 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d ation.has.been.specified.in.the.
1c6c0 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 .....///.conceptual.model.metada
1c6e0 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a ta.(CSDL).......///.</summary>..
1c700 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 ....///.<param.name="edmType">Th
1c720 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 e.c-space.type.to.get.a.name.for
1c740 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 .</param>......///.<returns>The.
1c760 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 type.name.to.use.</returns>.....
1c780 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 45 64 6d 54 79 .public.string.GetTypeName(EdmTy
1c7a0 70 65 20 65 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 pe.edmType)......{..........retu
1c7c0 72 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 rn.GetTypeName(edmType,.isNullab
1c7e0 6c 65 3a 20 6e 75 6c 6c 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 3a 20 6e 75 6c 6c 29 3b le:.null,.modelNamespace:.null);
1c800 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
1c820 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e ..///.Returns.the.escaped.type.n
1c840 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 73 61 67 65 20 6f ame.to.use.for.the.given.usage.o
1c860 66 20 61 6e 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 f.an.c-space.type.in.o-space..Th
1c880 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c is.might.be......///.an.external
1c8a0 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 .type.name.if.the.ExternalTypeNa
1c8c0 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 me.annotation.has.been.specified
1c8e0 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 .in.the......///.conceptual.mode
1c900 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 l.metadata.(CSDL).......///.</su
1c920 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 79 70 mmary>......///.<param.name="typ
1c940 65 55 73 61 67 65 22 3e 54 68 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 20 74 eUsage">The.c-space.type.usage.t
1c960 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f o.get.a.name.for.</param>....../
1c980 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e //.<param.name="modelNamespace">
1c9a0 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 If.not.null.and.the.type's.names
1c9c0 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 pace.does.not.match.this.namespa
1c9e0 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 ce,.then.a......///.fully.qualif
1ca00 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 ied.name.will.be.returned.</para
1ca20 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 m>......///.<returns>The.type.na
1ca40 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 me.to.use.</returns>......public
1ca60 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 54 79 70 65 55 73 61 67 65 20 74 79 .string.GetTypeName(TypeUsage.ty
1ca80 70 65 55 73 61 67 65 2c 20 73 74 72 69 6e 67 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d peUsage,.string.modelNamespace).
1caa0 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 55 73 61 67 65 .....{..........return.typeUsage
1cac0 20 3d 3d 20 6e 75 6c 6c 20 3f 20 6e 75 6c 6c 20 3a 20 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 .==.null.?.null.:.GetTypeName(ty
1cae0 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 peUsage.EdmType,._ef.IsNullable(
1cb00 74 79 70 65 55 73 61 67 65 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 3b 0d 0a 20 20 typeUsage),.modelNamespace);....
1cb20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
1cb40 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 /.Returns.the.escaped.type.name.
1cb60 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 63 2d 73 70 61 63 65 20 74 79 70 to.use.for.the.given.c-space.typ
1cb80 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 e.in.o-space..This.might.be.....
1cba0 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 .///.an.external.type.name.if.th
1cbc0 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 e.ExternalTypeName.annotation.ha
1cbe0 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f s.been.specified.in.the......///
1cc00 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c .conceptual.model.metadata.(CSDL
1cc20 29 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 20 2f 2f 2f 20 ).......///.</summary>......///.
1cc40 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 63 2d 73 70 61 63 <param.name="edmType">The.c-spac
1cc60 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d e.type.to.get.a.name.for.</param
1cc80 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d >......///.<param.name="modelNam
1cca0 65 73 70 61 63 65 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 espace">If.not.null.and.the.type
1ccc0 27 73 20 6e 61 6d 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 's.namespace.does.not.match.this
1cce0 20 6e 61 6d 65 73 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 66 75 6c 6c .namespace,.then.a......///.full
1cd00 79 20 71 75 61 6c 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 y.qualified.name.will.be.returne
1cd20 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 d.</param>......///.<returns>The
1cd40 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 .type.name.to.use.</returns>....
1cd60 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 45 64 6d 54 ..public.string.GetTypeName(EdmT
1cd80 79 70 65 20 65 64 6d 54 79 70 65 2c 20 73 74 72 69 6e 67 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 ype.edmType,.string.modelNamespa
1cda0 63 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 54 79 ce)......{..........return.GetTy
1cdc0 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 3a 20 6e 75 6c 6c peName(edmType,.isNullable:.null
1cde0 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 3a 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 ,.modelNamespace:.modelNamespace
1ce00 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a );......}........///.<summary>..
1ce20 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 ....///.Returns.the.escaped.type
1ce40 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 63 2d 73 70 61 .name.to.use.for.the.given.c-spa
1ce60 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 ce.type.in.o-space..This.might.b
1ce80 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 e......///.an.external.type.name
1cea0 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 .if.the.ExternalTypeName.annotat
1cec0 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 ion.has.been.specified.in.the...
1cee0 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 ...///.conceptual.model.metadata
1cf00 20 28 43 53 44 4c 29 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 .(CSDL).......///.</summary>....
1cf20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 ..///.<param.name="edmType">The.
1cf40 63 2d 73 70 61 63 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c c-space.type.to.get.a.name.for.<
1cf60 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 69 73 /param>......///.<param.name="is
1cf80 4e 75 6c 6c 61 62 6c 65 22 3e 53 65 74 20 74 68 69 73 20 74 6f 20 74 72 75 65 20 66 6f 72 20 6e Nullable">Set.this.to.true.for.n
1cfa0 75 6c 6c 61 62 6c 65 20 75 73 61 67 65 20 6f 66 20 74 68 69 73 20 74 79 70 65 2e 3c 2f 70 61 72 ullable.usage.of.this.type.</par
1cfc0 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e am>......///.<param.name="modelN
1cfe0 61 6d 65 73 70 61 63 65 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 amespace">If.not.null.and.the.ty
1d000 70 65 27 73 20 6e 61 6d 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 pe's.namespace.does.not.match.th
1d020 69 73 20 6e 61 6d 65 73 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 66 75 is.namespace,.then.a......///.fu
1d040 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 lly.qualified.name.will.be.retur
1d060 6e 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 ned.</param>......///.<returns>T
1d080 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a he.type.name.to.use.</returns>..
1d0a0 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 45 ....private.string.GetTypeName(E
1d0c0 64 6d 54 79 70 65 20 65 64 6d 54 79 70 65 2c 20 62 6f 6f 6c 3f 20 69 73 4e 75 6c 6c 61 62 6c 65 dmType.edmType,.bool?.isNullable
1d0e0 2c 20 73 74 72 69 6e 67 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 7b 0d ,.string.modelNamespace)......{.
1d100 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 .........if.(edmType.==.null)...
1d120 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c .......{..............return.nul
1d140 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6c l;..........}............var.col
1d160 6c 65 63 74 69 6f 6e 54 79 70 65 20 3d 20 65 64 6d 54 79 70 65 20 61 73 20 43 6f 6c 6c 65 63 74 lectionType.=.edmType.as.Collect
1d180 69 6f 6e 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e ionType;..........if.(collection
1d1a0 54 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 Type.!=.null)..........{........
1d1c0 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 ......return.String.Format(Cultu
1d1e0 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 49 43 6f 6c 6c 65 reInfo.InvariantCulture,."IColle
1d200 63 74 69 6f 6e 3c 7b 30 7d 3e 22 2c 20 47 65 74 54 79 70 65 4e 61 6d 65 28 63 6f 6c 6c 65 63 74 ction<{0}>",.GetTypeName(collect
1d220 69 6f 6e 54 79 70 65 2e 54 79 70 65 55 73 61 67 65 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 ionType.TypeUsage,.modelNamespac
1d240 65 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 2f 2f 20 54 72 e));..........}............//.Tr
1d260 79 20 74 6f 20 67 65 74 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 2c 20 y.to.get.an.external.type.name,.
1d280 61 6e 64 20 69 66 20 74 68 61 74 20 69 73 20 6e 75 6c 6c 2c 20 74 68 65 6e 20 74 72 79 20 74 6f and.if.that.is.null,.then.try.to
1d2a0 20 67 65 74 20 65 73 63 61 70 65 20 74 68 65 20 6e 61 6d 65 20 66 72 6f 6d 20 6d 65 74 61 64 61 .get.escape.the.name.from.metada
1d2c0 74 61 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 70 6f 73 73 69 62 6c 79 20 6e 61 6d 65 73 70 61 ta,..........//.possibly.namespa
1d2e0 63 65 2d 71 75 61 6c 69 66 79 69 6e 67 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 74 ce-qualifying.it...........var.t
1d300 79 70 65 4e 61 6d 65 20 3d 20 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 2e 4d 65 74 61 64 61 74 ypeName.=.Escape(edmType.Metadat
1d320 61 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aProperties.....................
1d340 20 20 20 20 20 20 20 20 20 20 20 2e 57 68 65 72 65 28 70 20 3d 3e 20 70 2e 4e 61 6d 65 20 3d 3d ............Where(p.=>.p.Name.==
1d360 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 0d .ExternalTypeNameAttributeName).
1d380 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 2e ................................
1d3a0 53 65 6c 65 63 74 28 70 20 3d 3e 20 28 73 74 72 69 6e 67 29 70 2e 56 61 6c 75 65 29 0d 0a 20 20 Select(p.=>.(string)p.Value)....
1d3c0 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 2e 46 69 72 .............................Fir
1d3e0 73 74 4f 72 44 65 66 61 75 6c 74 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3f 3f 0d 0a stOrDefault())..............??..
1d400 20 20 20 20 20 20 20 20 20 20 20 20 28 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 21 3d 20 6e ............(modelNamespace.!=.n
1d420 75 6c 6c 20 26 26 20 65 64 6d 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 21 3d 20 ull.&&.edmType.NamespaceName.!=.
1d440 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 43 modelNamespace.?...............C
1d460 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 65 64 reateFullName(EscapeNamespace(ed
1d480 6d 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 2c 20 45 73 63 61 70 65 28 65 64 6d mType.NamespaceName),.Escape(edm
1d4a0 54 79 70 65 29 29 20 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 45 73 63 61 70 65 28 65 64 Type)).:...............Escape(ed
1d4c0 6d 54 79 70 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 54 79 70 65 20 mType));............if.(edmType.
1d4e0 69 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 is.StructuralType)..........{...
1d500 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 ...........return.typeName;.....
1d520 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 54 79 70 65 20 69 73 .....}............if.(edmType.is
1d540 20 53 69 6d 70 6c 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .SimpleType)..........{.........
1d560 20 20 20 20 20 76 61 72 20 63 6c 72 54 79 70 65 20 3d 20 5f 65 66 2e 55 6e 64 65 72 6c 79 69 6e .....var.clrType.=._ef.Underlyin
1d580 67 43 6c 72 54 79 70 65 28 65 64 6d 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 gClrType(edmType);..............
1d5a0 69 66 20 28 21 28 65 64 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 79 70 65 29 29 0d 0a 20 20 20 if.(!(edmType.is.EnumType)).....
1d5c0 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 74 79 70 65 .........{..................type
1d5e0 4e 61 6d 65 20 3d 20 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 Name.=.Escape(clrType);.........
1d600 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 63 6c 72 .....}................return.clr
1d620 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 20 26 26 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3d Type.IsValueType.&&.isNullable.=
1d640 3d 20 74 72 75 65 20 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 =.true.?..................String
1d660 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c .Format(CultureInfo.InvariantCul
1d680 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 3c 7b 30 7d 3e 22 2c 20 74 79 70 65 4e 61 6d 65 29 ture,."Nullable<{0}>",.typeName)
1d6a0 20 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 .:..................typeName;...
1d6c0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 .......}............throw.new.Ar
1d6e0 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 74 79 70 65 55 73 61 67 65 22 29 3b 0d 0a 20 gumentException("typeUsage");...
1d700 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 ...}..}....///.<summary>..///.Re
1d720 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6d 61 6b 69 6e 67 20 74 68 65 20 45 6e 74 69 74 79 20 sponsible.for.making.the.Entity.
1d740 46 72 61 6d 65 77 6f 72 6b 20 4d 65 74 61 64 61 74 61 20 6d 6f 72 65 0d 0a 2f 2f 2f 20 61 63 63 Framework.Metadata.more..///.acc
1d760 65 73 73 69 62 6c 65 20 66 6f 72 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e 2e 0d 0a 2f 2f essible.for.code.generation...//
1d780 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4d 65 74 61 64 /.</summary>..public.class.Metad
1d7a0 61 74 61 54 6f 6f 6c 73 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c ataTools..{......private.readonl
1d7c0 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 y.DynamicTextTransformation._tex
1d7e0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d tTransformation;........///.<sum
1d800 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 4d 65 mary>......///.Initializes.an.Me
1d820 74 61 64 61 74 61 54 6f 6f 6c 73 20 49 6e 73 74 61 6e 63 65 20 20 77 69 74 68 20 74 68 65 0d 0a tadataTools.Instance..with.the..
1d840 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 ....///.TextTransformation.(T4.g
1d860 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c enerated.class).that.is.currentl
1d880 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 y.running......///.</summary>...
1d8a0 20 20 20 70 75 62 6c 69 63 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 6f 62 6a 65 63 74 20 74 ...public.MetadataTools(object.t
1d8c0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 extTransformation)......{.......
1d8e0 20 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c ...if.(textTransformation.==.nul
1d900 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 74 68 72 6f 77 l)..........{..............throw
1d920 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 .new.ArgumentNullException("text
1d940 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a Transformation");..........}....
1d960 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 ........_textTransformation.=.Dy
1d980 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 namicTextTransformation.Create(t
1d9a0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 extTransformation);......}......
1d9c0 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 ..///.<summary>......///.This.me
1d9e0 74 68 6f 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 43 4c 52 20 thod.returns.the.underlying.CLR.
1da00 74 79 70 65 20 6f 66 20 74 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 63 6f 72 72 65 73 70 type.of.the.o-space.type.corresp
1da20 6f 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 3c 70 61 72 61 6d 72 65 66 onding.to.the.supplied.<paramref
1da40 20 6e 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 4e 6f 74 .name="typeUsage"/>......///.Not
1da60 65 20 74 68 61 74 20 66 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d 65 61 e.that.for.an.enum.type.this.mea
1da80 6e 73 20 74 68 61 74 20 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 6e 75 ns.that.the.type.backing.the.enu
1daa0 6d 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e 75 6d m.will.be.returned,.not.the.enum
1dac0 20 74 79 70 65 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 .type.itself.......///.</summary
1dae0 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 43 6c 72 54 79 70 65 28 54 79 70 65 55 >......public.Type.ClrType(TypeU
1db00 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 sage.typeUsage)......{..........
1db20 72 65 74 75 72 6e 20 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 return.UnderlyingClrType(typeUsa
1db40 67 65 2e 45 64 6d 54 79 70 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c ge.EdmType);......}........///.<
1db60 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 72 65 summary>......///.This.method.re
1db80 74 75 72 6e 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 43 4c 52 20 74 79 70 65 20 67 69 turns.the.underlying.CLR.type.gi
1dba0 76 65 6e 20 74 68 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 4e ven.the.c-space.type.......///.N
1dbc0 6f 74 65 20 74 68 61 74 20 66 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d ote.that.for.an.enum.type.this.m
1dbe0 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 eans.that.the.type.backing.the.e
1dc00 6e 75 6d 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e num.will.be.returned,.not.the.en
1dc20 75 6d 20 74 79 70 65 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 um.type.itself.......///.</summa
1dc40 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 55 6e 64 65 72 6c 79 69 6e 67 43 ry>......public.Type.UnderlyingC
1dc60 6c 72 54 79 70 65 28 45 64 6d 54 79 70 65 20 65 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a lrType(EdmType.edmType)......{..
1dc80 20 20 20 20 20 20 20 20 76 61 72 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 20 3d 20 65 64 6d 54 ........var.primitiveType.=.edmT
1dca0 79 70 65 20 61 73 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 ype.as.PrimitiveType;..........i
1dcc0 66 20 28 70 72 69 6d 69 74 69 76 65 54 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 f.(primitiveType.!=.null).......
1dce0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 69 6d 69 74 69 ...{..............return.primiti
1dd00 76 65 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 3b 0d 0a 20 20 20 20 20 veType.ClrEquivalentType;.......
1dd20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 75 6d 54 79 70 65 20 3d 20 65 ...}............var.enumType.=.e
1dd40 64 6d 54 79 70 65 20 61 73 20 45 6e 75 6d 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 dmType.as.EnumType;..........if.
1dd60 28 65 6e 75 6d 54 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 (enumType.!=.null)..........{...
1dd80 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 65 6e 75 6d 54 79 70 65 2e 55 6e 64 65 72 ...........return.enumType.Under
1dda0 6c 79 69 6e 67 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 3b 0d 0a 20 20 lyingType.ClrEquivalentType;....
1ddc0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 6f 66 ......}............return.typeof
1dde0 28 6f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d (object);......}........///.<sum
1de00 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 6d 50 72 mary>......///.True.if.the.EdmPr
1de20 6f 70 65 72 74 79 20 69 73 20 61 20 6b 65 79 20 6f 66 20 69 74 73 20 44 65 63 6c 61 72 69 6e 67 operty.is.a.key.of.its.Declaring
1de40 54 79 70 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 Type,.False.otherwise.......///.
1de60 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4b 65 </summary>......public.bool.IsKe
1de80 79 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a y(EdmProperty.property)......{..
1dea0 20 20 20 20 20 20 20 20 69 66 20 28 70 72 6f 70 65 72 74 79 20 21 3d 20 6e 75 6c 6c 20 26 26 20 ........if.(property.!=.null.&&.
1dec0 70 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 property.DeclaringType.BuiltInTy
1dee0 70 65 4b 69 6e 64 20 3d 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 peKind.==.BuiltInTypeKind.Entity
1df00 54 79 70 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 72 65 Type)..........{..............re
1df20 74 75 72 6e 20 28 28 45 6e 74 69 74 79 54 79 70 65 29 70 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 turn.((EntityType)property.Decla
1df40 72 69 6e 67 54 79 70 65 29 2e 4b 65 79 4d 65 6d 62 65 72 73 2e 43 6f 6e 74 61 69 6e 73 28 70 72 ringType).KeyMembers.Contains(pr
1df60 6f 70 65 72 74 79 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 72 operty);..........}............r
1df80 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c eturn.false;......}........///.<
1dfa0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 summary>......///.True.if.the.Ed
1dfc0 6d 50 72 6f 70 65 72 74 79 20 54 79 70 65 55 73 61 67 65 20 69 73 20 4e 75 6c 6c 61 62 6c 65 2c mProperty.TypeUsage.is.Nullable,
1dfe0 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d .False.otherwise.......///.</sum
1e000 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4e 75 6c 6c 61 62 6c mary>......public.bool.IsNullabl
1e020 65 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a e(EdmProperty.property)......{..
1e040 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 6f 70 65 72 74 79 20 21 3d 20 6e 75 6c 6c 20 ........return.property.!=.null.
1e060 26 26 20 49 73 4e 75 6c 6c 61 62 6c 65 28 70 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 &&.IsNullable(property.TypeUsage
1e080 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a );......}........///.<summary>..
1e0a0 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 20 69 73 ....///.True.if.the.TypeUsage.is
1e0c0 20 4e 75 6c 6c 61 62 6c 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 .Nullable,.False.otherwise......
1e0e0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c .///.</summary>......public.bool
1e100 20 49 73 4e 75 6c 6c 61 62 6c 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 .IsNullable(TypeUsage.typeUsage)
1e120 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 46 61 63 65 74 20 6e 75 6c 6c 61 62 6c 65 46 ......{..........Facet.nullableF
1e140 61 63 65 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 55 73 acet.=.null;..........if.(typeUs
1e160 61 67 65 20 21 3d 20 6e 75 6c 6c 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 age.!=.null.&&..............type
1e180 55 73 61 67 65 2e 46 61 63 65 74 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 22 4e 75 6c 6c 61 62 Usage.Facets.TryGetValue("Nullab
1e1a0 6c 65 22 2c 20 74 72 75 65 2c 20 6f 75 74 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 29 29 0d 0a le",.true,.out.nullableFacet))..
1e1c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 62 ........{..............return.(b
1e1e0 6f 6f 6c 29 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 ool)nullableFacet.Value;........
1e200 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 ..}............return.false;....
1e220 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
1e240 2f 20 49 66 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 20 54 79 70 65 55 73 61 67 65 20 72 65 70 /.If.the.passed.in.TypeUsage.rep
1e260 72 65 73 65 6e 74 73 20 61 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 68 69 73 20 6d 65 74 68 6f 64 resents.a.collection.this.method
1e280 20 72 65 74 75 72 6e 73 20 66 69 6e 61 6c 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 2f 2f 2f 20 .returns.final.element......///.
1e2a0 74 79 70 65 20 6f 66 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 74 68 65 72 77 69 73 type.of.the.collection,.otherwis
1e2c0 65 20 69 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 76 61 6c 75 65 20 70 61 73 73 65 64 20 69 6e e.it.returns.the.value.passed.in
1e2e0 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 20 70 75 62 6c 69 .......///.</summary>......publi
1e300 63 20 54 79 70 65 55 73 61 67 65 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 54 79 70 65 55 c.TypeUsage.GetElementType(TypeU
1e320 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 sage.typeUsage)......{..........
1e340 69 66 20 28 74 79 70 65 55 73 61 67 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 if.(typeUsage.==.null)..........
1e360 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 {..............return.null;.....
1e380 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 55 73 61 67 65 2e .....}............if.(typeUsage.
1e3a0 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 0d 0a 20 20 20 20 EdmType.is.CollectionType)......
1e3c0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 45 6c 65 ....{..............return.GetEle
1e3e0 6d 65 6e 74 54 79 70 65 28 28 28 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 74 79 70 65 55 73 mentType(((CollectionType)typeUs
1e400 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 54 79 70 65 55 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 age.EdmType).TypeUsage);........
1e420 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ..}..........else..........{....
1e440 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 55 73 61 67 65 3b 0d 0a 20 20 20 ..........return.typeUsage;.....
1e460 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 .....}......}........///.<summar
1e480 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 4e 61 76 69 67 61 74 69 y>......///.Returns.the.Navigati
1e4a0 6f 6e 50 72 6f 70 65 72 74 79 20 74 68 61 74 20 69 73 20 74 68 65 20 6f 74 68 65 72 20 65 6e 64 onProperty.that.is.the.other.end
1e4c0 20 6f 66 20 74 68 65 20 73 61 6d 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 73 65 74 20 69 66 20 .of.the.same.association.set.if.
1e4e0 69 74 20 69 73 0d 0a 20 20 20 20 2f 2f 2f 20 61 76 61 69 6c 61 62 6c 65 2c 20 6f 74 68 65 72 77 it.is......///.available,.otherw
1e500 69 73 65 20 69 74 20 72 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f ise.it.returns.null.......///.</
1e520 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 4e 61 76 69 67 61 74 69 6f 6e 50 summary>......public.NavigationP
1e540 72 6f 70 65 72 74 79 20 49 6e 76 65 72 73 65 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 roperty.Inverse(NavigationProper
1e560 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ty.navProperty)......{..........
1e580 69 66 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 if(navProperty.==.null).........
1e5a0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 .{..............return.null;....
1e5c0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 45 6e 74 69 74 79 54 79 70 65 20 74 6f ......}............EntityType.to
1e5e0 45 6e 74 69 74 79 20 3d 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 Entity.=.navProperty.ToEndMember
1e600 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 .GetEntityType();..........retur
1e620 6e 20 74 6f 45 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 0d n.toEntity.NavigationProperties.
1e640 0a 20 20 20 20 20 20 20 20 20 20 20 20 2e 53 69 6e 67 6c 65 4f 72 44 65 66 61 75 6c 74 28 6e 20 ..............SingleOrDefault(n.
1e660 3d 3e 20 4f 62 6a 65 63 74 2e 52 65 66 65 72 65 6e 63 65 45 71 75 61 6c 73 28 6e 2e 52 65 6c 61 =>.Object.ReferenceEquals(n.Rela
1e680 74 69 6f 6e 73 68 69 70 54 79 70 65 2c 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 tionshipType,.navProperty.Relati
1e6a0 6f 6e 73 68 69 70 54 79 70 65 29 20 26 26 20 21 4f 62 6a 65 63 74 2e 52 65 66 65 72 65 6e 63 65 onshipType).&&.!Object.Reference
1e6c0 45 71 75 61 6c 73 28 6e 2c 20 6e 61 76 50 72 6f 70 65 72 74 79 29 29 3b 0d 0a 20 20 20 20 7d 0d Equals(n,.navProperty));......}.
1e6e0 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 69 .......///.<summary>......///.Gi
1e700 76 65 6e 20 61 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 ven.a.property.on.the.dependent.
1e720 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c end.of.a.referential.constraint,
1e740 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 70 72 6f 70 65 .returns.the.corresponding.prope
1e760 72 74 79 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 2e 0d 0a 20 20 20 20 2f rty.on.the.principal.end......./
1e780 2f 2f 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 //.Requires:.The.association.has
1e7a0 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 61 6e 64 20 74 .a.referential.constraint,.and.t
1e7c0 68 65 20 73 70 65 63 69 66 69 65 64 20 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 69 he.specified.dependentProperty.i
1e7e0 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 70 72 6f 70 65 72 74 69 65 73 20 6f 6e 20 74 68 65 20 64 s.one.of.the.properties.on.the.d
1e800 65 70 65 6e 64 65 6e 74 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 ependent.end.......///.</summary
1e820 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 50 72 6f 70 65 72 74 79 20 47 65 74 43 6f 72 >......public.EdmProperty.GetCor
1e840 72 65 73 70 6f 6e 64 69 6e 67 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 28 4e 61 76 69 respondingPrincipalProperty(Navi
1e860 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 45 64 6d 50 gationProperty.navProperty,.EdmP
1e880 72 6f 70 65 72 74 79 20 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 roperty.dependentProperty)......
1e8a0 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 {..........if.(navProperty.==.nu
1e8c0 6c 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 74 68 72 6f ll)..........{..............thro
1e8e0 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 w.new.ArgumentNullException("nav
1e900 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 Property");..........}..........
1e920 20 20 69 66 20 28 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 ..if.(dependentProperty.==.null)
1e940 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e ..........{..............throw.n
1e960 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 64 65 70 65 6e 64 ew.ArgumentNullException("depend
1e980 65 6e 74 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 entProperty");..........}.......
1e9a0 20 20 20 20 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c .....ReadOnlyMetadataCollection<
1e9c0 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 EdmProperty>.fromProperties.=.Ge
1e9e0 74 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 tPrincipalProperties(navProperty
1ea00 29 3b 0d 0a 20 20 20 20 20 20 20 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c );..........ReadOnlyMetadataColl
1ea20 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 ection<EdmProperty>.toProperties
1ea40 20 3d 20 47 65 74 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f .=.GetDependentProperties(navPro
1ea60 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 72 6f 6d 50 72 6f 70 perty);..........return.fromProp
1ea80 65 72 74 69 65 73 5b 74 6f 50 72 6f 70 65 72 74 69 65 73 2e 49 6e 64 65 78 4f 66 28 64 65 70 65 erties[toProperties.IndexOf(depe
1eaa0 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 29 5d 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f ndentProperty)];......}......../
1eac0 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 69 76 65 6e 20 61 20 70 72 //.<summary>......///.Given.a.pr
1eae0 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 operty.on.the.principal.end.of.a
1eb00 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 72 65 74 75 72 6e 73 .referential.constraint,.returns
1eb20 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 .the.corresponding.property.on.t
1eb40 68 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 he.dependent.end.......///.Requi
1eb60 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 res:.The.association.has.a.refer
1eb80 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 61 6e 64 20 74 68 65 20 73 70 65 63 69 ential.constraint,.and.the.speci
1eba0 66 69 65 64 20 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 20 69 73 20 6f 6e 65 20 6f 66 fied.principalProperty.is.one.of
1ebc0 20 74 68 65 20 70 72 6f 70 65 72 74 69 65 73 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c .the.properties.on.the.principal
1ebe0 20 65 6e 64 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 20 70 .end.......///.</summary>......p
1ec00 75 62 6c 69 63 20 45 64 6d 50 72 6f 70 65 72 74 79 20 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 ublic.EdmProperty.GetCorrespondi
1ec20 6e 67 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 ngDependentProperty(NavigationPr
1ec40 6f 70 65 72 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 45 64 6d 50 72 6f 70 65 72 74 79 20 operty.navProperty,.EdmProperty.
1ec60 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 principalProperty)......{.......
1ec80 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ...if.(navProperty.==.null).....
1eca0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 .....{..............throw.new.Ar
1ecc0 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 gumentNullException("navProperty
1ece0 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 70 72 ");..........}............if.(pr
1ed00 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 incipalProperty.==.null)........
1ed20 20 20 7b 0d 0a 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
1ed40 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 entNullException("principalPrope
1ed60 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 61 rty");..........}............Rea
1ed80 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 dOnlyMetadataCollection<EdmPrope
1eda0 72 74 79 3e 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 74 50 72 69 6e 63 69 70 rty>.fromProperties.=.GetPrincip
1edc0 61 6c 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 alProperties(navProperty);......
1ede0 20 20 20 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 ....ReadOnlyMetadataCollection<E
1ee00 64 6d 50 72 6f 70 65 72 74 79 3e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 74 44 65 dmProperty>.toProperties.=.GetDe
1ee20 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 3b 0d pendentProperties(navProperty);.
1ee40 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 5b 66 72 6f .........return.toProperties[fro
1ee60 6d 50 72 6f 70 65 72 74 69 65 73 2e 49 6e 64 65 78 4f 66 28 70 72 69 6e 63 69 70 61 6c 50 72 6f mProperties.IndexOf(principalPro
1ee80 70 65 72 74 79 29 5d 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d perty)];......}........///.<summ
1eea0 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f ary>......///.Gets.the.collectio
1eec0 6e 20 6f 66 20 70 72 6f 70 65 72 74 69 65 73 20 74 68 61 74 20 61 72 65 20 6f 6e 20 74 68 65 20 n.of.properties.that.are.on.the.
1eee0 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 principal.end.of.a.referential.c
1ef00 6f 6e 73 74 72 61 69 6e 74 20 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 onstraint.for.the.specified.navi
1ef20 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 72 gation.property.......///.Requir
1ef40 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 es:.The.association.has.a.refere
1ef60 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ntial.constraint.......///.</sum
1ef80 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 mary>......public.ReadOnlyMetada
1efa0 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 47 65 74 50 72 69 taCollection<EdmProperty>.GetPri
1efc0 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 ncipalProperties(NavigationPrope
1efe0 72 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 rty.navProperty)......{.........
1f000 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .if.(navProperty.==.null).......
1f020 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 ...{..............throw.new.Argu
1f040 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 mentNullException("navProperty")
1f060 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 ;..........}............return.(
1f080 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c (AssociationType)navProperty.Rel
1f0a0 61 74 69 6f 6e 73 68 69 70 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 ationshipType).ReferentialConstr
1f0c0 61 69 6e 74 73 5b 30 5d 2e 46 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 3b 0d 0a 20 20 20 20 7d 0d aints[0].FromProperties;......}.
1f0e0 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 .......///.<summary>......///.Ge
1f100 74 73 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 70 72 6f 70 65 72 74 69 65 73 20 ts.the.collection.of.properties.
1f120 74 68 61 74 20 61 72 65 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 20 6f 66 that.are.on.the.dependent.end.of
1f140 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 66 6f 72 20 74 68 .a.referential.constraint.for.th
1f160 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 2e e.specified.navigation.property.
1f180 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 ......///.Requires:.The.associat
1f1a0 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 ion.has.a.referential.constraint
1f1c0 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 20 70 75 62 6c 69 .......///.</summary>......publi
1f1e0 63 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d c.ReadOnlyMetadataCollection<Edm
1f200 50 72 6f 70 65 72 74 79 3e 20 47 65 74 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 Property>.GetDependentProperties
1f220 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 29 (NavigationProperty.navProperty)
1f240 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 ......{..........if.(navProperty
1f260 20 3d 3d 20 6e 75 6c 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 .==.null)..........{............
1f280 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
1f2a0 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a n("navProperty");..........}....
1f2c0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 ........return.((AssociationType
1f2e0 29 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 29 2e 52 )navProperty.RelationshipType).R
1f300 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 5b 30 5d 2e 54 6f 50 72 6f 70 65 eferentialConstraints[0].ToPrope
1f320 72 74 69 65 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 rties;......}........///.<summar
1f340 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 69 73 20 65 6e 74 69 74 79 20 y>......///.True.if.this.entity.
1f360 74 79 70 65 20 72 65 71 75 69 72 65 73 20 74 68 65 20 48 61 6e 64 6c 65 43 61 73 63 61 64 65 44 type.requires.the.HandleCascadeD
1f380 65 6c 65 74 65 20 6d 65 74 68 6f 64 20 64 65 66 69 6e 65 64 20 61 6e 64 20 74 68 65 20 6d 65 74 elete.method.defined.and.the.met
1f3a0 68 6f 64 20 68 61 73 0d 0a 20 20 20 20 2f 2f 2f 20 6e 6f 74 20 62 65 65 6e 20 64 65 66 69 6e 65 hod.has......///.not.been.define
1f3c0 64 20 6f 6e 20 61 6e 79 20 62 61 73 65 20 74 79 70 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 d.on.any.base.type......///.</su
1f3e0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 4e 65 65 64 73 48 61 6e mmary>......public.bool.NeedsHan
1f400 64 6c 65 43 61 73 63 61 64 65 44 65 6c 65 74 65 4d 65 74 68 6f 64 28 49 74 65 6d 43 6f 6c 6c 65 dleCascadeDeleteMethod(ItemColle
1f420 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 45 6e 74 69 74 79 54 79 70 65 ction.itemCollection,.EntityType
1f440 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 6e 65 .entity)......{..........bool.ne
1f460 65 64 73 4d 65 74 68 6f 64 20 3d 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 edsMethod.=.ContainsCascadeDelet
1f480 65 41 73 73 6f 63 69 61 74 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 65 6e 74 eAssociation(itemCollection,.ent
1f4a0 69 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 ity);..........//.Check.to.make.
1f4c0 73 75 72 65 20 6e 6f 20 62 61 73 65 20 74 79 70 65 73 20 68 61 76 65 20 61 6c 72 65 61 64 79 20 sure.no.base.types.have.already.
1f4e0 64 65 63 6c 61 72 65 64 20 74 68 69 73 20 6d 65 74 68 6f 64 0d 0a 20 20 20 20 20 20 20 20 45 6e declared.this.method..........En
1f500 74 69 74 79 54 79 70 65 20 62 61 73 65 54 79 70 65 20 3d 20 65 6e 74 69 74 79 2e 42 61 73 65 54 tityType.baseType.=.entity.BaseT
1f520 79 70 65 20 61 73 20 45 6e 74 69 74 79 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 77 68 69 6c ype.as.EntityType;..........whil
1f540 65 28 6e 65 65 64 73 4d 65 74 68 6f 64 20 26 26 20 62 61 73 65 54 79 70 65 20 21 3d 20 6e 75 6c e(needsMethod.&&.baseType.!=.nul
1f560 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 6e 65 65 64 73 l)..........{..............needs
1f580 4d 65 74 68 6f 64 20 3d 20 21 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 Method.=.!ContainsCascadeDeleteA
1f5a0 73 73 6f 63 69 61 74 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 62 61 73 65 54 ssociation(itemCollection,.baseT
1f5c0 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 62 61 ype);..............baseType.=.ba
1f5e0 73 65 54 79 70 65 2e 42 61 73 65 54 79 70 65 20 61 73 20 45 6e 74 69 74 79 54 79 70 65 3b 0d 0a seType.BaseType.as.EntityType;..
1f600 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 65 64 73 4d ........}..........return.needsM
1f620 65 74 68 6f 64 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 ethod;......}........///.<summar
1f640 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 69 73 20 65 6e 74 69 74 79 20 y>......///.True.if.this.entity.
1f660 74 79 70 65 20 70 61 72 74 69 63 69 70 61 74 65 73 20 69 6e 20 61 6e 79 20 72 65 6c 61 74 69 6f type.participates.in.any.relatio
1f680 6e 73 68 69 70 73 20 77 68 65 72 65 20 74 68 65 20 6f 74 68 65 72 20 65 6e 64 20 68 61 73 20 61 nships.where.the.other.end.has.a
1f6a0 6e 20 4f 6e 44 65 6c 65 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 61 73 63 61 64 65 20 64 65 6c 65 n.OnDelete......///.cascade.dele
1f6c0 74 65 20 64 65 66 69 6e 65 64 2c 20 6f 72 20 69 66 20 69 74 20 69 73 20 74 68 65 20 64 65 70 65 te.defined,.or.if.it.is.the.depe
1f6e0 6e 64 65 6e 74 20 69 6e 20 61 6e 79 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f ndent.in.any.identifying.relatio
1f700 6e 73 68 69 70 73 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 20 nships......///.</summary>......
1f720 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 private.bool.ContainsCascadeDele
1f740 74 65 41 73 73 6f 63 69 61 74 69 6f 6e 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 teAssociation(ItemCollection.ite
1f760 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 29 0d mCollection,.EntityType.entity).
1f780 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 .....{..........return.itemColle
1f7a0 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 3e 28 ction.GetItems<AssociationType>(
1f7c0 29 2e 57 68 65 72 65 28 61 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 ).Where(a.=>..................((
1f7e0 52 65 66 54 79 70 65 29 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b RefType)a.AssociationEndMembers[
1f800 30 5d 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 0].TypeUsage.EdmType).ElementTyp
1f820 65 20 3d 3d 20 65 6e 74 69 74 79 20 26 26 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 e.==.entity.&&.IsCascadeDeletePr
1f840 69 6e 63 69 70 61 6c 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b incipal(a.AssociationEndMembers[
1f860 31 5d 29 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 52 65 66 54 79 70 1]).||..................((RefTyp
1f880 65 29 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 31 5d 2e 54 79 70 e)a.AssociationEndMembers[1].Typ
1f8a0 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 65 eUsage.EdmType).ElementType.==.e
1f8c0 6e 74 69 74 79 20 26 26 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 ntity.&&.IsCascadeDeletePrincipa
1f8e0 6c 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 30 5d 29 29 2e 41 l(a.AssociationEndMembers[0])).A
1f900 6e 79 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 ny();......}........///.<summary
1f920 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 73 6f 75 72 63 65 20 65 6e >......///.True.if.the.source.en
1f940 64 20 6f 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 d.of.the.specified.navigation.pr
1f960 6f 70 65 72 74 79 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 69 6e 20 61 6e 20 69 64 operty.is.the.principal.in.an.id
1f980 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 2f 2f 2f entifying.relationship.......///
1f9a0 20 6f 72 20 69 66 20 74 68 65 20 73 6f 75 72 63 65 20 65 6e 64 20 68 61 73 20 63 61 73 63 61 64 .or.if.the.source.end.has.cascad
1f9c0 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d e.delete.defined.......///.</sum
1f9e0 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 43 61 73 63 61 64 65 mary>......public.bool.IsCascade
1fa00 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 DeletePrincipal(NavigationProper
1fa20 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ty.navProperty)......{..........
1fa40 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 if.(navProperty.==.null)........
1fa60 20 20 7b 0d 0a 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
1fa80 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 3b entNullException("navProperty");
1faa0 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 73 ..........}............return.Is
1fac0 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 28 41 73 73 6f 63 69 61 74 CascadeDeletePrincipal((Associat
1fae0 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 29 6e 61 76 50 72 6f 70 65 72 74 79 2e 46 72 6f 6d 45 6e 64 ionEndMember)navProperty.FromEnd
1fb00 4d 65 6d 62 65 72 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d Member);......}........///.<summ
1fb20 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 ary>......///.True.if.the.specif
1fb40 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 ied.association.end.is.the.princ
1fb60 69 70 61 6c 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 ipal.in.an.identifying.relations
1fb80 68 69 70 2e 0d 0a 20 20 20 20 2f 2f 2f 20 6f 72 20 69 66 20 74 68 65 20 61 73 73 6f 63 69 61 74 hip.......///.or.if.the.associat
1fba0 69 6f 6e 20 65 6e 64 20 68 61 73 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e ion.end.has.cascade.delete.defin
1fbc0 65 64 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 20 70 75 62 ed.......///.</summary>......pub
1fbe0 6c 69 63 20 62 6f 6f 6c 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 lic.bool.IsCascadeDeletePrincipa
1fc00 6c 28 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 20 61 73 73 6f 63 69 61 74 69 l(AssociationEndMember.associati
1fc20 6f 6e 45 6e 64 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 61 73 73 6f 63 onEnd)......{..........if.(assoc
1fc40 69 61 74 69 6f 6e 45 6e 64 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 iationEnd.==.null)..........{...
1fc60 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
1fc80 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 22 29 3b 0d 0a 20 lException("associationEnd");...
1fca0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 73 73 6f 63 .......}............return.assoc
1fcc0 69 61 74 69 6f 6e 45 6e 64 2e 44 65 6c 65 74 65 42 65 68 61 76 69 6f 72 20 3d 3d 20 4f 70 65 72 iationEnd.DeleteBehavior.==.Oper
1fce0 61 74 69 6f 6e 41 63 74 69 6f 6e 2e 43 61 73 63 61 64 65 20 7c 7c 20 49 73 50 72 69 6e 63 69 70 ationAction.Cascade.||.IsPrincip
1fd00 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 alEndOfIdentifyingRelationship(a
1fd20 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f ssociationEnd);......}........//
1fd40 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 /.<summary>......///.True.if.the
1fd60 20 73 70 65 63 69 66 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 69 73 20 74 68 .specified.association.end.is.th
1fd80 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e e.principal.end.in.an.identifyin
1fda0 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 20 6f 72 64 65 g.relationship.......///.In.orde
1fdc0 72 20 74 6f 20 62 65 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 r.to.be.an.identifying.relations
1fde0 68 69 70 2c 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 6d 75 73 74 20 68 61 76 65 20 61 hip,.the.association.must.have.a
1fe00 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 77 68 65 72 65 20 61 6c .referential.constraint.where.al
1fe20 6c 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 70 72 6f 70 65 72 74 69 65 73 20 61 72 l.of.the.dependent.properties.ar
1fe40 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 74 79 70 65 27 73 20 70 e.part.of.the.dependent.type's.p
1fe60 72 69 6d 61 72 79 20 6b 65 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d rimary.key.......///.</summary>.
1fe80 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f .....public.bool.IsPrincipalEndO
1fea0 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 41 73 73 6f 63 69 61 fIdentifyingRelationship(Associa
1fec0 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 0d 0a 20 tionEndMember.associationEnd)...
1fee0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 ...{..........if.(associationEnd
1ff00 20 3d 3d 20 6e 75 6c 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 .==.null)..........{............
1ff20 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
1ff40 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d n("associationEnd");..........}.
1ff60 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 ...........ReferentialConstraint
1ff80 20 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 28 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 .refConstraint.=.((AssociationTy
1ffa0 70 65 29 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 29 pe)associationEnd.DeclaringType)
1ffc0 2e 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 2e 57 68 65 72 65 28 72 63 .ReferentialConstraints.Where(rc
1ffe0 20 3d 3e 20 72 63 2e 46 72 6f 6d 52 6f 6c 65 20 3d 3d 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e .=>.rc.FromRole.==.associationEn
20000 64 29 2e 53 69 6e 67 6c 65 4f 72 44 65 66 61 75 6c 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 d).SingleOrDefault();..........i
20020 66 20 28 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 f.(refConstraint.!=.null).......
20040 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 ...{..............EntityType.ent
20060 69 74 79 20 3d 20 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 2e 54 6f 52 6f 6c 65 2e 47 65 74 45 6e ity.=.refConstraint.ToRole.GetEn
20080 74 69 74 79 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 tityType();..............return.
200a0 21 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 2e 54 6f 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 !refConstraint.ToProperties.Wher
200c0 65 28 74 70 20 3d 3e 20 21 65 6e 74 69 74 79 2e 4b 65 79 4d 65 6d 62 65 72 73 2e 43 6f 6e 74 61 e(tp.=>.!entity.KeyMembers.Conta
200e0 69 6e 73 28 74 70 29 29 2e 41 6e 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ins(tp)).Any();..........}......
20100 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ....return.false;......}........
20120 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 ///.<summary>......///.True.if.t
20140 68 65 20 73 70 65 63 69 66 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 74 79 70 65 20 69 73 he.specified.association.type.is
20160 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 .an.identifying.relationship....
20180 20 20 20 2f 2f 2f 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 6e 20 69 64 65 6e 74 69 66 ...///.In.order.to.be.an.identif
201a0 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2c 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 ying.relationship,.the.associati
201c0 6f 6e 20 6d 75 73 74 20 68 61 76 65 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 on.must.have.a.referential.const
201e0 72 61 69 6e 74 20 77 68 65 72 65 20 61 6c 6c 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 raint.where.all.of.the.dependent
20200 20 70 72 6f 70 65 72 74 69 65 73 20 61 72 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 64 65 70 65 .properties.are.part.of.the.depe
20220 6e 64 65 6e 74 20 74 79 70 65 27 73 20 70 72 69 6d 61 72 79 20 6b 65 79 2e 0d 0a 20 20 20 20 2f ndent.type's.primary.key......./
20240 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 //.</summary>......public.bool.I
20260 73 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 41 73 73 6f 63 69 61 sIdentifyingRelationship(Associa
20280 74 69 6f 6e 54 79 70 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 tionType.association)......{....
202a0 20 20 20 20 20 20 69 66 20 28 61 73 73 6f 63 69 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ......if.(association.==.null)..
202c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 ........{..............throw.new
202e0 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 .ArgumentNullException("associat
20300 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 ion");..........}............ret
20320 75 72 6e 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 urn.IsPrincipalEndOfIdentifyingR
20340 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 elationship(association.Associat
20360 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 30 5d 29 20 7c 7c 20 49 73 50 72 69 6e 63 69 70 61 6c ionEndMembers[0]).||.IsPrincipal
20380 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 EndOfIdentifyingRelationship(ass
203a0 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 31 ociation.AssociationEndMembers[1
203c0 5d 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ]);......}........///.<summary>.
203e0 0a 20 20 20 20 2f 2f 2f 20 72 65 71 75 69 72 65 73 3a 20 66 69 72 73 74 54 79 70 65 20 69 73 20 .....///.requires:.firstType.is.
20400 6e 6f 74 20 6e 75 6c 6c 0d 0a 20 20 20 20 2f 2f 2f 20 65 66 66 65 63 74 73 3a 20 69 66 20 73 65 not.null......///.effects:.if.se
20420 63 6f 6e 64 54 79 70 65 20 69 73 20 61 6d 6f 6e 67 20 74 68 65 20 62 61 73 65 20 74 79 70 65 73 condType.is.among.the.base.types
20440 20 6f 66 20 74 68 65 20 66 69 72 73 74 54 79 70 65 2c 20 72 65 74 75 72 6e 20 74 72 75 65 2c 0d .of.the.firstType,.return.true,.
20460 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 66 61 6c 73 65 .....///.otherwise.returns.false
20480 2e 0d 0a 20 20 20 20 2f 2f 2f 20 77 68 65 6e 20 66 69 72 73 74 54 79 70 65 20 69 73 20 73 61 6d .......///.when.firstType.is.sam
204a0 65 20 61 73 20 74 68 65 20 73 65 63 6f 6e 64 54 79 70 65 2c 20 72 65 74 75 72 6e 20 66 61 6c 73 e.as.the.secondType,.return.fals
204c0 65 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 20 70 75 62 6c e.......///.</summary>......publ
204e0 69 63 20 62 6f 6f 6c 20 49 73 53 75 62 74 79 70 65 4f 66 28 45 64 6d 54 79 70 65 20 66 69 72 73 ic.bool.IsSubtypeOf(EdmType.firs
20500 74 54 79 70 65 2c 20 45 64 6d 54 79 70 65 20 73 65 63 6f 6e 64 54 79 70 65 29 0d 0a 20 20 20 20 tType,.EdmType.secondType)......
20520 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 65 63 6f 6e 64 54 79 70 65 20 3d 3d 20 6e 75 6c {..........if.(secondType.==.nul
20540 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 72 65 74 75 72 l)..........{..............retur
20560 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f n.false;..........}............/
20580 2f 20 77 61 6c 6b 20 75 70 20 66 69 72 73 74 54 79 70 65 20 68 69 65 72 61 72 63 68 79 20 6c 69 /.walk.up.firstType.hierarchy.li
205a0 73 74 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 45 64 6d 54 79 70 65 20 74 20 3d 20 66 69 72 st..........for.(EdmType.t.=.fir
205c0 73 74 54 79 70 65 2e 42 61 73 65 54 79 70 65 3b 20 74 20 21 3d 20 6e 75 6c 6c 3b 20 74 20 3d 20 stType.BaseType;.t.!=.null;.t.=.
205e0 74 2e 42 61 73 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 t.BaseType)..........{..........
20600 20 20 20 20 69 66 20 28 74 20 3d 3d 20 73 65 63 6f 6e 64 54 79 70 65 29 0d 0a 20 20 20 20 20 20 ....if.(t.==.secondType)........
20620 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 ..........return.true;..........
20640 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d }..........return.false;......}.
20660 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 .......///.<summary>......///.Re
20680 74 75 72 6e 73 20 74 68 65 20 73 75 62 74 79 70 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 54 turns.the.subtype.of.the.EntityT
206a0 79 70 65 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ype.in.the.current.itemCollectio
206c0 6e 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 20 70 75 62 6c 69 n......///.</summary>......publi
206e0 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 6e 74 69 74 79 54 79 70 65 3e 20 47 65 74 53 75 62 c.IEnumerable<EntityType>.GetSub
20700 74 79 70 65 73 4f 66 28 45 6e 74 69 74 79 54 79 70 65 20 74 79 70 65 2c 20 49 74 65 6d 43 6f 6c typesOf(EntityType.type,.ItemCol
20720 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 62 6f 6f 6c 20 69 6e 63 lection.itemCollection,.bool.inc
20740 6c 75 64 65 41 62 73 74 72 61 63 74 54 79 70 65 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 ludeAbstractTypes)......{.......
20760 20 20 20 69 66 20 28 74 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d ...if.(type.!=.null)..........{.
20780 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 6e 74 69 74 79 54 .............IEnumerable<EntityT
207a0 79 70 65 3e 20 74 79 70 65 73 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 69 74 65 6d 43 6f 6c ype>.typesInCollection.=.itemCol
207c0 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 45 6e 74 69 74 79 54 79 70 65 3e 28 29 3b 0d lection.GetItems<EntityType>();.
207e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 74 69 74 79 54 79 70 65 .............foreach.(EntityType
20800 20 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 6e 20 74 79 70 65 73 49 6e 43 6f 6c 6c .typeInCollection.in.typesInColl
20820 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ection)..............{..........
20840 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 2e 45 71 75 61 6c 73 28 74 79 70 65 49 6e 43 6f ........if.(type.Equals(typeInCo
20860 6c 6c 65 63 74 69 6f 6e 29 20 3d 3d 20 66 61 6c 73 65 20 26 26 20 74 68 69 73 2e 49 73 53 75 62 llection).==.false.&&.this.IsSub
20880 74 79 70 65 4f 66 28 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 74 79 70 65 29 29 0d typeOf(typeInCollection,.type)).
208a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
208c0 20 20 20 20 20 20 20 20 69 66 20 28 20 69 6e 63 6c 75 64 65 41 62 73 74 72 61 63 74 54 79 70 65 ........if.(.includeAbstractType
208e0 73 20 7c 7c 20 21 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2e 41 62 73 74 72 61 63 74 29 s.||.!typeInCollection.Abstract)
20900 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 ......................{.........
20920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 74 79 .................yield.return.ty
20940 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 peInCollection;.................
20960 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 .....}.................}........
20980 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 ......}..........}......}.......
209a0 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 54 72 79 47 65 74 53 74 72 69 6e 67 .public.static.bool.TryGetString
209c0 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 28 4d 65 74 61 64 61 74 61 MetadataPropertySetting(Metadata
209e0 49 74 65 6d 20 69 74 65 6d 2c 20 73 74 72 69 6e 67 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 2c 20 Item.item,.string.propertyName,.
20a00 6f 75 74 20 73 74 72 69 6e 67 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 out.string.value)......{........
20a20 20 20 76 61 6c 75 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 61 64 61 74 ..value.=.null;..........Metadat
20a40 61 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 20 3d 20 69 74 65 6d 2e 4d 65 74 61 64 61 aProperty.property.=.item.Metada
20a60 74 61 50 72 6f 70 65 72 74 69 65 73 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 28 70 20 3d 3e taProperties.FirstOrDefault(p.=>
20a80 20 70 2e 4e 61 6d 65 20 3d 3d 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 .p.Name.==.propertyName);.......
20aa0 20 20 20 69 66 20 28 70 72 6f 70 65 72 74 79 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 ...if.(property.!=.null)........
20ac0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 20 3d 20 28 73 74 72 69 6e 67 ..{..............value.=.(string
20ae0 29 70 72 6f 70 65 72 74 79 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 )property.Value;..........}.....
20b00 20 20 20 20 20 72 65 74 75 72 6e 20 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 .....return.value.!=.null;......
20b20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f }..}....///.<summary>..///.Respo
20b40 6e 73 69 62 6c 65 20 66 6f 72 20 6c 6f 61 64 69 6e 67 20 61 6e 20 45 64 6d 49 74 65 6d 43 6f 6c nsible.for.loading.an.EdmItemCol
20b60 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 61 20 2e 65 64 6d 78 20 66 69 6c 65 20 6f 72 20 2e 63 73 lection.from.a..edmx.file.or..cs
20b80 64 6c 20 66 69 6c 65 73 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 dl.files..///.</summary>..public
20ba0 20 63 6c 61 73 73 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 0d 0a 7b 0d 0a 20 20 20 20 70 72 .class.MetadataLoader..{......pr
20bc0 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 ivate.readonly.DynamicTextTransf
20be0 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 0d ormation._textTransformation;...
20c00 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 69 74 .....///.<summary>......///.Init
20c20 69 61 6c 69 7a 65 73 20 61 6e 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 20 49 6e 73 74 61 6e ializes.an.MetadataLoader.Instan
20c40 63 65 20 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 ce..with.the......///.TextTransf
20c60 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 ormation.(T4.generated.class).th
20c80 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f at.is.currently.running......///
20ca0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 4d 65 74 61 64 61 74 61 .</summary>......public.Metadata
20cc0 4c 6f 61 64 65 72 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e Loader(object.textTransformation
20ce0 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 66 )......{..........if.(textTransf
20d00 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ormation.==.null)..........{....
20d20 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
20d40 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 3b Exception("textTransformation");
20d60 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e ..........}............_textTran
20d80 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 sformation.=.DynamicTextTransfor
20da0 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e mation.Create(textTransformation
20dc0 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a );......}........///.<summary>..
20de0 20 20 20 20 2f 2f 2f 20 4c 6f 61 64 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 66 6f 72 20 45 64 ....///.Load.the.metadata.for.Ed
20e00 6d 2c 20 53 74 6f 72 65 2c 20 61 6e 64 20 4d 61 70 70 69 6e 67 20 63 6f 6c 6c 65 63 74 69 6f 6e m,.Store,.and.Mapping.collection
20e20 73 20 61 6e 64 20 72 65 67 69 73 74 65 72 20 74 68 65 6d 0d 0a 20 20 20 20 2f 2f 2f 20 77 69 74 s.and.register.them......///.wit
20e40 68 20 61 20 6e 65 77 20 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2c 20 72 65 74 75 72 h.a.new.MetadataWorkspace,.retur
20e60 6e 73 20 66 61 6c 73 65 20 69 66 20 61 6e 79 20 6f 66 20 74 68 65 20 70 61 72 74 73 20 63 61 6e ns.false.if.any.of.the.parts.can
20e80 27 74 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 72 65 61 74 65 64 2c 20 73 6f 6d 65 20 6f 66 20 't.be......///.created,.some.of.
20ea0 74 68 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 73 20 6d 61 79 20 62 65 20 72 65 67 69 73 the.ItemCollections.may.be.regis
20ec0 74 65 72 65 64 20 61 6e 64 20 75 73 61 62 6c 65 20 65 76 65 6e 20 69 66 20 66 61 6c 73 65 20 69 tered.and.usable.even.if.false.i
20ee0 73 0d 0a 20 20 20 20 2f 2f 2f 20 72 65 74 75 72 6e 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 s......///.returned......///.</s
20f00 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 ummary>......public.bool.TryLoad
20f20 41 6c 6c 4d 65 74 61 64 61 74 61 28 73 74 72 69 6e 67 20 69 6e 70 75 74 46 69 6c 65 2c 20 6f 75 AllMetadata(string.inputFile,.ou
20f40 74 20 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 20 6d 65 74 61 64 61 74 61 57 6f 72 6b t.MetadataWorkspace.metadataWork
20f60 73 70 61 63 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 space)......{..........metadataW
20f80 6f 72 6b 73 70 61 63 65 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 orkspace.=.new.MetadataWorkspace
20fa0 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ();............EdmItemCollection
20fc0 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 72 65 61 74 65 45 64 6d 49 74 .edmItemCollection.=.CreateEdmIt
20fe0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 29 3b 0d 0a 20 20 20 20 20 20 emCollection(inputFile);........
21000 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d ..metadataWorkspace.RegisterItem
21020 43 6f 6c 6c 65 63 74 69 6f 6e 28 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d 0a Collection(edmItemCollection);..
21040 0d 0a 20 20 20 20 20 20 20 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 ..........StoreItemCollection.st
21060 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 oreItemCollection.=.null;.......
21080 20 20 20 69 66 20 28 54 72 79 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 ...if.(TryCreateStoreItemCollect
210a0 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 2c 20 6f 75 74 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c ion(inputFile,.out.storeItemColl
210c0 65 63 74 69 6f 6e 29 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 ection))..........{.............
210e0 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 .StorageMappingItemCollection.st
21100 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c orageMappingItemCollection.=.nul
21120 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 72 79 43 72 65 61 74 65 53 74 6f l;..............if.(TryCreateSto
21140 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 rageMappingItemCollection(inputF
21160 69 6c 65 2c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 ile,.edmItemCollection,.storeIte
21180 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 75 74 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 mCollection,.out.storageMappingI
211a0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a temCollection))..............{..
211c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 ................metadataWorkspac
211e0 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 6f 72 65 49 74 e.RegisterItemCollection(storeIt
21200 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 emCollection);..................
21220 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f metadataWorkspace.RegisterItemCo
21240 6c 6c 65 63 74 69 6f 6e 28 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 llection(storageMappingItemColle
21260 63 74 69 6f 6e 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 ction);..................return.
21280 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d true;..............}..........}.
212a0 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d ...........return.false;......}.
212c0 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 .......///.<summary>......///.Cr
212e0 65 61 74 65 20 61 6e 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 64 65 64 eate.an.EdmItemCollection.loaded
21300 20 77 69 74 68 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 .with.the.metadata.provided.....
21320 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 49 .///.</summary>......public.EdmI
21340 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 temCollection.CreateEdmItemColle
21360 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 70 61 72 61 6d 73 20 ction(string.sourcePath,.params.
21380 73 74 72 69 6e 67 5b 5d 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 29 0d 0a 20 20 20 20 string[].referenceSchemas)......
213a0 7b 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d {..........EdmItemCollection.edm
213c0 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 54 72 79 43 ItemCollection;..........if(TryC
213e0 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 reateEdmItemCollection(sourcePat
21400 68 2c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2c 20 6f 75 74 20 65 64 6d 49 74 65 6d h,.referenceSchemas,.out.edmItem
21420 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 Collection))..........{.........
21440 20 20 20 20 20 72 65 74 75 72 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a .....return.edmItemCollection;..
21460 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 ........}............return.new.
21480 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 EdmItemCollection();......}.....
214a0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 ...///.<summary>......///.Attemp
214c0 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ts.to.create.a.EdmItemCollection
214e0 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c .from.the.specified.metadata.fil
21500 65 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 20 70 75 62 6c 69 e......///.</summary>......publi
21520 63 20 62 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f c.bool.TryCreateEdmItemCollectio
21540 6e 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 45 64 6d 49 74 65 6d n(string.sourcePath,.out.EdmItem
21560 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 Collection.edmItemCollection)...
21580 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 79 43 72 65 61 74 65 45 64 ...{..........return.TryCreateEd
215a0 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 6e 75 6c 6c mItemCollection(sourcePath,.null
215c0 2c 20 6f 75 74 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 7d ,.out.edmItemCollection);......}
215e0 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 ........///.<summary>......///.A
21600 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 ttempts.to.create.a.EdmItemColle
21620 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 ction.from.the.specified.metadat
21640 61 20 66 69 6c 65 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 20 a.file......///.</summary>......
21660 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c public.bool.TryCreateEdmItemColl
21680 65 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 73 74 72 69 6e 67 ection(string.sourcePath,.string
216a0 5b 5d 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2c 20 6f 75 74 20 45 64 6d 49 74 65 6d [].referenceSchemas,.out.EdmItem
216c0 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 Collection.edmItemCollection)...
216e0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 ...{..........edmItemCollection.
21700 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c 69 64 61 74 65 =.null;............if.(!Validate
21720 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 InputPath(sourcePath,._textTrans
21740 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 formation))..........{..........
21760 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a ....return.false;..........}....
21780 20 20 20 20 20 20 20 20 69 66 20 28 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 3d 3d 20 ........if.(referenceSchemas.==.
217a0 6e 75 6c 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 72 65 null)..........{..............re
217c0 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 30 5d 3b 0d ferenceSchemas.=.new.string[0];.
217e0 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 .........}............ItemCollec
21800 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 tion.itemCollection.=.null;.....
21820 20 20 20 20 20 73 6f 75 72 63 65 50 61 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d .....sourcePath.=._textTransform
21840 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 ation.Host.ResolvePath(sourcePat
21860 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 h);..........EdmItemCollectionBu
21880 69 6c 64 65 72 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 45 64 ilder.collectionBuilder.=.new.Ed
218a0 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e mItemCollectionBuilder(_textTran
218c0 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 53 65 6c sformation,.referenceSchemas.Sel
218e0 65 63 74 28 73 20 3d 3e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 ect(s.=>._textTransformation.Hos
21900 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 29 29 2e 57 68 65 72 65 28 73 20 3d 3e 20 73 20 21 t.ResolvePath(s)).Where(s.=>.s.!
21920 3d 20 73 6f 75 72 63 65 50 61 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6c =.sourcePath));..........if.(col
21940 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c lectionBuilder.TryCreateItemColl
21960 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 69 74 65 6d 43 6f 6c 6c 65 ection(sourcePath,.out.itemColle
21980 63 74 69 6f 6e 29 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 ction))..........{..............
219a0 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 28 45 64 6d 49 74 65 6d 43 6f 6c 6c edmItemCollection.=.(EdmItemColl
219c0 65 63 74 69 6f 6e 29 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 ection)itemCollection;..........
219e0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 }............return.edmItemColle
21a00 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f ction.!=.null;......}........///
21a20 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 74 6f 20 .<summary>......///.Attempts.to.
21a40 63 72 65 61 74 65 20 61 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f create.a.StoreItemCollection.fro
21a60 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 m.the.specified.metadata.file...
21a80 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f ...///.</summary>......public.bo
21aa0 6f 6c 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 ol.TryCreateStoreItemCollection(
21ac0 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 53 74 6f 72 65 49 74 65 6d string.sourcePath,.out.StoreItem
21ae0 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d Collection.storeItemCollection).
21b00 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 .....{..........storeItemCollect
21b20 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c 69 ion.=.null;............if.(!Vali
21b40 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 dateInputPath(sourcePath,._textT
21b60 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ransformation))..........{......
21b80 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d ........return.false;..........}
21ba0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 ............ItemCollection.itemC
21bc0 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 53 74 6f 72 65 ollection.=.null;..........Store
21be0 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6f 6c 6c 65 63 74 69 6f 6e ItemCollectionBuilder.collection
21c00 42 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f Builder.=.new.StoreItemCollectio
21c20 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a nBuilder(_textTransformation);..
21c40 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 ........if.(collectionBuilder.Tr
21c60 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 65 78 74 54 72 61 6e 73 yCreateItemCollection(_textTrans
21c80 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 formation.Host.ResolvePath(sourc
21ca0 65 50 61 74 68 29 2c 20 6f 75 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 0d 0a 20 20 ePath),.out.itemCollection))....
21cc0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f ......{..............storeItemCo
21ce0 6c 6c 65 63 74 69 6f 6e 20 3d 20 28 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 llection.=.(StoreItemCollection)
21d00 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 itemCollection;..........}......
21d20 20 20 20 20 72 65 74 75 72 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 ....return.storeItemCollection.!
21d40 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 =.null;......}........///.<summa
21d60 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 ry>......///.Attempts.to.create.
21d80 61 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 a.StorageMappingItemCollection.f
21da0 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 2c rom.the.specified.metadata.file,
21dc0 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 61 6e 64 20 53 74 6f 72 65 49 74 65 .EdmItemCollection,.and.StoreIte
21de0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d mCollection......///.</summary>.
21e00 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 67 .....public.bool.TryCreateStorag
21e20 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 6f eMappingItemCollection(string.so
21e40 75 72 63 65 50 61 74 68 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d 49 urcePath,.EdmItemCollection.edmI
21e60 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 temCollection,.StoreItemCollecti
21e80 6f 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 75 74 20 53 74 6f 72 on.storeItemCollection,.out.Stor
21ea0 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 61 67 65 ageMappingItemCollection.storage
21ec0 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 MappingItemCollection)......{...
21ee0 20 20 20 20 20 20 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 .......storageMappingItemCollect
21f00 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c 69 ion.=.null;............if.(!Vali
21f20 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 dateInputPath(sourcePath,._textT
21f40 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ransformation))..........{......
21f60 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d ........return.false;..........}
21f80 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ............if.(edmItemCollectio
21fa0 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 n.==.null)..........{...........
21fc0 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 69 ...throw.new.ArgumentNullExcepti
21fe0 6f 6e 28 22 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 on("edmItemCollection");........
22000 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c ..}............if.(storeItemColl
22020 65 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ection.==.null)..........{......
22040 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
22060 63 65 70 74 69 6f 6e 28 22 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 3b 0d ception("storeItemCollection");.
22080 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 .........}............ItemCollec
220a0 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 tion.itemCollection.=.null;.....
220c0 20 20 20 20 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f .....StorageMappingItemCollectio
220e0 6e 42 75 69 6c 64 65 72 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3d 20 6e 65 77 nBuilder.collectionBuilder.=.new
22100 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 .StorageMappingItemCollectionBui
22120 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 65 64 6d 49 74 65 lder(_textTransformation,.edmIte
22140 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e mCollection,.storeItemCollection
22160 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 );..........if.(collectionBuilde
22180 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 65 78 74 54 r.TryCreateItemCollection(_textT
221a0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 ransformation.Host.ResolvePath(s
221c0 6f 75 72 63 65 50 61 74 68 29 2c 20 6f 75 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 ourcePath),.out.itemCollection))
221e0 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 73 74 6f 72 61 67 65 ..........{..............storage
22200 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 28 53 74 6f 72 61 67 65 MappingItemCollection.=.(Storage
22220 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 69 74 65 6d 43 6f 6c 6c 65 63 MappingItemCollection)itemCollec
22240 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e tion;..........}..........return
22260 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 3d .storageMappingItemCollection.!=
22280 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 .null;......}........///.<summar
222a0 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 4d 6f 64 65 6c 20 4e 61 6d 65 73 y>......///.Gets.the.Model.Names
222c0 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 73 63 68 65 6d 61 20 66 69 pace.from.the.provided.schema.fi
222e0 6c 65 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 20 70 75 62 le.......///.</summary>......pub
22300 6c 69 63 20 73 74 72 69 6e 67 20 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 73 74 72 lic.string.GetModelNamespace(str
22320 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ing.sourcePath)......{..........
22340 69 66 20 28 21 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 if.(!ValidateInputPath(sourcePat
22360 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 h,._textTransformation))........
22380 20 20 7b 0d 0a 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 2e 45 ..{..............return.String.E
223a0 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 49 mpty;..........}............EdmI
223c0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 62 75 69 6c 64 65 72 20 3d 20 6e temCollectionBuilder.builder.=.n
223e0 65 77 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 ew.EdmItemCollectionBuilder(_tex
22400 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 58 45 6c 65 6d tTransformation);..........XElem
22420 65 6e 74 20 6d 6f 64 65 6c 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 62 75 69 6c 64 65 72 2e 54 ent.model;..........if(builder.T
22440 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d ryLoadRootElement(_textTransform
22460 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 ation.Host.ResolvePath(sourcePat
22480 68 29 2c 20 6f 75 74 20 6d 6f 64 65 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 h),.out.model))..........{......
224a0 20 20 20 20 20 20 20 20 58 41 74 74 72 69 62 75 74 65 20 61 74 74 72 69 62 75 74 65 20 3d 20 6d ........XAttribute.attribute.=.m
224c0 6f 64 65 6c 2e 41 74 74 72 69 62 75 74 65 28 22 4e 61 6d 65 73 70 61 63 65 22 29 3b 0d 0a 20 20 odel.Attribute("Namespace");....
224e0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 ..........if.(attribute.!=.null)
22500 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 ..............{.................
22520 20 72 65 74 75 72 6e 20 61 74 74 72 69 62 75 74 65 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 .return.attribute.Value;........
22540 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 ......}..........}............re
22560 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 turn.String.Empty;......}.......
22580 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 .///.<summary>......///.Returns.
225a0 74 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 66 69 6c 65 20 70 61 74 68 20 true.if.the.specified.file.path.
225c0 69 73 20 76 61 6c 69 64 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 is.valid......///.</summary>....
225e0 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 56 61 6c 69 64 61 74 65 49 6e ..private.static.bool.ValidateIn
22600 70 75 74 50 61 74 68 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 44 79 6e 61 6d putPath(string.sourcePath,.Dynam
22620 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f icTextTransformation.textTransfo
22640 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 rmation)......{..........if.(Str
22660 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 6f 75 72 63 65 50 61 74 68 29 29 0d 0a ing.IsNullOrEmpty(sourcePath))..
22680 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 ........{..............throw.new
226a0 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 73 6f 75 72 63 65 50 61 74 68 22 29 .ArgumentException("sourcePath")
226c0 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 28 73 6f 75 72 63 ;..........}............if(sourc
226e0 65 50 61 74 68 20 3d 3d 20 22 24 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 24 22 29 0d 0a 20 20 20 ePath.==."$edmxInputFile$").....
22700 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 54 72 61 6e 73 66 6f 72 .....{..............textTransfor
22720 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 mation.Errors.Add(new.CompilerEr
22740 72 6f 72 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 ror(textTransformation.Host.Temp
22760 6c 61 74 65 46 69 6c 65 20 3f 3f 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e lateFile.??.CodeGenerationTools.
22780 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 75 72 72 GetResourceString("Template_Curr
227a0 65 6e 74 6c 79 52 75 6e 6e 69 6e 67 54 65 6d 70 6c 61 74 65 22 29 2c 20 2d 31 2c 20 2d 31 2c 20 entlyRunningTemplate"),.-1,.-1,.
227c0 73 74 72 69 6e 67 2e 45 6d 70 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 string.Empty,..................C
227e0 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 odeGenerationTools.GetResourceSt
22800 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 70 6c 61 63 65 56 73 49 74 65 6d 54 65 6d 70 ring("Template_ReplaceVsItemTemp
22820 6c 61 74 65 54 6f 6b 65 6e 22 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 lateToken")));..............retu
22840 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 rn.false;..........}............
22860 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c return.true;......}........///.<
22880 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 42 61 73 65 20 63 6c 61 73 73 20 66 6f 72 summary>......///.Base.class.for
228a0 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6c 61 73 73 65 73 20 74 .ItemCollectionBuilder.classes.t
228c0 68 61 74 0d 0a 20 20 20 20 2f 2f 2f 20 6c 6f 61 64 73 20 74 68 65 20 73 70 65 63 69 66 69 63 20 hat......///.loads.the.specific.
228e0 74 79 70 65 73 20 6f 66 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d types.of.metadata......///.</sum
22900 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 61 62 73 74 72 61 63 74 20 63 6c 61 73 mary>......private.abstract.clas
22920 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 7b 0d 0a s.ItemCollectionBuilder......{..
22940 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 ........private.readonly.Dynamic
22960 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 TextTransformation._textTransfor
22980 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c mation;..........private.readonl
229a0 79 20 73 74 72 69 6e 67 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 y.string._fileExtension;........
229c0 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 73 74 72 69 6e 67 20 5f 65 64 6d 78 53 ..private.readonly.string._edmxS
229e0 65 63 74 69 6f 6e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 ectionName;..........private.rea
22a00 64 6f 6e 6c 79 20 73 74 72 69 6e 67 20 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 3b 0d donly.string.._rootElementName;.
22a20 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 20 ...........///.<summary>........
22a40 20 20 2f 2f 2f 20 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 69 6e 64 69 76 69 64 75 ..///.FileExtension.for.individu
22a60 61 6c 20 28 6e 6f 6e 2d 65 64 6d 78 29 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 66 6f 72 20 al.(non-edmx).metadata.file.for.
22a80 74 68 69 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 70 65 63 69 66 69 63 20 49 74 65 6d 43 this..........///.specific.ItemC
22aa0 6f 6c 6c 65 63 74 69 6f 6e 20 74 79 70 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 ollection.type..........///.</su
22ac0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 46 69 mmary>..........public.string.Fi
22ae0 6c 65 45 78 74 65 6e 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 leExtension..........{..........
22b00 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 3b ....get.{.return._fileExtension;
22b20 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 3c 73 75 .}..........}............///.<su
22b40 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 mmary>..........///.The.name.of.
22b60 74 68 65 20 58 6d 6c 45 6c 65 6d 65 6e 74 20 69 6e 20 74 68 65 20 2e 65 64 6d 78 20 3c 52 75 6e the.XmlElement.in.the..edmx.<Run
22b80 74 69 6d 65 3e 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 66 69 time>.element..........///.to.fi
22ba0 6e 64 20 74 68 69 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 nd.this.ItemCollection's.metadat
22bc0 61 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 a..........///.</summary>.......
22be0 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 ...public.string.EdmxSectionName
22c00 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 67 65 74 20 7b 20 72 ..........{..............get.{.r
22c20 65 74 75 72 6e 20 5f 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 3b 20 7d 0d 0a 20 20 20 20 20 eturn._edmxSectionName;.}.......
22c40 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>...
22c60 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 72 6f 6f 74 20 .......///.The.name.of.the.root.
22c80 65 6c 65 6d 65 6e 74 20 6f 66 20 74 68 69 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 27 73 element.of.this.ItemCollection's
22ca0 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 .metadata..........///.</summary
22cc0 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 6f 6f 74 45 6c 65 >..........public.string.RootEle
22ce0 6d 65 6e 74 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 mentName..........{.............
22d00 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 3b 20 .get.{.return._rootElementName;.
22d20 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 3c 73 75 6d }..........}............///.<sum
22d40 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 74 6f 20 62 75 69 mary>..........///.Method.to.bui
22d60 6c 64 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ld.the.appropriate.ItemCollectio
22d80 6e 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 n..........///.</summary>.......
22da0 20 20 20 70 72 6f 74 65 63 74 65 64 20 61 62 73 74 72 61 63 74 20 49 74 65 6d 43 6f 6c 6c 65 63 ...protected.abstract.ItemCollec
22dc0 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 49 45 6e 75 6d 65 tion.CreateItemCollection(IEnume
22de0 72 61 62 6c 65 3c 58 6d 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 49 4c rable<XmlReader>.readers,.out.IL
22e00 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 73 29 3b 0d 0a 0d 0a ist<EdmSchemaError>.errors);....
22e20 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>........../
22e40 2f 2f 20 43 74 6f 72 20 74 6f 20 73 65 74 75 70 20 74 68 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 //.Ctor.to.setup.the.ItemCollect
22e60 69 6f 6e 42 75 69 6c 64 65 72 20 6d 65 6d 62 65 72 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ionBuilder.members..........///.
22e80 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 49 74 </summary>..........protected.It
22ea0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 emCollectionBuilder(DynamicTextT
22ec0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e ransformation.textTransformation
22ee0 2c 20 73 74 72 69 6e 67 20 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 65 ,.string.fileExtension,.string.e
22f00 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 72 6f 6f 74 45 6c 65 6d 65 dmxSectionName,.string.rootEleme
22f20 6e 74 4e 61 6d 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 ntName)..........{..............
22f40 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 74 65 78 74 54 72 61 6e 73 66 _textTransformation.=.textTransf
22f60 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 66 69 6c 65 45 78 74 65 ormation;.............._fileExte
22f80 6e 73 69 6f 6e 20 3d 20 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 nsion.=.fileExtension;..........
22fa0 20 20 20 20 5f 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 20 3d 20 65 64 6d 78 53 65 63 74 69 ...._edmxSectionName.=.edmxSecti
22fc0 6f 6e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e onName;.............._rootElemen
22fe0 74 4e 61 6d 65 20 3d 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 tName.=.rootElementName;........
23000 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 20 ..}............///.<summary>....
23020 20 20 20 20 20 20 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 ......///.Selects.a.namespace.fr
23040 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 om.the.supplied.constants.......
23060 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 70 72 6f 74 ....///.</summary>..........prot
23080 65 63 74 65 64 20 61 62 73 74 72 61 63 74 20 73 74 72 69 6e 67 20 47 65 74 4e 61 6d 65 73 70 61 ected.abstract.string.GetNamespa
230a0 63 65 28 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 61 6e 74 73 29 3b 0d 0a ce(SchemaConstants.constants);..
230c0 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>.........
230e0 20 2f 2f 2f 20 54 72 79 20 74 6f 20 63 72 65 61 74 65 20 61 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 .///.Try.to.create.an.ItemCollec
23100 74 69 6f 6e 20 6c 6f 61 64 65 64 20 77 69 74 68 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 70 72 tion.loaded.with.the.metadata.pr
23120 6f 76 69 64 65 64 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 ovided..........///.</summary>..
23140 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 49 74 65 ........public.bool.TryCreateIte
23160 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 6f mCollection(string.sourcePath,.o
23180 75 74 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ut.ItemCollection.itemCollection
231a0 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 74 65 6d 43 6f )..........{..............itemCo
231c0 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 llection.=.null;................
231e0 69 66 20 28 21 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 if.(!ValidateInputPath(sourcePat
23200 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 h,._textTransformation))........
23220 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 ......{..................return.
23240 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 false;..............}...........
23260 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 .....XElement.schemaElement.=.nu
23280 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 72 79 4c 6f 61 64 52 6f 6f 74 ll;..............if.(TryLoadRoot
232a0 45 6c 65 6d 65 6e 74 28 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 73 63 68 65 6d 61 45 6c Element(sourcePath,.out.schemaEl
232c0 65 6d 65 6e 74 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 ement))..............{..........
232e0 20 20 20 20 20 20 20 20 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 20 ........List<XmlReader>.readers.
23300 3d 20 6e 65 77 20 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 =.new.List<XmlReader>();........
23320 20 20 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b ..........try..................{
23340 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61 64 65 72 73 2e 41 64 ......................readers.Ad
23360 64 28 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 2e 43 72 65 61 74 65 52 65 61 64 65 72 28 29 29 3b d(schemaElement.CreateReader());
23380 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 4c 69 73 74 3c 45 64 6d 53 ......................IList<EdmS
233a0 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 chemaError>.errors.=.null;......
233c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ..................ItemCollection
233e0 20 74 65 6d 70 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 72 65 61 74 65 49 74 65 6d .tempItemCollection.=.CreateItem
23400 43 6f 6c 6c 65 63 74 69 6f 6e 28 72 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b Collection(readers,.out.errors);
23420 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 72 6f 63 65 73 ......................if.(Proces
23440 73 45 72 72 6f 72 73 28 65 72 72 6f 72 73 2c 20 73 6f 75 72 63 65 50 61 74 68 29 29 0d 0a 20 20 sErrors(errors,.sourcePath))....
23460 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
23480 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 .............return.false;......
234a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ................}...............
234c0 20 20 20 20 20 20 20 20 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 74 65 6d 70 49 74 .........itemCollection.=.tempIt
234e0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 emCollection;...................
23500 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 20 20 20 20 20 20 ...return.true;.................
23520 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 0d 0a 20 20 20 .}..................finally.....
23540 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 .............{..................
23560 20 20 20 20 66 6f 72 65 61 63 68 20 28 58 6d 6c 52 65 61 64 65 72 20 72 65 61 64 65 72 20 69 6e ....foreach.(XmlReader.reader.in
23580 20 72 65 61 64 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b .readers)......................{
235a0 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 28 28 49 44 69 73 ..........................((IDis
235c0 70 6f 73 61 62 6c 65 29 72 65 61 64 65 72 29 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 posable)reader).Dispose();......
235e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
23600 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 20 ...}..............}.............
23620 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ...return.false;..........}.....
23640 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 2f .......///.<summary>..........//
23660 2f 20 54 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 /.Tries.to.load.the.root.element
23680 20 66 72 6f 6d 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 70 72 6f 76 69 64 65 64 .from.the.metadata.file.provided
236a0 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>........
236c0 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 ..public.bool.TryLoadRootElement
236e0 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 58 45 6c 65 6d 65 6e 74 (string.sourcePath,.out.XElement
23700 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .schemaElement)..........{......
23720 20 20 20 20 20 20 20 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 ........schemaElement.=.null;...
23740 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 20 3d 20 50 61 ...........string.extension.=.Pa
23760 74 68 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 29 3b 0d 0a 20 20 th.GetExtension(sourcePath);....
23780 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 78 74 65 6e 73 69 6f 6e 2e 45 71 75 61 6c 73 28 22 ..........if.(extension.Equals("
237a0 2e 65 64 6d 78 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 .edmx",.StringComparison.Invaria
237c0 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 ntCultureIgnoreCase))...........
237e0 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 54 72 79 ...{..................return.Try
23800 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 73 6f 75 72 63 65 50 61 LoadRootElementFromEdmx(sourcePa
23820 74 68 2c 20 6f 75 74 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 th,.out.schemaElement);.........
23840 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 28 65 78 74 65 .....}..............else.if(exte
23860 6e 73 69 6f 6e 2e 45 71 75 61 6c 73 28 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 2c 20 53 74 72 69 nsion.Equals(FileExtension,.Stri
23880 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 49 67 6e ngComparison.InvariantCultureIgn
238a0 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 oreCase))..............{........
238c0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6c 6f 61 64 20 66 72 6f 6d 20 73 69 6e 67 6c 65 20 6d 65 ..........//.load.from.single.me
238e0 74 61 64 61 74 61 20 66 69 6c 65 20 28 2e 63 73 64 6c 2c 20 2e 73 73 64 6c 2c 20 6f 72 20 2e 6d tadata.file.(.csdl,..ssdl,.or..m
23900 73 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 63 68 65 6d 61 45 6c 65 6d 65 sl)..................schemaEleme
23920 6e 74 20 3d 20 58 45 6c 65 6d 65 6e 74 2e 4c 6f 61 64 28 73 6f 75 72 63 65 50 61 74 68 2c 20 4c nt.=.XElement.Load(sourcePath,.L
23940 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 42 61 73 65 55 72 69 20 7c 20 4c 6f 61 64 4f 70 74 69 oadOptions.SetBaseUri.|.LoadOpti
23960 6f 6e 73 2e 53 65 74 4c 69 6e 65 49 6e 66 6f 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ons.SetLineInfo);...............
23980 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 20 20 20 7d 0d 0a ...return.true;..............}..
239a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 ..............return.false;.....
239c0 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>.
239e0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 .........///.Tries.to.load.the.r
23a00 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 65 64 oot.element.from.the.provided.ed
23a20 6d 78 44 6f 63 75 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 mxDocument..........///.</summar
23a40 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 y>..........private.bool.TryLoad
23a60 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 58 45 6c 65 6d 65 6e 74 20 65 64 6d RootElementFromEdmx(XElement.edm
23a80 78 44 6f 63 75 6d 65 6e 74 2c 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 73 63 68 65 6d xDocument,.SchemaConstants.schem
23aa0 61 43 6f 6e 73 74 61 6e 74 73 2c 20 73 74 72 69 6e 67 20 73 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 aConstants,.string.sectionName,.
23ac0 73 74 72 69 6e 67 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 58 45 6c 65 string.rootElementName,.out.XEle
23ae0 6d 65 6e 74 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ment.rootElement)..........{....
23b00 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d ..........rootElement.=.null;...
23b20 0a 20 20 20 20 20 20 20 20 20 20 20 20 58 4e 61 6d 65 73 70 61 63 65 20 65 64 6d 78 4e 73 20 3d .............XNamespace.edmxNs.=
23b40 20 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2e 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 3b 0d .schemaConstants.EdmxNamespace;.
23b60 0a 20 20 20 20 20 20 20 20 20 20 20 20 58 4e 61 6d 65 73 70 61 63 65 20 73 65 63 74 69 6f 6e 4e .............XNamespace.sectionN
23b80 73 20 3d 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 s.=.GetNamespace(schemaConstants
23ba0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 72 75 6e 74 69 );................XElement.runti
23bc0 6d 65 20 3d 20 65 64 6d 78 44 6f 63 75 6d 65 6e 74 2e 45 6c 65 6d 65 6e 74 28 65 64 6d 78 4e 73 me.=.edmxDocument.Element(edmxNs
23be0 20 20 2b 20 22 52 75 6e 74 69 6d 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ..+."Runtime");..............if.
23c00 28 72 75 6e 74 69 6d 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b (runtime.==.null)..............{
23c20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d ..................return.false;.
23c40 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 58 45 .............}................XE
23c60 6c 65 6d 65 6e 74 20 73 65 63 74 69 6f 6e 20 3d 20 72 75 6e 74 69 6d 65 2e 45 6c 65 6d 65 6e 74 lement.section.=.runtime.Element
23c80 28 65 64 6d 78 4e 73 20 2b 20 73 65 63 74 69 6f 6e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 (edmxNs.+.sectionName);.........
23ca0 20 20 20 20 20 69 66 20 28 73 65 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .....if.(section.==.null).......
23cc0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e .......{..................return
23ce0 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 .false;..............}..........
23d00 20 20 20 20 20 20 73 74 72 69 6e 67 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 3b 0d 0a 0d ......string.templateVersion;...
23d20 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 .............if.(!TemplateMetada
23d40 74 61 2e 54 72 79 47 65 74 56 61 6c 75 65 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 ta.TryGetValue(MetadataConstants
23d60 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 2c 20 6f 75 74 20 74 65 6d 70 6c 61 .TT_TEMPLATE_VERSION,.out.templa
23d80 74 65 56 65 72 73 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 teVersion))..............{......
23da0 20 20 20 20 20 20 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 4d 65 ............templateVersion.=.Me
23dc0 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 44 45 46 41 55 4c 54 5f 54 45 4d 50 4c 41 54 45 tadataConstants.DEFAULT_TEMPLATE
23de0 5f 56 45 52 53 49 4f 4e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 _VERSION;..............}........
23e00 20 20 20 20 20 20 20 20 69 66 20 28 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 69 6e 69 ........if.(schemaConstants.Mini
23e20 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3e 20 6e 65 77 20 56 65 72 73 69 6f 6e mumTemplateVersion.>.new.Version
23e40 28 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 (templateVersion))..............
23e60 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 {.................._textTransfor
23e80 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 mation.Errors.Add(new.CompilerEr
23ea0 72 6f 72 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 ror(......................_textT
23ec0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 20 ransformation.Host.TemplateFile.
23ee0 3f 3f 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 ??.CodeGenerationTools.GetResour
23f00 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e 6e ceString("Template_CurrentlyRunn
23f20 69 6e 67 54 65 6d 70 6c 61 74 65 22 29 2c 20 2d 31 2c 20 2d 31 2c 20 73 74 72 69 6e 67 2e 45 6d ingTemplate"),.-1,.-1,.string.Em
23f40 70 74 79 2c 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 43 6f pty,..........................Co
23f60 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 deGenerationTools.GetResourceStr
23f80 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 55 6e 73 75 70 70 6f 72 74 65 64 53 63 68 65 6d 61 22 ing("Template_UnsupportedSchema"
23fa0 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 49 73 57 61 72 6e 69 6e 67 20 3d ))..................{IsWarning.=
23fc0 20 74 72 75 65 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 .true});..............}.........
23fe0 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 73 65 63 74 69 6f 6e 2e 45 6c 65 .......rootElement.=.section.Ele
24000 6d 65 6e 74 28 73 65 63 74 69 6f 6e 4e 73 20 2b 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 ment(sectionNs.+.rootElementName
24020 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f 74 45 6c 65 6d 65 );..............return.rootEleme
24040 6e 74 20 21 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 nt.!=.null;..........}..........
24060 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 54 72 69 ..///.<summary>..........///.Tri
24080 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d es.to.load.the.root.element.from
240a0 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 2e 65 64 6d 78 20 6d 65 74 61 64 61 74 61 20 66 69 6c .the.provided..edmx.metadata.fil
240c0 65 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 e..........///.</summary>.......
240e0 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 ...private.bool.TryLoadRootEleme
24100 6e 74 46 72 6f 6d 45 64 6d 78 28 73 74 72 69 6e 67 20 65 64 6d 78 50 61 74 68 2c 20 6f 75 74 20 ntFromEdmx(string.edmxPath,.out.
24120 58 45 6c 65 6d 65 6e 74 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b XElement.rootElement)..........{
24140 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c ..............rootElement.=.null
24160 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 65 6c 65 6d 65 6e ;................XElement.elemen
24180 74 20 3d 20 58 45 6c 65 6d 65 6e 74 2e 4c 6f 61 64 28 65 64 6d 78 50 61 74 68 2c 20 4c 6f 61 64 t.=.XElement.Load(edmxPath,.Load
241a0 4f 70 74 69 6f 6e 73 2e 53 65 74 42 61 73 65 55 72 69 20 7c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 Options.SetBaseUri.|.LoadOptions
241c0 2e 53 65 74 4c 69 6e 65 49 6e 66 6f 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 .SetLineInfo);................re
241e0 74 75 72 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 turn.TryLoadRootElementFromEdmx(
24200 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 33 5f 53 43 element,.MetadataConstants.V3_SC
24220 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c HEMA_CONSTANTS,.EdmxSectionName,
24240 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 72 6f 6f 74 45 6c 65 6d 65 6e .RootElementName,.out.rootElemen
24260 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 54 72 79 4c 6f 61 64 52 6f t)..................||.TryLoadRo
24280 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 otElementFromEdmx(element,.Metad
242a0 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 ataConstants.V2_SCHEMA_CONSTANTS
242c0 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 ,.EdmxSectionName,.RootElementNa
242e0 6d 65 2c 20 6f 75 74 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 me,.out.rootElement)............
24300 20 20 20 20 20 20 7c 7c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 ......||.TryLoadRootElementFromE
24320 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 dmx(element,.MetadataConstants.V
24340 31 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 1_SCHEMA_CONSTANTS,.EdmxSectionN
24360 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 72 6f 6f 74 45 6c ame,.RootElementName,.out.rootEl
24380 65 6d 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f ement);..........}............//
243a0 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 54 61 6b 65 73 20 61 /.<summary>..........///.Takes.a
243c0 6e 20 45 6e 75 6d 65 72 61 62 6c 65 20 6f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 73 2c n.Enumerable.of.EdmSchemaErrors,
243e0 20 61 6e 64 20 61 64 64 73 20 74 68 65 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 74 .and.adds.them..........///.to.t
24400 68 65 20 65 72 72 6f 72 73 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 65 6d 70 he.errors.collection.of.the.temp
24420 6c 61 74 65 20 63 6c 61 73 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 late.class..........///.</summar
24440 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 50 72 6f 63 65 73 73 y>..........private.bool.Process
24460 45 72 72 6f 72 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f Errors(IEnumerable<EdmSchemaErro
24480 72 3e 20 65 72 72 6f 72 73 2c 20 73 74 72 69 6e 67 20 73 6f 75 72 63 65 46 69 6c 65 50 61 74 68 r>.errors,.string.sourceFilePath
244a0 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 62 6f 6f 6c 20 66 )..........{..............bool.f
244c0 6f 75 6e 64 45 72 72 6f 72 73 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 oundErrors.=.false;.............
244e0 20 66 6f 72 65 61 63 68 20 28 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 20 65 72 72 6f 72 20 69 .foreach.(EdmSchemaError.error.i
24500 6e 20 65 72 72 6f 72 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 n.errors)..............{........
24520 20 20 20 20 20 20 20 20 20 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 6e 65 77 45 72 72 6f 72 ..........CompilerError.newError
24540 20 3d 20 6e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 65 72 72 6f 72 2e 53 63 68 65 6d .=.new.CompilerError(error.Schem
24560 61 4c 6f 63 61 74 69 6f 6e 2c 20 65 72 72 6f 72 2e 4c 69 6e 65 2c 20 65 72 72 6f 72 2e 43 6f 6c aLocation,.error.Line,.error.Col
24580 75 6d 6e 2c 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 umn,............................
245a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 72 72 6f 72 2e 45 72 72 .......................error.Err
245c0 6f 72 43 6f 64 65 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 orCode.ToString(CultureInfo.Inva
245e0 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 riantCulture),..................
24600 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 ................................
24620 20 65 72 72 6f 72 2e 4d 65 73 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .error.Message);................
24640 20 20 6e 65 77 45 72 72 6f 72 2e 49 73 57 61 72 6e 69 6e 67 20 3d 20 65 72 72 6f 72 2e 53 65 76 ..newError.IsWarning.=.error.Sev
24660 65 72 69 74 79 20 3d 3d 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 53 65 76 65 72 69 74 79 2e erity.==.EdmSchemaErrorSeverity.
24680 57 61 72 6e 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 75 6e 64 45 Warning;..................foundE
246a0 72 72 6f 72 73 20 7c 3d 20 65 72 72 6f 72 2e 53 65 76 65 72 69 74 79 20 3d 3d 20 45 64 6d 53 63 rrors.|=.error.Severity.==.EdmSc
246c0 68 65 6d 61 45 72 72 6f 72 53 65 76 65 72 69 74 79 2e 45 72 72 6f 72 3b 0d 0a 20 20 20 20 20 20 hemaErrorSeverity.Error;........
246e0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 72 72 6f 72 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 ..........if.(error.SchemaLocati
24700 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 7b 0d 0a on.==.null)..................{..
24720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 45 72 72 6f 72 2e 46 69 6c ....................newError.Fil
24740 65 4e 61 6d 65 20 3d 20 73 6f 75 72 63 65 46 69 6c 65 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 eName.=.sourceFilePath;.........
24760 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 5f 74 65 78 .........}.................._tex
24780 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 45 72 tTransformation.Errors.Add(newEr
247a0 72 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ror);..............}............
247c0 20 20 20 20 72 65 74 75 72 6e 20 66 6f 75 6e 64 45 72 72 6f 72 73 3b 0d 0a 20 20 20 20 20 20 20 ....return.foundErrors;.........
247e0 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .}......}........///.<summary>..
24800 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 69 ....///.Builder.class.for.creati
24820 6e 67 20 61 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ng.a.StorageMappingItemCollectio
24840 6e 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 20 70 72 69 76 61 n......///.</summary>......priva
24860 74 65 20 63 6c 61 73 73 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 te.class.StorageMappingItemColle
24880 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3a 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 ctionBuilder.:.ItemCollectionBui
248a0 6c 64 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 lder......{..........private.rea
248c0 64 6f 6e 6c 79 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 5f 65 64 6d 49 74 65 6d donly.EdmItemCollection._edmItem
248e0 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 Collection;..........private.rea
24900 64 6f 6e 6c 79 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 5f 73 74 6f 72 65 donly.StoreItemCollection._store
24920 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 ItemCollection;............publi
24940 63 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 c.StorageMappingItemCollectionBu
24960 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 ilder(DynamicTextTransformation.
24980 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 textTransformation,.EdmItemColle
249a0 63 74 69 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 53 74 6f 72 65 49 74 ction.edmItemCollection,.StoreIt
249c0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e emCollection.storeItemCollection
249e0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 74 65 78 74 54 72 61 6e 73 66 )..............:.base(textTransf
24a00 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f ormation,.MetadataConstants.MSL_
24a20 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c EXTENSION,.MetadataConstants.MSL
24a40 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 _EDMX_SECTION_NAME,.MetadataCons
24a60 74 61 6e 74 73 2e 4d 53 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 tants.MSL_ROOT_ELEMENT_NAME)....
24a80 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d 49 74 65 6d 43 6f 6c ......{.............._edmItemCol
24aa0 6c 65 63 74 69 6f 6e 20 3d 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 lection.=.edmItemCollection;....
24ac0 20 20 20 20 20 20 20 20 20 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d .........._storeItemCollection.=
24ae0 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d .storeItemCollection;..........}
24b00 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 49 ............protected.override.I
24b20 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 temCollection.CreateItemCollecti
24b40 6f 6e 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 58 6d 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 on(IEnumerable<XmlReader>.reader
24b60 73 2c 20 6f 75 74 20 49 4c 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 s,.out.IList<EdmSchemaError>.err
24b80 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 ors)..........{..............ret
24ba0 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 urn.MetadataItemCollectionFactor
24bc0 79 2e 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 y.CreateStorageMappingItemCollec
24be0 74 69 6f 6e 28 5f 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 5f 73 74 6f 72 65 49 tion(_edmItemCollection,._storeI
24c00 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f temCollection,.readers,.out.erro
24c20 72 73 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 rs);..........}............///.<
24c40 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 summary>..........///.Selects.a.
24c60 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 namespace.from.the.supplied.cons
24c80 74 61 6e 74 73 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 tants...........///.</summary>..
24ca0 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e ........protected.override.strin
24cc0 67 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 g.GetNamespace(SchemaConstants.c
24ce0 6f 6e 73 74 61 6e 74 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 onstants)..........{............
24d00 20 20 72 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 4d 73 6c 4e 61 6d 65 73 70 61 63 65 3b ..return.constants.MslNamespace;
24d20 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 ..........}......}........///.<s
24d40 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 ummary>......///.Builder.class.f
24d60 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f or.creating.a.StoreItemCollectio
24d80 6e 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 20 70 72 69 76 61 n......///.</summary>......priva
24da0 74 65 20 63 6c 61 73 73 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c te.class.StoreItemCollectionBuil
24dc0 64 65 72 20 3a 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 der.:.ItemCollectionBuilder.....
24de0 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c .{..........public.StoreItemColl
24e00 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f ectionBuilder(DynamicTextTransfo
24e20 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 rmation.textTransformation).....
24e40 20 20 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 .........:.base(textTransformati
24e60 6f 6e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 58 54 45 4e on,.MetadataConstants.SSDL_EXTEN
24e80 53 49 4f 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 44 4d SION,.MetadataConstants.SSDL_EDM
24ea0 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 X_SECTION_NAME,.MetadataConstant
24ec0 73 2e 53 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 s.SSDL_ROOT_ELEMENT_NAME).......
24ee0 20 20 20 7b 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 6f 74 65 ...{..........}............prote
24f00 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 cted.override.ItemCollection.Cre
24f20 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 58 6d ateItemCollection(IEnumerable<Xm
24f40 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 49 4c 69 73 74 3c 45 64 6d 53 lReader>.readers,.out.IList<EdmS
24f60 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a chemaError>.errors)..........{..
24f80 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 ............return.MetadataItemC
24fa0 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d ollectionFactory.CreateStoreItem
24fc0 43 6f 6c 6c 65 63 74 69 6f 6e 28 72 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b Collection(readers,.out.errors);
24fe0 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ..........}............///.<summ
25000 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 ary>..........///.Selects.a.name
25020 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 space.from.the.supplied.constant
25040 73 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 s...........///.</summary>......
25060 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 47 65 ....protected.override.string.Ge
25080 74 4e 61 6d 65 73 70 61 63 65 28 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 tNamespace(SchemaConstants.const
250a0 61 6e 74 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 72 65 ants)..........{..............re
250c0 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 turn.constants.SsdlNamespace;...
250e0 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d .......}......}........///.<summ
25100 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 ary>......///.Builder.class.for.
25120 63 72 65 61 74 69 6e 67 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 creating.a.EdmItemCollection....
25140 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6c ..///.</summary>......private.cl
25160 61 73 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3a 20 49 ass.EdmItemCollectionBuilder.:.I
25180 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 temCollectionBuilder......{.....
251a0 20 20 20 20 20 70 72 69 76 61 74 65 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 20 5f 72 65 66 65 72 .....private.List<string>._refer
251c0 65 6e 63 65 53 63 68 65 6d 61 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 enceSchemas.=.new.List<string>()
251e0 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 ;............public.EdmItemColle
25200 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 ctionBuilder(DynamicTextTransfor
25220 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 mation.textTransformation)......
25240 20 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f ........:.base(textTransformatio
25260 6e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 45 58 54 45 4e 53 n,.MetadataConstants.CSDL_EXTENS
25280 49 4f 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 45 44 4d 58 ION,.MetadataConstants.CSDL_EDMX
252a0 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 _SECTION_NAME,.MetadataConstants
252c0 2e 43 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 .CSDL_ROOT_ELEMENT_NAME)........
252e0 20 20 7b 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 ..{..........}............public
25300 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 6e 61 6d 69 .EdmItemCollectionBuilder(Dynami
25320 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 cTextTransformation.textTransfor
25340 6d 61 74 69 6f 6e 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 72 65 66 65 mation,.IEnumerable<string>.refe
25360 72 65 6e 63 65 53 63 68 65 6d 61 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 74 68 69 renceSchemas)..............:.thi
25380 73 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 7b s(textTransformation)..........{
253a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e .............._referenceSchemas.
253c0 41 64 64 52 61 6e 67 65 28 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 29 3b 0d 0a 20 20 20 AddRange(referenceSchemas);.....
253e0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 .....}............protected.over
25400 72 69 64 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f ride.ItemCollection.CreateItemCo
25420 6c 6c 65 63 74 69 6f 6e 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 58 6d 6c 52 65 61 64 65 72 3e 20 llection(IEnumerable<XmlReader>.
25440 72 65 61 64 65 72 73 2c 20 6f 75 74 20 49 4c 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f readers,.out.IList<EdmSchemaErro
25460 72 3e 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 r>.errors)..........{...........
25480 20 20 20 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 20 6f 77 6e 65 64 52 65 61 64 65 72 73 20 ...List<XmlReader>.ownedReaders.
254a0 3d 20 6e 65 77 20 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 =.new.List<XmlReader>();........
254c0 20 20 20 20 20 20 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 20 61 6c 6c 52 65 61 64 65 72 73 ......List<XmlReader>.allReaders
254e0 20 3d 20 6e 65 77 20 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 .=.new.List<XmlReader>();.......
25500 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .......try..............{.......
25520 20 20 20 20 20 20 20 20 20 20 20 61 6c 6c 52 65 61 64 65 72 73 2e 41 64 64 52 61 6e 67 65 28 72 ...........allReaders.AddRange(r
25540 65 61 64 65 72 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 eaders);..................foreac
25560 68 20 28 73 74 72 69 6e 67 20 70 61 74 68 20 69 6e 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 h.(string.path.in._referenceSche
25580 6d 61 73 2e 44 69 73 74 69 6e 63 74 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 mas.Distinct()).................
255a0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 .{......................XElement
255c0 20 72 65 66 65 72 65 6e 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .reference;.....................
255e0 20 69 66 28 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 70 61 74 68 2c 20 6f 75 74 .if(TryLoadRootElement(path,.out
25600 20 72 65 66 65 72 65 6e 63 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .reference))....................
25620 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 58 6d 6c ..{..........................Xml
25640 52 65 61 64 65 72 20 72 65 61 64 65 72 20 3d 20 72 65 66 65 72 65 6e 63 65 2e 43 72 65 61 74 65 Reader.reader.=.reference.Create
25660 52 65 61 64 65 72 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 Reader();.......................
25680 20 20 20 61 6c 6c 52 65 61 64 65 72 73 2e 41 64 64 28 72 65 61 64 65 72 29 3b 0d 0a 20 20 20 20 ...allReaders.Add(reader);......
256a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 77 6e 65 64 52 65 61 64 65 72 73 ....................ownedReaders
256c0 2e 41 64 64 28 72 65 61 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Add(reader);...................
256e0 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 20 20 ...}..................}.........
25700 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f ...........return.MetadataItemCo
25720 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c llectionFactory.CreateEdmItemCol
25740 6c 65 63 74 69 6f 6e 28 61 6c 6c 52 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b lection(allReaders,.out.errors);
25760 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6e ..............}..............fin
25780 61 6c 6c 79 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 ally..............{.............
257a0 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 58 6d 6c 52 65 61 64 65 72 20 72 65 61 64 65 72 20 69 .....foreach.(XmlReader.reader.i
257c0 6e 20 6f 77 6e 65 64 52 65 61 64 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 n.ownedReaders).................
257e0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 49 44 69 73 70 6f .{......................((IDispo
25800 73 61 62 6c 65 29 72 65 61 64 65 72 29 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 sable)reader).Dispose();........
25820 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ..........}..............}......
25840 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 0a ....}............///.<summary>..
25860 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 ........///.Selects.a.namespace.
25880 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 from.the.supplied.constants.....
258a0 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 70 72 ......///.</summary>..........pr
258c0 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 47 65 74 4e 61 6d 65 73 otected.override.string.GetNames
258e0 70 61 63 65 28 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 61 6e 74 73 29 0d pace(SchemaConstants.constants).
25900 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 .........{..............return.c
25920 6f 6e 73 74 61 6e 74 73 2e 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 onstants.CsdlNamespace;.........
25940 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f .}......}..}....///.<summary>../
25960 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 69 6e 67 //.Responsible.for.encapsulating
25980 20 74 68 65 20 72 65 74 72 69 65 76 61 6c 20 61 6e 64 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20 6f .the.retrieval.and.translation.o
259a0 66 20 74 68 65 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 0d 0a 2f 2f 2f 20 61 6e 6e 6f 74 61 f.the.CodeGeneration..///.annota
259c0 74 69 6f 6e 73 20 69 6e 20 74 68 65 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 20 4d 65 74 tions.in.the.EntityFramework.Met
259e0 61 64 61 74 61 20 74 6f 20 61 20 66 6f 72 6d 20 74 68 61 74 20 69 73 20 75 73 65 66 75 6c 20 69 adata.to.a.form.that.is.useful.i
25a00 6e 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 n.code.generation...///.</summar
25a20 79 3e 0d 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 41 63 63 65 73 73 69 62 y>..public.static.class.Accessib
25a40 69 6c 69 74 79 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 ility..{......private.const.stri
25a60 6e 67 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d ng.GETTER_ACCESS.=."http://schem
25a80 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 as.microsoft.com/ado/2006/04/cod
25aa0 65 67 65 6e 65 72 61 74 69 6f 6e 3a 47 65 74 74 65 72 41 63 63 65 73 73 22 3b 0d 0a 20 20 20 20 egeneration:GetterAccess";......
25ac0 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 53 45 54 54 45 52 5f 41 43 43 45 private.const.string.SETTER_ACCE
25ae0 53 53 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 SS.=."http://schemas.microsoft.c
25b00 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 53 65 om/ado/2006/04/codegeneration:Se
25b20 74 74 65 72 41 63 63 65 73 73 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 tterAccess";......private.const.
25b40 73 74 72 69 6e 67 20 54 59 50 45 5f 41 43 43 45 53 53 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 string.TYPE_ACCESS.=."http://sch
25b60 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 emas.microsoft.com/ado/2006/04/c
25b80 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 54 79 70 65 41 63 63 65 73 73 22 3b 0d 0a 20 20 20 20 odegeneration:TypeAccess";......
25ba0 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 4d 45 54 48 4f 44 5f 41 43 43 45 private.const.string.METHOD_ACCE
25bc0 53 53 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 SS.=."http://schemas.microsoft.c
25be0 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 4d 65 om/ado/2006/04/codegeneration:Me
25c00 74 68 6f 64 41 63 63 65 73 73 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 thodAccess";......private.const.
25c20 73 74 72 69 6e 67 20 41 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 44 20 3d 20 22 50 72 6f 74 65 string.ACCESS_PROTECTED.=."Prote
25c40 63 74 65 64 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 cted";......private.const.string
25c60 20 41 43 43 45 53 53 5f 49 4e 54 45 52 4e 41 4c 20 3d 20 22 49 6e 74 65 72 6e 61 6c 22 3b 0d 0a .ACCESS_INTERNAL.=."Internal";..
25c80 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 41 43 43 45 53 53 5f ....private.const.string.ACCESS_
25ca0 50 52 49 56 41 54 45 20 3d 20 22 50 72 69 76 61 74 65 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 PRIVATE.=."Private";......privat
25cc0 65 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 e.static.readonly.Dictionary<str
25ce0 69 6e 67 2c 20 69 6e 74 3e 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f ing,.int>.AccessibilityRankIdLoo
25d00 6b 75 70 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 69 6e 74 kup.=.new.Dictionary<string,.int
25d20 3e 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 7b 20 22 70 72 69 >..........{..............{."pri
25d40 76 61 74 65 22 2c 20 31 7d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 69 6e 74 65 72 vate",.1},..............{."inter
25d60 6e 61 6c 22 2c 20 32 7d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 70 72 6f 74 65 63 nal",.2},..............{."protec
25d80 74 65 64 22 2c 20 33 7d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 70 75 62 6c 69 63 ted",.3},..............{."public
25da0 22 2c 20 34 7d 2c 0d 0a 20 20 20 20 20 20 20 20 7d 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 ",.4},..........};........///.<s
25dc0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 ummary>......///.Gets.the.access
25de0 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 74 ibility.that.should.be.applied.t
25e00 6f 20 61 20 74 79 70 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 o.a.type.being.generated.from.th
25e20 65 20 70 72 6f 76 69 64 65 64 20 47 6c 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f 2f 0d e.provided.GlobalItem.......///.
25e40 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e .....///.defaults.to.public.if.n
25e60 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 o.annotation.is.found.......///.
25e80 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 </summary>......public.static.st
25ea0 72 69 6e 67 20 46 6f 72 54 79 70 65 28 47 6c 6f 62 61 6c 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 ring.ForType(GlobalItem.item)...
25ec0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 3d 3d 20 6e 75 6c 6c 29 0d ...{..........if.(item.==.null).
25ee0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e .........{..............return.n
25f00 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 ull;..........}............retur
25f20 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 54 59 50 45 5f 41 43 n.GetAccessibility(item,.TYPE_AC
25f40 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 CESS);......}........///.<summar
25f60 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 y>......///.Gets.the.accessibili
25f80 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 ty.that.should.be.applied.at.the
25fa0 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 .property.level.for.a.property.b
25fc0 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 eing......///.generated.from.the
25fe0 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 .provided.EdmMember.......///...
26000 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 ...///.defaults.to.public.if.no.
26020 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f annotation.is.found.......///.</
26040 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 summary>......public.static.stri
26060 6e 67 20 46 6f 72 50 72 6f 70 65 72 74 79 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 ng.ForProperty(EdmMember.member)
26080 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e ......{..........if.(member.==.n
260a0 75 6c 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 72 65 74 ull)..........{..............ret
260c0 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 urn.null;..........}............
260e0 73 74 72 69 6e 67 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 string.getterAccess,.setterAcces
26100 73 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 s,.propertyAccess;..........Calc
26120 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 ulatePropertyAccessibility(membe
26140 72 2c 20 6f 75 74 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 6f 75 74 20 67 65 74 74 65 r,.out.propertyAccess,.out.gette
26160 72 41 63 63 65 73 73 2c 20 6f 75 74 20 73 65 74 74 65 72 41 63 63 65 73 73 29 3b 0d 0a 20 20 20 rAccess,.out.setterAccess);.....
26180 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 .....return.propertyAccess;.....
261a0 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
261c0 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f .Gets.the.accessibility.that.sho
261e0 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c uld.be.applied.at.the.property.l
26200 65 76 65 6c 20 66 6f 72 20 61 20 52 65 61 64 2d 4f 6e 6c 79 20 70 72 6f 70 65 72 74 79 20 62 65 evel.for.a.Read-Only.property.be
26220 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 ing......///.generated.from.the.
26240 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 provided.EdmMember.......///....
26260 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 ..///.defaults.to.public.if.no.a
26280 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 nnotation.is.found.......///.</s
262a0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e ummary>......public.static.strin
262c0 67 20 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 45 64 6d 4d 65 6d 62 65 72 20 g.ForReadOnlyProperty(EdmMember.
262e0 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 member)......{..........if.(memb
26300 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 er.==.null)..........{..........
26320 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ....return.null;..........}.....
26340 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d .......return.GetAccessibility(m
26360 65 6d 62 65 72 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d ember,.GETTER_ACCESS);......}...
26380 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 .....///.<summary>......///.Gets
263a0 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 .the.accessibility.that.should.b
263c0 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 e.applied.at.the.property.level.
263e0 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 for.a.property.being......///.ge
26400 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 6e 74 69 74 79 nerated.from.the.provided.Entity
26420 53 65 74 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 Set.......///......///.defaults.
26440 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f to.public.if.no.annotation.is.fo
26460 75 6e 64 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 20 70 75 und.......///.</summary>......pu
26480 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 blic.static.string.ForReadOnlyPr
264a0 6f 70 65 72 74 79 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 operty(EntitySet.set)......{....
264c0 20 20 20 20 20 20 69 66 20 28 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 ......if.(set.==.null)..........
264e0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 {..............return.null;.....
26500 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 41 63 63 65 .....}............return.GetAcce
26520 73 73 69 62 69 6c 69 74 79 28 73 65 74 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a ssibility(set,.GETTER_ACCESS);..
26540 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
26560 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 ///.Gets.the.accessibility.that.
26580 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 should.be.applied.at.the.propert
265a0 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 57 72 69 74 65 2d 4f 6e 6c 79 20 70 72 6f 70 65 72 74 y.level.for.a.Write-Only.propert
265c0 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 y.being......///.generated.from.
265e0 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f the.provided.EdmMember.......///
26600 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 ......///.defaults.to.public.if.
26620 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f no.annotation.is.found.......///
26640 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 .</summary>......public.static.s
26660 74 72 69 6e 67 20 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 45 64 6d 4d 65 tring.ForWriteOnlyProperty(EdmMe
26680 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 mber.member)......{..........if.
266a0 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 (member.==.null)..........{.....
266c0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d .........return.null;..........}
266e0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c ............return.GetAccessibil
26700 69 74 79 28 6d 65 6d 62 65 72 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 ity(member,.SETTER_ACCESS);.....
26720 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f .}..........///.<summary>....../
26740 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 //.Gets.the.accessibility.that.s
26760 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 67 65 74 20 6c 65 76 65 hould.be.applied.at.the.get.leve
26780 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 l.for.a.property.being......///.
267a0 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d generated.from.the.provided.EdmM
267c0 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 ember.......///......///.default
267e0 73 20 74 6f 20 65 6d 70 74 79 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 s.to.empty.if.no.annotation.is.f
26800 6f 75 6e 64 20 6f 72 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 68 65 ound.or.the.accessibility.is.the
26820 20 73 61 6d 65 20 61 73 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a 20 20 .same.as.the.property.level.....
26840 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 ..///.</summary>......public.sta
26860 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 47 65 74 74 65 72 28 45 64 6d 4d 65 6d 62 65 72 20 6d tic.string.ForGetter(EdmMember.m
26880 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 ember)......{..........if.(membe
268a0 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 r.==.null)..........{...........
268c0 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ...return.null;..........}......
268e0 20 20 20 20 20 20 73 74 72 69 6e 67 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 ......string.getterAccess,.sette
26900 72 41 63 63 65 73 73 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 20 20 rAccess,.propertyAccess;........
26920 20 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 ..CalculatePropertyAccessibility
26940 28 6d 65 6d 62 65 72 2c 20 6f 75 74 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 6f 75 74 (member,.out.propertyAccess,.out
26960 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 6f 75 74 20 73 65 74 74 65 72 41 63 63 65 73 73 29 .getterAccess,.out.setterAccess)
26980 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 67 65 74 74 65 72 41 63 63 65 73 73 3b 0d ;..........return.getterAccess;.
269a0 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .....}........///.<summary>.....
269c0 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 .///.Gets.the.accessibility.that
269e0 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 73 65 74 20 6c 65 .should.be.applied.at.the.set.le
26a00 76 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f vel.for.a.property.being......//
26a20 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 /.generated.from.the.provided.Ed
26a40 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 mMember.......///......///.defau
26a60 6c 74 73 20 74 6f 20 65 6d 70 74 79 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 lts.to.empty.if.no.annotation.is
26a80 20 66 6f 75 6e 64 20 6f 72 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 .found.or.the.accessibility.is.t
26aa0 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a he.same.as.the.property.level...
26ac0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 ....///.</summary>......public.s
26ae0 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 53 65 74 74 65 72 28 45 64 6d 4d 65 6d 62 65 72 tatic.string.ForSetter(EdmMember
26b00 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d .member)......{..........if.(mem
26b20 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ber.==.null)..........{.........
26b40 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .....return.null;..........}....
26b60 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 ........string.getterAccess,.set
26b80 74 65 72 41 63 63 65 73 73 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 terAccess,.propertyAccess;......
26ba0 20 20 20 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 ....CalculatePropertyAccessibili
26bc0 74 79 28 6d 65 6d 62 65 72 2c 20 6f 75 74 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 6f ty(member,.out.propertyAccess,.o
26be0 75 74 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 6f 75 74 20 73 65 74 74 65 72 41 63 63 65 73 ut.getterAccess,.out.setterAcces
26c00 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 65 74 74 65 72 41 63 63 65 73 73 s);..........return.setterAccess
26c20 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 ;......}........///.<summary>...
26c40 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 ...///.Gets.the.accessibility.th
26c60 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 74 6f 20 61 20 6d 65 74 68 6f 64 at.should.be.applied.to.a.method
26c80 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 .being.generated.from.the.provid
26ca0 65 64 20 45 64 6d 46 75 6e 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f ed.EdmFunction.......///......//
26cc0 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 /.defaults.to.public.if.no.annot
26ce0 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ation.is.found.......///.</summa
26d00 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f ry>......public.static.string.Fo
26d20 72 4d 65 74 68 6f 64 28 45 64 6d 46 75 6e 63 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 29 0d 0a 20 rMethod(EdmFunction.function)...
26d40 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 75 6e 63 74 69 6f 6e 20 3d 3d 20 6e 75 ...{..........if.(function.==.nu
26d60 6c 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 72 65 74 75 ll)..........{..............retu
26d80 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 rn.null;..........}............r
26da0 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 66 75 6e 63 74 69 6f 6e 2c eturn.GetAccessibility(function,
26dc0 20 4d 45 54 48 4f 44 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 .METHOD_ACCESS);......}........p
26de0 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 rivate.static.void.CalculateProp
26e00 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 4d 65 74 61 64 61 74 61 49 74 65 6d 20 69 ertyAccessibility(MetadataItem.i
26e20 74 65 6d 2c 0d 0a 20 20 20 20 20 20 20 20 6f 75 74 20 73 74 72 69 6e 67 20 70 72 6f 70 65 72 74 tem,..........out.string.propert
26e40 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 6f 75 74 20 73 74 72 yAccessibility,..........out.str
26e60 69 6e 67 20 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 2c 0d 0a 20 20 20 20 20 20 ing.getterAccessibility,........
26e80 20 20 6f 75 74 20 73 74 72 69 6e 67 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 ..out.string.setterAccessibility
26ea0 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 67 65 74 74 65 72 41 63 63 65 73 73 69 62 )......{..........getterAccessib
26ec0 69 6c 69 74 79 20 3d 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 47 ility.=.GetAccessibility(item,.G
26ee0 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 20 67 65 74 74 ETTER_ACCESS);..........int.gett
26f00 65 72 52 61 6e 6b 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b erRank.=.AccessibilityRankIdLook
26f20 75 70 5b 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 5d 3b 0d 0a 0d 0a 20 20 20 20 up[getterAccessibility];........
26f40 20 20 20 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 47 65 74 41 63 63 ....setterAccessibility.=.GetAcc
26f60 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b essibility(item,.SETTER_ACCESS);
26f80 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 20 73 65 74 74 65 72 52 61 6e 6b 20 3d 20 41 63 63 65 73 ..........int.setterRank.=.Acces
26fa0 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 5b 73 65 74 74 65 72 41 63 63 65 73 sibilityRankIdLookup[setterAcces
26fc0 73 69 62 69 6c 69 74 79 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 20 70 72 6f 70 65 72 sibility];............int.proper
26fe0 74 79 52 61 6e 6b 20 3d 20 4d 61 74 68 2e 4d 61 78 28 67 65 74 74 65 72 52 61 6e 6b 2c 20 73 65 tyRank.=.Math.Max(getterRank,.se
27000 74 74 65 72 52 61 6e 6b 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 65 74 74 65 72 52 61 tterRank);..........if.(setterRa
27020 6e 6b 20 3d 3d 20 70 72 6f 70 65 72 74 79 52 61 6e 6b 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a nk.==.propertyRank)..........{..
27040 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 ............setterAccessibility.
27060 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 =.String.Empty;..........}......
27080 20 20 20 20 20 20 69 66 20 28 67 65 74 74 65 72 52 61 6e 6b 20 3d 3d 20 70 72 6f 70 65 72 74 79 ......if.(getterRank.==.property
270a0 52 61 6e 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 20 20 67 65 Rank)..........{..............ge
270c0 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 tterAccessibility.=.String.Empty
270e0 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 6f 70 65 72 74 79 ;..........}............property
27100 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e Accessibility.=.AccessibilityRan
27120 6b 49 64 4c 6f 6f 6b 75 70 2e 57 68 65 72 65 28 76 20 3d 3e 20 76 2e 56 61 6c 75 65 20 3d 3d 20 kIdLookup.Where(v.=>.v.Value.==.
27140 70 72 6f 70 65 72 74 79 52 61 6e 6b 29 2e 53 65 6c 65 63 74 28 76 20 3d 3e 20 76 2e 4b 65 79 29 propertyRank).Select(v.=>.v.Key)
27160 2e 53 69 6e 67 6c 65 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 .Single();......}........private
27180 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 .static.string.GetAccessibility(
271a0 4d 65 74 61 64 61 74 61 49 74 65 6d 20 69 74 65 6d 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d MetadataItem.item,.string.name).
271c0 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 61 63 63 65 73 73 69 62 69 .....{..........string.accessibi
271e0 6c 69 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 lity;..........if.(MetadataTools
27200 2e 54 72 79 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 .TryGetStringMetadataPropertySet
27220 74 69 6e 67 28 69 74 65 6d 2c 20 6e 61 6d 65 2c 20 6f 75 74 20 61 63 63 65 73 73 69 62 69 6c 69 ting(item,.name,.out.accessibili
27240 74 79 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 ty))..........{..............ret
27260 75 72 6e 20 54 72 61 6e 73 6c 61 74 65 55 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 54 6f urn.TranslateUserAccessibilityTo
27280 43 53 68 61 72 70 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 61 63 63 65 73 73 69 62 69 6c 69 74 CSharpAccessibility(accessibilit
272a0 79 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 72 65 74 75 72 6e y);..........}............return
272c0 20 22 70 75 62 6c 69 63 22 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 ."public";......}........private
272e0 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 54 72 61 6e 73 6c 61 74 65 55 73 65 72 41 63 63 65 .static.string.TranslateUserAcce
27300 73 73 69 62 69 6c 69 74 79 54 6f 43 53 68 61 72 70 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 73 ssibilityToCSharpAccessibility(s
27320 74 72 69 6e 67 20 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 0d 0a 20 20 20 20 7b 0d tring.userAccessibility)......{.
27340 0a 20 20 20 20 20 20 20 20 69 66 20 28 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d .........if.(userAccessibility.=
27360 3d 20 41 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 44 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a =.ACCESS_PROTECTED)..........{..
27380 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 70 72 6f 74 65 63 74 65 64 22 3b 0d ............return."protected";.
273a0 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 75 73 65 .........}..........else.if.(use
273c0 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 41 43 43 45 53 53 5f 49 4e 54 45 52 4e 41 rAccessibility.==.ACCESS_INTERNA
273e0 4c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 L)..........{..............retur
27400 6e 20 22 69 6e 74 65 72 6e 61 6c 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 n."internal";..........}........
27420 20 20 65 6c 73 65 20 69 66 20 28 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 ..else.if.(userAccessibility.==.
27440 41 43 43 45 53 53 5f 50 52 49 56 41 54 45 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ACCESS_PRIVATE)..........{......
27460 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 70 72 69 76 61 74 65 22 3b 0d 0a 20 20 20 20 20 ........return."private";.......
27480 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 ...}..........else..........{...
274a0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 64 65 66 61 75 6c 74 20 74 6f 20 70 75 62 6c 69 63 0d ...........//.default.to.public.
274c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 70 75 62 6c 69 63 22 3b 0d 0a 20 .............return."public";...
274e0 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 .......}......}..}....///.<summa
27500 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 63 72 65 61 74 69 6e ry>..///.Responsible.for.creatin
27520 67 20 73 6f 75 72 63 65 20 63 6f 64 65 20 72 65 67 69 6f 6e 73 20 69 6e 20 63 6f 64 65 20 77 68 g.source.code.regions.in.code.wh
27540 65 6e 20 74 68 65 20 6c 6f 6f 70 20 69 6e 73 69 64 65 0d 0a 2f 2f 2f 20 61 63 74 75 61 6c 6c 79 en.the.loop.inside..///.actually
27560 20 70 72 6f 64 75 63 65 73 20 73 6f 6d 65 74 68 69 6e 67 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d .produces.something...///.</summ
27580 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 43 6f 64 65 52 65 67 69 6f 6e 0d 0a 7b ary>..public.class.CodeRegion..{
275a0 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 69 6e 74 20 53 54 41 4e 44 41 52 44 ......private.const.int.STANDARD
275c0 5f 49 4e 44 45 4e 54 5f 4c 45 4e 47 54 48 20 3d 20 34 3b 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 _INDENT_LENGTH.=.4;........priva
275e0 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d te.readonly.DynamicTextTransform
27600 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 ation._textTransformation;......
27620 70 72 69 76 61 74 65 20 69 6e 74 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 3b private.int._beforeRegionLength;
27640 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 ......private.int._emptyRegionLe
27660 6e 67 74 68 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 5f 72 65 67 69 6f 6e 49 6e ngth;......private.int._regionIn
27680 64 65 6e 74 4c 65 76 65 6c 20 3d 20 2d 31 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d dentLevel.=.-1;........///.<summ
276a0 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 43 6f 64 ary>......///.Initializes.an.Cod
276c0 65 52 65 67 69 6f 6e 20 69 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 2f eRegion.instance.with.the....../
276e0 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 //.TextTransformation.(T4.genera
27700 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e ted.class).that.is.currently.run
27720 6e 69 6e 67 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 20 70 75 ning......///.</summary>......pu
27740 62 6c 69 63 20 43 6f 64 65 52 65 67 69 6f 6e 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 blic.CodeRegion(object.textTrans
27760 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 formation)......{..........if.(t
27780 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 extTransformation.==.null)......
277a0 20 20 20 20 7b 0d 0a 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
277c0 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 umentNullException("textTransfor
277e0 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 mation");..........}............
27800 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 _textTransformation.=.DynamicTex
27820 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 tTransformation.Create(textTrans
27840 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 formation);......}........///.<s
27860 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 ummary>......///.Initializes.an.
27880 43 6f 64 65 52 65 67 69 6f 6e 20 69 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 CodeRegion.instance.with.the....
278a0 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e ..///.TextTransformation.(T4.gen
278c0 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 erated.class).that.is.currently.
278e0 72 75 6e 6e 69 6e 67 2c 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 64 20 74 68 65 20 69 6e 64 65 6e 74 running,......///.and.the.indent
27900 20 6c 65 76 65 6c 20 74 6f 20 73 74 61 72 74 20 74 68 65 20 66 69 72 73 74 20 72 65 67 69 6f 6e .level.to.start.the.first.region
27920 20 61 74 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 20 70 75 .at.......///.</summary>......pu
27940 62 6c 69 63 20 43 6f 64 65 52 65 67 69 6f 6e 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 blic.CodeRegion(object.textTrans
27960 66 6f 72 6d 61 74 69 6f 6e 2c 20 69 6e 74 20 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 formation,.int.firstIndentLevel)
27980 0d 0a 20 20 20 20 20 20 20 20 3a 20 74 68 69 73 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 ..........:.this(textTransformat
279a0 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 69 72 73 74 49 6e ion)......{..........if.(firstIn
279c0 64 65 6e 74 4c 65 76 65 6c 20 3c 20 30 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 dentLevel.<.0)..........{.......
279e0 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 .......throw.new.ArgumentExcepti
27a00 6f 6e 28 22 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 on("firstIndentLevel");.........
27a20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c .}............_regionIndentLevel
27a40 20 3d 20 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2d 20 31 3b 0d 0a 20 20 20 20 7d 0d .=.firstIndentLevel.-.1;......}.
27a60 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 .......///.<summary>......///.St
27a80 61 72 74 73 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 0d 0a 20 arts.the.begining.of.a.region...
27aa0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f ...///.</summary>......public.vo
27ac0 69 64 20 42 65 67 69 6e 28 73 74 72 69 6e 67 20 72 65 67 69 6f 6e 4e 61 6d 65 29 0d 0a 20 20 20 id.Begin(string.regionName).....
27ae0 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 72 65 67 69 6f 6e 4e 61 6d 65 20 3d 3d 20 6e 75 .{..........if.(regionName.==.nu
27b00 6c 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 74 68 72 6f ll)..........{..............thro
27b20 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 72 65 67 w.new.ArgumentNullException("reg
27b40 69 6f 6e 4e 61 6d 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 ionName");..........}...........
27b60 20 42 65 67 69 6e 28 72 65 67 69 6f 6e 4e 61 6d 65 2c 20 31 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d .Begin(regionName,.1);......}...
27b80 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 61 72 .....///.<summary>......///.Star
27ba0 74 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 2c 20 69 6e 64 65 t.the.begining.of.a.region,.inde
27bc0 6e 74 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f 66 20 6c 65 76 nted......///.the.numbers.of.lev
27be0 65 6c 73 20 73 70 65 63 69 66 69 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 els.specified......///.</summary
27c00 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 42 65 67 69 6e 28 73 74 72 69 6e 67 20 >......public.void.Begin(string.
27c20 72 65 67 69 6f 6e 4e 61 6d 65 2c 20 69 6e 74 20 6c 65 76 65 6c 73 54 6f 49 6e 63 72 65 61 73 65 regionName,.int.levelsToIncrease
27c40 49 6e 64 65 6e 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 72 65 67 69 Indent)......{..........if.(regi
27c60 6f 6e 4e 61 6d 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 onName.==.null)..........{......
27c80 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
27ca0 63 65 70 74 69 6f 6e 28 22 72 65 67 69 6f 6e 4e 61 6d 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 ception("regionName");..........
27cc0 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 }............_beforeRegionLength
27ce0 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f .=._textTransformation.Generatio
27d00 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 5f 72 nEnvironment.Length;.........._r
27d20 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2b 3d 20 6c 65 76 65 6c 73 54 6f 49 6e 63 72 egionIndentLevel.+=.levelsToIncr
27d40 65 61 73 65 49 6e 64 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 easeIndent;.........._textTransf
27d60 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 47 65 74 49 6e 64 65 6e 74 28 5f 72 65 67 69 6f 6e ormation.Write(GetIndent(_region
27d80 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 IndentLevel));.........._textTra
27da0 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 22 23 72 65 67 69 6f 6e 20 22 nsformation.WriteLine("#region."
27dc0 20 2b 20 72 65 67 69 6f 6e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 65 6d 70 74 79 52 .+.regionName);.........._emptyR
27de0 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f egionLength.=._textTransformatio
27e00 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 3b 0d n.GenerationEnvironment.Length;.
27e20 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .....}........///.<summary>.....
27e40 20 2f 2f 2f 20 45 6e 64 73 20 61 20 72 65 67 69 6f 6e 2c 20 6f 72 20 74 6f 74 61 6c 79 20 72 65 .///.Ends.a.region,.or.totaly.re
27e60 6d 6f 76 65 73 20 69 74 20 69 66 20 6e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 77 61 73 moves.it.if.nothing......///.was
27e80 20 67 65 6e 65 72 74 65 64 20 73 69 6e 63 65 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 .generted.since.the.begining.of.
27ea0 74 68 65 20 72 65 67 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d the.region.......///.</summary>.
27ec0 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e 64 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 .....public.void.End()......{...
27ee0 20 20 20 20 20 20 20 45 6e 64 28 31 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f .......End(1);......}........///
27f00 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 45 6e 64 73 20 61 20 72 65 67 69 6f .<summary>......///.Ends.a.regio
27f20 6e 2c 20 6f 72 20 74 6f 74 61 6c 79 20 72 65 6d 6f 76 65 73 20 69 74 20 69 66 20 6e 6f 74 68 69 n,.or.totaly.removes.it.if.nothi
27f40 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 77 61 73 20 67 65 6e 65 72 74 65 64 20 73 69 6e 63 65 20 74 ng......///.was.generted.since.t
27f60 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 74 68 65 20 72 65 67 69 6f 6e 2c 20 61 6c 73 6f 20 he.begining.of.the.region,.also.
27f80 6f 75 74 64 65 6e 74 73 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 outdents......///.the.number.of.
27fa0 6c 65 76 65 6c 73 20 73 70 65 63 69 66 69 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d levels.specified.......///.</sum
27fc0 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e 64 28 69 6e 74 20 6c mary>......public.void.End(int.l
27fe0 65 76 65 6c 73 54 6f 44 65 63 72 65 61 73 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 evelsToDecrease)......{.........
28000 20 69 6e 74 20 69 6e 64 65 6e 74 4c 65 76 65 6c 20 3d 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 .int.indentLevel.=._regionIndent
28020 4c 65 76 65 6c 3b 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 Level;.........._regionIndentLev
28040 65 6c 20 2d 3d 20 6c 65 76 65 6c 73 54 6f 44 65 63 72 65 61 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 el.-=.levelsToDecrease;.........
28060 20 20 20 69 66 20 28 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 3d 20 5f 74 65 ...if.(_emptyRegionLength.==._te
28080 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 xtTransformation.GenerationEnvir
280a0 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 onment.Length).............._tex
280c0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f tTransformation.GenerationEnviro
280e0 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 nment.Length.=._beforeRegionLeng
28100 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 th;..........else..........{....
28120 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 .........._textTransformation.Wr
28140 69 74 65 4c 69 6e 65 28 53 74 72 69 6e 67 2e 45 6d 70 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 iteLine(String.Empty);..........
28160 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 47 65 ...._textTransformation.Write(Ge
28180 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 tIndent(indentLevel));..........
281a0 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e ...._textTransformation.WriteLin
281c0 65 28 22 23 65 6e 64 72 65 67 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 e("#endregion");.............._t
281e0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 53 74 72 69 extTransformation.WriteLine(Stri
28200 6e 67 2e 45 6d 70 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a ng.Empty);..........}......}....
28220 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 ....///.<summary>......///.Gets.
28240 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 6c 65 76 65 6c 20 74 68 61 74 20 74 68 the.current.indent.level.that.th
28260 65 20 6e 65 78 74 20 65 6e 64 20 72 65 67 69 6f 6e 20 73 74 61 74 65 6d 65 6e 74 20 77 69 6c 6c e.next.end.region.statement.will
28280 20 62 65 20 77 72 69 74 74 65 6e 0d 0a 20 20 20 20 2f 2f 2f 20 61 74 0d 0a 20 20 20 20 2f 2f 2f .be.written......///.at......///
282a0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 43 75 72 72 .</summary>......public.int.Curr
282c0 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 7b 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 72 entIndentLevel.{.get.{.return._r
282e0 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 3b 20 7d 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f egionIndentLevel;.}.}........///
28300 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 20 61 20 73 74 72 69 6e 67 .<summary>......///.Get.a.string
28320 20 6f 66 20 73 70 61 63 65 73 20 65 71 75 69 76 65 6c 65 6e 74 20 74 6f 20 74 68 65 20 6e 75 6d .of.spaces.equivelent.to.the.num
28340 62 65 72 20 6f 66 20 69 6e 64 65 6e 74 73 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 73 69 72 65 64 2e ber.of.indents......///.desired.
28360 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 20 70 75 62 6c 69 63 ......///.</summary>......public
28380 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 49 6e 64 65 6e 74 28 69 6e 74 20 69 6e 64 .static.string.GetIndent(int.ind
283a0 65 6e 74 4c 65 76 65 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 6e entLevel)......{..........if.(in
283c0 64 65 6e 74 4c 65 76 65 6c 20 3c 20 30 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 dentLevel.<.0)..........{.......
283e0 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 .......throw.new.ArgumentExcepti
28400 6f 6e 28 22 69 6e 64 65 6e 74 4c 65 76 65 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d on("indentLevel");..........}...
28420 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 2e 50 61 64 .........return.String.Empty.Pad
28440 4c 65 66 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 20 2a 20 53 54 41 4e 44 41 52 44 5f 49 4e 44 45 Left(indentLevel.*.STANDARD_INDE
28460 4e 54 5f 4c 45 4e 47 54 48 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 0d 0a 2f 2f 2f 20 3c NT_LENGTH);......}..}......///.<
28480 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 63 6f summary>..///.Responsible.for.co
284a0 6c 6c 65 63 74 69 6e 67 20 74 6f 67 65 74 68 65 72 20 74 68 65 20 61 63 74 75 61 6c 20 6d 65 74 llecting.together.the.actual.met
284c0 68 6f 64 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 2f 2f 2f 20 61 6e 64 20 74 68 65 20 70 61 72 61 hod.parameters..///.and.the.para
284e0 6d 65 74 65 72 73 20 74 68 61 74 20 6e 65 65 64 20 74 6f 20 62 65 20 73 65 6e 74 20 74 6f 20 74 meters.that.need.to.be.sent.to.t
28500 68 65 20 45 78 65 63 75 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 he.Execute.method...///.</summar
28520 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 y>..public.class.FunctionImportP
28540 61 72 61 6d 65 74 65 72 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e arameter..{......public.Function
28560 50 61 72 61 6d 65 74 65 72 20 53 6f 75 72 63 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a Parameter.Source.{.get;.set;.}..
28580 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 ....public.string.RawFunctionPar
285a0 61 6d 65 74 65 72 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 ameterName.{.get;.set;.}......pu
285c0 62 6c 69 63 20 73 74 72 69 6e 67 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d blic.string.FunctionParameterNam
285e0 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 e.{.get;.set;.}......public.stri
28600 6e 67 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 7b 20 67 65 74 3b 20 ng.FunctionParameterType.{.get;.
28620 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 4c 6f 63 61 6c 56 set;.}......public.string.LocalV
28640 61 72 69 61 62 6c 65 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 ariableName.{.get;.set;.}......p
28660 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 20 7b 20 67 65 ublic.string.RawClrTypeName.{.ge
28680 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 78 65 t;.set;.}......public.string.Exe
286a0 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d cuteParameterName.{.get;.set;.}.
286c0 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 71 6c 50 61 72 61 6d 65 74 65 72 .....public.string.EsqlParameter
286e0 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 Name.{.get;.set;.}......public.b
28700 6f 6f 6c 20 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 7b 20 67 65 74 3b 20 73 65 ool.NeedsLocalVariable.{.get;.se
28720 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4e 75 6c 6c 61 62 6c 65 t;.}......public.bool.IsNullable
28740 4f 66 54 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c OfT.{.get;.set;.}..........///.<
28760 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 20 73 65 74 20 summary>......///.Creates.a.set.
28780 6f 66 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 6f 62 6a 65 63 of.FunctionImportParameter.objec
287a0 74 73 20 66 72 6f 6d 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 70 61 73 73 65 64 20 69 6e ts.from.the.parameters.passed.in
287c0 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 20 70 75 62 6c 69 .......///.</summary>......publi
287e0 63 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 c.static.IEnumerable<FunctionImp
28800 6f 72 74 50 61 72 61 6d 65 74 65 72 3e 20 43 72 65 61 74 65 28 49 45 6e 75 6d 65 72 61 62 6c 65 ortParameter>.Create(IEnumerable
28820 3c 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 2c 20 <FunctionParameter>.parameters,.
28840 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 2c 20 4d 65 74 61 64 61 CodeGenerationTools.code,.Metada
28860 74 61 54 6f 6f 6c 73 20 65 66 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 taTools.ef)......{..........if.(
28880 70 61 72 61 6d 65 74 65 72 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a parameters.==.null)..........{..
288a0 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 4e 75 ............throw.new.ArgumentNu
288c0 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 70 61 72 61 6d 65 74 65 72 73 22 29 3b 0d 0a 20 20 20 20 llException("parameters");......
288e0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 64 65 20 3d 3d 20 6e 75 6c ....}............if.(code.==.nul
28900 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 74 68 72 6f 77 l)..........{..............throw
28920 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 63 6f 64 65 .new.ArgumentNullException("code
28940 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 66 ");..........}............if.(ef
28960 20 3d 3d 20 6e 75 6c 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 .==.null)..........{............
28980 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
289a0 6e 28 22 65 66 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 55 n("ef");..........}............U
289c0 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 75 6e 69 71 75 65 20 3d 20 niqueIdentifierService.unique.=.
289e0 6e 65 77 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 3b 0d 0a new.UniqueIdentifierService();..
28a00 20 20 20 20 20 20 20 20 4c 69 73 74 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d ........List<FunctionImportParam
28a20 65 74 65 72 3e 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 4c 69 73 eter>.importParameters.=.new.Lis
28a40 74 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 3e 28 29 3b 0d 0a 20 t<FunctionImportParameter>();...
28a60 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 .......foreach.(FunctionParamete
28a80 72 20 70 61 72 61 6d 65 74 65 72 20 69 6e 20 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 r.parameter.in.parameters)......
28aa0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 ....{..............FunctionImpor
28ac0 74 50 61 72 61 6d 65 74 65 72 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 3d 20 6e 65 77 tParameter.importParameter.=.new
28ae0 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 28 29 3b 0d 0a 20 20 20 .FunctionImportParameter();.....
28b00 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 20 .........importParameter.Source.
28b20 3d 20 70 61 72 61 6d 65 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 =.parameter;..............import
28b40 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 Parameter.RawFunctionParameterNa
28b60 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 63 6f 64 me.=.unique.AdjustIdentifier(cod
28b80 65 2e 43 61 6d 65 6c 43 61 73 65 28 70 61 72 61 6d 65 74 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 20 e.CamelCase(parameter.Name));...
28ba0 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 ...........importParameter.Funct
28bc0 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 69 ionParameterName.=.code.Escape(i
28be0 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 mportParameter.RawFunctionParame
28c00 74 65 72 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 72 61 6d terName);..............if.(param
28c20 65 74 65 72 2e 4d 6f 64 65 20 3d 3d 20 50 61 72 61 6d 65 74 65 72 4d 6f 64 65 2e 49 6e 29 0d 0a eter.Mode.==.ParameterMode.In)..
28c40 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 54 ............{..................T
28c60 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 20 3d 20 70 61 72 61 6d 65 74 65 72 2e 54 ypeUsage.typeUsage.=.parameter.T
28c80 79 70 65 55 73 61 67 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 ypeUsage;..................impor
28ca0 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 3d 20 tParameter.NeedsLocalVariable.=.
28cc0 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 true;..................importPar
28ce0 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 63 ameter.FunctionParameterType.=.c
28d00 6f 64 65 2e 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 29 3b 0d 0a 20 20 20 ode.GetTypeName(typeUsage);.....
28d20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 45 73 71 .............importParameter.Esq
28d40 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 70 61 72 61 6d 65 74 65 72 2e 4e 61 6d 65 3b lParameterName.=.parameter.Name;
28d60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 79 70 65 20 63 6c 72 54 79 70 65 20 3d ..................Type.clrType.=
28d80 20 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 70 61 72 61 6d 65 74 65 72 2e .ef.UnderlyingClrType(parameter.
28da0 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 TypeUsage.EdmType);.............
28dc0 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e .....importParameter.RawClrTypeN
28de0 61 6d 65 20 3d 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 ame.=.typeUsage.EdmType.is.EnumT
28e00 79 70 65 20 3f 20 63 6f 64 65 2e 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 ype.?.code.GetTypeName(typeUsage
28e20 2e 45 64 6d 54 79 70 65 29 20 3a 20 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 .EdmType).:.code.Escape(clrType)
28e40 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 ;..................importParamet
28e60 65 72 2e 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 3d 20 63 6c 72 54 79 70 65 2e 49 73 56 61 6c er.IsNullableOfT.=.clrType.IsVal
28e80 75 65 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 ueType;..............}..........
28ea0 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ....else..............{.........
28ec0 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f .........importParameter.NeedsLo
28ee0 63 61 6c 56 61 72 69 61 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 calVariable.=.false;............
28f00 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 ......importParameter.FunctionPa
28f20 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 22 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 22 3b rameterType.=."ObjectParameter";
28f40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 ..................importParamete
28f60 72 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 69 6d 70 6f 72 74 50 r.ExecuteParameterName.=.importP
28f80 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 3b 0d arameter.FunctionParameterName;.
28fa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f .............}..............impo
28fc0 72 74 50 61 72 61 6d 65 74 65 72 73 2e 41 64 64 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 rtParameters.Add(importParameter
28fe0 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 20 77 65 20 73 );..........}............//.we.s
29000 61 76 65 20 74 68 65 20 6c 6f 63 61 6c 20 70 61 72 61 6d 65 74 65 72 20 75 6e 69 71 75 69 66 69 ave.the.local.parameter.uniquifi
29020 63 61 74 69 6f 6e 20 66 6f 72 20 61 20 73 65 63 6f 6e 64 20 70 61 73 73 20 74 6f 20 6d 61 6b 65 cation.for.a.second.pass.to.make
29040 20 74 68 65 20 76 69 73 69 62 6c 65 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 .the.visible.parameters.........
29060 20 2f 2f 20 61 73 20 70 72 65 74 74 79 20 61 6e 64 20 73 65 6e 73 69 62 6c 65 20 61 73 20 70 6f .//.as.pretty.and.sensible.as.po
29080 73 73 69 62 6c 65 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 ssible..........for.(int.i.=.0;.
290a0 69 20 3c 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 i.<.importParameters.Count;.i++)
290c0 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 46 75 6e 63 74 69 6f ..........{..............Functio
290e0 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 nImportParameter.importParameter
29100 20 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 .=.importParameters[i];.........
29120 20 20 20 20 20 69 66 20 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f .....if.(importParameter.NeedsLo
29140 63 61 6c 56 61 72 69 61 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 calVariable)..............{.....
29160 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4c 6f 63 .............importParameter.Loc
29180 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 alVariableName.=.unique.AdjustId
291a0 65 6e 74 69 66 69 65 72 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 entifier(importParameter.RawFunc
291c0 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 50 61 72 61 6d 65 74 65 72 22 29 tionParameterName.+."Parameter")
291e0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 ;..................importParamet
29200 65 72 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 69 6d 70 6f 72 74 er.ExecuteParameterName.=.import
29220 50 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 3b 0d 0a 20 20 Parameter.LocalVariableName;....
29240 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ..........}..........}..........
29260 20 20 72 65 74 75 72 6e 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 3b 0d 0a 20 20 20 20 ..return.importParameters;......
29280 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 0d 0a 20 20 20 20 2f 2f 20 43 6c 61 73 73 20 74 6f 20 63 72 65 }........//......//.Class.to.cre
292a0 61 74 65 20 75 6e 69 71 75 65 20 76 61 72 69 61 62 6c 65 73 20 77 69 74 68 69 6e 20 74 68 65 20 ate.unique.variables.within.the.
292c0 73 61 6d 65 20 73 63 6f 70 65 0d 0a 20 20 20 20 2f 2f 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 same.scope......//......private.
292e0 73 65 61 6c 65 64 20 63 6c 61 73 73 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 sealed.class.UniqueIdentifierSer
29300 76 69 63 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 vice......{..........private.rea
29320 64 6f 6e 6c 79 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 20 5f 6b 6e 6f 77 6e 49 64 65 6e donly.HashSet<string>._knownIden
29340 74 69 66 69 65 72 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 55 6e 69 71 75 tifiers;............public.Uniqu
29360 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d eIdentifierService()..........{.
29380 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 3d ............._knownIdentifiers.=
293a0 20 6e 65 77 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 28 53 74 72 69 6e 67 43 6f 6d 70 61 .new.HashSet<string>(StringCompa
293c0 72 65 72 2e 4f 72 64 69 6e 61 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 rer.Ordinal);..........}........
293e0 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 20 47 ....///.<summary>..........///.G
29400 69 76 65 6e 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2c 20 6d 61 6b 65 73 20 69 74 20 75 6e 69 iven.an.identifier,.makes.it.uni
29420 71 75 65 20 77 69 74 68 69 6e 20 74 68 65 20 73 63 6f 70 65 20 62 79 20 61 64 64 69 6e 67 0d 0a que.within.the.scope.by.adding..
29440 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 73 75 66 66 69 78 20 28 31 2c 20 32 2c 20 33 2c 20 2e ........///.a.suffix.(1,.2,.3,..
29460 2e 2e 29 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 61 64 6a 75 73 74 65 64 20 69 64 ..),.and.returns.the.adjusted.id
29480 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 entifier...........///.</summary
294a0 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 41 64 6a 75 73 74 49 >..........public.string.AdjustI
294c0 64 65 6e 74 69 66 69 65 72 28 73 74 72 69 6e 67 20 69 64 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 dentifier(string.identifier)....
294e0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 66 69 6e 64 20 61 20 75 ......{..............//.find.a.u
29500 6e 69 71 75 65 20 6e 61 6d 65 20 62 79 20 61 64 64 69 6e 67 20 73 75 66 66 69 78 20 61 73 20 6e nique.name.by.adding.suffix.as.n
29520 65 63 65 73 73 61 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6e 75 6d 62 65 72 ecessary..............int.number
29540 4f 66 43 6f 6e 66 6c 69 63 74 73 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 OfConflicts.=.0;..............st
29560 72 69 6e 67 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 69 ring.adjustedIdentifier.=.identi
29580 66 69 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 21 5f 6b 6e fier;................while.(!_kn
295a0 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 64 65 6e 74 ownIdentifiers.Add(adjustedIdent
295c0 69 66 69 65 72 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 ifier))..............{..........
295e0 20 20 20 20 20 20 20 20 2b 2b 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 3b 0d 0a 20 20 ........++numberOfConflicts;....
29600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 ..............adjustedIdentifier
29620 20 3d 20 69 64 65 6e 74 69 66 69 65 72 20 2b 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 .=.identifier.+.numberOfConflict
29640 73 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 s.ToString(CultureInfo.Invariant
29660 43 75 6c 74 75 72 65 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 Culture);..............}........
29680 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 ........return.adjustedIdentifie
296a0 72 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c r;..........}......}..}....///.<
296c0 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6d 61 summary>..///.Responsible.for.ma
296e0 72 6b 69 6e 67 20 74 68 65 20 76 61 72 69 6f 75 73 20 73 65 63 74 69 6f 6e 73 20 6f 66 20 74 68 rking.the.various.sections.of.th
29700 65 20 67 65 6e 65 72 61 74 69 6f 6e 2c 0d 0a 2f 2f 2f 20 73 6f 20 74 68 65 79 20 63 61 6e 20 62 e.generation,..///.so.they.can.b
29720 65 20 73 70 6c 69 74 20 75 70 20 69 6e 74 6f 20 73 65 70 61 72 61 74 65 20 66 69 6c 65 73 0d 0a e.split.up.into.separate.files..
29740 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 45 6e 74 ///.</summary>..public.class.Ent
29760 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d ityFrameworkTemplateFileManager.
29780 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 20 2f 2f 2f 20 43 .{......///.<summary>......///.C
297a0 72 65 61 74 65 73 20 74 68 65 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 reates.the.VsEntityFrameworkTemp
297c0 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 69 66 20 56 53 20 69 73 20 64 65 74 65 63 74 65 lateFileManager.if.VS.is.detecte
297e0 64 2c 20 6f 74 68 65 72 77 69 73 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 72 65 61 74 65 73 20 74 68 d,.otherwise......///.creates.th
29800 65 20 66 69 6c 65 20 73 79 73 74 65 6d 20 76 65 72 73 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 e.file.system.version.......///.
29820 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 45 6e </summary>......public.static.En
29840 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 tityFrameworkTemplateFileManager
29860 20 43 72 65 61 74 65 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f .Create(object.textTransformatio
29880 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 n)......{..........DynamicTextTr
298a0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 ansformation.transformation.=.Dy
298c0 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 namicTextTransformation.Create(t
298e0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 49 44 79 extTransformation);..........IDy
29900 6e 61 6d 69 63 48 6f 73 74 20 68 6f 73 74 20 3d 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e namicHost.host.=.transformation.
29920 48 6f 73 74 3b 0d 0a 0d 0a 23 69 66 20 21 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c Host;....#if.!PREPROCESSED_TEMPL
29940 41 54 45 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 ATE..........var.hostServiceProv
29960 69 64 65 72 20 3d 20 68 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 ider.=.host.AsIServiceProvider()
29980 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 ;............if.(hostServiceProv
299a0 69 64 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ider.!=.null)..........{........
299c0 20 20 20 20 20 20 45 6e 76 44 54 45 2e 44 54 45 20 64 74 65 20 3d 20 28 45 6e 76 44 54 45 2e 44 ......EnvDTE.DTE.dte.=.(EnvDTE.D
299e0 54 45 29 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 2e 47 65 74 53 65 72 76 69 TE).hostServiceProvider.GetServi
29a00 63 65 28 74 79 70 65 6f 66 28 45 6e 76 44 54 45 2e 44 54 45 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 ce(typeof(EnvDTE.DTE));.........
29a20 20 20 20 20 20 20 20 69 66 20 28 64 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 .......if.(dte.!=.null).........
29a40 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e .....{..................return.n
29a60 65 77 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 ew.VsEntityFrameworkTemplateFile
29a80 4d 61 6e 61 67 65 72 28 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 Manager(transformation);........
29aa0 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 ......}..........}..#endif......
29ac0 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 ....return.new.EntityFrameworkTe
29ae0 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e mplateFileManager(transformation
29b00 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 65 61 6c 65 64 20 );......}........private.sealed.
29b20 63 6c 61 73 73 20 42 6c 6f 63 6b 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c class.Block......{..........publ
29b40 69 63 20 53 74 72 69 6e 67 20 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 ic.String.Name;..........public.
29b60 69 6e 74 20 53 74 61 72 74 2c 20 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 int.Start,.Length;......}.......
29b80 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4c 69 73 74 3c 42 6c 6f 63 6b 3e 20 66 69 .private.readonly.List<Block>.fi
29ba0 6c 65 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 42 6c 6f 63 6b 3e 28 29 3b 0d 0a 20 20 20 20 70 72 les.=.new.List<Block>();......pr
29bc0 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 42 6c 6f 63 6b 20 66 6f 6f 74 65 72 20 3d 20 6e 65 ivate.readonly.Block.footer.=.ne
29be0 77 20 42 6c 6f 63 6b 28 29 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 w.Block();......private.readonly
29c00 20 42 6c 6f 63 6b 20 68 65 61 64 65 72 20 3d 20 6e 65 77 20 42 6c 6f 63 6b 28 29 3b 0d 0a 20 20 .Block.header.=.new.Block();....
29c20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 ..private.readonly.DynamicTextTr
29c40 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e ansformation._textTransformation
29c60 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 47 65 6e ;........//.reference.to.the.Gen
29c80 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 erationEnvironment.StringBuilder
29ca0 20 6f 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 .on.the......//.TextTransformati
29cc0 6f 6e 20 6f 62 6a 65 63 74 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 on.object......private.readonly.
29ce0 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e StringBuilder._generationEnviron
29d00 6d 65 6e 74 3b 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 42 6c 6f 63 6b 20 63 75 72 72 65 ment;........private.Block.curre
29d20 6e 74 42 6c 6f 63 6b 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 ntBlock;........///.<summary>...
29d40 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 45 6e 74 69 74 79 46 72 61 6d ...///.Initializes.an.EntityFram
29d60 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 49 6e 73 74 61 6e 63 eworkTemplateFileManager.Instanc
29d80 65 20 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f e..with.the......///.TextTransfo
29da0 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 rmation.(T4.generated.class).tha
29dc0 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 t.is.currently.running......///.
29de0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 45 6e 74 69 74 79 46 72 </summary>......private.EntityFr
29e00 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 6f 62 6a 65 63 ameworkTemplateFileManager(objec
29e20 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 t.textTransformation)......{....
29e40 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 ......if.(textTransformation.==.
29e60 6e 75 6c 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 74 68 null)..........{..............th
29e80 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 22 74 row.new.ArgumentNullException("t
29ea0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d extTransformation");..........}.
29ec0 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d ..........._textTransformation.=
29ee0 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 .DynamicTextTransformation.Creat
29f00 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 e(textTransformation);..........
29f20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 5f 74 65 78 74 54 72 _generationEnvironment.=._textTr
29f40 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 ansformation.GenerationEnvironme
29f60 6e 74 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d nt;......}........///.<summary>.
29f80 0a 20 20 20 20 2f 2f 2f 20 4d 61 72 6b 73 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 6c 61 .....///.Marks.the.end.of.the.la
29fa0 73 74 20 66 69 6c 65 20 69 66 20 74 68 65 72 65 20 77 61 73 20 6f 6e 65 2c 20 61 6e 64 20 73 74 st.file.if.there.was.one,.and.st
29fc0 61 72 74 73 20 61 20 6e 65 77 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 64 20 6d 61 72 6b 73 20 74 68 arts.a.new......///.and.marks.th
29fe0 69 73 20 70 6f 69 6e 74 20 69 6e 20 67 65 6e 65 72 61 74 69 6f 6e 20 61 73 20 61 20 6e 65 77 20 is.point.in.generation.as.a.new.
2a000 66 69 6c 65 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 20 70 file.......///.</summary>......p
2a020 75 62 6c 69 63 20 76 6f 69 64 20 53 74 61 72 74 4e 65 77 46 69 6c 65 28 73 74 72 69 6e 67 20 6e ublic.void.StartNewFile(string.n
2a040 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 6d 65 20 3d 3d ame)......{..........if.(name.==
2a060 20 6e 75 6c 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 74 .null)..........{..............t
2a080 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 22 hrow.new.ArgumentNullException("
2a0a0 6e 61 6d 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 43 75 name");..........}............Cu
2a0c0 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 6e 65 77 20 42 6c 6f 63 6b 20 7b 20 4e 61 6d 65 20 3d 20 rrentBlock.=.new.Block.{.Name.=.
2a0e0 6e 61 6d 65 20 7d 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 name.};......}........public.voi
2a100 64 20 53 74 61 72 74 46 6f 6f 74 65 72 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 d.StartFooter()......{..........
2a120 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 66 6f 6f 74 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 0d CurrentBlock.=.footer;......}...
2a140 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 74 61 72 74 48 65 61 64 65 72 28 29 0d 0a .....public.void.StartHeader()..
2a160 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 68 65 ....{..........CurrentBlock.=.he
2a180 61 64 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 ader;......}........public.void.
2a1a0 45 6e 64 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 43 EndBlock()......{..........if.(C
2a1c0 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d urrentBlock.==.null)..........{.
2a1e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d .............return;..........}.
2a200 0a 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 2e 4c 65 6e 67 74 68 20 3d ...........CurrentBlock.Length.=
2a220 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 2d ._generationEnvironment.Length.-
2a240 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 2e 53 74 61 72 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .CurrentBlock.Start;............
2a260 69 66 20 28 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 21 3d 20 68 65 61 64 65 72 20 26 26 20 43 75 if.(CurrentBlock.!=.header.&&.Cu
2a280 72 72 65 6e 74 42 6c 6f 63 6b 20 21 3d 20 66 6f 6f 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 7b rrentBlock.!=.footer)..........{
2a2a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 73 2e 41 64 64 28 43 75 72 72 65 6e 74 42 ..............files.Add(CurrentB
2a2c0 6c 6f 63 6b 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 63 75 72 lock);..........}............cur
2a2e0 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 rentBlock.=.null;......}........
2a300 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 50 72 6f 64 75 63 65 20 74 ///.<summary>......///.Produce.t
2a320 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 20 66 69 6c 65 73 2e 0d 0a 20 20 20 20 2f he.template.output.files......./
2a340 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 69 72 74 75 61 //.</summary>......public.virtua
2a360 6c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 50 72 6f 63 65 73 73 28 62 6f l.IEnumerable<string>.Process(bo
2a380 6f 6c 20 73 70 6c 69 74 20 3d 20 74 72 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ol.split.=.true)......{.........
2a3a0 20 76 61 72 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 20 3d 20 6e 65 77 20 4c 69 .var.generatedFileNames.=.new.Li
2a3c0 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 70 6c st<string>();............if.(spl
2a3e0 69 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 42 it)..........{..............EndB
2a400 6c 6f 63 6b 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 65 61 64 65 lock();................var.heade
2a420 72 54 65 78 74 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 rText.=._generationEnvironment.T
2a440 6f 53 74 72 69 6e 67 28 68 65 61 64 65 72 2e 53 74 61 72 74 2c 20 68 65 61 64 65 72 2e 4c 65 6e oString(header.Start,.header.Len
2a460 67 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 6f 6f 74 65 72 54 65 78 gth);..............var.footerTex
2a480 74 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 t.=._generationEnvironment.ToStr
2a4a0 69 6e 67 28 66 6f 6f 74 65 72 2e 53 74 61 72 74 2c 20 66 6f 6f 74 65 72 2e 4c 65 6e 67 74 68 29 ing(footer.Start,.footer.Length)
2a4c0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 75 74 70 75 74 50 61 74 68 20 3d 20 ;..............var.outputPath.=.
2a4e0 50 61 74 68 2e 47 65 74 44 69 72 65 63 74 6f 72 79 4e 61 6d 65 28 5f 74 65 78 74 54 72 61 6e 73 Path.GetDirectoryName(_textTrans
2a500 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 29 3b 0d 0a 0d formation.Host.TemplateFile);...
2a520 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 73 2e 52 65 76 65 72 73 65 28 29 3b 0d 0a 0d .............files.Reverse();...
2a540 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 62 6c 6f 63 6b 20 .............foreach.(var.block.
2a560 69 6e 20 66 69 6c 65 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 in.files)..............{........
2a580 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 69 6c 65 4e 61 6d 65 20 3d 20 50 61 74 68 2e 43 6f ..........var.fileName.=.Path.Co
2a5a0 6d 62 69 6e 65 28 6f 75 74 70 75 74 50 61 74 68 2c 20 62 6c 6f 63 6b 2e 4e 61 6d 65 29 3b 0d 0a mbine(outputPath,.block.Name);..
2a5c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 65 6e 74 20 3d 20 68 65 ................var.content.=.he
2a5e0 61 64 65 72 54 65 78 74 20 2b 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e aderText.+._generationEnvironmen
2a600 74 2e 54 6f 53 74 72 69 6e 67 28 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 t.ToString(block.Start,.block.Le
2a620 6e 67 74 68 29 20 2b 20 66 6f 6f 74 65 72 54 65 78 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ngth).+.footerText;.............
2a640 20 20 20 20 20 20 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 2e 41 64 64 28 66 69 .......generatedFileNames.Add(fi
2a660 6c 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 leName);..................Create
2a680 46 69 6c 65 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 File(fileName,.content);........
2a6a0 20 20 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 .........._generationEnvironment
2a6c0 2e 52 65 6d 6f 76 65 28 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 6e 67 74 .Remove(block.Start,.block.Lengt
2a6e0 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d h);..............}..........}...
2a700 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d .........return.generatedFileNam
2a720 65 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 76 69 72 74 es;......}........protected.virt
2a740 75 61 6c 20 76 6f 69 64 20 43 72 65 61 74 65 46 69 6c 65 28 73 74 72 69 6e 67 20 66 69 6c 65 4e ual.void.CreateFile(string.fileN
2a760 61 6d 65 2c 20 73 74 72 69 6e 67 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 ame,.string.content)......{.....
2a780 20 20 20 20 20 69 66 20 28 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 .....if.(IsFileContentDifferent(
2a7a0 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a fileName,.content))..........{..
2a7c0 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 78 74 28 66 69 ............File.WriteAllText(fi
2a7e0 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 leName,.content);..........}....
2a800 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 62 6f 6f 6c 20 49 73 46 69 6c 65 ..}........protected.bool.IsFile
2a820 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 53 74 72 69 6e 67 20 66 69 6c 65 4e 61 6d 65 ContentDifferent(String.fileName
2a840 2c 20 73 74 72 69 6e 67 20 6e 65 77 43 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 ,.string.newContent)......{.....
2a860 20 20 20 20 20 72 65 74 75 72 6e 20 21 28 46 69 6c 65 2e 45 78 69 73 74 73 28 66 69 6c 65 4e 61 .....return.!(File.Exists(fileNa
2a880 6d 65 29 20 26 26 20 46 69 6c 65 2e 52 65 61 64 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 me).&&.File.ReadAllText(fileName
2a8a0 29 20 3d 3d 20 6e 65 77 43 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ).==.newContent);......}........
2a8c0 70 72 69 76 61 74 65 20 42 6c 6f 63 6b 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 0d 0a 20 20 20 20 private.Block.CurrentBlock......
2a8e0 7b 0d 0a 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 63 75 72 72 65 6e 74 42 {..........get.{.return.currentB
2a900 6c 6f 63 6b 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d lock;.}..........set..........{.
2a920 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 21 3d .............if.(CurrentBlock.!=
2a940 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 .null)..............{...........
2a960 20 20 20 20 20 20 20 45 6e 64 42 6c 6f 63 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .......EndBlock();..............
2a980 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 20 21 3d 20 6e 75 }................if.(value.!=.nu
2a9a0 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ll)..............{..............
2a9c0 20 20 20 20 76 61 6c 75 65 2e 53 74 61 72 74 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 ....value.Start.=._generationEnv
2a9e0 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ironment.Length;..............}.
2aa00 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 76 61 ...............currentBlock.=.va
2aa20 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 23 69 66 20 21 50 lue;..........}......}....#if.!P
2aa40 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 20 20 70 72 69 76 61 74 REPROCESSED_TEMPLATE......privat
2aa60 65 20 73 65 61 6c 65 64 20 63 6c 61 73 73 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b e.sealed.class.VsEntityFramework
2aa80 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 3a 20 45 6e 74 69 74 79 46 72 61 6d TemplateFileManager.:.EntityFram
2aaa0 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 7b 0d eworkTemplateFileManager......{.
2aac0 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 .........private.EnvDTE.ProjectI
2aae0 74 65 6d 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 3b 0d 0a 20 20 20 20 20 20 tem.templateProjectItem;........
2ab00 20 20 70 72 69 76 61 74 65 20 45 6e 76 44 54 45 2e 44 54 45 20 64 74 65 3b 0d 0a 20 20 20 20 20 ..private.EnvDTE.DTE.dte;.......
2ab20 20 20 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 3c 73 74 72 69 6e 67 3e 20 63 68 65 63 6b 4f ...private.Action<string>.checkO
2ab40 75 74 41 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 41 63 74 69 6f utAction;..........private.Actio
2ab60 6e 3c 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 3e 20 70 72 6f 6a 65 63 74 53 79 n<IEnumerable<string>>.projectSy
2ab80 6e 63 41 63 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 ncAction;............///.<summar
2aba0 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 y>..........///.Creates.an.insta
2abc0 6e 63 65 20 6f 66 20 74 68 65 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 nce.of.the.VsEntityFrameworkTemp
2abe0 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 63 6c 61 73 73 20 77 69 74 68 20 74 68 65 20 49 lateFileManager.class.with.the.I
2ac00 44 79 6e 61 6d 69 63 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f DynamicHost.instance..........//
2ac20 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 73 45 /.</summary>..........public.VsE
2ac40 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 ntityFrameworkTemplateFileManage
2ac60 72 28 6f 62 6a 65 63 74 20 74 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 29 0d 0a 20 20 20 20 20 20 r(object.textTemplating)........
2ac80 20 20 20 20 20 20 3a 20 62 61 73 65 28 74 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 29 0d 0a 20 20 ......:.base(textTemplating)....
2aca0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 6f 73 74 53 65 72 ......{..............var.hostSer
2acc0 76 69 63 65 50 72 6f 76 69 64 65 72 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 viceProvider.=._textTransformati
2ace0 6f 6e 2e 48 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 20 on.Host.AsIServiceProvider();...
2ad00 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 ...........if.(hostServiceProvid
2ad20 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 er.==.null)..............{......
2ad40 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 4e 75 ............throw.new.ArgumentNu
2ad60 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 6f 62 74 61 69 6e 20 68 6f llException("Could.not.obtain.ho
2ad80 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 stServiceProvider");............
2ada0 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 74 65 20 3d 20 28 45 6e 76 44 54 45 ..}................dte.=.(EnvDTE
2adc0 2e 44 54 45 29 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 2e 47 65 74 53 65 72 .DTE).hostServiceProvider.GetSer
2ade0 76 69 63 65 28 74 79 70 65 6f 66 28 45 6e 76 44 54 45 2e 44 54 45 29 29 3b 0d 0a 20 20 20 20 20 vice(typeof(EnvDTE.DTE));.......
2ae00 20 20 20 20 20 20 20 69 66 20 28 64 74 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 .......if.(dte.==.null).........
2ae20 20 20 20 20 20 7b 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 .....{..................throw.ne
2ae40 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e w.ArgumentNullException("Could.n
2ae60 6f 74 20 6f 62 74 61 69 6e 20 44 54 45 20 66 72 6f 6d 20 68 6f 73 74 22 29 3b 0d 0a 20 20 20 20 ot.obtain.DTE.from.host");......
2ae80 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 74 65 6d 70 6c 61 74 ........}................templat
2aea0 65 50 72 6f 6a 65 63 74 49 74 65 6d 20 3d 20 64 74 65 2e 53 6f 6c 75 74 69 6f 6e 2e 46 69 6e 64 eProjectItem.=.dte.Solution.Find
2aec0 50 72 6f 6a 65 63 74 49 74 65 6d 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e ProjectItem(_textTransformation.
2aee0 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 Host.TemplateFile);.............
2af00 20 20 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 20 3d 20 66 69 6c 65 4e 61 6d 65 20 3d 3e 20 ...checkOutAction.=.fileName.=>.
2af20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 2e 43 68 65 63 6b 4f 75 74 49 74 65 6d 28 66 dte.SourceControl.CheckOutItem(f
2af40 69 6c 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 ileName);..............projectSy
2af60 6e 63 41 63 74 69 6f 6e 20 3d 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 20 3d 3e 20 50 72 6f 6a ncAction.=.keepFileNames.=>.Proj
2af80 65 63 74 53 79 6e 63 28 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2c 20 6b 65 65 ectSync(templateProjectItem,.kee
2afa0 70 46 69 6c 65 4e 61 6d 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 pFileNames);..........}.........
2afc0 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 ...public.override.IEnumerable<s
2afe0 74 72 69 6e 67 3e 20 50 72 6f 63 65 73 73 28 62 6f 6f 6c 20 73 70 6c 69 74 29 0d 0a 20 20 20 20 tring>.Process(bool.split)......
2b000 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 6d 70 6c 61 74 65 50 ....{..............if.(templateP
2b020 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 20 3d 3d 20 6e 75 6c 6c 29 rojectItem.ProjectItems.==.null)
2b040 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 ..............{.................
2b060 20 72 65 74 75 72 6e 20 6e 65 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 .return.new.List<string>();.....
2b080 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 76 61 72 20 67 65 .........}................var.ge
2b0a0 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 20 3d 20 62 61 73 65 2e 50 72 6f 63 65 73 73 28 neratedFileNames.=.base.Process(
2b0c0 73 70 6c 69 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 split);................projectSy
2b0e0 6e 63 41 63 74 69 6f 6e 2e 45 6e 64 49 6e 76 6f 6b 65 28 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 ncAction.EndInvoke(projectSyncAc
2b100 74 69 6f 6e 2e 42 65 67 69 6e 49 6e 76 6f 6b 65 28 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 tion.BeginInvoke(generatedFileNa
2b120 6d 65 73 2c 20 6e 75 6c 6c 2c 20 6e 75 6c 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 mes,.null,.null));..............
2b140 20 20 72 65 74 75 72 6e 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 3b 0d 0a 20 20 ..return.generatedFileNames;....
2b160 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 ......}............protected.ove
2b180 72 72 69 64 65 20 76 6f 69 64 20 43 72 65 61 74 65 46 69 6c 65 28 73 74 72 69 6e 67 20 66 69 6c rride.void.CreateFile(string.fil
2b1a0 65 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 eName,.string.content)..........
2b1c0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 {..............if.(IsFileContent
2b1e0 44 69 66 66 65 72 65 6e 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 29 0d 0a 20 Different(fileName,.content))...
2b200 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 43 68 ...........{..................Ch
2b220 65 63 6b 6f 75 74 46 69 6c 65 49 66 52 65 71 75 69 72 65 64 28 66 69 6c 65 4e 61 6d 65 29 3b 0d eckoutFileIfRequired(fileName);.
2b240 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 .................File.WriteAllTe
2b260 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 xt(fileName,.content);..........
2b280 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 ....}..........}............priv
2b2a0 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 50 72 6f 6a 65 63 74 53 79 6e 63 28 45 6e 76 44 ate.static.void.ProjectSync(EnvD
2b2c0 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 TE.ProjectItem.templateProjectIt
2b2e0 65 6d 2c 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 6b 65 65 70 46 69 6c 65 em,.IEnumerable<string>.keepFile
2b300 4e 61 6d 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 76 Names)..........{..............v
2b320 61 72 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 53 65 74 20 3d 20 6e 65 77 20 48 61 73 68 53 65 74 ar.keepFileNameSet.=.new.HashSet
2b340 3c 73 74 72 69 6e 67 3e 28 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 3b 0d 0a 20 20 20 20 20 20 <string>(keepFileNames);........
2b360 20 20 20 20 20 20 76 61 72 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 20 3d 20 6e 65 77 20 44 69 63 ......var.projectFiles.=.new.Dic
2b380 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 tionary<string,.EnvDTE.ProjectIt
2b3a0 65 6d 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 72 69 67 69 6e 61 6c em>();..............var.original
2b3c0 4f 75 74 70 75 74 20 3d 20 50 61 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f 75 74 Output.=.Path.GetFileNameWithout
2b3e0 45 78 74 65 6e 73 69 6f 6e 28 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 46 69 Extension(templateProjectItem.Fi
2b400 6c 65 4e 61 6d 65 73 5b 30 5d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 leNames[0]);................fore
2b420 61 63 68 20 28 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 20 70 72 6f 6a 65 63 74 49 ach.(EnvDTE.ProjectItem.projectI
2b440 74 65 6d 20 69 6e 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 tem.in.templateProjectItem.Proje
2b460 63 74 49 74 65 6d 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 ctItems)..............{.........
2b480 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 2e 41 64 64 28 70 72 6f 6a 65 63 .........projectFiles.Add(projec
2b4a0 74 49 74 65 6d 2e 46 69 6c 65 4e 61 6d 65 73 5b 30 5d 2c 20 70 72 6f 6a 65 63 74 49 74 65 6d 29 tItem.FileNames[0],.projectItem)
2b4c0 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 ;..............}................
2b4e0 2f 2f 20 52 65 6d 6f 76 65 20 75 6e 75 73 65 64 20 69 74 65 6d 73 20 66 72 6f 6d 20 74 68 65 20 //.Remove.unused.items.from.the.
2b500 70 72 6f 6a 65 63 74 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 project..............foreach.(va
2b520 72 20 70 61 69 72 20 69 6e 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 29 0d 0a 20 20 20 20 20 20 20 r.pair.in.projectFiles).........
2b540 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 28 21 6b 65 65 .....{..................if.(!kee
2b560 70 46 69 6c 65 4e 61 6d 65 73 2e 43 6f 6e 74 61 69 6e 73 28 70 61 69 72 2e 4b 65 79 29 0d 0a 20 pFileNames.Contains(pair.Key)...
2b580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 26 20 21 28 50 61 74 68 2e 47 65 74 ...................&&.!(Path.Get
2b5a0 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 70 61 69 72 2e 4b 65 FileNameWithoutExtension(pair.Ke
2b5c0 79 29 20 2b 20 22 2e 22 29 2e 53 74 61 72 74 73 57 69 74 68 28 6f 72 69 67 69 6e 61 6c 4f 75 74 y).+.".").StartsWith(originalOut
2b5e0 70 75 74 20 2b 20 22 2e 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a put.+."."))..................{..
2b600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 69 72 2e 56 61 6c 75 65 2e 44 ....................pair.Value.D
2b620 65 6c 65 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 elete();..................}.....
2b640 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 .........}................//.Add
2b660 20 6d 69 73 73 69 6e 67 20 66 69 6c 65 73 20 74 6f 20 74 68 65 20 70 72 6f 6a 65 63 74 0d 0a 20 .missing.files.to.the.project...
2b680 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 73 74 72 69 6e 67 20 66 69 6c 65 4e ...........foreach.(string.fileN
2b6a0 61 6d 65 20 69 6e 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 53 65 74 29 0d 0a 20 20 20 20 20 20 20 ame.in.keepFileNameSet).........
2b6c0 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 28 21 70 72 6f .....{..................if.(!pro
2b6e0 6a 65 63 74 46 69 6c 65 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 66 69 6c 65 4e 61 6d 65 29 29 jectFiles.ContainsKey(fileName))
2b700 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
2b720 20 20 20 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f .........templateProjectItem.Pro
2b740 6a 65 63 74 49 74 65 6d 73 2e 41 64 64 46 72 6f 6d 46 69 6c 65 28 66 69 6c 65 4e 61 6d 65 29 3b jectItems.AddFromFile(fileName);
2b760 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
2b780 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 .}..........}............private
2b7a0 20 76 6f 69 64 20 43 68 65 63 6b 6f 75 74 46 69 6c 65 49 66 52 65 71 75 69 72 65 64 28 73 74 72 .void.CheckoutFileIfRequired(str
2b7c0 69 6e 67 20 66 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ing.fileName)..........{........
2b7e0 20 20 20 20 20 20 69 66 20 28 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 20 3d 3d 20 6e ......if.(dte.SourceControl.==.n
2b800 75 6c 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 21 64 74 65 2e 53 6f 75 ull..................||.!dte.Sou
2b820 72 63 65 43 6f 6e 74 72 6f 6c 2e 49 73 49 74 65 6d 55 6e 64 65 72 53 43 43 28 66 69 6c 65 4e 61 rceControl.IsItemUnderSCC(fileNa
2b840 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 64 74 65 2e me)......................||.dte.
2b860 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 2e 49 73 49 74 65 6d 43 68 65 63 6b 65 64 4f 75 74 28 66 SourceControl.IsItemCheckedOut(f
2b880 69 6c 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ileName))..............{........
2b8a0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d ..........return;..............}
2b8c0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 72 75 6e 20 6f 6e 20 77 6f 72 6b 65 72 ................//.run.on.worker
2b8e0 20 74 68 72 65 61 64 20 74 6f 20 70 72 65 76 65 6e 74 20 54 34 20 63 61 6c 6c 69 6e 67 20 62 61 .thread.to.prevent.T4.calling.ba
2b900 63 6b 20 69 6e 74 6f 20 56 53 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 65 63 6b 4f 75 74 ck.into.VS..............checkOut
2b920 41 63 74 69 6f 6e 2e 45 6e 64 49 6e 76 6f 6b 65 28 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 2e Action.EndInvoke(checkOutAction.
2b940 42 65 67 69 6e 49 6e 76 6f 6b 65 28 66 69 6c 65 4e 61 6d 65 2c 20 6e 75 6c 6c 2c 20 6e 75 6c 6c BeginInvoke(fileName,.null,.null
2b960 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 23 65 6e 64 69 66 0d 0a 7d ));..........}......}..#endif..}
2b980 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 ....///.<summary>..///.Responsib
2b9a0 6c 65 20 63 72 65 61 74 69 6e 67 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 74 68 61 74 20 63 61 6e le.creating.an.instance.that.can
2b9c0 20 62 65 20 70 61 73 73 65 64 0d 0a 2f 2f 2f 20 74 6f 20 68 65 6c 70 65 72 20 63 6c 61 73 73 65 .be.passed..///.to.helper.classe
2b9e0 73 20 74 68 61 74 20 6e 65 65 64 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 20 54 65 78 74 54 72 s.that.need.to.access.the.TextTr
2ba00 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 2f 2f 2f 20 6d 65 6d 62 65 72 73 2e 20 20 49 74 20 61 ansformation..///.members...It.a
2ba20 63 63 65 73 73 65 73 20 6d 65 6d 62 65 72 20 62 79 20 6e 61 6d 65 20 61 6e 64 20 73 69 67 6e 61 ccesses.member.by.name.and.signa
2ba40 74 75 72 65 20 72 61 74 68 65 72 20 74 68 61 6e 0d 0a 2f 2f 2f 20 62 79 20 74 79 70 65 2e 20 20 ture.rather.than..///.by.type...
2ba60 54 68 69 73 20 69 73 20 6e 65 63 65 73 73 61 72 79 20 77 68 65 6e 20 74 68 65 0d 0a 2f 2f 2f 20 This.is.necessary.when.the..///.
2ba80 74 65 6d 70 6c 61 74 65 20 69 73 20 62 65 69 6e 67 20 75 73 65 64 20 69 6e 20 50 72 65 70 72 6f template.is.being.used.in.Prepro
2baa0 63 65 73 73 65 64 20 6d 6f 64 65 0d 0a 2f 2f 2f 20 61 6e 64 20 74 68 65 72 65 20 69 73 20 6e 6f cessed.mode..///.and.there.is.no
2bac0 20 63 6f 6d 6d 6f 6e 20 6b 6e 6f 77 6e 20 74 79 70 65 20 74 68 61 74 20 63 61 6e 20 62 65 0d 0a .common.known.type.that.can.be..
2bae0 2f 2f 2f 20 70 61 73 73 65 64 20 69 6e 73 74 65 61 64 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 ///.passed.instead..///.</summar
2bb00 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e y>..public.class.DynamicTextTran
2bb20 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 6f 62 6a 65 63 sformation..{......private.objec
2bb40 74 20 5f 69 6e 73 74 61 6e 63 65 3b 0d 0a 20 20 20 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 5f t._instance;......IDynamicHost._
2bb60 64 79 6e 61 6d 69 63 48 6f 73 74 3b 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 dynamicHost;........private.read
2bb80 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 6e 66 6f 20 5f 77 72 69 74 65 3b 0d 0a 20 20 20 20 70 72 69 only.MethodInfo._write;......pri
2bba0 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 6e 66 6f 20 5f 77 72 69 74 65 4c vate.readonly.MethodInfo._writeL
2bbc0 69 6e 65 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 50 72 6f 70 65 ine;......private.readonly.Prope
2bbe0 72 74 79 49 6e 66 6f 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 3b 0d rtyInfo._generationEnvironment;.
2bc00 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 50 72 6f 70 65 72 74 79 49 6e .....private.readonly.PropertyIn
2bc20 66 6f 20 5f 65 72 72 6f 72 73 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c fo._errors;......private.readonl
2bc40 79 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 5f 68 6f 73 74 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f y.PropertyInfo._host;........///
2bc60 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 6e 20 69 .<summary>......///.Creates.an.i
2bc80 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 nstance.of.the.DynamicTextTransf
2bca0 6f 72 6d 61 74 69 6f 6e 20 63 6c 61 73 73 20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 ormation.class.around.the.passed
2bcc0 20 69 6e 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 .in......///.TextTransformation.
2bce0 73 68 61 70 70 65 64 20 69 6e 73 74 61 6e 63 65 20 70 61 73 73 65 64 20 69 6e 2c 20 6f 72 20 69 shapped.instance.passed.in,.or.i
2bd00 66 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 2f 2f f.the.passed.in.instance......//
2bd20 2f 20 61 6c 72 65 61 64 79 20 69 73 20 61 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 /.already.is.a.DynamicTextTransf
2bd40 6f 72 6d 61 74 69 6f 6e 2c 20 69 74 20 63 61 73 74 73 20 69 74 20 61 6e 64 20 73 65 6e 64 73 20 ormation,.it.casts.it.and.sends.
2bd60 69 74 20 62 61 63 6b 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 it.back.......///.</summary>....
2bd80 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 ..public.static.DynamicTextTrans
2bda0 66 6f 72 6d 61 74 69 6f 6e 20 43 72 65 61 74 65 28 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 formation.Create(object.instance
2bdc0 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 73 74 61 6e 63 65 20 3d )......{..........if.(instance.=
2bde0 3d 20 6e 75 6c 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 =.null)..........{..............
2be00 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(
2be20 22 69 6e 73 74 61 6e 63 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 "instance");..........}.........
2be40 20 20 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 ...DynamicTextTransformation.tex
2be60 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 69 6e 73 74 61 6e 63 65 20 61 73 20 44 79 tTransformation.=.instance.as.Dy
2be80 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 namicTextTransformation;........
2bea0 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c ..if.(textTransformation.!=.null
2bec0 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e )..........{..............return
2bee0 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d .textTransformation;..........}.
2bf00 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 44 79 6e 61 6d 69 63 54 65 78 ...........return.new.DynamicTex
2bf20 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 28 69 6e 73 74 61 6e 63 65 29 3b 0d 0a 20 20 20 20 tTransformation(instance);......
2bf40 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e }........private.DynamicTextTran
2bf60 73 66 6f 72 6d 61 74 69 6f 6e 28 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 29 0d 0a 20 20 20 sformation(object.instance).....
2bf80 20 7b 0d 0a 20 20 20 20 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 6e 73 74 61 6e 63 65 .{.........._instance.=.instance
2bfa0 3b 0d 0a 20 20 20 20 20 20 20 20 54 79 70 65 20 74 79 70 65 20 3d 20 5f 69 6e 73 74 61 6e 63 65 ;..........Type.type.=._instance
2bfc0 2e 47 65 74 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 20 3d 20 74 79 .GetType();.........._write.=.ty
2bfe0 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 57 72 69 74 65 22 2c 20 6e 65 77 20 54 79 70 65 5b 5d pe.GetMethod("Write",.new.Type[]
2c000 20 7b 20 74 79 70 65 6f 66 28 73 74 72 69 6e 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f .{.typeof(string).});.........._
2c020 77 72 69 74 65 4c 69 6e 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 57 72 69 74 writeLine.=.type.GetMethod("Writ
2c040 65 4c 69 6e 65 22 2c 20 6e 65 77 20 54 79 70 65 5b 5d 20 7b 20 74 79 70 65 6f 66 28 73 74 72 69 eLine",.new.Type[].{.typeof(stri
2c060 6e 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 ng).});.........._generationEnvi
2c080 72 6f 6e 6d 65 6e 74 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 47 65 6e 65 ronment.=.type.GetProperty("Gene
2c0a0 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 22 2c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 rationEnvironment",.BindingFlags
2c0c0 2e 49 6e 73 74 61 6e 63 65 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 62 6c .Instance.|.BindingFlags.NonPubl
2c0e0 69 63 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 68 6f 73 74 20 3d 20 74 79 70 65 2e 47 65 74 50 72 ic);.........._host.=.type.GetPr
2c100 6f 70 65 72 74 79 28 22 48 6f 73 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 65 72 72 6f 72 73 operty("Host");.........._errors
2c120 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 45 72 72 6f 72 73 22 29 3b 0d 0a .=.type.GetProperty("Errors");..
2c140 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
2c160 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 ///.Gets.the.value.of.the.wrappe
2c180 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 47 d.TextTranformation.instance's.G
2c1a0 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 70 72 6f 70 65 72 74 79 0d 0a 20 enerationEnvironment.property...
2c1c0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 53 74 ...///.</summary>......public.St
2c1e0 72 69 6e 67 42 75 69 6c 64 65 72 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e ringBuilder.GenerationEnvironmen
2c200 74 20 7b 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 28 53 74 72 69 6e 67 42 75 69 6c 64 65 72 29 t.{.get.{.return.(StringBuilder)
2c220 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 47 65 74 56 61 6c 75 65 28 _generationEnvironment.GetValue(
2c240 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 75 6c 6c 29 3b 20 7d 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f _instance,.null);.}.}........///
2c260 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 76 61 6c .<summary>......///.Gets.the.val
2c280 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 ue.of.the.wrapped.TextTranformat
2c2a0 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 45 72 72 6f 72 73 20 70 72 6f 70 65 72 74 79 0d 0a ion.instance's.Errors.property..
2c2c0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 53 ....///.</summary>......public.S
2c2e0 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 ystem.CodeDom.Compiler.CompilerE
2c300 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 20 45 72 72 6f 72 73 20 7b 20 67 65 74 20 7b 20 72 65 rrorCollection.Errors.{.get.{.re
2c320 74 75 72 6e 20 28 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f turn.(System.CodeDom.Compiler.Co
2c340 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 29 5f 65 72 72 6f 72 73 2e 47 65 mpilerErrorCollection)_errors.Ge
2c360 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 75 6c 6c 29 3b 20 7d 20 7d 0d 0a 0d 0a tValue(_instance,.null);.}.}....
2c380 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 73 ....///.<summary>......///.Calls
2c3a0 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 .the.wrapped.TextTranformation.i
2c3c0 6e 73 74 61 6e 63 65 27 73 20 57 72 69 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 2f 2f 2f nstance's.Write.method.......///
2c3e0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 .</summary>......public.void.Wri
2c400 74 65 28 73 74 72 69 6e 67 20 74 65 78 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 te(string.text)......{..........
2c420 5f 77 72 69 74 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 65 77 20 6f 62 6a _write.Invoke(_instance,.new.obj
2c440 65 63 74 5b 5d 20 7b 20 74 65 78 74 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f ect[].{.text.});......}......../
2c460 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 73 20 74 68 65 20 //.<summary>......///.Calls.the.
2c480 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e wrapped.TextTranformation.instan
2c4a0 63 65 27 73 20 57 72 69 74 65 4c 69 6e 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 ce's.WriteLine.method.......///.
2c4c0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 </summary>......public.void.Writ
2c4e0 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 74 65 78 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 eLine(string.text)......{.......
2c500 20 20 20 5f 77 72 69 74 65 4c 69 6e 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 ..._writeLine.Invoke(_instance,.
2c520 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 20 74 65 78 74 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a new.object[].{.text.});......}..
2c540 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 ......///.<summary>......///.Get
2c560 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 s.the.value.of.the.wrapped.TextT
2c580 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 48 6f 73 74 20 70 72 6f ranformation.instance's.Host.pro
2c5a0 70 65 72 74 79 0d 0a 20 20 20 20 2f 2f 2f 20 69 66 20 61 76 61 69 6c 61 62 6c 65 20 28 73 68 6f perty......///.if.available.(sho
2c5c0 77 73 20 75 70 20 77 68 65 6e 20 68 6f 73 74 73 70 65 63 69 66 69 63 20 69 73 20 73 65 74 20 74 ws.up.when.hostspecific.is.set.t
2c5e0 6f 20 74 72 75 65 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 64 69 72 65 63 74 69 76 65 o.true.in.the.template.directive
2c600 29 20 61 6e 64 20 72 65 74 75 72 6e 73 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 61 70 70 72 6f ).and.returns......///.the.appro
2c620 70 72 69 61 74 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 6f 66 20 49 44 79 6e 61 6d 69 priate.implementation.of.IDynami
2c640 63 48 6f 73 74 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 20 70 cHost......///.</summary>......p
2c660 75 62 6c 69 63 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 48 6f 73 74 0d 0a 20 20 20 20 7b 0d 0a ublic.IDynamicHost.Host......{..
2c680 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ........get..........{..........
2c6a0 20 20 20 20 69 66 20 28 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 ....if.(_dynamicHost.==.null)...
2c6c0 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
2c6e0 28 5f 68 6f 73 74 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 (_host.==.null).................
2c700 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 64 79 6e 61 6d 69 63 .{......................_dynamic
2c720 48 6f 73 74 20 3d 20 6e 65 77 20 4e 75 6c 6c 48 6f 73 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 Host.=.new.NullHost();..........
2c740 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d ........}..................else.
2c760 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
2c780 20 20 20 20 20 20 20 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 20 6e 65 77 20 44 79 6e 61 6d ........_dynamicHost.=.new.Dynam
2c7a0 69 63 48 6f 73 74 28 5f 68 6f 73 74 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c icHost(_host.GetValue(_instance,
2c7c0 20 6e 75 6c 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 .null));..................}.....
2c7e0 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f .........}..............return._
2c800 64 79 6e 61 6d 69 63 48 6f 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a dynamicHost;..........}......}..
2c820 7d 0d 0a 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 70 6f 6e 73 }......///.<summary>..///.Repons
2c840 69 62 6c 65 20 66 6f 72 20 61 62 73 74 72 61 63 74 69 6e 67 20 74 68 65 20 75 73 65 20 6f 66 20 ible.for.abstracting.the.use.of.
2c860 48 6f 73 74 20 62 65 74 77 65 65 6e 20 74 69 6d 65 73 0d 0a 2f 2f 2f 20 77 68 65 6e 20 69 74 20 Host.between.times..///.when.it.
2c880 69 73 20 61 76 61 69 6c 61 62 6c 65 20 61 6e 64 20 6e 6f 74 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d is.available.and.not..///.</summ
2c8a0 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 69 6e 74 65 72 66 61 63 65 20 49 44 79 6e 61 6d 69 63 48 ary>..public.interface.IDynamicH
2c8c0 6f 73 74 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 20 2f ost..{......///.<summary>....../
2c8e0 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f //.An.abstracted.call.to.Microso
2c900 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 ft.VisualStudio.TextTemplating.I
2c920 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 TextTemplatingEngineHost.Resolve
2c940 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 ParameterValue......///.</summar
2c960 79 3e 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 y>......string.ResolveParameterV
2c980 61 6c 75 65 28 73 74 72 69 6e 67 20 69 64 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 73 74 72 alue(string.id,.string.name,.str
2c9a0 69 6e 67 20 6f 74 68 65 72 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ing.otherName);........///.<summ
2c9c0 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c ary>......///.An.abstracted.call
2c9e0 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 .to.Microsoft.VisualStudio.TextT
2ca00 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 emplating.ITextTemplatingEngineH
2ca20 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ost.ResolvePath......///.</summa
2ca40 72 79 3e 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 74 68 28 73 74 72 69 ry>......string.ResolvePath(stri
2ca60 6e 67 20 70 61 74 68 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a ng.path);........///.<summary>..
2ca80 20 20 20 20 2f 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 ....///.An.abstracted.call.to.Mi
2caa0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 crosoft.VisualStudio.TextTemplat
2cac0 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 ing.ITextTemplatingEngineHost.Te
2cae0 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a mplateFile......///.</summary>..
2cb00 20 20 20 20 73 74 72 69 6e 67 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 20 7b 20 67 65 74 3b 20 7d ....string.TemplateFile.{.get;.}
2cb20 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 ........///.<summary>......///.R
2cb40 65 74 75 72 6e 73 20 74 68 65 20 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 eturns.the.Host.instance.cast.as
2cb60 20 61 6e 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f .an.IServiceProvider......///.</
2cb80 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 41 summary>......IServiceProvider.A
2cba0 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c sIServiceProvider();..}....///.<
2cbc0 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 69 6d 70 summary>..///.Reponsible.for.imp
2cbe0 6c 65 6d 65 6e 74 69 6e 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 61 73 20 61 20 lementing.the.IDynamicHost.as.a.
2cc00 64 79 6e 61 6d 69 63 0d 0a 2f 2f 2f 20 73 68 61 70 65 20 77 72 61 70 70 65 72 20 6f 76 65 72 20 dynamic..///.shape.wrapper.over.
2cc20 74 68 65 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 the.Microsoft.VisualStudio.TextT
2cc40 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 emplating.ITextTemplatingEngineH
2cc60 6f 73 74 20 69 6e 74 65 72 66 61 63 65 0d 0a 2f 2f 2f 20 72 61 74 68 65 72 20 74 68 61 6e 20 74 ost.interface..///.rather.than.t
2cc80 79 70 65 20 64 65 70 65 6e 64 65 6e 74 20 77 72 61 70 70 65 72 2e 20 20 57 65 20 64 6f 6e 27 74 ype.dependent.wrapper...We.don't
2cca0 20 75 73 65 20 74 68 65 0d 0a 2f 2f 2f 20 69 6e 74 65 72 66 61 63 65 20 74 79 70 65 20 73 6f 20 .use.the..///.interface.type.so.
2ccc0 74 68 61 74 20 74 68 65 20 63 6f 64 65 20 63 61 6e 20 62 65 20 72 75 6e 20 69 6e 20 70 72 65 70 that.the.code.can.be.run.in.prep
2cce0 72 6f 63 65 73 73 65 64 20 6d 6f 64 65 0d 0a 2f 2f 2f 20 6f 6e 20 61 20 2e 6e 65 74 20 66 72 61 rocessed.mode..///.on.a..net.fra
2cd00 6d 65 77 6f 72 6b 20 6f 6e 6c 79 20 69 6e 73 74 61 6c 6c 65 64 20 6d 61 63 68 69 6e 65 2e 0d 0a mework.only.installed.machine...
2cd20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 44 79 6e ///.</summary>..public.class.Dyn
2cd40 61 6d 69 63 48 6f 73 74 20 3a 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 7b 0d 0a 20 20 20 20 amicHost.:.IDynamicHost..{......
2cd60 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 6f 62 6a 65 63 74 20 5f 69 6e 73 74 61 6e 63 private.readonly.object._instanc
2cd80 65 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 e;......private.readonly.MethodI
2cda0 6e 66 6f 20 5f 72 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 3b 0d 0a 20 20 20 nfo._resolveParameterValue;.....
2cdc0 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 6e 66 6f 20 5f 72 65 .private.readonly.MethodInfo._re
2cde0 73 6f 6c 76 65 50 61 74 68 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 solvePath;......private.readonly
2ce00 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 3b 0d 0a 0d 0a .PropertyInfo._templateFile;....
2ce20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 ....///.<summary>......///.Creat
2ce40 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 44 79 6e 61 6d 69 63 48 6f 73 es.an.instance.of.the.DynamicHos
2ce60 74 20 63 6c 61 73 73 20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 0d 0a 20 20 t.class.around.the.passed.in....
2ce80 20 20 2f 2f 2f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 ..///.Microsoft.VisualStudio.Tex
2cea0 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e tTemplating.ITextTemplatingEngin
2cec0 65 48 6f 73 74 20 73 68 61 70 70 65 64 20 69 6e 73 74 61 6e 63 65 20 70 61 73 73 65 64 20 69 6e eHost.shapped.instance.passed.in
2cee0 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 20 70 75 62 6c 69 .......///.</summary>......publi
2cf00 63 20 44 79 6e 61 6d 69 63 48 6f 73 74 28 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 29 0d 0a c.DynamicHost(object.instance)..
2cf20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 6e 73 74 61 ....{.........._instance.=.insta
2cf40 6e 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 54 79 70 65 20 74 79 70 65 20 3d 20 5f 69 6e 73 74 61 nce;..........Type.type.=._insta
2cf60 6e 63 65 2e 47 65 74 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 73 6f 6c 76 65 nce.GetType();.........._resolve
2cf80 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 ParameterValue.=.type.GetMethod(
2cfa0 22 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 22 2c 20 6e 65 77 20 54 79 70 "ResolveParameterValue",.new.Typ
2cfc0 65 5b 5d 20 7b 20 74 79 70 65 6f 66 28 73 74 72 69 6e 67 29 2c 20 74 79 70 65 6f 66 28 73 74 72 e[].{.typeof(string),.typeof(str
2cfe0 69 6e 67 29 2c 20 74 79 70 65 6f 66 28 73 74 72 69 6e 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 ing),.typeof(string).});........
2d000 20 20 5f 72 65 73 6f 6c 76 65 50 61 74 68 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 .._resolvePath.=.type.GetMethod(
2d020 22 52 65 73 6f 6c 76 65 50 61 74 68 22 2c 20 6e 65 77 20 54 79 70 65 5b 5d 20 7b 20 74 79 70 65 "ResolvePath",.new.Type[].{.type
2d040 6f 66 28 73 74 72 69 6e 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 6d 70 6c 61 74 of(string).});.........._templat
2d060 65 46 69 6c 65 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 54 65 6d 70 6c 61 eFile.=.type.GetProperty("Templa
2d080 74 65 46 69 6c 65 22 29 3b 0d 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 teFile");........}........///.<s
2d0a0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f ummary>......///.A.call.to.Micro
2d0c0 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 soft.VisualStudio.TextTemplating
2d0e0 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c .ITextTemplatingEngineHost.Resol
2d100 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d veParameterValue......///.</summ
2d120 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 ary>......public.string.ResolveP
2d140 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 73 74 72 69 6e 67 20 69 64 2c 20 73 74 72 69 6e 67 20 arameterValue(string.id,.string.
2d160 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 6f 74 68 65 72 4e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a name,.string.otherName)......{..
2d180 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 73 74 72 69 6e 67 29 5f 72 65 73 6f 6c 76 65 50 ........return.(string)_resolveP
2d1a0 61 72 61 6d 65 74 65 72 56 61 6c 75 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 arameterValue.Invoke(_instance,.
2d1c0 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 20 69 64 2c 20 6e 61 6d 65 2c 20 6f 74 68 65 72 4e 61 new.object[].{.id,.name,.otherNa
2d1e0 6d 65 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 me.});......}........///.<summar
2d200 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e y>......///.A.call.to.Microsoft.
2d220 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 VisualStudio.TextTemplating.ITex
2d240 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 tTemplatingEngineHost.ResolvePat
2d260 68 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 20 70 75 62 6c 69 h......///.</summary>......publi
2d280 63 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 74 68 28 73 74 72 69 6e 67 20 70 61 74 68 c.string.ResolvePath(string.path
2d2a0 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 73 74 72 69 6e 67 )......{..........return.(string
2d2c0 29 5f 72 65 73 6f 6c 76 65 50 61 74 68 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 )_resolvePath.Invoke(_instance,.
2d2e0 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 20 70 61 74 68 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a new.object[].{.path.});......}..
2d300 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 63 ......///.<summary>......///.A.c
2d320 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 all.to.Microsoft.VisualStudio.Te
2d340 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 xtTemplating.ITextTemplatingEngi
2d360 6e 65 48 6f 73 74 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 neHost.TemplateFile......///.</s
2d380 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 54 65 6d 70 6c ummary>......public.string.Templ
2d3a0 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 ateFile......{..........get.....
2d3c0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 73 74 72 69 .....{..............return.(stri
2d3e0 6e 67 29 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 ng)_templateFile.GetValue(_insta
2d400 6e 63 65 2c 20 6e 75 6c 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d nce,.null);..........}......}...
2d420 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 .....///.<summary>......///.Retu
2d440 72 6e 73 20 74 68 65 20 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e rns.the.Host.instance.cast.as.an
2d460 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d .IServiceProvider......///.</sum
2d480 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 mary>......public.IServiceProvid
2d4a0 65 72 20 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 7b 0d 0a er.AsIServiceProvider()......{..
2d4c0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f 69 6e 73 74 61 6e 63 65 20 61 73 20 49 53 65 72 ........return._instance.as.ISer
2d4e0 76 69 63 65 50 72 6f 76 69 64 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c viceProvider;......}..}....///.<
2d500 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 69 6d 70 summary>..///.Reponsible.for.imp
2d520 6c 65 6d 65 6e 74 69 6e 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 77 68 65 6e 20 lementing.the.IDynamicHost.when.
2d540 74 68 65 0d 0a 2f 2f 2f 20 48 6f 73 74 20 70 72 6f 70 65 72 74 79 20 69 73 20 6e 6f 74 20 61 76 the..///.Host.property.is.not.av
2d560 61 69 6c 61 62 6c 65 20 6f 6e 20 74 68 65 20 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 20 74 79 ailable.on.the.TextTemplating.ty
2d580 70 65 2e 20 54 68 65 20 48 6f 73 74 0d 0a 2f 2f 2f 20 70 72 6f 70 65 72 74 79 20 6f 6e 6c 79 20 pe..The.Host..///.property.only.
2d5a0 65 78 69 73 74 73 20 77 68 65 6e 20 74 68 65 20 68 6f 73 74 73 70 65 63 69 66 69 63 20 61 74 74 exists.when.the.hostspecific.att
2d5c0 72 69 62 75 74 65 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 0d 0a 2f 2f 2f 20 64 69 72 65 ribute.of.the.template..///.dire
2d5e0 63 74 69 76 65 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d ctive.is.set.to.true...///.</sum
2d600 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4e 75 6c 6c 48 6f 73 74 20 3a 20 49 mary>..public.class.NullHost.:.I
2d620 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 DynamicHost..{......///.<summary
2d640 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 >......///.An.abstraction.of.the
2d660 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e .call.to.Microsoft.VisualStudio.
2d680 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e TextTemplating.ITextTemplatingEn
2d6a0 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a gineHost.ResolveParameterValue..
2d6c0 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 73 69 6d 70 6c 79 20 72 65 74 75 6e 73 20 6e 75 6c 6c 2e ....///.that.simply.retuns.null.
2d6e0 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 20 70 75 62 6c 69 63 ......///.</summary>......public
2d700 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 73 74 .string.ResolveParameterValue(st
2d720 72 69 6e 67 20 69 64 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 6f 74 68 ring.id,.string.name,.string.oth
2d740 65 72 4e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e erName)......{..........return.n
2d760 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ull;......}........///.<summary>
2d780 0d 0a 20 20 20 20 2f 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 ......///.An.abstraction.of.the.
2d7a0 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 call.to.Microsoft.VisualStudio.T
2d7c0 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 extTemplating.ITextTemplatingEng
2d7e0 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 ineHost.ResolvePath......///.tha
2d800 74 20 73 69 6d 70 6c 79 20 72 65 74 75 6e 73 20 74 68 65 20 70 61 74 68 20 70 61 73 73 65 64 20 t.simply.retuns.the.path.passed.
2d820 69 6e 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 20 70 75 62 in.......///.</summary>......pub
2d840 6c 69 63 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 74 68 28 73 74 72 69 6e 67 20 70 61 lic.string.ResolvePath(string.pa
2d860 74 68 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 61 74 68 3b th)......{..........return.path;
2d880 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
2d8a0 20 20 2f 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c ..///.An.abstraction.of.the.call
2d8c0 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 .to.Microsoft.VisualStudio.TextT
2d8e0 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 emplating.ITextTemplatingEngineH
2d900 6f 73 74 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 72 ost.TemplateFile......///.that.r
2d920 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e eturns.null.......///.</summary>
2d940 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 ......public.string.TemplateFile
2d960 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d ......{..........get..........{.
2d980 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 .............return.null;.......
2d9a0 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ...}......}........///.<summary>
2d9c0 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f 2f ......///.Returns.null.......///
2d9e0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 53 65 72 76 69 63 65 .</summary>......public.IService
2da00 50 72 6f 76 69 64 65 72 20 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 Provider.AsIServiceProvider()...
2da20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 ...{..........return.null;......
2da40 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f }..}....///.<summary>..///.Respo
2da60 6e 73 69 62 6c 65 20 66 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 69 6e 67 20 74 68 65 20 63 6f 6e nsible.for.encapsulating.the.con
2da80 73 74 61 6e 74 73 20 64 65 66 69 6e 65 64 20 69 6e 20 4d 65 74 61 64 61 74 61 0d 0a 2f 2f 2f 20 stants.defined.in.Metadata..///.
2daa0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 </summary>..public.static.class.
2dac0 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 MetadataConstants..{......public
2dae0 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 43 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 3d 20 22 .const.string.CSDL_EXTENSION.=."
2db00 2e 63 73 64 6c 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 .csdl";........public.const.stri
2db20 6e 67 20 43 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 3d 20 22 43 6f 6e ng.CSDL_EDMX_SECTION_NAME.=."Con
2db40 63 65 70 74 75 61 6c 4d 6f 64 65 6c 73 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 ceptualModels";......public.cons
2db60 74 20 73 74 72 69 6e 67 20 43 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 t.string.CSDL_ROOT_ELEMENT_NAME.
2db80 3d 20 22 53 63 68 65 6d 61 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 =."Schema";......public.const.st
2dba0 72 69 6e 67 20 45 44 4d 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 3d 20 22 68 74 74 ring.EDM_ANNOTATION_09_02.=."htt
2dbc0 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 p://schemas.microsoft.com/ado/20
2dbe0 30 39 2f 30 32 2f 65 64 6d 2f 61 6e 6e 6f 74 61 74 69 6f 6e 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 09/02/edm/annotation";........pu
2dc00 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 53 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e blic.const.string.SSDL_EXTENSION
2dc20 20 3d 20 22 2e 73 73 64 6c 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 .=.".ssdl";........public.const.
2dc40 73 74 72 69 6e 67 20 53 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 3d 20 string.SSDL_EDMX_SECTION_NAME.=.
2dc60 22 53 74 6f 72 61 67 65 4d 6f 64 65 6c 73 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e "StorageModels";......public.con
2dc80 73 74 20 73 74 72 69 6e 67 20 53 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 st.string.SSDL_ROOT_ELEMENT_NAME
2dca0 20 3d 20 22 53 63 68 65 6d 61 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 .=."Schema";........public.const
2dcc0 20 73 74 72 69 6e 67 20 4d 53 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 3d 20 22 2e 6d 73 6c 22 3b 0d .string.MSL_EXTENSION.=.".msl";.
2dce0 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 4d 53 4c 5f 45 .......public.const.string.MSL_E
2dd00 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 3d 20 22 4d 61 70 70 69 6e 67 73 22 3b 0d 0a DMX_SECTION_NAME.=."Mappings";..
2dd20 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 4d 53 4c 5f 52 4f 4f 54 ....public.const.string.MSL_ROOT
2dd40 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 3d 20 22 4d 61 70 70 69 6e 67 22 3b 0d 0a 0d 0a 20 20 _ELEMENT_NAME.=."Mapping";......
2dd60 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 54 54 5f 54 45 4d 50 4c 41 54 ..public.const.string.TT_TEMPLAT
2dd80 45 5f 4e 41 4d 45 20 3d 20 22 54 65 6d 70 6c 61 74 65 4e 61 6d 65 22 3b 0d 0a 20 20 20 20 70 75 E_NAME.=."TemplateName";......pu
2dda0 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 blic.const.string.TT_TEMPLATE_VE
2ddc0 52 53 49 4f 4e 20 3d 20 22 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 22 3b 0d 0a 20 20 20 20 RSION.=."TemplateVersion";......
2dde0 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 54 54 5f 4d 49 4e 49 4d 55 4d 5f 45 public.const.string.TT_MINIMUM_E
2de00 4e 54 49 54 59 5f 46 52 41 4d 45 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 20 3d 20 22 4d 69 6e 69 6d NTITY_FRAMEWORK_VERSION.=."Minim
2de20 75 6d 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f 6e 22 3b 0d 0a 0d 0a 20 20 umEntityFrameworkVersion";......
2de40 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 44 45 46 41 55 4c 54 5f 54 45 ..public.const.string.DEFAULT_TE
2de60 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 20 3d 20 22 34 2e 30 22 3b 0d 0a 0d 0a 20 20 20 20 70 MPLATE_VERSION.=."4.0";........p
2de80 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 53 63 68 65 6d 61 43 6f 6e 73 ublic.static.readonly.SchemaCons
2dea0 74 61 6e 74 73 20 56 31 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 3d 20 6e 65 77 20 tants.V1_SCHEMA_CONSTANTS.=.new.
2dec0 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a SchemaConstants(.........."http:
2dee0 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 37 //schemas.microsoft.com/ado/2007
2df00 2f 30 36 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 /06/edmx",.........."http://sche
2df20 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 mas.microsoft.com/ado/2006/04/ed
2df40 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 m",.........."http://schemas.mic
2df60 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 6d 2f 73 73 64 6c 22 rosoft.com/ado/2006/04/edm/ssdl"
2df80 2c 0d 0a 20 20 20 20 20 20 20 20 22 75 72 6e 3a 73 63 68 65 6d 61 73 2d 6d 69 63 72 6f 73 6f 66 ,.........."urn:schemas-microsof
2dfa0 74 2d 63 6f 6d 3a 77 69 6e 64 6f 77 73 3a 73 74 6f 72 61 67 65 3a 6d 61 70 70 69 6e 67 3a 43 53 t-com:windows:storage:mapping:CS
2dfc0 22 2c 0d 0a 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 72 73 69 6f 6e 28 22 33 2e 35 22 29 29 3b ",..........new.Version("3.5"));
2dfe0 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 53 ........public.static.readonly.S
2e000 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e chemaConstants.V2_SCHEMA_CONSTAN
2e020 54 53 20 3d 20 6e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 TS.=.new.SchemaConstants(.......
2e040 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d ..."http://schemas.microsoft.com
2e060 2f 61 64 6f 2f 32 30 30 38 2f 31 30 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 /ado/2008/10/edmx",.........."ht
2e080 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 tp://schemas.microsoft.com/ado/2
2e0a0 30 30 38 2f 30 39 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 008/09/edm",.........."http://sc
2e0c0 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 30 32 2f hemas.microsoft.com/ado/2009/02/
2e0e0 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 edm/ssdl",.........."http://sche
2e100 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 30 39 2f 6d 61 mas.microsoft.com/ado/2008/09/ma
2e120 70 70 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 72 73 69 6f 6e 28 pping/cs",..........new.Version(
2e140 22 34 2e 30 22 29 29 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 "4.0"));........public.static.re
2e160 61 64 6f 6e 6c 79 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 56 33 5f 53 43 48 45 4d 41 adonly.SchemaConstants.V3_SCHEMA
2e180 5f 43 4f 4e 53 54 41 4e 54 53 20 3d 20 6e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 _CONSTANTS.=.new.SchemaConstants
2e1a0 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f (.........."http://schemas.micro
2e1c0 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 soft.com/ado/2009/11/edmx",.....
2e1e0 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 ....."http://schemas.microsoft.c
2e200 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 om/ado/2009/11/edm",.........."h
2e220 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f ttp://schemas.microsoft.com/ado/
2e240 32 30 30 39 2f 31 31 2f 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 2009/11/edm/ssdl",.........."htt
2e260 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 p://schemas.microsoft.com/ado/20
2e280 30 39 2f 31 31 2f 6d 61 70 70 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 6e 65 77 20 09/11/mapping/cs",..........new.
2e2a0 56 65 72 73 69 6f 6e 28 22 35 2e 30 22 29 29 3b 0d 0a 7d 0d 0a 0d 0a 70 75 62 6c 69 63 20 73 74 Version("5.0"));..}....public.st
2e2c0 72 75 63 74 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 ruct.SchemaConstants..{......pub
2e2e0 6c 69 63 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 73 74 72 69 6e 67 20 65 64 6d 78 4e lic.SchemaConstants(string.edmxN
2e300 61 6d 65 73 70 61 63 65 2c 20 73 74 72 69 6e 67 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 2c 20 amespace,.string.csdlNamespace,.
2e320 73 74 72 69 6e 67 20 73 73 64 6c 4e 61 6d 65 73 70 61 63 65 2c 20 73 74 72 69 6e 67 20 6d 73 6c string.ssdlNamespace,.string.msl
2e340 4e 61 6d 65 73 70 61 63 65 2c 20 56 65 72 73 69 6f 6e 20 6d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 Namespace,.Version.minimumTempla
2e360 74 65 56 65 72 73 69 6f 6e 29 20 3a 20 74 68 69 73 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 teVersion).:.this()......{......
2e380 20 20 20 20 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 3d 20 65 64 6d 78 4e 61 6d 65 73 70 61 63 ....EdmxNamespace.=.edmxNamespac
2e3a0 65 3b 0d 0a 20 20 20 20 20 20 20 20 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 63 73 64 6c e;..........CsdlNamespace.=.csdl
2e3c0 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 53 73 64 6c 4e 61 6d 65 73 70 61 63 Namespace;..........SsdlNamespac
2e3e0 65 20 3d 20 73 73 64 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 4d 73 6c 4e e.=.ssdlNamespace;..........MslN
2e400 61 6d 65 73 70 61 63 65 20 3d 20 6d 73 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 amespace.=.mslNamespace;........
2e420 20 20 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 6d 69 6e 69 6d ..MinimumTemplateVersion.=.minim
2e440 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 umTemplateVersion;......}.......
2e460 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 7b 20 67 .public.string.EdmxNamespace.{.g
2e480 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 et;.private.set;.}......public.s
2e4a0 74 72 69 6e 67 20 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 7b 20 67 65 74 3b 20 70 72 69 76 61 tring.CsdlNamespace.{.get;.priva
2e4c0 74 65 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 73 64 te.set;.}......public.string.Ssd
2e4e0 6c 4e 61 6d 65 73 70 61 63 65 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d lNamespace.{.get;.private.set;.}
2e500 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 4d 73 6c 4e 61 6d 65 73 70 61 63 65 ......public.string.MslNamespace
2e520 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c .{.get;.private.set;.}......publ
2e540 69 63 20 56 65 72 73 69 6f 6e 20 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f ic.Version.MinimumTemplateVersio
2e560 6e 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 7d 0d 0a 0a 0a 20 20 n.{.get;.private.set;.}..}......
2e580 20 20 7d 0d 0a 0a 0a 20 20 20 20 23 72 65 67 69 6f 6e 20 42 61 73 65 20 63 6c 61 73 73 0d 0a 20 ..}........#region.Base.class...
2e5a0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 42 61 73 65 20 63 ...///.<summary>......///.Base.c
2e5c0 6c 61 73 73 20 66 6f 72 20 74 68 69 73 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 lass.for.this.transformation....
2e5e0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 5b 67 6c 6f 62 61 6c 3a 3a 53 ..///.</summary>......[global::S
2e600 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 65 6e 65 72 61 74 65 64 ystem.CodeDom.Compiler.Generated
2e620 43 6f 64 65 41 74 74 72 69 62 75 74 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 CodeAttribute("Microsoft.VisualS
2e640 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 22 2c 20 22 31 31 2e 30 2e 30 2e 30 tudio.TextTemplating",."11.0.0.0
2e660 22 29 5d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 43 53 68 61 72 70 43 6f 64 65 ")]......public.class.CSharpCode
2e680 47 65 6e 54 65 6d 70 6c 61 74 65 42 61 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 GenTemplateBase......{..........
2e6a0 23 72 65 67 69 6f 6e 20 46 69 65 6c 64 73 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 #region.Fields..........private.
2e6c0 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 global::System.Text.StringBuilde
2e6e0 72 20 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 3b 0d 0a 20 r.generationEnvironmentField;...
2e700 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f .......private.global::System.Co
2e720 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c deDom.Compiler.CompilerErrorColl
2e740 65 63 74 69 6f 6e 20 65 72 72 6f 72 73 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 ection.errorsField;..........pri
2e760 76 61 74 65 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e vate.global::System.Collections.
2e780 47 65 6e 65 72 69 63 2e 4c 69 73 74 3c 69 6e 74 3e 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 Generic.List<int>.indentLengthsF
2e7a0 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 63 75 ield;..........private.string.cu
2e7c0 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 22 22 3b 0d 0a 20 20 20 20 20 20 20 20 rrentIndentField.=."";..........
2e7e0 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 3b 0d 0a 20 private.bool.endsWithNewline;...
2e800 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f .......private.global::System.Co
2e820 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 llections.Generic.IDictionary<st
2e840 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 20 73 65 73 73 69 6f 6e 46 69 65 6c 64 3b 0d 0a 20 20 20 ring,.object>.sessionField;.....
2e860 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e .....#endregion..........#region
2e880 20 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 .Properties..........///.<summar
2e8a0 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 73 74 72 69 6e 67 20 62 75 69 6c 64 y>..........///.The.string.build
2e8c0 65 72 20 74 68 61 74 20 67 65 6e 65 72 61 74 69 6f 6e 2d 74 69 6d 65 20 63 6f 64 65 20 69 73 20 er.that.generation-time.code.is.
2e8e0 75 73 69 6e 67 20 74 6f 20 61 73 73 65 6d 62 6c 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 using.to.assemble.generated.outp
2e900 75 74 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 ut..........///.</summary>......
2e920 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 ....protected.System.Text.String
2e940 42 75 69 6c 64 65 72 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 0d 0a 20 Builder.GenerationEnvironment...
2e960 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 .......{..............get.......
2e980 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 28 28 74 .......{..................if.((t
2e9a0 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 3d his.generationEnvironmentField.=
2e9c0 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 =.null))..................{.....
2e9e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e .................this.generation
2ea00 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 EnvironmentField.=.new.global::S
2ea20 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 ystem.Text.StringBuilder();.....
2ea40 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 .............}..................
2ea60 72 65 74 75 72 6e 20 74 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e return.this.generationEnvironmen
2ea80 74 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 tField;..............}..........
2eaa0 20 20 20 20 73 65 74 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 ....set..............{..........
2eac0 20 20 20 20 20 20 20 20 74 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 ........this.generationEnvironme
2eae0 6e 74 46 69 65 6c 64 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ntField.=.value;..............}.
2eb00 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 .........}..........///.<summary
2eb20 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 65 72 72 6f 72 20 63 6f 6c 6c 65 63 74 >..........///.The.error.collect
2eb40 69 6f 6e 20 66 6f 72 20 74 68 65 20 67 65 6e 65 72 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 0d 0a ion.for.the.generation.process..
2eb60 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>..........
2eb80 70 75 62 6c 69 63 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 public.System.CodeDom.Compiler.C
2eba0 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 20 45 72 72 6f 72 73 0d 0a 20 ompilerErrorCollection.Errors...
2ebc0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 .......{..............get.......
2ebe0 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 28 28 74 .......{..................if.((t
2ec00 68 69 73 2e 65 72 72 6f 72 73 46 69 65 6c 64 20 3d 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 20 20 his.errorsField.==.null)).......
2ec20 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 ...........{....................
2ec40 20 20 74 68 69 73 2e 65 72 72 6f 72 73 46 69 65 6c 64 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a ..this.errorsField.=.new.global:
2ec60 3a 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 :System.CodeDom.Compiler.Compile
2ec80 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rErrorCollection();.............
2eca0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 .....}..................return.t
2ecc0 68 69 73 2e 65 72 72 6f 72 73 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d his.errorsField;..............}.
2ece0 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 .........}..........///.<summary
2ed00 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 20 6c 69 73 74 20 6f 66 20 74 68 65 20 6c 65 6e >..........///.A.list.of.the.len
2ed20 67 74 68 73 20 6f 66 20 65 61 63 68 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 61 73 20 61 64 64 gths.of.each.indent.that.was.add
2ed40 65 64 20 77 69 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ed.with.PushIndent..........///.
2ed60 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 53 79 73 74 </summary>..........private.Syst
2ed80 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 4c 69 73 74 3c 69 6e 74 3e em.Collections.Generic.List<int>
2eda0 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .indentLengths..........{.......
2edc0 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .......get..............{.......
2ede0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 ...........if.((this.indentLengt
2ee00 68 73 46 69 65 6c 64 20 3d 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 hsField.==.null))...............
2ee20 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 74 68 69 73 2e 69 ...{......................this.i
2ee40 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a ndentLengthsField.=.new.global::
2ee60 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 2e 4c 69 73 74 3c System.Collections.Generic.List<
2ee80 69 6e 74 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 int>();..................}......
2eea0 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 ............return.this.indentLe
2eec0 6e 67 74 68 73 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ngthsField;..............}......
2eee0 20 20 20 20 7d 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 ....}..........///.<summary>....
2ef00 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e ......///.Gets.the.current.inden
2ef20 74 20 77 65 20 75 73 65 20 77 68 65 6e 20 61 64 64 69 6e 67 20 6c 69 6e 65 73 20 74 6f 20 74 68 t.we.use.when.adding.lines.to.th
2ef40 65 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e e.output..........///.</summary>
2ef60 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 75 72 72 65 6e 74 49 ..........public.string.CurrentI
2ef80 6e 64 65 6e 74 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 67 65 ndent..........{..............ge
2efa0 74 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 t..............{................
2efc0 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 ..return.this.currentIndentField
2efe0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ;..............}..........}.....
2f000 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 20 .....///.<summary>..........///.
2f020 43 75 72 72 65 6e 74 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 65 73 73 69 6f 6e 0d 0a Current.transformation.session..
2f040 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>..........
2f060 70 75 62 6c 69 63 20 76 69 72 74 75 61 6c 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f public.virtual.global::System.Co
2f080 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 llections.Generic.IDictionary<st
2f0a0 72 69 6e 67 2c 20 6f 62 6a 65 63 74 3e 20 53 65 73 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b ring,.object>.Session..........{
2f0c0 0d 0a 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 20 20 20 7b ..............get..............{
2f0e0 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 2e 73 65 ..................return.this.se
2f100 73 73 69 6f 6e 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ssionField;..............}......
2f120 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ........set..............{......
2f140 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 73 65 73 73 69 6f 6e 46 69 65 6c 64 20 3d 20 ............this.sessionField.=.
2f160 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d value;..............}..........}
2f180 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 72 ..........#endregion..........#r
2f1a0 65 67 69 6f 6e 20 54 72 61 6e 73 66 6f 72 6d 2d 74 69 6d 65 20 68 65 6c 70 65 72 73 0d 0a 20 20 egion.Transform-time.helpers....
2f1c0 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>..........///
2f1e0 20 57 72 69 74 65 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 .Write.text.directly.into.the.ge
2f200 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 nerated.output..........///.</su
2f220 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 mmary>..........public.void.Writ
2f240 65 28 73 74 72 69 6e 67 20 74 65 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 e(string.textToAppend)..........
2f260 7b 0d 0a 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 {..............if.(string.IsNull
2f280 4f 72 45 6d 70 74 79 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 29 0d 0a 20 20 20 20 20 20 20 20 OrEmpty(textToAppend))..........
2f2a0 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 3b 0d 0a ....{..................return;..
2f2c0 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 2f 2f 20 49 66 ............}..............//.If
2f2e0 20 77 65 27 72 65 20 73 74 61 72 74 69 6e 67 20 6f 66 66 2c 20 6f 72 20 69 66 20 74 68 65 20 70 .we're.starting.off,.or.if.the.p
2f300 72 65 76 69 6f 75 73 20 74 65 78 74 20 65 6e 64 65 64 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e revious.text.ended.with.a.newlin
2f320 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 68 61 76 65 20 74 6f 20 61 70 e,..............//.we.have.to.ap
2f340 70 65 6e 64 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 66 69 72 73 74 2e 0d 0a pend.the.current.indent.first...
2f360 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 28 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f ............if.(((this.Generatio
2f380 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 20 0d 0a 20 20 20 20 nEnvironment.Length.==.0).......
2f3a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 74 68 69 73 2e 65 6e 64 73 ....................||.this.ends
2f3c0 57 69 74 68 4e 65 77 6c 69 6e 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 WithNewline))..............{....
2f3e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 ..............this.GenerationEnv
2f400 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 ironment.Append(this.currentInde
2f420 6e 74 46 69 65 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ntField);..................this.
2f440 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 endsWithNewline.=.false;........
2f460 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 ......}..............//.Check.if
2f480 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 65 78 74 20 65 6e 64 73 20 77 69 74 68 20 61 20 6e 65 .the.current.text.ends.with.a.ne
2f4a0 77 6c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 6f 41 70 70 wline..............if.(textToApp
2f4c0 65 6e 64 2e 45 6e 64 73 57 69 74 68 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 45 6e 76 69 end.EndsWith(global::System.Envi
2f4e0 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e ronment.NewLine,.global::System.
2f500 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 29 StringComparison.CurrentCulture)
2f520 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 )..............{................
2f540 20 20 74 68 69 73 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 3b 0d 0a ..this.endsWithNewline.=.true;..
2f560 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 2f 2f 20 54 68 ............}..............//.Th
2f580 69 73 20 69 73 20 61 6e 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 49 66 20 74 68 65 20 63 75 is.is.an.optimization..If.the.cu
2f5a0 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 69 73 20 22 22 2c 20 74 68 65 6e 20 77 65 20 64 6f 6e 27 rrent.indent.is."",.then.we.don'
2f5c0 74 20 68 61 76 65 20 74 6f 20 64 6f 20 61 6e 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f t.have.to.do.any..............//
2f5e0 20 6f 66 20 74 68 65 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 20 73 74 75 66 66 20 66 75 72 74 68 .of.the.more.complex.stuff.furth
2f600 65 72 20 64 6f 77 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e er.down...............if.((this.
2f620 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 29 currentIndentField.Length.==.0))
2f640 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 ..............{.................
2f660 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 .this.GenerationEnvironment.Appe
2f680 6e 64 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nd(textToAppend);...............
2f6a0 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 ...return;..............}.......
2f6c0 20 20 20 20 20 20 20 2f 2f 20 45 76 65 72 79 77 68 65 72 65 20 74 68 65 72 65 20 69 73 20 61 20 .......//.Everywhere.there.is.a.
2f6e0 6e 65 77 6c 69 6e 65 20 69 6e 20 74 68 65 20 74 65 78 74 2c 20 61 64 64 20 61 6e 20 69 6e 64 65 newline.in.the.text,.add.an.inde
2f700 6e 74 20 61 66 74 65 72 20 69 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 54 6f 41 nt.after.it..............textToA
2f720 70 70 65 6e 64 20 3d 20 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 52 65 70 6c 61 63 65 28 67 6c 6f ppend.=.textToAppend.Replace(glo
2f740 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c bal::System.Environment.NewLine,
2f760 20 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 .(global::System.Environment.New
2f780 4c 69 6e 65 20 2b 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 29 29 Line.+.this.currentIndentField))
2f7a0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 74 65 78 74 20 65 6e ;..............//.If.the.text.en
2f7c0 64 73 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 2c 20 74 68 65 6e 20 77 65 20 73 68 6f 75 6c ds.with.a.newline,.then.we.shoul
2f7e0 64 20 73 74 72 69 70 20 6f 66 66 20 74 68 65 20 69 6e 64 65 6e 74 20 61 64 64 65 64 20 61 74 20 d.strip.off.the.indent.added.at.
2f800 74 68 65 20 76 65 72 79 20 65 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 65 63 the.very.end..............//.bec
2f820 61 75 73 65 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 69 6e 64 65 6e 74 20 77 69 6c 6c ause.the.appropriate.indent.will
2f840 20 62 65 20 61 64 64 65 64 20 77 68 65 6e 20 74 68 65 20 6e 65 78 74 20 74 69 6d 65 20 57 72 69 .be.added.when.the.next.time.Wri
2f860 74 65 28 29 20 69 73 20 63 61 6c 6c 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 te().is.called..............if.(
2f880 74 68 69 73 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 29 0d 0a 20 20 20 20 20 20 20 20 20 this.endsWithNewline)...........
2f8a0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 ...{..................this.Gener
2f8c0 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 78 74 54 6f 41 70 ationEnvironment.Append(textToAp
2f8e0 70 65 6e 64 2c 20 30 2c 20 28 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 4c 65 6e 67 74 68 20 2d 20 pend,.0,.(textToAppend.Length.-.
2f900 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 29 29 this.currentIndentField.Length))
2f920 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c ;..............}..............el
2f940 73 65 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 se..............{...............
2f960 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 ...this.GenerationEnvironment.Ap
2f980 70 65 6e 64 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 pend(textToAppend);.............
2f9a0 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d .}..........}..........///.<summ
2f9c0 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 72 69 74 65 20 74 65 78 74 20 64 69 72 ary>..........///.Write.text.dir
2f9e0 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d ectly.into.the.generated.output.
2fa00 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 20 .........///.</summary>.........
2fa20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 74 65 .public.void.WriteLine(string.te
2fa40 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 xtToAppend)..........{..........
2fa60 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 3b 0d 0a 20 ....this.Write(textToAppend);...
2fa80 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f ...........this.GenerationEnviro
2faa0 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 4c 69 6e 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nment.AppendLine();.............
2fac0 20 74 68 69 73 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 3b 0d 0a 20 .this.endsWithNewline.=.true;...
2fae0 20 20 20 20 20 20 20 7d 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>.
2fb00 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 72 69 74 65 20 66 6f 72 6d 61 74 74 65 64 20 74 65 78 .........///.Write.formatted.tex
2fb20 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 t.directly.into.the.generated.ou
2fb40 74 70 75 74 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 tput..........///.</summary>....
2fb60 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 28 73 74 72 69 6e 67 20 66 ......public.void.Write(string.f
2fb80 6f 72 6d 61 74 2c 20 70 61 72 61 6d 73 20 6f 62 6a 65 63 74 5b 5d 20 61 72 67 73 29 0d 0a 20 20 ormat,.params.object[].args)....
2fba0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ......{..............this.Write(
2fbc0 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 47 6c 6f string.Format(global::System.Glo
2fbe0 62 61 6c 69 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 balization.CultureInfo.CurrentCu
2fc00 6c 74 75 72 65 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 lture,.format,.args));..........
2fc20 7d 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 }..........///.<summary>........
2fc40 20 20 2f 2f 2f 20 57 72 69 74 65 20 66 6f 72 6d 61 74 74 65 64 20 74 65 78 74 20 64 69 72 65 63 ..///.Write.formatted.text.direc
2fc60 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 tly.into.the.generated.output...
2fc80 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 70 .......///.</summary>..........p
2fca0 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 66 6f 72 6d ublic.void.WriteLine(string.form
2fcc0 61 74 2c 20 70 61 72 61 6d 73 20 6f 62 6a 65 63 74 5b 5d 20 61 72 67 73 29 0d 0a 20 20 20 20 20 at,.params.object[].args).......
2fce0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 4c 69 6e 65 ...{..............this.WriteLine
2fd00 28 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 47 6c (string.Format(global::System.Gl
2fd20 6f 62 61 6c 69 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 obalization.CultureInfo.CurrentC
2fd40 75 6c 74 75 72 65 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 3b 0d 0a 20 20 20 20 20 20 20 ulture,.format,.args));.........
2fd60 20 7d 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>.......
2fd80 20 20 20 2f 2f 2f 20 52 61 69 73 65 20 61 6e 20 65 72 72 6f 72 0d 0a 20 20 20 20 20 20 20 20 2f ...///.Raise.an.error........../
2fda0 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f //.</summary>..........public.vo
2fdc0 69 64 20 45 72 72 6f 72 28 73 74 72 69 6e 67 20 6d 65 73 73 61 67 65 29 0d 0a 20 20 20 20 20 20 id.Error(string.message)........
2fde0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e ..{..............System.CodeDom.
2fe00 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 65 72 72 6f 72 20 3d 20 6e Compiler.CompilerError.error.=.n
2fe20 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c ew.global::System.CodeDom.Compil
2fe40 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 er.CompilerError();.............
2fe60 20 65 72 72 6f 72 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 6d 65 73 73 61 67 65 3b 0d 0a 20 20 20 .error.ErrorText.=.message;.....
2fe80 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 45 72 72 6f 72 73 2e 41 64 64 28 65 72 72 6f 72 29 3b .........this.Errors.Add(error);
2fea0 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 ..........}..........///.<summar
2fec0 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 61 69 73 65 20 61 20 77 61 72 6e 69 6e 67 0d y>..........///.Raise.a.warning.
2fee0 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 20 .........///.</summary>.........
2ff00 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 61 72 6e 69 6e 67 28 73 74 72 69 6e 67 20 6d 65 73 73 .public.void.Warning(string.mess
2ff20 61 67 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 53 79 73 age)..........{..............Sys
2ff40 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 tem.CodeDom.Compiler.CompilerErr
2ff60 6f 72 20 65 72 72 6f 72 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f or.error.=.new.global::System.Co
2ff80 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 3b 0d deDom.Compiler.CompilerError();.
2ffa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 72 72 6f 72 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 6d .............error.ErrorText.=.m
2ffc0 65 73 73 61 67 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 72 72 6f 72 2e 49 73 57 61 72 essage;..............error.IsWar
2ffe0 6e 69 6e 67 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 45 ning.=.true;..............this.E
30000 72 72 6f 72 73 2e 41 64 64 28 65 72 72 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 rrors.Add(error);..........}....
30020 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>..........///
30040 20 49 6e 63 72 65 61 73 65 20 74 68 65 20 69 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f .Increase.the.indent..........//
30060 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 /.</summary>..........public.voi
30080 64 20 50 75 73 68 49 6e 64 65 6e 74 28 73 74 72 69 6e 67 20 69 6e 64 65 6e 74 29 0d 0a 20 20 20 d.PushIndent(string.indent).....
300a0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 69 6e 64 65 6e 74 20 .....{..............if.((indent.
300c0 3d 3d 20 6e 75 6c 6c 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 ==.null))..............{........
300e0 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 ..........throw.new.global::Syst
30100 65 6d 2e 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 69 6e 64 65 6e 74 em.ArgumentNullException("indent
30120 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ");..............}..............
30140 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 28 74 68 69 73 2e this.currentIndentField.=.(this.
30160 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 2b 20 69 6e 64 65 6e 74 29 3b 0d 0a 20 currentIndentField.+.indent);...
30180 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 41 64 ...........this.indentLengths.Ad
301a0 64 28 69 6e 64 65 6e 74 2e 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 d(indent.Length);..........}....
301c0 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>..........///
301e0 20 52 65 6d 6f 76 65 20 74 68 65 20 6c 61 73 74 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 61 73 .Remove.the.last.indent.that.was
30200 20 61 64 64 65 64 20 77 69 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 .added.with.PushIndent..........
30220 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 ///.</summary>..........public.s
30240 74 72 69 6e 67 20 50 6f 70 49 6e 64 65 6e 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 tring.PopIndent()..........{....
30260 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 72 65 74 75 72 6e 56 61 6c 75 65 20 3d 20 22 ..........string.returnValue.=."
30280 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 69 6e 64 65 6e 74 ";..............if.((this.indent
302a0 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 3e 20 30 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Lengths.Count.>.0)).............
302c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 6e 64 65 6e 74 4c 65 .{..................int.indentLe
302e0 6e 67 74 68 20 3d 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 5b 28 74 68 69 73 2e ngth.=.this.indentLengths[(this.
30300 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 2d 20 31 29 5d 3b 0d 0a 20 20 20 20 indentLengths.Count.-.1)];......
30320 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 52 ............this.indentLengths.R
30340 65 6d 6f 76 65 41 74 28 28 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e emoveAt((this.indentLengths.Coun
30360 74 20 2d 20 31 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 69 t.-.1));..................if.((i
30380 6e 64 65 6e 74 4c 65 6e 67 74 68 20 3e 20 30 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ndentLength.>.0))...............
303a0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ...{......................return
303c0 56 61 6c 75 65 20 3d 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e Value.=.this.currentIndentField.
303e0 53 75 62 73 74 72 69 6e 67 28 28 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 Substring((this.currentIndentFie
30400 6c 64 2e 4c 65 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 3b 0d 0a 20 20 20 ld.Length.-.indentLength));.....
30420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 .................this.currentInd
30440 65 6e 74 46 69 65 6c 64 20 3d 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 entField.=.this.currentIndentFie
30460 6c 64 2e 52 65 6d 6f 76 65 28 28 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 ld.Remove((this.currentIndentFie
30480 6c 64 2e 4c 65 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 3b 0d 0a 20 20 20 ld.Length.-.indentLength));.....
304a0 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 .............}..............}...
304c0 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 74 75 72 6e 56 61 6c 75 65 3b 0d 0a ...........return.returnValue;..
304e0 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ........}..........///.<summary>
30500 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 6d 6f 76 65 20 61 6e 79 20 69 6e 64 65 6e 74 61 ..........///.Remove.any.indenta
30520 74 69 6f 6e 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 tion..........///.</summary>....
30540 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6c 65 61 72 49 6e 64 65 6e 74 28 29 0d ......public.void.ClearIndent().
30560 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 .........{..............this.ind
30580 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 entLengths.Clear();.............
305a0 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 22 22 3b 0d 0a .this.currentIndentField.=."";..
305c0 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 ........}..........#endregion...
305e0 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 54 6f 53 74 72 69 6e 67 20 48 65 6c 70 65 72 73 0d .......#region.ToString.Helpers.
30600 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>..........
30620 2f 2f 2f 20 55 74 69 6c 69 74 79 20 63 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 63 65 20 63 75 6c ///.Utility.class.to.produce.cul
30640 74 75 72 65 2d 6f 72 69 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 ture-oriented.representation.of.
30660 61 6e 20 6f 62 6a 65 63 74 20 61 73 20 61 20 73 74 72 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 an.object.as.a.string...........
30680 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 ///.</summary>..........public.c
306a0 6c 61 73 73 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 0d 0a 20 20 20 lass.ToStringInstanceHelper.....
306c0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 53 79 73 74 .....{..............private.Syst
306e0 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 20 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 em.IFormatProvider.formatProvide
30700 72 46 69 65 6c 64 20 20 3d 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 rField..=.global::System.Globali
30720 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 zation.CultureInfo.InvariantCult
30740 75 72 65 3b 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 ure;..............///.<summary>.
30760 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 6f 72 20 73 65 74 73 20 66 6f .............///.Gets.or.sets.fo
30780 72 6d 61 74 20 70 72 6f 76 69 64 65 72 20 74 6f 20 62 65 20 75 73 65 64 20 62 79 20 54 6f 53 74 rmat.provider.to.be.used.by.ToSt
307a0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 ringWithCulture.method..........
307c0 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>.............
307e0 20 70 75 62 6c 69 63 20 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 20 46 .public.System.IFormatProvider.F
30800 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ormatProvider..............{....
30820 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 20 20 20 20 ..............get...............
30840 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ...{......................return
30860 20 74 68 69 73 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 3b 0d 0a 20 20 20 .this.formatProviderField.;.....
30880 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 .............}..................
308a0 73 65 74 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 set..................{..........
308c0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 29 ............if.((value.!=.null))
308e0 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 ......................{.........
30900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 66 6f 72 6d 61 74 50 72 6f 76 .................this.formatProv
30920 69 64 65 72 46 69 65 6c 64 20 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 iderField..=.value;.............
30940 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 20 .........}..................}...
30960 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 2f 2f 2f 20 3c 73 ...........}..............///.<s
30980 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 69 73 20 69 73 ummary>..............///.This.is
309a0 20 63 61 6c 6c 65 64 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d 70 69 6c 65 2f 72 75 6e 20 61 70 70 .called.from.the.compile/run.app
309c0 64 6f 6d 61 69 6e 20 74 6f 20 63 6f 6e 76 65 72 74 20 6f 62 6a 65 63 74 73 20 77 69 74 68 69 6e domain.to.convert.objects.within
309e0 20 61 6e 20 65 78 70 72 65 73 73 69 6f 6e 20 62 6c 6f 63 6b 20 74 6f 20 61 20 73 74 72 69 6e 67 .an.expression.block.to.a.string
30a00 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 20 ..............///.</summary>....
30a20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 54 6f 53 74 72 69 6e 67 ..........public.string.ToString
30a40 57 69 74 68 43 75 6c 74 75 72 65 28 6f 62 6a 65 63 74 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 WithCulture(object.objectToConve
30a60 72 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 rt)..............{..............
30a80 20 20 20 20 69 66 20 28 28 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 20 3d 3d 20 6e 75 6c 6c ....if.((objectToConvert.==.null
30aa0 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ))..................{...........
30ac0 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 ...........throw.new.global::Sys
30ae0 74 65 6d 2e 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6f 62 6a 65 63 tem.ArgumentNullException("objec
30b00 74 54 6f 43 6f 6e 76 65 72 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d tToConvert");..................}
30b20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 54 79 70 65 20 74 20 ..................System.Type.t.
30b40 3d 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2e 47 65 74 54 79 70 65 28 29 3b 0d 0a 20 20 =.objectToConvert.GetType();....
30b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f 6e 2e ..............System.Reflection.
30b80 4d 65 74 68 6f 64 49 6e 66 6f 20 6d 65 74 68 6f 64 20 3d 20 74 2e 47 65 74 4d 65 74 68 6f 64 28 MethodInfo.method.=.t.GetMethod(
30ba0 22 54 6f 53 74 72 69 6e 67 22 2c 20 6e 65 77 20 53 79 73 74 65 6d 2e 54 79 70 65 5b 5d 20 7b 0d "ToString",.new.System.Type[].{.
30bc0 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 74 79 70 .............................typ
30be0 65 6f 66 28 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 29 7d 29 3b 0d 0a eof(System.IFormatProvider)});..
30c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 65 74 68 6f 64 20 3d 3d 20 6e ................if.((method.==.n
30c20 75 6c 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ull))..................{........
30c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6f 62 6a 65 63 74 54 6f 43 6f 6e ..............return.objectToCon
30c60 76 65 72 74 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 vert.ToString();................
30c80 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 20 20 20 ..}..................else.......
30ca0 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 ...........{....................
30cc0 20 20 72 65 74 75 72 6e 20 28 28 73 74 72 69 6e 67 29 28 6d 65 74 68 6f 64 2e 49 6e 76 6f 6b 65 ..return.((string)(method.Invoke
30ce0 28 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2c 20 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b (objectToConvert,.new.object[].{
30d00 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 ................................
30d20 20 20 74 68 69 73 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 7d 29 29 29 3b ..this.formatProviderField.})));
30d40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
30d60 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 54 .}..........}..........private.T
30d80 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 20 74 6f 53 74 72 69 6e 67 48 65 oStringInstanceHelper.toStringHe
30da0 6c 70 65 72 46 69 65 6c 64 20 3d 20 6e 65 77 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 lperField.=.new.ToStringInstance
30dc0 48 65 6c 70 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e Helper();..........///.<summary>
30de0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 48 65 6c 70 65 72 20 74 6f 20 70 72 6f 64 75 63 65 20 ..........///.Helper.to.produce.
30e00 63 75 6c 74 75 72 65 2d 6f 72 69 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 culture-oriented.representation.
30e20 6f 66 20 61 6e 20 6f 62 6a 65 63 74 20 61 73 20 61 20 73 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 of.an.object.as.a.string........
30e40 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 70 75 62 6c 69 63 ..///.</summary>..........public
30e60 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 20 54 6f 53 74 72 69 6e 67 .ToStringInstanceHelper.ToString
30e80 48 65 6c 70 65 72 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 67 Helper..........{..............g
30ea0 65 74 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 et..............{...............
30ec0 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 74 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 46 69 65 ...return.this.toStringHelperFie
30ee0 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 ld;..............}..........}...
30f00 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 23 65 .......#endregion......}......#e
30f20 6e 64 72 65 67 69 6f 6e 0d 0a 7d 0d 0a 00 00 00 b4 9f 02 00 2f 2f 20 2d 2d 2d 2d 2d 2d 2d 2d 2d ndregion..}.........//.---------
30f40 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
30f60 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
30f80 2d 2d 2d 2d 2d 0d 0a 2f 2f 20 3c 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 0d 0a 2f 2f 20 20 -----..//.<auto-generated>..//..
30fa0 20 20 20 54 68 69 73 20 63 6f 64 65 20 77 61 73 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 61 20 ...This.code.was.generated.by.a.
30fc0 74 6f 6f 6c 2e 0d 0a 2f 2f 20 20 20 20 20 52 75 6e 74 69 6d 65 20 56 65 72 73 69 6f 6e 3a 20 31 tool...//.....Runtime.Version:.1
30fe0 31 2e 30 2e 30 2e 30 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 20 20 20 43 68 61 6e 67 65 73 20 74 6f 1.0.0.0..//....//.....Changes.to
31000 20 74 68 69 73 20 66 69 6c 65 20 6d 61 79 20 63 61 75 73 65 20 69 6e 63 6f 72 72 65 63 74 20 62 .this.file.may.cause.incorrect.b
31020 65 68 61 76 69 6f 72 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 6c 6f 73 74 20 69 66 0d 0a 2f 2f 20 ehavior.and.will.be.lost.if..//.
31040 20 20 20 20 74 68 65 20 63 6f 64 65 20 69 73 20 72 65 67 65 6e 65 72 61 74 65 64 2e 0d 0a 2f 2f ....the.code.is.regenerated...//
31060 20 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 0d 0a 2f 2f 20 2d 2d 2d 2d 2d 2d 2d 2d 2d .</auto-generated>..//.---------
31080 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
310a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
310c0 2d 2d 2d 2d 2d 0d 0a 6e 61 6d 65 73 70 61 63 65 20 54 65 6d 70 6c 61 74 65 43 6f 64 65 47 65 6e -----..namespace.TemplateCodeGen
310e0 65 72 61 74 6f 72 73 0d 0a 7b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 20 erators..{......using.System;...
31100 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 4c 69 6e 71 3b 0d 0a 20 20 20 20 75 73 69 6e 67 ...using.System.Linq;......using
31120 20 53 79 73 74 65 6d 2e 49 4f 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f .System.IO;......using.System.Co
31140 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 llections.Generic;......using.Sy
31160 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 stem.Data.Objects;......using.Sy
31180 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 2e 44 61 74 61 43 6c 61 73 73 65 73 3b 0d 0a stem.Data.Objects.DataClasses;..
311a0 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 58 6d 6c 3b 0d 0a 20 20 20 20 75 73 69 6e 67 ....using.System.Xml;......using
311c0 20 53 79 73 74 65 6d 2e 58 6d 6c 2e 4c 69 6e 71 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 .System.Xml.Linq;......using.Sys
311e0 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 tem.Globalization;......using.Sy
31200 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 75 73 69 6e 67 20 53 79 73 74 stem.Reflection;......using.Syst
31220 65 6d 2e 44 61 74 61 2e 4d 65 74 61 64 61 74 61 2e 45 64 6d 3b 0d 0a 20 20 20 20 75 73 69 6e 67 em.Data.Metadata.Edm;......using
31240 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4d 61 70 70 69 6e 67 3b 0d 0a 20 20 20 20 75 73 69 6e 67 .System.Data.Mapping;......using
31260 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 3b 0d 0a 20 20 20 .System.Data.Entity.Design;.....
31280 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 3b 0d 0a 20 20 20 20 75 73 69 6e .using.System.CodeDom;......usin
312a0 67 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 3b 0d 0a 20 20 20 20 g.System.CodeDom.Compiler;......
312c0 75 73 69 6e 67 20 4d 69 63 72 6f 73 6f 66 74 2e 43 53 68 61 72 70 3b 0d 0a 20 20 20 20 75 73 69 using.Microsoft.CSharp;......usi
312e0 6e 67 20 53 79 73 74 65 6d 2e 54 65 78 74 3b 0d 0a 20 20 20 20 0d 0a 20 20 20 20 2f 2f 2f 20 3c ng.System.Text;............///.<
31300 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 summary>......///.Class.to.produ
31320 63 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 2f 2f 2f 20 ce.the.template.output......///.
31340 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 0a 20 20 20 20 5b 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d </summary>.......[global::System
31360 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 65 6e 65 72 61 74 65 64 43 6f 64 65 41 .CodeDom.Compiler.GeneratedCodeA
31380 74 74 72 69 62 75 74 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f ttribute("Microsoft.VisualStudio
313a0 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 22 2c 20 22 31 31 2e 30 2e 30 2e 30 22 29 5d 0d 0a .TextTemplating",."11.0.0.0")]..
313c0 20 20 20 20 70 75 62 6c 69 63 20 70 61 72 74 69 61 6c 20 63 6c 61 73 73 20 43 53 68 61 72 70 43 ....public.partial.class.CSharpC
313e0 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 56 35 30 20 3a 20 43 53 68 61 72 70 43 6f 64 65 47 65 odeGenTemplateV50.:.CSharpCodeGe
31400 6e 54 65 6d 70 6c 61 74 65 56 35 30 42 61 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 nTemplateV50Base......{.........
31420 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 43 72 65 61 .///.<summary>..........///.Crea
31440 74 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 te.the.template.output..........
31460 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 ///.</summary>..........public.v
31480 69 72 74 75 61 6c 20 73 74 72 69 6e 67 20 54 72 61 6e 73 66 6f 72 6d 54 65 78 74 28 29 0d 0a 20 irtual.string.TransformText()...
314a0 20 20 20 20 20 20 20 7b 0d 0a 0a 0d 0a 2f 2f 20 0d 0a 2f 2f 20 0d 0a 2f 2f 20 0d 0a 2f 2f 0d 0a .......{.....//...//...//...//..
314c0 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f //....//....//....//....//....//
314e0 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 2f 2f 0d 0a 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a ....//....//....//..//....//....
31500 2f 2f 20 20 0d 0a 2f 2f 20 20 0d 0a 0a 0a 0a 0d 0a 0d 0a 44 65 66 69 6e 65 4d 65 74 61 64 61 74 //....//...........DefineMetadat
31520 61 28 29 3b 0d 0a 0d 0a 55 73 65 72 53 65 74 74 69 6e 67 73 20 75 73 65 72 53 65 74 74 69 6e 67 a();....UserSettings.userSetting
31540 73 20 3d 0d 0a 20 20 20 20 6e 65 77 20 55 73 65 72 53 65 74 74 69 6e 67 73 0d 0a 20 20 20 20 7b s.=......new.UserSettings......{
31560 0d 0a 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 40 22 24 65 64 ..........SourceCsdlPath.=.@"$ed
31580 6d 78 49 6e 70 75 74 46 69 6c 65 24 22 2c 0d 0a 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 63 mxInputFile$",..........Referenc
315a0 65 43 73 64 6c 50 61 74 68 73 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 5d 20 7b 7d 2c 0d 0a 20 eCsdlPaths.=.new.string[].{},...
315c0 20 20 20 20 20 20 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d .......FullyQualifySystemTypes.=
315e0 20 74 72 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 .true,..........CreateContextAdd
31600 54 6f 4d 65 74 68 6f 64 73 20 3d 20 74 72 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 43 61 6d 65 6c ToMethods.=.true,..........Camel
31620 43 61 73 65 46 69 65 6c 64 73 20 3d 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 7d 3b 0d 0a 0d 0a 41 CaseFields.=.false,......};....A
31640 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 75 73 65 72 53 65 74 74 69 6e 67 73 29 3b 0d pplyUserSettings(userSettings);.
31660 0a 69 66 28 45 72 72 6f 72 73 2e 48 61 73 45 72 72 6f 72 73 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 .if(Errors.HasErrors)..{......re
31680 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 7d 0d 0a 0d 0a 4d 65 74 61 64 61 74 turn.String.Empty;..}....Metadat
316a0 61 4c 6f 61 64 65 72 20 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 4c 6f 61 aLoader.loader.=.new.MetadataLoa
316c0 64 65 72 28 74 68 69 73 29 3b 0d 0a 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 65 66 20 3d 20 6e der(this);..MetadataTools.ef.=.n
316e0 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 68 69 73 29 3b 0d 0a 43 6f 64 65 52 65 67 ew.MetadataTools(this);..CodeReg
31700 69 6f 6e 20 72 65 67 69 6f 6e 20 3d 20 6e 65 77 20 43 6f 64 65 52 65 67 69 6f 6e 28 74 68 69 73 ion.region.=.new.CodeRegion(this
31720 29 3b 0d 0a 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 20 3d 20 6e );..CodeGenerationTools.code.=.n
31740 65 77 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 28 74 68 69 73 29 7b 46 75 6c ew.CodeGenerationTools(this){Ful
31760 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 75 73 65 72 53 65 74 74 69 lyQualifySystemTypes.=.userSetti
31780 6e 67 73 2e 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 2c 20 43 61 6d ngs.FullyQualifySystemTypes,.Cam
317a0 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 61 6d 65 elCaseFields.=.userSettings.Came
317c0 6c 43 61 73 65 46 69 65 6c 64 73 7d 3b 0d 0a 0d 0a 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 lCaseFields};....ItemCollection.
317e0 3d 20 6c 6f 61 64 65 72 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e =.loader.CreateEdmItemCollection
31800 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 (SourceCsdlPath,.ReferenceCsdlPa
31820 74 68 73 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 ths.ToArray());..ModelNamespace.
31840 3d 20 6c 6f 61 64 65 72 2e 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 53 6f 75 72 63 =.loader.GetModelNamespace(Sourc
31860 65 43 73 64 6c 50 61 74 68 29 3b 0d 0a 73 74 72 69 6e 67 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d eCsdlPath);..string.namespaceNam
31880 65 20 3d 20 47 65 74 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 28 63 6f 64 65 29 3b 0d 0a 55 70 64 e.=.GetNamespaceName(code);..Upd
318a0 61 74 65 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 28 6e 61 6d 65 73 70 61 63 65 4e ateObjectNamespaceMap(namespaceN
318c0 61 6d 65 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ame);................this.Write(
318e0 22 2f 2f 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d "//-----------------------------
31900 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
31920 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 5c 72 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 -----------------\r".+..........
31940 20 20 20 20 20 20 20 20 20 20 20 20 22 5c 6e 2f 2f 20 3c 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 ............"\n//.<auto-generate
31960 64 3e 5c 72 5c 6e 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e d>\r\n//.");...............this.
31980 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
319a0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c ngWithCulture(CodeGenerationTool
319c0 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 s.GetResourceString("Template_Ge
319e0 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 31 22 29 29 29 3b 0d 0a 0a 0a neratedCodeCommentLine1")));....
31a00 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 5c 72 ............this.Write("\r\n//\r
31a20 5c 6e 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 \n//.");...............this.Writ
31a40 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
31a60 74 68 43 75 6c 74 75 72 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 thCulture(CodeGenerationTools.Ge
31a80 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 tResourceString("Template_Genera
31aa0 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 32 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 tedCodeCommentLine2")));........
31ac0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 20 22 29 3b 0d 0a ........this.Write("\r\n//.");..
31ae0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
31b00 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
31b20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 CodeGenerationTools.GetResourceS
31b40 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d tring("Template_GeneratedCodeCom
31b60 6d 65 6e 74 4c 69 6e 65 33 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 mentLine3")));................th
31b80 69 73 2e 57 72 69 74 65 28 40 22 0d 0a 2f 2f 20 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 is.Write(@"..//.</auto-generated
31ba0 3e 0d 0a 2f 2f 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d >..//---------------------------
31bc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
31be0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 75 73 69 6e 67 20 53 79 73 -------------------....using.Sys
31c00 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6d 70 6f 6e 65 6e 74 4d 6f 64 65 tem;..using.System.ComponentMode
31c20 6c 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 43 6c 69 65 l;..using.System.Data.EntityClie
31c40 6e 74 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 3b 0d nt;..using.System.Data.Objects;.
31c60 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 2e 44 61 74 61 43 .using.System.Data.Objects.DataC
31c80 6c 61 73 73 65 73 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 4c 69 6e 71 3b 0d 0a 75 73 69 lasses;..using.System.Linq;..usi
31ca0 6e 67 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 3b ng.System.Runtime.Serialization;
31cc0 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 58 6d 6c 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e ..using.System.Xml.Serialization
31ce0 3b 0d 0a 0d 0a 5b 61 73 73 65 6d 62 6c 79 3a 20 45 64 6d 53 63 68 65 6d 61 41 74 74 72 69 62 75 ;....[assembly:.EdmSchemaAttribu
31d00 74 65 28 29 5d 0d 0a 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 te()]..");.........////////.....
31d20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 72 65 .////////.......////////......re
31d40 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 gion.Begin(CodeGenerationTools.G
31d60 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f etResourceString("Template_Regio
31d80 6e 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 22 29 29 3b 0d 0a 20 20 20 20 62 6f 6f 6c 20 66 69 72 nRelationships"));......bool.fir
31da0 73 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 28 41 73 73 6f 63 69 61 st.=.true;......foreach.(Associa
31dc0 74 69 6f 6e 54 79 70 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 69 6e 20 47 65 74 53 6f 75 72 63 tionType.association.in.GetSourc
31de0 65 53 63 68 65 6d 61 54 79 70 65 73 3c 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 3e 28 29 29 eSchemaTypes<AssociationType>())
31e00 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 69 72 73 74 29 0d 0a 20 20 20 ......{..........if.(first).....
31e20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 69 6e 65 28 73 74 .....{..............WriteLine(st
31e40 72 69 6e 67 2e 45 6d 70 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 72 73 74 20 ring.Empty);..............first.
31e60 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 =.false;..........}.............
31e80 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5b 61 73 73 65 6d 62 6c 79 3a 20 45 64 6d 52 65 6c ...this.Write("[assembly:.EdmRel
31ea0 61 74 69 6f 6e 73 68 69 70 41 74 74 72 69 62 75 74 65 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 ationshipAttribute(\"");........
31ec0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
31ee0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 73 73 6f 63 69 elper.ToStringWithCulture(associ
31f00 61 74 69 6f 6e 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 ation.NamespaceName));..........
31f20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 ......this.Write("\",.\"");.....
31f40 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
31f60 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 73 73 ngHelper.ToStringWithCulture(ass
31f80 6f 63 69 61 74 69 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ociation.Name));................
31fa0 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 this.Write("\",.\"");...........
31fc0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
31fe0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 er.ToStringWithCulture(EndName(a
32000 73 73 6f 63 69 61 74 69 6f 6e 2c 20 30 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ssociation,.0)));...............
32020 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 .this.Write("\",.");............
32040 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
32060 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4d 75 6c 74 69 70 6c r.ToStringWithCulture(EndMultipl
32080 69 63 69 74 79 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 30 2c 20 63 6f 64 65 29 29 29 3b 0d 0a icity(association,.0,.code)));..
320a0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 74 79 70 65 ..............this.Write(",.type
320c0 6f 66 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 of(");...............this.Write(
320e0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
32100 43 75 6c 74 75 72 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 61 73 73 6f 63 69 Culture(EscapeEndTypeName(associ
32120 61 74 69 6f 6e 2c 20 30 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 ation,.0,.code)));..............
32140 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 ..this.Write("),.\"");..........
32160 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
32180 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 per.ToStringWithCulture(EndName(
321a0 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 31 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 association,.1)));..............
321c0 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 ..this.Write("\",.");...........
321e0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
32200 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4d 75 6c 74 69 70 er.ToStringWithCulture(EndMultip
32220 6c 69 63 69 74 79 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 31 2c 20 63 6f 64 65 29 29 29 3b 0d licity(association,.1,.code)));.
32240 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 74 79 70 ...............this.Write(",.typ
32260 65 6f 66 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 eof(");...............this.Write
32280 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
322a0 68 43 75 6c 74 75 72 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 61 73 73 6f 63 hCulture(EscapeEndTypeName(assoc
322c0 69 61 74 69 6f 6e 2c 20 31 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 iation,.1,.code)));.............
322e0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ...this.Write(")");.............
32300 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
32320 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 .ToStringWithCulture(code.String
32340 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 61 73 73 6f 63 69 61 74 69 6f 6e 2e 49 73 46 6f 72 65 69 Before(",.",.association.IsForei
32360 67 6e 4b 65 79 20 3f 20 22 74 72 75 65 22 20 3a 20 6e 75 6c 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 gnKey.?."true".:.null)));.......
32380 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5d 5c 72 5c 6e 22 29 3b 0d 0a .........this.Write(")]\r\n");..
323a0 0a 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 .......}......region.End();.....
323c0 20 20 20 69 66 20 28 21 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d ...if.(!String.IsNullOrEmpty(nam
323e0 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 espaceName))......{.............
32400 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 6e 61 6d 65 73 70 61 63 65 20 22 29 3b 0d 0a 0a 20 ...this.Write("namespace.");....
32420 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
32440 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 ingHelper.ToStringWithCulture(na
32460 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 mespaceName));................th
32480 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 is.Write("\r\n{\r\n");..........
324a0 20 20 20 50 75 73 68 49 6e 64 65 6e 74 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 ...PushIndent(CodeRegion.GetInde
324c0 6e 74 28 31 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a nt(1));......}........////////..
324e0 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 ....////////.......////////.....
32500 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ...region.Begin(CodeGenerationTo
32520 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f ols.GetResourceString("Template_
32540 52 65 67 69 6f 6e 43 6f 6e 74 65 78 74 73 22 29 29 3b 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 RegionContexts"));......foreach.
32560 28 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 63 6f 6e 74 61 69 6e 65 72 20 69 6e 20 47 65 (EntityContainer.container.in.Ge
32580 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 3c 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e tSourceSchemaTypes<EntityContain
325a0 65 72 3e 28 29 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 er>())......{................thi
325c0 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 2f 2f s.Write("\r\n///.<summary>\r\n//
325e0 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 /.");...............this.Write(t
32600 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
32620 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6e 74 61 69 6e 65 72 29 ulture(SummaryComment(container)
32640 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c ));................this.Write("\
32660 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 r\n///.</summary>");............
32680 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
326a0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 r.ToStringWithCulture(LongDescri
326c0 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6e 74 61 69 6e 65 72 2c 20 72 ptionCommentElement(container,.r
326e0 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a egion.CurrentIndentLevel)));....
32700 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 22 29 3b 0d ............this.Write("\r\n");.
32720 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
32740 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
32760 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 63 6f 6e 74 61 69 6e 65 72 (Accessibility.ForType(container
32780 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
327a0 20 70 61 72 74 69 61 6c 20 63 6c 61 73 73 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 .partial.class.");..............
327c0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
327e0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 ToStringWithCulture(code.Escape(
32800 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 container)));................thi
32820 73 2e 57 72 69 74 65 28 22 20 3a 20 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 5c 72 5c 6e 7b 5c 72 s.Write(".:.ObjectContext\r\n{\r
32840 5c 6e 20 20 20 20 23 72 65 67 69 6f 6e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 \n....#region.");...............
32860 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
32880 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f oStringWithCulture(CodeGeneratio
328a0 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 nTools.GetResourceString("Templa
328c0 74 65 5f 52 65 67 69 6f 6e 43 6f 6e 73 74 72 75 63 74 6f 72 73 22 29 29 29 3b 0d 0a 0a 0a 20 20 te_RegionConstructors")));......
328e0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5c 72 5c 6e 20 20 ..........this.Write("\r\n\r\n..
32900 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a ..///.<summary>\r\n....///.");..
32920 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
32940 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
32960 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e String.Format(CultureInfo.Curren
32980 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 tCulture,.CodeGenerationTools.Ge
329a0 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 tResourceString("Template_Contex
329c0 74 44 65 66 61 75 6c 74 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 72 tDefaultCtorComment"),.container
329e0 2e 4e 61 6d 65 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 .Name,.container.Name)));.......
32a00 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f .........this.Write("\r\n....///
32a20 20 3c 2f 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 22 29 3b 0d 0a 0a .</summary>\r\n....public.");...
32a40 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
32a60 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
32a80 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 ode.Escape(container)));........
32aa0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 20 3a 20 62 61 73 65 28 5c 22 ........this.Write("().:.base(\"
32ac0 6e 61 6d 65 3d 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 name=");...............this.Writ
32ae0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
32b00 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 thCulture(container.Name));.....
32b20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b ...........this.Write("\",.\"");
32b40 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
32b60 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
32b80 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 e(container.Name));.............
32ba0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 ...this.Write("\")\r\n....{\r\n"
32bc0 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 );.............WriteLazyLoadingE
32be0 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 nabled(container);..............
32c00 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 43 ..this.Write("........OnContextC
32c20 72 65 61 74 65 64 28 29 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 2f 2f reated();\r\n....}\r\n\r\n....//
32c40 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 /.<summary>\r\n....///.");......
32c60 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
32c80 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 gHelper.ToStringWithCulture(Stri
32ca0 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c ng.Format(CultureInfo.CurrentCul
32cc0 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 ture,.CodeGenerationTools.GetRes
32ce0 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 74 43 6f 6d ourceString("Template_ContextCom
32d00 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 monCtorComment"),.container.Name
32d20 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
32d40 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 70 75 \r\n....///.</summary>\r\n....pu
32d60 62 6c 69 63 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 blic.");...............this.Writ
32d80 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
32da0 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 thCulture(code.Escape(container)
32dc0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 ));................this.Write("(
32de0 73 74 72 69 6e 67 20 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e 67 29 20 3a 20 62 61 73 65 28 string.connectionString).:.base(
32e00 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e 67 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 connectionString,.\"");.........
32e20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
32e40 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e lper.ToStringWithCulture(contain
32e60 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 er.Name));................this.W
32e80 72 69 74 65 28 22 5c 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 rite("\")\r\n....{\r\n");.......
32ea0 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 63 6f ......WriteLazyLoadingEnabled(co
32ec0 6e 74 61 69 6e 65 72 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 ntainer);................this.Wr
32ee0 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 3b ite("........OnContextCreated();
32f00 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 \r\n....}\r\n\r\n....///.<summar
32f20 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 y>\r\n....///.");...............
32f40 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
32f60 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 oStringWithCulture(String.Format
32f80 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 (CultureInfo.CurrentCulture,.Cod
32fa0 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 eGenerationTools.GetResourceStri
32fc0 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 74 43 6f 6d 6d 6f 6e 43 74 6f 72 43 6f ng("Template_ContextCommonCtorCo
32fe0 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a 20 mment"),.container.Name)));.....
33000 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f ...........this.Write("\r\n..../
33020 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 22 29 3b 0d //.</summary>\r\n....public.");.
33040 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
33060 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
33080 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 (code.Escape(container)));......
330a0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 45 6e 74 69 74 79 43 6f 6e ..........this.Write("(EntityCon
330c0 6e 65 63 74 69 6f 6e 20 63 6f 6e 6e 65 63 74 69 6f 6e 29 20 3a 20 62 61 73 65 28 63 6f 6e 6e 65 nection.connection).:.base(conne
330e0 63 74 69 6f 6e 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ction,.\"");...............this.
33100 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
33120 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 3b 0d ngWithCulture(container.Name));.
33140 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5c 72 ...............this.Write("\")\r
33160 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 \n....{\r\n");.............Write
33180 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 3b 0d 0a LazyLoadingEnabled(container);..
331a0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 ..............this.Write("......
331c0 20 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 ..OnContextCreated();\r\n....}\r
331e0 5c 6e 5c 72 5c 6e 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 \n\r\n....#endregion\r\n\r\n....
33200 23 72 65 67 69 6f 6e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 #region.");...............this.W
33220 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
33240 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 gWithCulture(CodeGenerationTools
33260 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 .GetResourceString("Template_Reg
33280 69 6f 6e 50 61 72 74 69 61 6c 4d 65 74 68 6f 64 73 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 ionPartialMethods")));..........
332a0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5c 72 5c 6e 20 20 20 20 70 61 ......this.Write("\r\n\r\n....pa
332c0 72 74 69 61 6c 20 76 6f 69 64 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 3b 5c 72 rtial.void.OnContextCreated();\r
332e0 5c 6e 5c 72 5c 6e 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 5c 72 5c 6e 5c 72 5c 6e 22 29 3b 0d \n\r\n....#endregion\r\n\r\n");.
33300 0a 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f ............////////..........//
33320 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 //////...........////////.......
33340 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ...region.Begin(CodeGenerationTo
33360 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f ols.GetResourceString("Template_
33380 52 65 67 69 6f 6e 4f 62 6a 65 63 74 53 65 74 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 RegionObjectSetProperties"));...
333a0 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 20 69 6e .......foreach.(EntitySet.set.in
333c0 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 73 2e 4f 66 54 79 70 65 .container.BaseEntitySets.OfType
333e0 3c 45 6e 74 69 74 79 53 65 74 3e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 <EntitySet>())..........{.......
33400 20 20 20 20 20 20 20 56 65 72 69 66 79 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 .......VerifyEntityTypeAndSetAcc
33420 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 73 65 74 29 3b 0d 0a 0a essibilityCompatability(set);...
33440 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 .............this.Write("\r\n...
33460 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a .///.<summary>\r\n....///.");...
33480 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
334a0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 ringHelper.ToStringWithCulture(S
334c0 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 ummaryComment(set)));...........
334e0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 .....this.Write("\r\n....///.</s
33500 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 ummary>");...............this.Wr
33520 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
33540 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 WithCulture(LongDescriptionComme
33560 6e 74 45 6c 65 6d 65 6e 74 28 73 65 74 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 ntElement(set,.region.CurrentInd
33580 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 entLevel)));................this
335a0 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 .Write("\r\n....");.............
335c0 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
335e0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
33600 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 73 65 74 29 29 29 29 3b 0d 0a 0a 0a 0a 20 20 fter(NewModifier(set))));.......
33620 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
33640 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 ngHelper.ToStringWithCulture(Acc
33660 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 73 essibility.ForReadOnlyProperty(s
33680 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 et)));................this.Write
336a0 28 22 20 4f 62 6a 65 63 74 53 65 74 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 (".ObjectSet<");...............t
336c0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
336e0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 StringWithCulture(MultiSchemaEsc
33700 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a ape(set.ElementType,.code)));...
33720 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 20 22 29 3b 0d 0a .............this.Write(">.");..
33740 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
33760 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
33780 63 6f 64 65 2e 45 73 63 61 70 65 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 code.Escape(set)));.............
337a0 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 ...this.Write("\r\n....{\r\n....
337c0 20 20 20 20 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 ....get\r\n........{\r\n........
337e0 20 20 20 20 69 66 20 28 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ....if.((");...............this.
33800 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
33820 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 65 74 ngWithCulture(code.FieldName(set
33840 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
33860 20 3d 3d 20 6e 75 6c 6c 29 29 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 .==.null))\r\n............{\r\n.
33880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ...............");..............
338a0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
338c0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 ToStringWithCulture(code.FieldNa
338e0 6d 65 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 me(set)));................this.W
33900 72 69 74 65 28 22 20 3d 20 62 61 73 65 2e 43 72 65 61 74 65 4f 62 6a 65 63 74 53 65 74 3c 22 29 rite(".=.base.CreateObjectSet<")
33920 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ;...............this.Write(this.
33940 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
33960 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 re(MultiSchemaEscape(set.Element
33980 54 79 70 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 Type,.code)));................th
339a0 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 is.Write(">(\"");...............
339c0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
339e0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 65 74 2e 4e 61 6d 65 29 29 3b 0d 0a oStringWithCulture(set.Name));..
33a00 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 ..............this.Write("\");\r
33a20 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 72 \n............}\r\n............r
33a40 65 74 75 72 6e 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 eturn.");...............this.Wri
33a60 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
33a80 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 65 74 29 29 29 ithCulture(code.FieldName(set)))
33aa0 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 ;................this.Write(";\r
33ac0 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 70 72 69 76 \n........}\r\n....}\r\n....priv
33ae0 61 74 65 20 4f 62 6a 65 63 74 53 65 74 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ate.ObjectSet<");...............
33b00 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
33b20 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 oStringWithCulture(MultiSchemaEs
33b40 63 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a cape(set.ElementType,.code)));..
33b60 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 20 22 29 3b 0d ..............this.Write(">.");.
33b80 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
33ba0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
33bc0 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 65 74 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 (code.FieldName(set)));.........
33be0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a .......this.Write(";\r\n");.....
33c00 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b ........}..........region.End();
33c20 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f ............////////..........//
33c40 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 //////...........////////.......
33c60 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d ...////////...........////////..
33c80 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f .........////////........../////
33ca0 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 ///...........////////..........
33cc0 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 .////////...........////////....
33ce0 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f ......region.Begin(CodeGeneratio
33d00 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 nTools.GetResourceString("Templa
33d20 74 65 5f 52 65 67 69 6f 6e 41 64 64 54 6f 4d 65 74 68 6f 64 73 22 29 29 3b 0d 0a 20 20 20 20 20 te_RegionAddToMethods"));.......
33d40 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 6e 74 69 74 79 53 65 74 3e 20 61 64 64 54 6f 4d ...IEnumerable<EntitySet>.addToM
33d60 65 74 68 6f 64 73 20 3d 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f ethods.=.CreateContextAddToMetho
33d80 64 73 2e 56 61 6c 75 65 20 3f 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 ds.Value.?.container.BaseEntityS
33da0 65 74 73 2e 4f 66 54 79 70 65 3c 45 6e 74 69 74 79 53 65 74 3e 28 29 20 3a 20 45 6e 75 6d 65 72 ets.OfType<EntitySet>().:.Enumer
33dc0 61 62 6c 65 2e 45 6d 70 74 79 3c 45 6e 74 69 74 79 53 65 74 3e 28 29 3b 0d 0a 20 20 20 20 20 20 able.Empty<EntitySet>();........
33de0 20 20 66 6f 72 65 61 63 68 20 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 20 69 6e 20 61 64 64 54 ..foreach.(EntitySet.set.in.addT
33e00 6f 4d 65 74 68 6f 64 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 oMethods)..........{............
33e20 20 20 73 74 72 69 6e 67 20 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 ..string.parameterName.=.code.Es
33e40 63 61 70 65 28 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 73 65 74 2e 45 6c 65 6d 65 6e cape(FixParameterName(set.Elemen
33e60 74 54 79 70 65 2e 4e 61 6d 65 2c 20 63 6f 64 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 tType.Name,.code));.............
33e80 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ...this.Write("\r\n....///.<summ
33ea0 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ary>\r\n....///.");.............
33ec0 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
33ee0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d .ToStringWithCulture(String.Form
33f00 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 at(CultureInfo.CurrentCulture,.C
33f20 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 odeGenerationTools.GetResourceSt
33f40 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 43 6f 6d 6d 65 6e 74 41 64 64 54 6f 4d 65 ring("Template_GenCommentAddToMe
33f60 74 68 6f 64 43 73 22 29 2c 20 73 65 74 2e 4e 61 6d 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 thodCs"),.set.Name)));..........
33f80 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f ......this.Write("\r\n....///.</
33fa0 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 summary>\r\n....");.............
33fc0 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
33fe0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 .ToStringWithCulture(Accessibili
34000 74 79 2e 46 6f 72 54 79 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 29 29 29 3b 0d 0a ty.ForType(set.ElementType)));..
34020 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 76 6f 69 64 20 ..............this.Write(".void.
34040 41 64 64 54 6f 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 AddTo");...............this.Writ
34060 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
34080 74 68 43 75 6c 74 75 72 65 28 73 65 74 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 thCulture(set.Name));...........
340a0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 .....this.Write("(");...........
340c0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
340e0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 er.ToStringWithCulture(MultiSche
34100 6d 61 45 73 63 61 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 maEscape(set.ElementType,.code))
34120 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 );................this.Write("."
34140 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 );...............this.Write(this
34160 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
34180 75 72 65 28 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 ure(parameterName));............
341a0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 ....this.Write(")\r\n....{\r\n..
341c0 20 20 20 20 20 20 62 61 73 65 2e 41 64 64 4f 62 6a 65 63 74 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 ......base.AddObject(\"");......
341e0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
34200 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 65 74 2e gHelper.ToStringWithCulture(set.
34220 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 Name));................this.Writ
34240 65 28 22 5c 22 2c 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 e("\",.");...............this.Wr
34260 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
34280 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a WithCulture(parameterName));....
342a0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 ............this.Write(");\r\n..
342c0 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ..}\r\n");.............}........
342e0 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f ..region.End();............/////
34300 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 ///..........////////...........
34320 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 ////////..........region.Begin(C
34340 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 odeGenerationTools.GetResourceSt
34360 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 46 75 6e 63 74 69 6f 6e 49 6d 70 ring("Template_RegionFunctionImp
34380 6f 72 74 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 46 75 orts"));..........foreach.(EdmFu
343a0 6e 63 74 69 6f 6e 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 69 6e 20 63 6f 6e 74 61 69 6e 65 72 2e nction.edmFunction.in.container.
343c0 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 0d 0a 20 FunctionImports)..........{.....
343e0 20 20 20 20 20 20 20 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 75 6e 63 74 69 6f 6e 49 ...........IEnumerable<FunctionI
34400 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 46 75 6e mportParameter>.parameters.=.Fun
34420 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 43 72 65 61 74 65 28 65 64 6d 46 ctionImportParameter.Create(edmF
34440 75 6e 63 74 69 6f 6e 2e 50 61 72 61 6d 65 74 65 72 73 2c 20 63 6f 64 65 2c 20 65 66 29 3b 0d 0a unction.Parameters,.code,.ef);..
34460 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 70 61 72 61 6d 4c 69 73 74 20 3d 20 73 ............string.paramList.=.s
34480 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 tring.Join(",.",.parameters.Sele
344a0 63 74 28 70 20 3d 3e 20 70 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 ct(p.=>.p.FunctionParameterType.
344c0 2b 20 22 20 22 20 2b 20 70 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 +.".".+.p.FunctionParameterName)
344e0 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 79 70 65 55 73 .ToArray());..............TypeUs
34500 61 67 65 20 72 65 74 75 72 6e 54 79 70 65 20 3d 20 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 age.returnType.=.edmFunction.Ret
34520 75 72 6e 50 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 20 3d 3d 20 30 20 3f 20 6e 75 6c 6c 20 urnParameters.Count.==.0.?.null.
34540 3a 20 65 66 2e 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e :.ef.GetElementType(edmFunction.
34560 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 72 73 5b 30 5d 2e 54 79 70 65 55 73 61 67 65 29 3b 0d ReturnParameters[0].TypeUsage);.
34580 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 49 73 43 .............if.(edmFunction.IsC
345a0 6f 6d 70 6f 73 61 62 6c 65 41 74 74 72 69 62 75 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 omposableAttribute).............
345c0 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 .{................this.Write("\r
345e0 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 \n....///.<summary>\r\n....///."
34600 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 );...............this.Write(this
34620 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
34640 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 ure(SummaryComment(edmFunction))
34660 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 );................this.Write("\r
34680 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 \n....///.</summary>");.........
346a0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
346c0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 lper.ToStringWithCulture(LongDes
346e0 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 criptionCommentElement(edmFuncti
34700 6f 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 on,.region.CurrentIndentLevel)))
34720 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 ;.................this.Write(thi
34740 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
34760 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 ture(ParameterComments(parameter
34780 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 s.Select(p.=>.new.Tuple<string,.
347a0 73 74 72 69 6e 67 3e 28 70 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 string>(p.RawFunctionParameterNa
347c0 6d 65 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 me,.SummaryComment(p.Source))),.
347e0 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a region.CurrentIndentLevel)));...
34800 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 .............this.Write("\r\n...
34820 20 5b 45 64 6d 46 75 6e 63 74 69 6f 6e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 .[EdmFunction(\"");.............
34840 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
34860 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e .ToStringWithCulture(edmFunction
34880 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 .NamespaceName));...............
348a0 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 .this.Write("\",.\"");..........
348c0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
348e0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 per.ToStringWithCulture(edmFunct
34900 69 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ion.Name));................this.
34920 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 Write("\")]\r\n....");..........
34940 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
34960 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 per.ToStringWithCulture(code.Spa
34980 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 ceAfter(NewModifier(edmFunction)
349a0 29 29 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 )));.................this.Write(
349c0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
349e0 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 4d 65 74 68 6f 64 28 Culture(Accessibility.ForMethod(
34a00 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 edmFunction)));................t
34a20 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 his.Write(".");...............th
34a40 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
34a60 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 22 49 51 75 65 72 79 61 62 6c 65 3c 22 20 2b tringWithCulture("IQueryable<".+
34a80 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 .MultiSchemaEscape(returnType,.c
34aa0 6f 64 65 29 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 ode).+.">"));................thi
34ac0 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 s.Write(".");...............this
34ae0 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
34b00 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 ingWithCulture(code.Escape(edmFu
34b20 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 nction)));................this.W
34b40 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 rite("(");...............this.Wr
34b60 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
34b80 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 4c 69 73 74 29 29 3b 0d 0a 0a 0a 20 20 20 20 WithCulture(paramList));........
34ba0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 ........this.Write(")\r\n....{\r
34bc0 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 \n");.....................WriteF
34be0 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 73 28 70 61 72 61 6d 65 74 65 72 73 29 3b 0d 0a unctionParameters(parameters);..
34c00 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 ..............this.Write("......
34c20 20 20 72 65 74 75 72 6e 20 62 61 73 65 2e 43 72 65 61 74 65 51 75 65 72 79 3c 22 29 3b 0d 0a 0a ..return.base.CreateQuery<");...
34c40 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
34c60 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d ringHelper.ToStringWithCulture(M
34c80 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 ultiSchemaEscape(returnType,.cod
34ca0 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 e)));................this.Write(
34cc0 22 3e 28 5c 22 5b 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 ">(\"[");...............this.Wri
34ce0 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
34d00 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 73 70 61 63 65 ithCulture(edmFunction.Namespace
34d20 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 Name));................this.Writ
34d40 65 28 22 5d 2e 5b 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 e("].[");...............this.Wri
34d60 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
34d80 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a ithCulture(edmFunction.Name));..
34da0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5d 28 22 29 3b 0d ..............this.Write("](");.
34dc0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
34de0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
34e00 28 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 (string.Join(",.",.parameters.Se
34e20 6c 65 63 74 28 70 20 3d 3e 20 22 40 22 20 2b 20 70 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e lect(p.=>."@".+.p.EsqlParameterN
34e40 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 ame).ToArray())));..............
34e60 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 ..this.Write(")\"");............
34e80 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
34ea0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e r.ToStringWithCulture(code.Strin
34ec0 67 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 gBefore(",.",.string.Join(",.",.
34ee0 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 70 2e 45 78 65 63 75 74 65 parameters.Select(p.=>.p.Execute
34f00 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 3b 0d 0a 0a ParameterName).ToArray()))));...
34f20 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 .............this.Write(");\r\n.
34f40 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 ...}\r\n");.................}...
34f60 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 7b 0d 0a ...........else..............{..
34f80 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 ..............this.Write("\r\n..
34fa0 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a ..///.<summary>\r\n....///.");..
34fc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
34fe0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
35000 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a SummaryComment(edmFunction)));..
35020 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 ..............this.Write("\r\n..
35040 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ..///.</summary>");.............
35060 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
35080 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 .ToStringWithCulture(LongDescrip
350a0 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2c 20 tionCommentElement(edmFunction,.
350c0 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a region.CurrentIndentLevel)));...
350e0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
35100 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
35120 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 (ParameterComments(parameters.Se
35140 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 lect(p.=>.new.Tuple<string,.stri
35160 6e 67 3e 28 70 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 ng>(p.RawFunctionParameterName,.
35180 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 67 69 SummaryComment(p.Source))),.regi
351a0 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 on.CurrentIndentLevel)));.......
351c0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 22 29 3b .........this.Write("\r\n....");
351e0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
35200 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
35220 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 64 e(code.SpaceAfter(NewModifier(ed
35240 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 mFunction))));.................t
35260 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
35280 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e StringWithCulture(Accessibility.
352a0 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 ForMethod(edmFunction)));.......
352c0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 .........this.Write(".");.......
352e0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
35300 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 72 65 74 75 72 Helper.ToStringWithCulture(retur
35320 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 22 69 6e 74 22 20 3a 20 22 4f 62 6a 65 63 74 52 nType.==.null.?."int".:."ObjectR
35340 65 73 75 6c 74 3c 22 20 2b 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 esult<".+.MultiSchemaEscape(retu
35360 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 rnType,.code).+.">"));..........
35380 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 ......this.Write(".");..........
353a0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
353c0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 per.ToStringWithCulture(code.Esc
353e0 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 ape(edmFunction)));.............
35400 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ...this.Write("(");.............
35420 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
35440 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 4c 69 73 74 29 29 .ToStringWithCulture(paramList))
35460 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 ;................this.Write(")\r
35480 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 \n....{\r\n");..................
354a0 20 20 20 57 72 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 73 28 70 61 72 61 6d ...WriteFunctionParameters(param
354c0 65 74 65 72 73 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 eters);................this.Writ
354e0 65 28 22 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 61 73 65 2e 45 78 65 63 75 74 65 46 75 e("........return.base.ExecuteFu
35500 6e 63 74 69 6f 6e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 nction");...............this.Wri
35520 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
35540 69 74 68 43 75 6c 74 75 72 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 ithCulture(returnType.==.null.?.
35560 22 22 20 3a 20 22 3c 22 20 2b 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 "".:."<".+.MultiSchemaEscape(ret
35580 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 urnType,.code).+.">"));.........
355a0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 .......this.Write("(\"");.......
355c0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
355e0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 Helper.ToStringWithCulture(edmFu
35600 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 nction.Name));................th
35620 69 73 2e 57 72 69 74 65 28 22 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 is.Write("\"");...............th
35640 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
35660 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f tringWithCulture(code.StringBefo
35680 72 65 28 22 2c 20 22 2c 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d re(",.",.string.Join(",.",.param
356a0 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 70 2e 45 78 65 63 75 74 65 50 61 72 61 6d eters.Select(p.=>.p.ExecuteParam
356c0 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 eterName).ToArray()))));........
356e0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 7d 5c ........this.Write(");\r\n....}\
35700 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 28 72 65 r\n");.....................if(re
35720 74 75 72 6e 54 79 70 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 72 65 74 75 72 6e 54 79 70 65 2e 45 turnType.!=.null.&&.returnType.E
35740 64 6d 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 3d 20 42 75 69 6c 74 49 dmType.BuiltInTypeKind.==.BuiltI
35760 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 nTypeKind.EntityType)...........
35780 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 .......{................this.Wri
357a0 74 65 28 22 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f te("....///.<summary>\r\n....///
357c0 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 .");...............this.Write(th
357e0 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
35800 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e lture(SummaryComment(edmFunction
35820 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
35840 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 \r\n....///.</summary>");.......
35860 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
35880 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 Helper.ToStringWithCulture(LongD
358a0 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 escriptionCommentElement(edmFunc
358c0 74 69 6f 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 tion,.region.CurrentIndentLevel)
358e0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c ));................this.Write("\
35900 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 5c 22 6d 65 72 67 65 4f 70 r\n....///.<param.name=\"mergeOp
35920 74 69 6f 6e 5c 22 3e 3c 2f 70 61 72 61 6d 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 tion\"></param>");..............
35940 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
35960 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d ToStringWithCulture(ParameterCom
35980 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 ments(parameters.Select(p.=>.new
359a0 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 70 2e 52 61 77 46 75 6e 63 .Tuple<string,.string>(p.RawFunc
359c0 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e tionParameterName,.SummaryCommen
359e0 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 t(p.Source))),.region.CurrentInd
35a00 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 entLevel)));................this
35a20 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 .Write("\r\n....");.............
35a40 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
35a60 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
35a80 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 fter(NewModifier(edmFunction))))
35aa0 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 ;.................this.Write(thi
35ac0 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
35ae0 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d ture(Accessibility.ForMethod(edm
35b00 46 75 6e 63 74 69 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 Function)));................this
35b20 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e .Write(".");...............this.
35b40 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
35b60 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c ngWithCulture(returnType.==.null
35b80 20 3f 20 22 69 6e 74 22 20 3a 20 22 4f 62 6a 65 63 74 52 65 73 75 6c 74 3c 22 20 2b 20 4d 75 6c .?."int".:."ObjectResult<".+.Mul
35ba0 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 tiSchemaEscape(returnType,.code)
35bc0 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 .+.">"));................this.Wr
35be0 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 ite(".");...............this.Wri
35c00 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
35c20 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 ithCulture(code.Escape(edmFuncti
35c40 6f 6e 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 on)));................this.Write
35c60 28 22 28 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 ("(");...............this.Write(
35c80 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
35ca0 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 41 66 74 65 72 28 70 61 72 61 6d 4c 69 Culture(code.StringAfter(paramLi
35cc0 73 74 2c 20 22 2c 20 22 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 st,.",.")));................this
35ce0 2e 57 72 69 74 65 28 22 4d 65 72 67 65 4f 70 74 69 6f 6e 20 6d 65 72 67 65 4f 70 74 69 6f 6e 29 .Write("MergeOption.mergeOption)
35d00 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 \r\n....{\r\n");................
35d20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 73 .........WriteFunctionParameters
35d40 28 70 61 72 61 6d 65 74 65 72 73 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 (parameters);................thi
35d60 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 62 61 73 65 2e 22 29 3b s.Write("........return.base.");
35d80 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
35da0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
35dc0 65 28 72 65 74 75 72 6e 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 22 45 78 65 63 75 74 65 46 e(returnType.==.null.?."ExecuteF
35de0 75 6e 63 74 69 6f 6e 22 20 3a 20 22 45 78 65 63 75 74 65 46 75 6e 63 74 69 6f 6e 3c 22 20 2b 20 unction".:."ExecuteFunction<".+.
35e00 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f MultiSchemaEscape(returnType,.co
35e20 64 65 29 20 2b 20 22 3e 22 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 de).+.">"));................this
35e40 2e 57 72 69 74 65 28 22 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 .Write("(\"");...............thi
35e60 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
35e80 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 ringWithCulture(edmFunction.Name
35ea0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c ));................this.Write("\
35ec0 22 2c 20 6d 65 72 67 65 4f 70 74 69 6f 6e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ",.mergeOption");...............
35ee0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
35f00 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 oStringWithCulture(code.StringBe
35f20 66 6f 72 65 28 22 2c 20 22 2c 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 fore(",.",.string.Join(",.",.par
35f40 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 70 2e 45 78 65 63 75 74 65 50 61 72 ameters.Select(p.=>.p.ExecutePar
35f60 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 3b 0d 0a 0a 0a 20 20 ameterName).ToArray()))));......
35f80 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 ..........this.Write(");\r\n....
35fa0 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a }\r\n");.....................}..
35fc0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ............}..........}........
35fe0 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ..region.End();................t
36000 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 20 his.Write("}\r\n");.........}...
36020 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f ...region.End();........////////
36040 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 ......////////.......////////...
36060 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ...region.Begin(CodeGenerationTo
36080 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f ols.GetResourceString("Template_
360a0 52 65 67 69 6f 6e 45 6e 74 69 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 66 6f 72 65 61 63 68 20 RegionEntities"));......foreach.
360c0 28 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 (EntityType.entity.in.GetSourceS
360e0 63 68 65 6d 61 54 79 70 65 73 3c 45 6e 74 69 74 79 54 79 70 65 3e 28 29 2e 4f 72 64 65 72 42 79 chemaTypes<EntityType>().OrderBy
36100 28 65 20 3d 3e 20 65 2e 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 (e.=>.e.Name))......{...........
36120 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 73 75 6d 6d 61 72 .....this.Write("\r\n///.<summar
36140 79 3e 5c 72 5c 6e 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 y>\r\n///.");...............this
36160 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 .Write(this.ToStringHelper.ToStr
36180 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 6e ingWithCulture(SummaryComment(en
361a0 74 69 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 tity)));................this.Wri
361c0 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 te("\r\n///.</summary>");.......
361e0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
36200 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 Helper.ToStringWithCulture(LongD
36220 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 6e 74 69 74 79 2c escriptionCommentElement(entity,
36240 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a .region.CurrentIndentLevel)));..
36260 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5b 45 ..............this.Write("\r\n[E
36280 64 6d 45 6e 74 69 74 79 54 79 70 65 41 74 74 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e dmEntityTypeAttribute(NamespaceN
362a0 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 ame=\"");...............this.Wri
362c0 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
362e0 69 74 68 43 75 6c 74 75 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 ithCulture(entity.NamespaceName)
36300 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 );................this.Write("\"
36320 2c 20 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ,.Name=\"");...............this.
36340 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
36360 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a ngWithCulture(entity.Name));....
36380 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e ............this.Write("\")]\r\n
363a0 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 28 29 5d 5c 72 5c 6e 5b 44 61 74 61 43 6f 6e 74 72 61 63 [Serializable()]\r\n[DataContrac
363c0 74 41 74 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3d 74 72 75 65 29 5d 5c 72 5c tAttribute(IsReference=true)]\r\
363e0 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 74 69 74 79 n");.............foreach.(Entity
36400 54 79 70 65 20 73 75 62 54 79 70 65 20 69 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 Type.subType.in.ItemCollection.G
36420 65 74 49 74 65 6d 73 3c 45 6e 74 69 74 79 54 79 70 65 3e 28 29 2e 57 68 65 72 65 28 62 20 3d 3e etItems<EntityType>().Where(b.=>
36440 20 62 2e 42 61 73 65 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 29 29 0d 0a 20 20 20 20 20 20 20 .b.BaseType.==.entity)).........
36460 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5b 4b .{................this.Write("[K
36480 6e 6f 77 6e 54 79 70 65 41 74 74 72 69 62 75 74 65 28 74 79 70 65 6f 66 28 22 29 3b 0d 0a 0a 20 nownTypeAttribute(typeof(");....
364a0 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
364c0 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 ingHelper.ToStringWithCulture(Mu
364e0 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 75 62 54 79 70 65 2c 20 63 6f 64 65 29 29 29 ltiSchemaEscape(subType,.code)))
36500 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 29 29 5d ;................this.Write("))]
36520 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 0a 20 20 20 20 20 20 \r\n");.............}...........
36540 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
36560 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 lper.ToStringWithCulture(Accessi
36580 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 65 6e 74 69 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 bility.ForType(entity)));.......
365a0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 .........this.Write(".");.......
365c0 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
365e0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e Helper.ToStringWithCulture(code.
36600 53 70 61 63 65 41 66 74 65 72 28 63 6f 64 65 2e 41 62 73 74 72 61 63 74 4f 70 74 69 6f 6e 28 65 SpaceAfter(code.AbstractOption(e
36620 6e 74 69 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 ntity))));................this.W
36640 72 69 74 65 28 22 70 61 72 74 69 61 6c 20 63 6c 61 73 73 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 rite("partial.class.");.........
36660 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
36680 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 lper.ToStringWithCulture(code.Es
366a0 63 61 70 65 28 65 6e 74 69 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 cape(entity)));................t
366c0 68 69 73 2e 57 72 69 74 65 28 22 20 3a 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 his.Write(".:.");...............
366e0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
36700 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 42 61 73 65 54 79 70 65 4e 61 6d 65 28 oStringWithCulture(BaseTypeName(
36720 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 entity,.code)));................
36740 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 this.Write("\r\n{\r\n");........
36760 20 20 20 20 20 69 66 20 28 21 65 6e 74 69 74 79 2e 41 62 73 74 72 61 63 74 29 0d 0a 20 20 20 20 .....if.(!entity.Abstract)......
36780 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d ....{..............WriteFactoryM
367a0 65 74 68 6f 64 28 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d ethod(entity,.code);..........}.
367c0 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 ...........region.Begin(CodeGene
367e0 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 rationTools.GetResourceString("T
36800 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 53 69 6d 70 6c 65 50 72 6f 70 65 72 74 69 65 73 22 29 emplate_RegionSimpleProperties")
36820 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 );..........foreach.(EdmProperty
36840 20 70 72 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 .property.in.entity.Properties.W
36860 68 65 72 65 28 70 20 3d 3e 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 65 6e 74 here(p.=>.p.DeclaringType.==.ent
36880 69 74 79 20 26 26 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 53 69 ity.&&.p.TypeUsage.EdmType.is.Si
368a0 6d 70 6c 65 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 mpleType))..........{...........
368c0 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 ...VerifyGetterAndSetterAccessib
368e0 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 ilityCompatability(property);...
36900 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 53 69 6d 70 6c 65 54 79 70 65 50 72 6f 70 65 72 ...........WriteSimpleTypeProper
36920 74 79 28 70 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ty(property,.code);..........}..
36940 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ........region.End();...........
36960 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c .region.Begin(CodeGenerationTool
36980 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 s.GetResourceString("Template_Re
369a0 67 69 6f 6e 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 gionComplexProperties"));.......
369c0 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 ...foreach.(EdmProperty.property
369e0 20 69 6e 20 65 6e 74 69 74 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 70 20 3d 3e .in.entity.Properties.Where(p.=>
36a00 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 20 26 26 20 70 2e .p.DeclaringType.==.entity.&&.p.
36a20 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 TypeUsage.EdmType.is.ComplexType
36a40 29 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 56 65 72 69 66 ))..........{..............Verif
36a60 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d yGetterAndSetterAccessibilityCom
36a80 70 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 patability(property);...........
36aa0 20 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 79 28 70 72 6f 70 ...WriteComplexTypeProperty(prop
36ac0 65 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 erty,.code);..........}.........
36ae0 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e .region.End();............region
36b00 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 .Begin(CodeGenerationTools.GetRe
36b20 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 4e 61 76 sourceString("Template_RegionNav
36b40 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 igationProperties"));..........f
36b60 6f 72 65 61 63 68 20 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 72 oreach.(NavigationProperty.navPr
36b80 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 operty.in.entity.NavigationPrope
36ba0 72 74 69 65 73 2e 57 68 65 72 65 28 6e 20 3d 3e 20 6e 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 rties.Where(n.=>.n.DeclaringType
36bc0 20 3d 3d 20 65 6e 74 69 74 79 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .==.entity))..........{.........
36be0 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 .....VerifyGetterAndSetterAccess
36c00 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 ibilityCompatability(navProperty
36c20 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 );................this.Write("\r
36c40 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 \n....///.<summary>\r\n....///."
36c60 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 );...............this.Write(this
36c80 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
36ca0 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 ure(SummaryComment(navProperty))
36cc0 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 );................this.Write("\r
36ce0 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 \n....///.</summary>");.........
36d00 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
36d20 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 lper.ToStringWithCulture(LongDes
36d40 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 criptionCommentElement(navProper
36d60 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 ty,.region.CurrentIndentLevel)))
36d80 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c ;................this.Write("\r\
36da0 6e 20 20 20 20 5b 58 6d 6c 49 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 20 n....[XmlIgnoreAttribute()]\r\n.
36dc0 20 20 20 5b 53 6f 61 70 49 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 20 20 ...[SoapIgnoreAttribute()]\r\n..
36de0 20 20 5b 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 22 20 2b 0d 0a 20 20 20 20 20 20 20 ..[DataMemberAttribu".+.........
36e00 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 65 28 29 5d 5c 72 5c 6e 20 20 20 20 5b 45 64 6d 52 ............."te()]\r\n....[EdmR
36e20 65 6c 61 74 69 6f 6e 73 68 69 70 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 41 74 74 elationshipNavigationPropertyAtt
36e40 72 69 62 75 74 65 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ribute(\"");...............this.
36e60 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
36e80 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 ngWithCulture(navProperty.Relati
36ea0 6f 6e 73 68 69 70 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 onshipType.NamespaceName));.....
36ec0 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b ...........this.Write("\",.\"");
36ee0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
36f00 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
36f20 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 4e e(navProperty.RelationshipType.N
36f40 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ame));................this.Write
36f60 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 ("\",.\"");...............this.W
36f80 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
36fa0 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 gWithCulture(navProperty.ToEndMe
36fc0 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 mber.Name));................this
36fe0 2e 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 .Write("\")]\r\n");.............
37000 20 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e ....if.(navProperty.ToEndMember.
37020 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 20 3d 3d 20 52 65 6c 61 RelationshipMultiplicity.==.Rela
37040 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 2e 4d 61 6e 79 29 0d 0a 20 20 20 20 tionshipMultiplicity.Many)......
37060 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 ........{................this.Wr
37080 69 74 65 28 22 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ite("....");...............this.
370a0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
370c0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 ngWithCulture(code.SpaceAfter(Ne
370e0 77 4d 6f 64 69 66 69 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 20 wModifier(navProperty))));......
37100 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
37120 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 ingHelper.ToStringWithCulture(Ac
37140 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 cessibility.ForProperty(navPrope
37160 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 rty)));................this.Writ
37180 65 28 22 20 45 6e 74 69 74 79 43 6f 6c 6c 65 63 74 69 6f 6e 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 e(".EntityCollection<");........
371a0 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 .......this.Write(this.ToStringH
371c0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 elper.ToStringWithCulture(MultiS
371e0 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d chemaEscape(navProperty.ToEndMem
37200 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a ber.GetEntityType(),.code)));...
37220 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 20 22 29 3b 0d 0a .............this.Write(">.");..
37240 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
37260 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
37280 63 6f 64 65 2e 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 code.Escape(navProperty)));.....
372a0 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b ...........this.Write("\r\n....{
372c0 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 \r\n........");...............th
372e0 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
37300 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 tringWithCulture(code.SpaceAfter
37320 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 50 72 6f 70 (Accessibility.ForGetter(navProp
37340 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 erty))));................this.Wr
37360 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 ite("get\r\n........{\r\n.......
37380 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f .....return.((IEntityWithRelatio
373a0 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 22 20 2b 0d 0a 20 nships)this).RelationshipM".+...
373c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 6e 61 67 65 72 2e 47 65 74 52 65 ..................."anager.GetRe
373e0 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 latedCollection<");.............
37400 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
37420 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 .ToStringWithCulture(MultiSchema
37440 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 Escape(navProperty.ToEndMember.G
37460 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 etEntityType(),.code)));........
37480 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 ........this.Write(">(\"");.....
374a0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
374c0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 ngHelper.ToStringWithCulture(nav
374e0 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 Property.RelationshipType.FullNa
37500 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 me));................this.Write(
37520 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 "\",.\"");...............this.Wr
37540 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
37560 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d WithCulture(navProperty.ToEndMem
37580 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ber.Name));................this.
375a0 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 Write("\");\r\n........}\r\n....
375c0 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 ....");...............this.Write
375e0 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
37600 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 hCulture(code.SpaceAfter(Accessi
37620 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 bility.ForSetter(navProperty))))
37640 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 73 65 74 ;................this.Write("set
37660 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 \r\n........{\r\n............if.
37680 28 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 29 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 ((value.!=.null))\r\n...........
376a0 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 2b 0d 0a 20 20 20 20 20 .{\r\n................".+.......
376c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c ..............."((IEntityWithRel
376e0 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e ationships)this).RelationshipMan
37700 61 67 65 72 2e 49 6e 69 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e ager.InitializeRelatedCollection
37720 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 3c 22 29 3b 0d 0a ".+......................"<");..
37740 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
37760 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
37780 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f MultiSchemaEscape(navProperty.To
377a0 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 EndMember.GetEntityType(),.code)
377c0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e ));................this.Write(">
377e0 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 (\"");...............this.Write(
37800 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
37820 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 Culture(navProperty.Relationship
37840 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 Type.FullName));................
37860 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 this.Write("\",.\"");...........
37880 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
378a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 er.ToStringWithCulture(navProper
378c0 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 ty.ToEndMember.Name));..........
378e0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 76 61 6c 75 65 29 3b 5c 72 5c ......this.Write("\",.value);\r\
37900 6e 20 20 20 20 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 n............}\r\n........}\r\n.
37920 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ...}\r\n");................}....
37940 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 7b 0d 0a 0a 0a 20 .........else.............{.....
37960 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 22 29 3b 0d 0a ...........this.Write("....");..
37980 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
379a0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
379c0 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 6e 61 76 50 code.SpaceAfter(NewModifier(navP
379e0 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 roperty))));.................thi
37a00 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
37a20 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f ringWithCulture(Accessibility.Fo
37a40 72 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 rProperty(navProperty)));.......
37a60 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 20 20 20 20 .........this.Write(".");.......
37a80 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
37aa0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 Helper.ToStringWithCulture(Multi
37ac0 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 SchemaEscape(navProperty.ToEndMe
37ae0 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a mber.GetEntityType(),.code)));..
37b00 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a ..............this.Write(".");..
37b20 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
37b40 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
37b60 63 6f 64 65 2e 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 code.Escape(navProperty)));.....
37b80 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b ...........this.Write("\r\n....{
37ba0 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 \r\n........");...............th
37bc0 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
37be0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 tringWithCulture(code.SpaceAfter
37c00 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 50 72 6f 70 (Accessibility.ForGetter(navProp
37c20 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 erty))));................this.Wr
37c40 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 ite("get\r\n........{\r\n.......
37c60 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f .....return.((IEntityWithRelatio
37c80 6e 73 68 69 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 22 20 2b 0d 0a 20 nships)this).RelationshipM".+...
37ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 6e 61 67 65 72 2e 47 65 74 52 65 ..................."anager.GetRe
37cc0 6c 61 74 65 64 52 65 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 latedReference<");..............
37ce0 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
37d00 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 ToStringWithCulture(MultiSchemaE
37d20 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 scape(navProperty.ToEndMember.Ge
37d40 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 tEntityType(),.code)));.........
37d60 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 .......this.Write(">(\"");......
37d80 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
37da0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 gHelper.ToStringWithCulture(navP
37dc0 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d roperty.RelationshipType.FullNam
37de0 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 e));................this.Write("
37e00 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 \",.\"");...............this.Wri
37e20 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 te(this.ToStringHelper.ToStringW
37e40 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 ithCulture(navProperty.ToEndMemb
37e60 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 er.Name));................this.W
37e80 72 69 74 65 28 22 5c 22 29 2e 56 61 6c 75 65 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c rite("\").Value;\r\n........}\r\
37ea0 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e n........");...............this.
37ec0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
37ee0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 ngWithCulture(code.SpaceAfter(Ac
37f00 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 cessibility.ForSetter(navPropert
37f20 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 y))));................this.Write
37f40 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 ("set\r\n........{\r\n..........
37f60 20 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 74 68 69 ..((IEntityWithRelationships)thi
37f80 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 22 20 2b 0d 0a 20 20 20 20 s).RelationshipManager.".+......
37fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 47 65 74 52 65 6c 61 74 65 64 52 65 66 65 72 ................"GetRelatedRefer
37fc0 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 ence<");...............this.Writ
37fe0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
38000 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 thCulture(MultiSchemaEscape(navP
38020 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 roperty.ToEndMember.GetEntityTyp
38040 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 e(),.code)));................thi
38060 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 s.Write(">(\"");...............t
38080 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
380a0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 StringWithCulture(navProperty.Re
380c0 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 lationshipType.FullName));......
380e0 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d ..........this.Write("\",.\"");.
38100 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
38120 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
38140 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b (navProperty.ToEndMember.Name));
38160 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 2e ................this.Write("\").
38180 56 61 6c 75 65 20 3d 20 76 61 6c 75 65 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 Value.=.value;\r\n........}\r\n.
381a0 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 72 ...}\r\n");.............string.r
381c0 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 20 3d 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 4e 61 6d efPropertyName.=.navProperty.Nam
381e0 65 20 2b 20 22 52 65 66 65 72 65 6e 63 65 22 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 6e e.+."Reference";..........if.(en
38200 74 69 74 79 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 6d 20 3d 3e 20 6d 2e 4e 61 6d 65 20 3d 3d 20 tity.Members.Any(m.=>.m.Name.==.
38220 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 refPropertyName))..........{....
38240 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 .........//...............Errors
38260 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 .Add(new.System.CodeDom.Compiler
38280 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d .CompilerError(SourceCsdlPath,.-
382a0 31 2c 20 2d 31 2c 20 22 36 30 31 37 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 1,.-1,."6017",.String.Format(Cul
382c0 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 20 20 20 20 tureInfo.CurrentCulture,........
382e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c ..............CodeGenerationTool
38300 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f s.GetResourceString("Template_Co
38320 6e 66 6c 69 63 74 69 6e 67 47 65 6e 65 72 61 74 65 64 4e 61 76 50 72 6f 70 4e 61 6d 65 22 29 2c nflictingGeneratedNavPropName"),
38340 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 76 50 72 6f ..........................navPro
38360 70 65 72 74 79 2e 4e 61 6d 65 2c 20 65 6e 74 69 74 79 2e 46 75 6c 6c 4e 61 6d 65 2c 20 72 65 66 perty.Name,.entity.FullName,.ref
38380 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 PropertyName)));..........}.....
383a0 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 2f 2f 2f 20 3c ...........this.Write("....///.<
383c0 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 summary>\r\n....///.");.........
383e0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
38400 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 lper.ToStringWithCulture(Summary
38420 43 6f 6d 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 Comment(navProperty)));.........
38440 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c .......this.Write("\r\n....///.<
38460 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e /summary>");...............this.
38480 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
384a0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d ngWithCulture(LongDescriptionCom
384c0 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e 2e mentElement(navProperty,.region.
384e0 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 CurrentIndentLevel)));..........
38500 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 5b 42 72 6f 77 73 ......this.Write("\r\n....[Brows
38520 61 62 6c 65 41 74 74 72 69 62 75 74 65 28 66 61 6c 73 65 29 5d 5c 72 5c 6e 20 20 20 20 5b 44 61 ableAttribute(false)]\r\n....[Da
38540 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 20 20 20 20 22 29 3b 0d taMemberAttribute()]\r\n....");.
38560 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
38580 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
385a0 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 (Accessibility.ForProperty(navPr
385c0 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 operty)));................this.W
385e0 72 69 74 65 28 22 20 45 6e 74 69 74 79 52 65 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 rite(".EntityReference<");......
38600 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
38620 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 gHelper.ToStringWithCulture(Mult
38640 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d iSchemaEscape(navProperty.ToEndM
38660 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d ember.GetEntityType(),.code)));.
38680 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 20 22 29 3b ...............this.Write(">.");
386a0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 ...............this.Write(this.T
386c0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
386e0 65 28 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 e(refPropertyName));............
38700 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 ....this.Write("\r\n....{\r\n...
38720 20 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 .....");...............this.Writ
38740 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
38760 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 thCulture(code.SpaceAfter(Access
38780 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 ibility.ForGetter(navProperty)))
387a0 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 67 65 );................this.Write("ge
387c0 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 72 65 t\r\n........{\r\n............re
387e0 74 75 72 6e 20 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 turn.((IEntityWithRelationships)
38800 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 this).RelationshipM".+..........
38820 20 20 20 20 20 20 20 20 20 20 20 20 22 61 6e 61 67 65 72 2e 47 65 74 52 65 6c 61 74 65 64 52 65 ............"anager.GetRelatedRe
38840 66 65 72 65 6e 63 65 3c 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 ference<");...............this.W
38860 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
38880 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e gWithCulture(MultiSchemaEscape(n
388a0 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 avProperty.ToEndMember.GetEntity
388c0 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 Type(),.code)));................
388e0 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 this.Write(">(\"");.............
38900 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..this.Write(this.ToStringHelper
38920 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 .ToStringWithCulture(navProperty
38940 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 3b 0d 0a 0a .RelationshipType.FullName));...
38960 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 5c 22 22 .............this.Write("\",.\""
38980 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 );...............this.Write(this
389a0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
389c0 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 ure(navProperty.ToEndMember.Name
389e0 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c ));................this.Write("\
38a00 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d ");\r\n........}\r\n........");.
38a20 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ..............this.Write(this.To
38a40 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
38a60 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 (code.SpaceAfter(Accessibility.F
38a80 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 20 20 20 orSetter(navProperty))));.......
38aa0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 .........this.Write("set\r\n....
38ac0 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 76 61 6c 75 65 20 ....{\r\n............if.((value.
38ae0 21 3d 20 6e 75 6c 6c 29 29 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 !=.null))\r\n............{\r\n..
38b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 2b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............".+...............
38b20 20 20 20 20 20 20 20 22 28 28 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 ......."((IEntityWithRelationshi
38b40 70 73 29 74 68 69 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 49 6e 69 ps)this).RelationshipManager.Ini
38b60 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 65 3c 22 20 2b 0d 0a 20 20 20 tializeRelatedReference<".+.....
38b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 ................."");...........
38ba0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
38bc0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 er.ToStringWithCulture(MultiSche
38be0 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 maEscape(navProperty.ToEndMember
38c00 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 20 20 .GetEntityType(),.code)));......
38c20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 3e 28 5c 22 22 29 3b 0d 0a 0a ..........this.Write(">(\"");...
38c40 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ............this.Write(this.ToSt
38c60 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e ringHelper.ToStringWithCulture(n
38c80 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c avProperty.RelationshipType.Full
38ca0 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 Name));................this.Writ
38cc0 65 28 22 5c 22 2c 20 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e e("\",.\"");...............this.
38ce0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
38d00 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d ngWithCulture(navProperty.ToEndM
38d20 65 6d 62 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 ember.Name));................thi
38d40 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 76 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 s.Write("\",.value);\r\n........
38d60 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 ....}\r\n........}\r\n....}\r\n"
38d80 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d );.................}..........}.
38da0 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 .........region.End();..........
38dc0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 ......this.Write("}\r\n");......
38de0 20 20 20 7d 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 2f ...}......region.End();......../
38e00 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f ///////......////////.......////
38e20 2f 2f 2f 2f 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 ////......region.Begin(CodeGener
38e40 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ationTools.GetResourceString("Te
38e60 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 6c 65 78 54 79 70 65 73 22 29 29 3b 0d 0a 20 mplate_RegionComplexTypes"));...
38e80 20 20 20 66 6f 72 65 61 63 68 20 28 43 6f 6d 70 6c 65 78 54 79 70 65 20 63 6f 6d 70 6c 65 78 20 ...foreach.(ComplexType.complex.
38ea0 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 3c 43 6f 6d 70 6c 65 78 54 in.GetSourceSchemaTypes<ComplexT
38ec0 79 70 65 3e 28 29 2e 4f 72 64 65 72 42 79 28 63 20 3d 3e 20 63 2e 4e 61 6d 65 29 29 0d 0a 20 20 ype>().OrderBy(c.=>.c.Name))....
38ee0 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c ..{................this.Write("\
38f00 72 5c 6e 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 r\n///.<summary>\r\n///.");.....
38f20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..........this.Write(this.ToStri
38f40 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d ngHelper.ToStringWithCulture(Sum
38f60 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 maryComment(complex)));.........
38f80 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d .......this.Write("\r\n///.</sum
38fa0 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 mary>");...............this.Writ
38fc0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
38fe0 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 thCulture(LongDescriptionComment
39000 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 Element(complex,.region.CurrentI
39020 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 ndentLevel)));................th
39040 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 5b 45 64 6d 43 6f 6d 70 6c 65 78 54 79 70 65 41 74 74 is.Write("\r\n[EdmComplexTypeAtt
39060 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 ribute(NamespaceName=\"");......
39080 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e .........this.Write(this.ToStrin
390a0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 gHelper.ToStringWithCulture(comp
390c0 6c 65 78 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 lex.NamespaceName));............
390e0 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a ....this.Write("\",.Name=\"");..
39100 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 .............this.Write(this.ToS
39120 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
39140 63 6f 6d 70 6c 65 78 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 complex.Name));................t
39160 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 5b 44 61 74 61 43 6f 6e 74 72 61 63 74 his.Write("\")]\r\n[DataContract
39180 41 74 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3d 74 72 75 65 29 5d 5c 72 5c 6e Attribute(IsReference=true)]\r\n
391a0 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 28 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 [Serializable()]\r\n");.........
391c0 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ......this.Write(this.ToStringHe
391e0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 lper.ToStringWithCulture(Accessi
39200 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 63 6f 6d 70 6c 65 78 29 29 29 3b 0d 0a 0a 0a 20 20 bility.ForType(complex)));......
39220 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 70 61 72 74 69 61 6c 20 63 ..........this.Write(".partial.c
39240 6c 61 73 73 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 lass.");...............this.Writ
39260 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
39280 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 29 29 29 thCulture(code.Escape(complex)))
392a0 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 3a 20 ;................this.Write(".:.
392c0 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 5c 72 5c 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 ComplexObject\r\n{\r\n");.......
392e0 20 20 20 20 20 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 63 6f 6d 70 6c 65 78 ......WriteFactoryMethod(complex
39300 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 ,.code);..........region.Begin(C
39320 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 odeGenerationTools.GetResourceSt
39340 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 53 69 6d 70 6c 65 50 72 6f 70 65 ring("Template_RegionSimplePrope
39360 72 74 69 65 73 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 rties"));..........foreach.(EdmP
39380 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 20 69 6e 20 63 6f 6d 70 6c 65 78 2e 50 72 6f 70 roperty.property.in.complex.Prop
393a0 65 72 74 69 65 73 2e 57 68 65 72 65 28 70 20 3d 3e 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 erties.Where(p.=>.p.DeclaringTyp
393c0 65 20 3d 3d 20 63 6f 6d 70 6c 65 78 20 26 26 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 e.==.complex.&&.p.TypeUsage.EdmT
393e0 79 70 65 20 69 73 20 53 69 6d 70 6c 65 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a ype.is.SimpleType))..........{..
39400 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 ............VerifyGetterAndSette
39420 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 rAccessibilityCompatability(prop
39440 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 53 69 6d 70 6c 65 54 erty);..............WriteSimpleT
39460 79 70 65 50 72 6f 70 65 72 74 79 28 70 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 ypeProperty(property,.code);....
39480 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a ......}..........region.End();..
394a0 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 ..........region.Begin(CodeGener
394c0 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ationTools.GetResourceString("Te
394e0 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 mplate_RegionComplexProperties")
39500 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 );..........foreach.(EdmProperty
39520 20 70 72 6f 70 65 72 74 79 20 69 6e 20 63 6f 6d 70 6c 65 78 2e 50 72 6f 70 65 72 74 69 65 73 2e .property.in.complex.Properties.
39540 57 68 65 72 65 28 70 20 3d 3e 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 3d 3d 20 63 6f Where(p.=>.p.DeclaringType.==.co
39560 6d 70 6c 65 78 20 26 26 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 mplex.&&.p.TypeUsage.EdmType.is.
39580 43 6f 6d 70 6c 65 78 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ComplexType))..........{........
395a0 20 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 ......VerifyGetterAndSetterAcces
395c0 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 70 72 6f 70 65 72 74 79 29 3b sibilityCompatability(property);
395e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 ..............WriteComplexTypePr
39600 6f 70 65 72 74 79 28 70 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 operty(property,.code);.........
39620 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0a 0a 20 20 20 .}..........region.End();.......
39640 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a .........this.Write("}\r\n");...
39660 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 ......}......region.End();......
39680 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f ..////////......////////......./
396a0 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 ///////......region.Begin(CodeGe
396c0 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 nerationTools.GetResourceString(
396e0 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 45 6e 75 6d 54 79 70 65 73 22 29 29 3b 0d 0a 20 "Template_RegionEnumTypes"));...
39700 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 75 6d 54 79 70 65 20 65 6e 75 6d 54 79 70 65 20 69 6e ...foreach.(EnumType.enumType.in
39720 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 3c 45 6e 75 6d 54 79 70 65 3e 28 .GetSourceSchemaTypes<EnumType>(
39740 29 2e 4f 72 64 65 72 42 79 28 63 20 3d 3e 20 63 2e 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a ).OrderBy(c.=>.c.Name))......{..
39760 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f ..............this.Write("\r\n//
39780 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 /.<summary>\r\n///.");..........
397a0 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
397c0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 per.ToStringWithCulture(SummaryC
397e0 6f 6d 6d 65 6e 74 28 65 6e 75 6d 54 79 70 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 omment(enumType)));.............
39800 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 ...this.Write("\r\n///.</summary
39820 3e 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 >");...............this.Write(th
39840 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
39860 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d lture(LongDescriptionCommentElem
39880 65 6e 74 28 65 6e 75 6d 54 79 70 65 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 ent(enumType,.region.CurrentInde
398a0 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ntLevel)));................this.
398c0 57 72 69 74 65 28 22 5c 72 5c 6e 5b 45 64 6d 45 6e 75 6d 54 79 70 65 41 74 74 72 69 62 75 74 65 Write("\r\n[EdmEnumTypeAttribute
398e0 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 (NamespaceName=\"");............
39900 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
39920 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 75 6d 54 79 70 65 2e 4e r.ToStringWithCulture(enumType.N
39940 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 amespaceName));................t
39960 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 4e 61 6d 65 3d 5c 22 22 29 3b 0d 0a 0a 20 20 20 20 his.Write("\",.Name=\"");.......
39980 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ........this.Write(this.ToString
399a0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 75 6d 54 Helper.ToStringWithCulture(enumT
399c0 79 70 65 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e ype.Name));................this.
399e0 57 72 69 74 65 28 22 5c 22 29 5d 5c 72 5c 6e 5b 44 61 74 61 43 6f 6e 74 72 61 63 74 41 74 74 72 Write("\")]\r\n[DataContractAttr
39a00 69 62 75 74 65 28 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 ibute()]\r\n");.............if.(
39a20 65 6e 75 6d 54 79 70 65 2e 49 73 46 6c 61 67 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a enumType.IsFlags)..........{....
39a40 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5b 46 6c 61 67 73 41 74 ............this.Write("[FlagsAt
39a60 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d tribute()]\r\n");.............}.
39a80 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ................this.Write(this.
39aa0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
39ac0 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 65 6e 75 6d 54 79 70 re(Accessibility.ForType(enumTyp
39ae0 65 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 e)));................this.Write(
39b00 22 20 65 6e 75 6d 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 ".enum.");...............this.Wr
39b20 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
39b40 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 75 6d 54 79 70 65 WithCulture(code.Escape(enumType
39b60 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 )));................this.Write("
39b80 20 3a 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 .:.");...............this.Write(
39ba0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
39bc0 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 75 6d 54 79 70 65 2e 55 6e 64 Culture(code.Escape(enumType.Und
39be0 65 72 6c 79 69 6e 67 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2c 20 66 erlyingType.ClrEquivalentType,.f
39c00 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 3a 20 66 61 6c 73 65 29 29 29 ullyQualifySystemTypes:.false)))
39c20 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c ;................this.Write("\r\
39c40 6e 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 n{\r\n");.............foreach.(E
39c60 6e 75 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 20 69 6e 20 65 6e 75 6d 54 79 70 65 2e 4d 65 6d numMember.member.in.enumType.Mem
39c80 62 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 bers)..........{................
39ca0 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c this.Write("....///.<summary>\r\
39cc0 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e n....///.");...............this.
39ce0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
39d00 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 6d 65 6d ngWithCulture(SummaryComment(mem
39d20 62 65 72 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 ber)));................this.Writ
39d40 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 20 e("\r\n....///.</summary>");....
39d60 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 ...........this.Write(this.ToStr
39d80 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f ingHelper.ToStringWithCulture(Lo
39da0 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6d 65 6d 62 ngDescriptionCommentElement(memb
39dc0 65 72 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2b 20 er,.region.CurrentIndentLevel.+.
39de0 31 29 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 1)));................this.Write(
39e00 22 5c 72 5c 6e 20 20 20 20 5b 45 6e 75 6d 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 5d "\r\n....[EnumMemberAttribute()]
39e20 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 \r\n....");...............this.W
39e40 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
39e60 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 6d 65 6d 62 65 72 29 gWithCulture(code.Escape(member)
39e80 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 20 ));................this.Write(".
39ea0 3d 20 22 29 3b 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 74 =.");...............this.Write(t
39ec0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
39ee0 75 6c 74 75 72 65 28 6d 65 6d 62 65 72 2e 56 61 6c 75 65 29 29 3b 0d 0a 0a 0a 20 20 20 20 20 20 ulture(member.Value));..........
39f00 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 2c 5c 72 5c 6e 5c 72 5c 6e 22 29 3b 0d 0a ......this.Write(",\r\n\r\n");..
39f20 0a 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 20 0d 0a 20 20 20 ...........}............//......
39f40 20 20 20 20 20 69 66 20 28 65 6e 75 6d 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 29 29 .....if.(enumType.Members.Any())
39f60 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 ..........{..............this.Ge
39f80 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 52 65 6d 6f 76 65 28 0d 0a 20 20 20 nerationEnvironment.Remove(.....
39fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 .............this.GenerationEnvi
39fc0 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 2d 20 28 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 2e ronment.Length.-.(CurrentIndent.
39fe0 4c 65 6e 67 74 68 20 2b 20 35 29 2c 20 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 2e 4c 65 6e 67 74 Length.+.5),.CurrentIndent.Lengt
3a000 68 20 2b 20 33 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 h.+.3);..........}..............
3a020 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 7d ..this.Write("}\r\n");.........}
3a040 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 69 66 20 28 21 ......region.End();........if.(!
3a060 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 String.IsNullOrEmpty(namespaceNa
3a080 6d 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 50 6f 70 49 6e 64 65 6e 74 28 29 me))......{..........PopIndent()
3a0a0 3b 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 22 7d 5c 72 ;................this.Write("}\r
3a0c0 5c 6e 22 29 3b 0d 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 21 56 65 72 69 \n");.........}........if.(!Veri
3a0e0 66 79 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 28 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 fyTypeUniqueness(GetSourceSchema
3a100 54 79 70 65 73 3c 47 6c 6f 62 61 6c 49 74 65 6d 3e 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Types<GlobalItem>().............
3a120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 68 65 72 65 28 69 20 ........................Where(i.
3a140 3d 3e 20 69 20 69 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 7c 7c 20 69 20 69 73 20 45 =>.i.is.StructuralType.||.i.is.E
3a160 6e 75 6d 54 79 70 65 20 7c 7c 20 69 20 69 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 numType.||.i.is.EntityContainer)
3a180 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 ................................
3a1a0 20 20 20 20 2e 53 65 6c 65 63 74 28 69 20 3d 3e 20 63 6f 64 65 2e 47 65 74 47 6c 6f 62 61 6c 49 .....Select(i.=>.code.GetGlobalI
3a1c0 74 65 6d 4e 61 6d 65 28 69 29 29 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 temName(i))))......{..........re
3a1e0 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 7d 0d 0a 0a 0a 20 20 20 turn.string.Empty;......}.......
3a200 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 .........return.this.GenerationE
3a220 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 nvironment.ToString();..........
3a240 7d 0d 0a 0a 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f }...........////////......//////
3a260 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f //.......////////........///////
3a280 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a /......////////.......////////..
3a2a0 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 ....private.void.WriteFactoryMet
3a2c0 68 6f 64 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 hod(StructuralType.structuralTyp
3a2e0 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 20 20 e,.CodeGenerationTools.code)....
3a300 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 43 6f 64 65 52 65 67 69 6f 6e 20 72 65 67 69 6f 6e 20 3d ..{..........CodeRegion.region.=
3a320 20 6e 65 77 20 43 6f 64 65 52 65 67 69 6f 6e 28 74 68 69 73 2c 20 31 29 3b 0d 0a 0d 0a 20 20 20 .new.CodeRegion(this,.1);.......
3a340 20 20 20 20 20 73 74 72 69 6e 67 20 6d 65 74 68 6f 64 4e 61 6d 65 20 3d 20 22 43 72 65 61 74 65 .....string.methodName.=."Create
3a360 22 20 2b 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 ".+.structuralType.Name;........
3a380 20 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 75 6e 69 71 75 65 ..UniqueIdentifierService.unique
3a3a0 49 64 65 6e 74 69 66 69 65 72 20 3d 20 6e 65 77 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 Identifier.=.new.UniqueIdentifie
3a3c0 72 53 65 72 76 69 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 69 6e 73 74 rService();..........string.inst
3a3e0 61 6e 63 65 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 75 6e 69 71 75 65 49 64 65 anceName.=.code.Escape(uniqueIde
3a400 6e 74 69 66 69 65 72 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 28 63 6f 64 65 2e 43 ntifier.AdjustIdentifier((code.C
3a420 61 6d 65 6c 43 61 73 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 29 29 29 29 amelCase(structuralType.Name))))
3a440 3b 0d 0a 20 20 20 20 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 61 63 74 6f 72 79 4d 65 ;..........IEnumerable<FactoryMe
3a460 74 68 6f 64 50 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 46 61 63 74 thodParameter>.parameters.=.Fact
3a480 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 2e 43 72 65 61 74 65 50 61 72 61 6d 65 74 oryMethodParameter.CreateParamet
3a4a0 65 72 73 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 4f 66 54 79 70 ers(structuralType.Members.OfTyp
3a4c0 65 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 28 29 2e 57 68 65 72 65 28 70 20 3d 3e 20 49 6e 63 6c e<EdmProperty>().Where(p.=>.Incl
3a4e0 75 64 65 50 72 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 73 74 72 75 63 udePropertyInFactoryMethod(struc
3a500 74 75 72 61 6c 54 79 70 65 2c 20 70 29 29 2c 20 75 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 turalType,.p)),.uniqueIdentifier
3a520 2c 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 2c 20 63 6f 64 65 29 3b 0d 0a 0d 0a 20 ,.MultiSchemaEscape,.code);.....
3a540 20 20 20 20 20 20 20 69 66 20 28 70 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 28 29 20 3d 3d .......if.(parameters.Count().==
3a560 20 30 29 0d 0a 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 .0)..............return;........
3a580 20 20 20 20 69 66 20 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 41 ....if.(structuralType.Members.A
3a5a0 6e 79 28 6d 20 3d 3e 20 6d 2e 4e 61 6d 65 20 3d 3d 20 6d 65 74 68 6f 64 4e 61 6d 65 29 29 0d 0a ny(m.=>.m.Name.==.methodName))..
3a5c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 ........{..............//.......
3a5e0 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f ........Errors.Add(new.System.Co
3a600 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 deDom.Compiler.CompilerError(Sou
3a620 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 32 39 22 2c 0d 0a 20 20 rceCsdlPath,.-1,.-1,."6029",....
3a640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 ..............String.Format(Cult
3a660 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 20 20 20 20 20 ureInfo.CurrentCulture,.........
3a680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 .................CodeGenerationT
3a6a0 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 ools.GetResourceString("Template
3a6c0 5f 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 4e 61 6d 65 43 6f 6e 66 6c 69 63 74 22 29 2c 20 6d 65 _FactoryMethodNameConflict"),.me
3a6e0 74 68 6f 64 4e 61 6d 65 2c 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 46 75 6c 6c 4e 61 6d thodName,.structuralType.FullNam
3a700 65 29 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 72 65 67 69 e)));..........}............regi
3a720 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 on.Begin(CodeGenerationTools.Get
3a740 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 46 ResourceString("Template_RegionF
3a760 61 63 74 6f 72 79 4d 65 74 68 6f 64 22 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 actoryMethod"));.....this.Write(
3a780 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f "\r\n....///.<summary>\r\n....//
3a7a0 2f 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 /.");.....this.Write(this.ToStri
3a7c0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 ngHelper.ToStringWithCulture(Str
3a7e0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 ing.Format(CultureInfo.CurrentCu
3a800 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 lture,.CodeGenerationTools.GetRe
3a820 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 46 61 63 74 6f 72 79 4d 65 sourceString("Template_FactoryMe
3a840 74 68 6f 64 43 6f 6d 6d 65 6e 74 22 29 2c 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 thodComment"),.structuralType.Na
3a860 6d 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f me)));.....this.Write("\r\n..../
3a880 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 //.</summary>");.....this.Write(
3a8a0 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
3a8c0 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 Culture(ParameterComments(parame
3a8e0 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d 3e 20 6e 65 77 20 54 75 70 6c 65 3c 73 74 72 69 6e ters.Select(p.=>.new.Tuple<strin
3a900 67 2c 20 73 74 72 69 6e 67 3e 28 70 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 70 g,.string>(p.RawParameterName,.p
3a920 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 .ParameterComment)),.region.Curr
3a940 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 entIndentLevel)));.....this.Writ
3a960 65 28 22 5c 72 5c 6e 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 22 29 3b 0d 0a 0a 0a e("\r\n....public.static.");....
3a980 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
3a9a0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 ToStringWithCulture(code.Escape(
3a9c0 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 structuralType)));.....this.Writ
3a9e0 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 e(".");.....this.Write(this.ToSt
3aa00 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6d ringHelper.ToStringWithCulture(m
3aa20 65 74 68 6f 64 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 ethodName));.....this.Write("(")
3aa40 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
3aa60 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 74 72 69 6e 67 2e lper.ToStringWithCulture(string.
3aa80 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 70 20 3d Join(",.",.parameters.Select(p.=
3aaa0 3e 20 70 2e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 2b 20 22 20 22 20 2b 20 70 2e 50 61 72 61 >.p.ParameterType.+.".".+.p.Para
3aac0 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 meterName).ToArray())));.....thi
3aae0 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 s.Write(")\r\n....{\r\n........"
3ab00 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 );.....this.Write(this.ToStringH
3ab20 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 elper.ToStringWithCulture(code.E
3ab40 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 scape(structuralType)));.....thi
3ab60 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 s.Write(".");.....this.Write(thi
3ab80 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
3aba0 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 ture(instanceName));.....this.Wr
3abc0 69 74 65 28 22 20 3d 20 6e 65 77 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 ite(".=.new.");.....this.Write(t
3abe0 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 his.ToStringHelper.ToStringWithC
3ac00 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 ulture(code.Escape(structuralTyp
3ac20 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b e)));.....this.Write("();\r\n");
3ac40 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 46 61 63 74 6f 72 79 4d ...............foreach.(FactoryM
3ac60 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 20 70 61 72 61 6d 65 74 65 72 20 69 6e 20 70 61 72 61 ethodParameter.parameter.in.para
3ac80 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 meters)..........{..............
3aca0 69 66 20 28 70 61 72 61 6d 65 74 65 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 29 0d 0a 20 20 if.(parameter.IsComplexType)....
3acc0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ..........{..................//.
3ace0 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a .....this.Write("........");....
3ad00 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
3ad20 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 ToStringWithCulture(instanceName
3ad40 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 ));.....this.Write(".");.....thi
3ad60 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
3ad80 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 61 72 61 ringWithCulture(code.Escape(para
3ada0 6d 65 74 65 72 2e 53 6f 75 72 63 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 meter.Source)));.....this.Write(
3adc0 22 20 3d 20 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 56 65 72 69 66 79 43 6f 6d 70 6c ".=.StructuralObject.VerifyCompl
3ade0 65 78 4f 62 6a 65 63 74 49 73 4e 6f 74 4e 75 6c 6c 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 exObjectIsNotNull(");.....this.W
3ae00 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
3ae20 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 gWithCulture(parameter.Parameter
3ae40 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 5c 22 22 29 3b 0d Name));.....this.Write(",.\"");.
3ae60 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
3ae80 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 er.ToStringWithCulture(parameter
3aea0 2e 53 6f 75 72 63 65 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 .Source.Name));.....this.Write("
3aec0 5c 22 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d \");\r\n");...................}.
3aee0 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 20 20 20 20 7b .............else..............{
3af00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 0a 0a 0a 74 68 69 73 2e 57 ..................//......this.W
3af20 72 69 74 65 28 22 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 rite("........");.....this.Write
3af40 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
3af60 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 hCulture(instanceName));.....thi
3af80 73 2e 57 72 69 74 65 28 22 2e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 s.Write(".");.....this.Write(thi
3afa0 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
3afc0 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 ture(code.Escape(parameter.Sourc
3afe0 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 22 29 3b 0d 0a 0a 0a e)));.....this.Write(".=.");....
3b000 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
3b020 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 50 61 ToStringWithCulture(parameter.Pa
3b040 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b rameterName));.....this.Write(";
3b060 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 \r\n");...................}.....
3b080 20 20 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 72 .....}.....this.Write("........r
3b0a0 65 74 75 72 6e 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f eturn.");.....this.Write(this.To
3b0c0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
3b0e0 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 (instanceName));.....this.Write(
3b100 22 3b 5c 72 5c 6e 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 ";\r\n....}\r\n");..............
3b120 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 2f .region.End();......}........../
3b140 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f ///////......////////.......////
3b160 2f 2f 2f 2f 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 53 69 6d 70 ////......private.void.WriteSimp
3b180 6c 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 45 64 6d 50 72 6f 70 65 72 74 79 20 73 69 6d 70 6c leTypeProperty(EdmProperty.simpl
3b1a0 65 50 72 6f 70 65 72 74 79 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 eProperty,.CodeGenerationTools.c
3b1c0 6f 64 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 61 64 61 74 61 54 6f 6f ode)......{..........MetadataToo
3b1e0 6c 73 20 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 68 69 73 29 3b ls.ef.=.new.MetadataTools(this);
3b200 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 73 75 .....this.Write("\r\n....///.<su
3b220 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 mmary>\r\n....///.");.....this.W
3b240 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
3b260 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 73 69 6d 70 gWithCulture(SummaryComment(simp
3b280 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c leProperty)));.....this.Write("\
3b2a0 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 3b 0d 0a 0a 0a 0a 74 68 69 r\n....///.</summary>");.....thi
3b2c0 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 s.Write(this.ToStringHelper.ToSt
3b2e0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 ringWithCulture(LongDescriptionC
3b300 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2c 20 31 29 ommentElement(simpleProperty,.1)
3b320 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 5b 45 64 6d ));.....this.Write("\r\n....[Edm
3b340 53 63 61 6c 61 72 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 45 6e 74 69 74 79 4b 65 ScalarPropertyAttribute(EntityKe
3b360 79 50 72 6f 70 65 72 74 79 3d 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 yProperty=");.....this.Write(thi
3b380 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
3b3a0 74 75 72 65 28 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 65 66 2e 49 73 4b 65 79 ture(code.CreateLiteral(ef.IsKey
3b3c0 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 (simpleProperty))));.....this.Wr
3b3e0 69 74 65 28 22 2c 20 49 73 4e 75 6c 6c 61 62 6c 65 3d 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 ite(",.IsNullable=");.....this.W
3b400 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
3b420 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 gWithCulture(code.CreateLiteral(
3b440 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 ef.IsNullable(simpleProperty))))
3b460 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 29 5d 5c 72 5c 6e 20 20 20 20 5b 44 61 74 ;.....this.Write(")]\r\n....[Dat
3b480 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 5d 5c 72 5c 6e 20 20 20 20 22 29 3b 0d 0a aMemberAttribute()]\r\n....");..
3b4a0 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
3b4c0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 r.ToStringWithCulture(code.Space
3b4e0 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 After(NewModifier(simpleProperty
3b500 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ))));.....this.Write(this.ToStri
3b520 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 ngHelper.ToStringWithCulture(Acc
3b540 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 73 69 6d 70 6c 65 50 72 6f essibility.ForProperty(simplePro
3b560 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a perty)));.....this.Write(".");..
3b580 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
3b5a0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d r.ToStringWithCulture(MultiSchem
3b5c0 61 45 73 63 61 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 aEscape(simpleProperty.TypeUsage
3b5e0 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d ,.code)));.....this.Write(".");.
3b600 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
3b620 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 er.ToStringWithCulture(code.Esca
3b640 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 pe(simpleProperty)));.....this.W
3b660 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a rite("\r\n....{\r\n........");..
3b680 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ...this.Write(this.ToStringHelpe
3b6a0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 r.ToStringWithCulture(code.Space
3b6c0 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 73 69 After(Accessibility.ForGetter(si
3b6e0 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 mpleProperty))));.....this.Write
3b700 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 20 20 ("get\r\n........{\r\n");.......
3b720 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 66 2e 43 6c 72 54 79 70 65 28 73 69 6d 70 6c 65 ...........if.(ef.ClrType(simple
3b740 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 20 3d 3d 20 74 79 70 65 6f 66 28 62 79 Property.TypeUsage).==.typeof(by
3b760 74 65 5b 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 te[]))..................{.....th
3b780 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 is.Write("............return.Str
3b7a0 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 47 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 3b 0d ucturalObject.GetValidValue(");.
3b7c0 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
3b7e0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c er.ToStringWithCulture(code.Fiel
3b800 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 dName(simpleProperty)));.....thi
3b820 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 s.Write(");\r\n");..............
3b840 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 .........}..................else
3b860 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 ..................{.....this.Wri
3b880 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 29 3b 0d 0a 0a 0a 0a 74 te("............return.");.....t
3b8a0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
3b8c0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 StringWithCulture(code.FieldName
3b8e0 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 (simpleProperty)));.....this.Wri
3b900 74 65 28 22 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 te(";\r\n");....................
3b920 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 7d 5c 72 ...}.....this.Write("........}\r
3b940 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 \n........");.....this.Write(thi
3b960 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
3b980 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 ture(code.SpaceAfter(Accessibili
3b9a0 74 79 2e 46 6f 72 53 65 74 74 65 72 28 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 ty.ForSetter((simpleProperty))))
3b9c0 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 );.....this.Write("set\r\n......
3b9e0 20 20 7b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 66 2e ..{\r\n");...............if.(ef.
3ba00 49 73 4b 65 79 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 0d 0a 20 20 20 20 20 20 20 20 IsKey(simpleProperty))..........
3ba20 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 28 65 66 2e 43 6c ....{..................if.(ef.Cl
3ba40 72 54 79 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 20 rType(simpleProperty.TypeUsage).
3ba60 3d 3d 20 74 79 70 65 6f 66 28 62 79 74 65 5b 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ==.typeof(byte[]))..............
3ba80 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 ....{.....this.Write("..........
3baa0 20 20 69 66 20 28 21 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 42 69 6e 61 72 79 45 71 ..if.(!StructuralObject.BinaryEq
3bac0 75 61 6c 73 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 uals(");.....this.Write(this.ToS
3bae0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
3bb00 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 code.FieldName(simpleProperty)))
3bb20 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 76 61 6c 75 65 29 29 5c 72 5c 6e 22 ;.....this.Write(",.value))\r\n"
3bb40 29 3b 0d 0a 0a 0a 0a 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 );.......................}......
3bb60 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................
3bb80 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 ..{.....this.Write("............
3bba0 69 66 20 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 if.(");.....this.Write(this.ToSt
3bbc0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
3bbe0 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b ode.FieldName(simpleProperty)));
3bc00 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 21 3d 20 76 61 6c 75 65 29 5c 72 5c 6e 22 .....this.Write(".!=.value)\r\n"
3bc20 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0a 0a 0a 74 );.......................}.....t
3bc40 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 22 29 3b 0d his.Write("............{\r\n");.
3bc60 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 73 68 49 6e 64 65 6e 74 28 43 6f 64 65 52 65 67 ..............PushIndent(CodeReg
3bc80 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 31 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ion.GetIndent(1));..............
3bca0 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 }.....this.Write("............")
3bcc0 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
3bce0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e lper.ToStringWithCulture(Changin
3bd00 67 4d 65 74 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a gMethodName(simpleProperty)));..
3bd20 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 76 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 20 ...this.Write("(value);\r\n.....
3bd40 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 69 6e 67 28 5c 22 .......ReportPropertyChanging(\"
3bd60 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ");.....this.Write(this.ToString
3bd80 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 69 6d 70 6c Helper.ToStringWithCulture(simpl
3bda0 65 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 eProperty.Name));.....this.Write
3bdc0 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 ("\");\r\n............");.....th
3bde0 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 is.Write(this.ToStringHelper.ToS
3be00 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 tringWithCulture(code.FieldName(
3be20 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 simpleProperty)));.....this.Writ
3be40 65 28 22 20 3d 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f e(".=.");.....this.Write(this.To
3be60 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
3be80 28 43 61 73 74 54 6f 45 6e 75 6d 54 79 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 (CastToEnumType(simpleProperty.T
3bea0 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 ypeUsage,.code)));.....this.Writ
3bec0 65 28 22 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 53 65 74 56 61 6c 69 64 56 61 6c 75 e("StructuralObject.SetValidValu
3bee0 65 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 e(");.....this.Write(this.ToStri
3bf00 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 61 73 ngHelper.ToStringWithCulture(Cas
3bf20 74 54 6f 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 tToUnderlyingType(simpleProperty
3bf40 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 .TypeUsage,.code)));.....this.Wr
3bf60 69 74 65 28 22 76 61 6c 75 65 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 ite("value");.....this.Write(thi
3bf80 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
3bfa0 74 75 72 65 28 4f 70 74 69 6f 6e 61 6c 4e 75 6c 6c 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f ture(OptionalNullableParameterFo
3bfc0 72 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2c 20 63 rSetValidValue(simpleProperty,.c
3bfe0 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 5c 22 22 29 3b 0d ode)));.....this.Write(",.\"");.
3c000 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
3c020 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 69 6d 70 6c 65 50 72 6f er.ToStringWithCulture(simplePro
3c040 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 perty.Name));.....this.Write("\"
3c060 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 );\r\n............ReportProperty
3c080 43 68 61 6e 67 65 64 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 Changed(\"");.....this.Write(thi
3c0a0 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c s.ToStringHelper.ToStringWithCul
3c0c0 74 75 72 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a ture(simpleProperty.Name));.....
3c0e0 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 this.Write("\");\r\n............
3c100 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ");.....this.Write(this.ToString
3c120 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 Helper.ToStringWithCulture(Chang
3c140 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d edMethodName(simpleProperty)));.
3c160 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d ....this.Write("();\r\n");......
3c180 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 66 2e 49 73 4b 65 79 28 73 69 6d 70 6c 65 50 72 6f 70 .........if.(ef.IsKey(simpleProp
3c1a0 65 72 74 79 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 50 erty))..............{..........P
3c1c0 6f 70 49 6e 64 65 6e 74 28 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 opIndent();.....this.Write("....
3c1e0 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 ........}\r\n");................
3c200 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 7d 5c 72 ...}.....this.Write("........}\r
3c220 5c 6e 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 70 72 69 76 61 74 65 20 22 29 3b 0d 0a 0a 0a 0a 74 \n....}\r\n....private.");.....t
3c240 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
3c260 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 StringWithCulture(MultiSchemaEsc
3c280 61 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f ape(simpleProperty.TypeUsage,.co
3c2a0 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a de)));.....this.Write(".");.....
3c2c0 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
3c2e0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d oStringWithCulture(code.FieldNam
3c300 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 e(simpleProperty)));.....this.Wr
3c320 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
3c340 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 20 WithCulture(code.StringBefore(".
3c360 3d 20 22 2c 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 73 69 6d 70 6c 65 50 72 =.",.code.CreateLiteral(simplePr
3c380 6f 70 65 72 74 79 2e 44 65 66 61 75 6c 74 56 61 6c 75 65 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 operty.DefaultValue))));.....thi
3c3a0 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 70 61 72 74 69 61 6c 20 76 6f 69 64 20 22 s.Write(";\r\n....partial.void."
3c3c0 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 );.....this.Write(this.ToStringH
3c3e0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 elper.ToStringWithCulture(Changi
3c400 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d ngMethodName(simpleProperty)));.
3c420 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 ....this.Write("(");.....this.Wr
3c440 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
3c460 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 69 WithCulture(MultiSchemaEscape(si
3c480 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 3b mpleProperty.TypeUsage,.code)));
3c4a0 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 76 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 .....this.Write(".value);\r\n...
3c4c0 20 70 61 72 74 69 61 6c 20 76 6f 69 64 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 .partial.void.");.....this.Write
3c4e0 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
3c500 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c hCulture(ChangedMethodName(simpl
3c520 65 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 eProperty)));.....this.Write("()
3c540 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f ;\r\n");...........}........////
3c560 2f 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f ////......////////.......///////
3c580 2f 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 /......private.void.WriteComplex
3c5a0 54 79 70 65 50 72 6f 70 65 72 74 79 28 45 64 6d 50 72 6f 70 65 72 74 79 20 63 6f 6d 70 6c 65 78 TypeProperty(EdmProperty.complex
3c5c0 50 72 6f 70 65 72 74 79 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f Property,.CodeGenerationTools.co
3c5e0 64 65 29 0d 0a 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 de)......{.....this.Write("\r\n.
3c600 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 22 29 3b 0d ...///.<summary>\r\n....///.");.
3c620 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
3c640 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f er.ToStringWithCulture(SummaryCo
3c660 6d 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 mment(complexProperty)));.....th
3c680 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e is.Write("\r\n....///.</summary>
3c6a0 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 ");.....this.Write(this.ToString
3c6c0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 Helper.ToStringWithCulture(LongD
3c6e0 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 escriptionCommentElement(complex
3c700 50 72 6f 70 65 72 74 79 2c 20 31 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 Property,.1)));.....this.Write("
3c720 5c 72 5c 6e 20 20 20 20 5b 45 64 6d 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 41 74 74 72 69 \r\n....[EdmComplexPropertyAttri
3c740 62 75 74 65 28 29 5d 5c 72 5c 6e 20 20 20 20 5b 44 65 73 69 67 6e 65 72 53 65 72 69 61 6c 69 7a bute()]\r\n....[DesignerSerializ
3c760 61 74 69 6f 6e 56 69 73 69 62 69 6c 69 74 79 28 44 65 73 69 67 22 20 2b 0d 0a 20 20 20 20 20 20 ationVisibility(Desig".+........
3c780 20 20 22 6e 65 72 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 56 69 73 69 62 69 6c 69 74 79 2e 43 6f .."nerSerializationVisibility.Co
3c7a0 6e 74 65 6e 74 29 5d 5c 72 5c 6e 20 20 20 20 5b 58 6d 6c 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c ntent)]\r\n....[XmlElement(IsNul
3c7c0 6c 61 62 6c 65 3d 74 72 75 65 29 5d 5c 72 5c 6e 20 20 20 20 5b 53 6f 22 20 2b 0d 0a 20 20 20 20 lable=true)]\r\n....[So".+......
3c7e0 20 20 20 20 22 61 70 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c 6c 61 62 6c 65 3d 74 72 75 65 29 5d ...."apElement(IsNullable=true)]
3c800 5c 72 5c 6e 20 20 20 20 5b 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 5d 5c \r\n....[DataMemberAttribute()]\
3c820 72 5c 6e 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 r\n....");.....this.Write(this.T
3c840 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
3c860 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 63 6f e(code.SpaceAfter(NewModifier(co
3c880 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 mplexProperty))));.....this.Writ
3c8a0 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
3c8c0 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 thCulture(Accessibility.ForPrope
3c8e0 72 74 79 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 rty(complexProperty)));.....this
3c900 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 .Write(".");.....this.Write(this
3c920 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
3c940 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f ure(MultiSchemaEscape(complexPro
3c960 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 perty.TypeUsage,.code)));.....th
3c980 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 is.Write(".");.....this.Write(th
3c9a0 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
3c9c0 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 lture(code.Escape(complexPropert
3c9e0 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 72 5c 6e 20 20 20 20 7b 5c y)));.....this.Write("\r\n....{\
3ca00 72 5c 6e 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 r\n........");.....this.Write(th
3ca20 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
3ca40 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c lture(code.SpaceAfter(Accessibil
3ca60 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 ity.ForGetter(complexProperty)))
3ca80 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 67 65 74 5c 72 5c 6e 20 20 20 20 20 20 );.....this.Write("get\r\n......
3caa0 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e ..{\r\n............");.....this.
3cac0 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 Write(this.ToStringHelper.ToStri
3cae0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d ngWithCulture(code.FieldName(com
3cb00 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 plexProperty)));.....this.Write(
3cb20 22 20 3d 20 47 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 ".=.GetValidValue(");.....this.W
3cb40 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
3cb60 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 gWithCulture(code.FieldName(comp
3cb80 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 lexProperty)));.....this.Write("
3cba0 2c 20 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 ,.\"");.....this.Write(this.ToSt
3cbc0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
3cbe0 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e omplexProperty.Name));.....this.
3cc00 57 72 69 74 65 28 22 5c 22 2c 20 66 61 6c 73 65 2c 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 Write("\",.false,.");.....this.W
3cc20 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
3cc40 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 gWithCulture(InitializedTracking
3cc60 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d Field(complexProperty,.code)));.
3cc80 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 ....this.Write(");\r\n..........
3cca0 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 ..");.....this.Write(this.ToStri
3ccc0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 ngHelper.ToStringWithCulture(Ini
3cce0 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f tializedTrackingField(complexPro
3cd00 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 perty,.code)));.....this.Write("
3cd20 20 3d 20 74 72 75 65 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 .=.true;\r\n............return."
3cd40 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 );.....this.Write(this.ToStringH
3cd60 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 elper.ToStringWithCulture(code.F
3cd80 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a ieldName(complexProperty)));....
3cda0 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 .this.Write(";\r\n........}\r\n.
3cdc0 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 .......");.....this.Write(this.T
3cde0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
3ce00 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e e(code.SpaceAfter(Accessibility.
3ce20 46 6f 72 53 65 74 74 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 29 3b 0d 0a ForSetter(complexProperty))));..
3ce40 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 73 65 74 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c ...this.Write("set\r\n........{\
3ce60 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 r\n............");.....this.Writ
3ce80 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 e(this.ToStringHelper.ToStringWi
3cea0 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d thCulture(ChangingMethodName(com
3cec0 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 plexProperty)));.....this.Write(
3cee0 22 28 76 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 "(value);\r\n............ReportP
3cf00 72 6f 70 65 72 74 79 43 68 61 6e 67 69 6e 67 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 ropertyChanging(\"");.....this.W
3cf20 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e rite(this.ToStringHelper.ToStrin
3cf40 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d gWithCulture(complexProperty.Nam
3cf60 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 e));.....this.Write("\");\r\n...
3cf80 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 .........");.....this.Write(this
3cfa0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
3cfc0 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 ure(code.FieldName(complexProper
3cfe0 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 53 65 74 56 61 6c ty)));.....this.Write(".=.SetVal
3d000 69 64 56 61 6c 75 65 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e idValue(");.....this.Write(this.
3d020 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
3d040 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 re(code.FieldName(complexPropert
3d060 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 2c 20 76 61 6c 75 65 2c 20 5c y)));.....this.Write(",.value,.\
3d080 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e "");.....this.Write(this.ToStrin
3d0a0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 gHelper.ToStringWithCulture(comp
3d0c0 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 lexProperty.Name));.....this.Wri
3d0e0 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a te("\");\r\n............");.....
3d100 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 this.Write(this.ToStringHelper.T
3d120 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 oStringWithCulture(InitializedTr
3d140 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 ackingField(complexProperty,.cod
3d160 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 74 72 75 65 3b 5c 72 e)));.....this.Write(".=.true;\r
3d180 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e \n............ReportPropertyChan
3d1a0 67 65 64 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ged(\"");.....this.Write(this.To
3d1c0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
3d1e0 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 (complexProperty.Name));.....thi
3d200 73 2e 57 72 69 74 65 28 22 5c 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 20 20 20 20 22 29 3b s.Write("\");\r\n............");
3d220 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
3d240 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d per.ToStringWithCulture(ChangedM
3d260 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a ethodName(complexProperty)));...
3d280 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 ..this.Write("();\r\n........}\r
3d2a0 5c 6e 20 20 20 20 7d 5c 72 5c 6e 20 20 20 20 70 72 69 76 61 74 65 20 22 29 3b 0d 0a 0a 0a 0a 74 \n....}\r\n....private.");.....t
3d2c0 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
3d2e0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 StringWithCulture(MultiSchemaEsc
3d300 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 ape(complexProperty.TypeUsage,.c
3d320 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 22 29 3b 0d 0a 0a 0a ode)));.....this.Write(".");....
3d340 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .this.Write(this.ToStringHelper.
3d360 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 ToStringWithCulture(code.FieldNa
3d380 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e me(complexProperty)));.....this.
3d3a0 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 22 29 3b Write(";\r\n....private.bool.");
3d3c0 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c .....this.Write(this.ToStringHel
3d3e0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 per.ToStringWithCulture(Initiali
3d400 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 zedTrackingField(complexProperty
3d420 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e ,.code)));.....this.Write(";\r\n
3d440 20 20 20 20 70 61 72 74 69 61 6c 20 76 6f 69 64 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 ....partial.void.");.....this.Wr
3d460 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 ite(this.ToStringHelper.ToString
3d480 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 WithCulture(ChangingMethodName(c
3d4a0 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 omplexProperty)));.....this.Writ
3d4c0 65 28 22 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 e("(");.....this.Write(this.ToSt
3d4e0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d ringHelper.ToStringWithCulture(M
3d500 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 ultiSchemaEscape(complexProperty
3d520 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 .TypeUsage,.code)));.....this.Wr
3d540 69 74 65 28 22 20 76 61 6c 75 65 29 3b 5c 72 5c 6e 20 20 20 20 70 61 72 74 69 61 6c 20 76 6f 69 ite(".value);\r\n....partial.voi
3d560 64 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 d.");.....this.Write(this.ToStri
3d580 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 ngHelper.ToStringWithCulture(Cha
3d5a0 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 ngedMethodName(complexProperty))
3d5c0 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 28 29 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a );.....this.Write("();\r\n");...
3d5e0 0a 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 ........}........private.void.Wr
3d600 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 73 28 49 45 6e 75 6d 65 72 61 62 6c iteFunctionParameters(IEnumerabl
3d620 65 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d e<FunctionImportParameter>.param
3d640 65 74 65 72 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 eters)......{..........foreach.(
3d660 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 70 61 72 61 6d 65 74 65 FunctionImportParameter.paramete
3d680 72 20 69 6e 20 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 r.in.parameters)..........{.....
3d6a0 20 20 20 20 20 20 20 20 20 69 66 20 28 21 70 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 .........if.(!parameter.NeedsLoc
3d6c0 61 6c 56 61 72 69 61 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 alVariable)..............{......
3d6e0 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 ............continue;...........
3d700 20 20 20 7d 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 62 6a ...}.....this.Write("........Obj
3d720 65 63 74 50 61 72 61 6d 65 74 65 72 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 ectParameter.");.....this.Write(
3d740 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 this.ToStringHelper.ToStringWith
3d760 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e Culture(parameter.LocalVariableN
3d780 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 20 20 20 20 ame));.....this.Write(";\r\n....
3d7a0 20 20 20 20 69 66 20 28 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e ....if.(");.....this.Write(this.
3d7c0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
3d7e0 72 65 28 70 61 72 61 6d 65 74 65 72 2e 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 3f 20 70 61 72 re(parameter.IsNullableOfT.?.par
3d800 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 ameter.FunctionParameterName.+."
3d820 2e 48 61 73 56 61 6c 75 65 22 20 3a 20 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 .HasValue".:.parameter.FunctionP
3d840 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 20 21 3d 20 6e 75 6c 6c 22 29 29 3b 0d 0a 0a 0a arameterName.+.".!=.null"));....
3d860 0a 74 68 69 73 2e 57 72 69 74 65 28 22 29 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 .this.Write(")\r\n........{\r\n.
3d880 20 20 20 20 20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 ...........");.....this.Write(th
3d8a0 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 is.ToStringHelper.ToStringWithCu
3d8c0 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d lture(parameter.LocalVariableNam
3d8e0 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 6e 65 77 20 4f 62 6a 65 e));.....this.Write(".=.new.Obje
3d900 63 74 50 61 72 61 6d 65 74 65 72 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 ctParameter(\"");.....this.Write
3d920 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 (this.ToStringHelper.ToStringWit
3d940 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 hCulture(parameter.EsqlParameter
3d960 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 22 29 3b 0d Name));.....this.Write("\",.");.
3d980 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ....this.Write(this.ToStringHelp
3d9a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 er.ToStringWithCulture(parameter
3d9c0 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 .FunctionParameterName));.....th
3d9e0 69 73 2e 57 72 69 74 65 28 22 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 20 20 20 is.Write(");\r\n........}\r\n...
3da00 20 20 20 20 20 65 6c 73 65 5c 72 5c 6e 20 20 20 20 20 20 20 20 7b 5c 72 5c 6e 20 20 20 20 20 20 .....else\r\n........{\r\n......
3da20 20 20 20 20 20 20 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f ......");.....this.Write(this.To
3da40 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
3da60 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 3b 0d (parameter.LocalVariableName));.
3da80 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 20 3d 20 6e 65 77 20 4f 62 6a 65 63 74 50 61 72 ....this.Write(".=.new.ObjectPar
3daa0 61 6d 65 74 65 72 28 5c 22 22 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 ameter(\"");.....this.Write(this
3dac0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
3dae0 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 ure(parameter.EsqlParameterName)
3db00 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 5c 22 2c 20 74 79 70 65 6f 66 28 22 29 );.....this.Write("\",.typeof(")
3db20 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 ;.....this.Write(this.ToStringHe
3db40 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 lper.ToStringWithCulture(paramet
3db60 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 29 29 3b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 er.RawClrTypeName));.....this.Wr
3db80 69 74 65 28 22 29 29 3b 5c 72 5c 6e 20 20 20 20 20 20 20 20 7d 5c 72 5c 6e 5c 72 5c 6e 22 29 3b ite("));\r\n........}\r\n\r\n");
3dba0 0d 0a 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 ...............}......}........p
3dbc0 72 69 76 61 74 65 20 76 6f 69 64 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 rivate.void.WriteLazyLoadingEnab
3dbe0 6c 65 64 28 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 63 6f 6e 74 61 69 6e 65 72 29 0d 0a led(EntityContainer.container)..
3dc00 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 6c 61 7a 79 4c 6f 61 64 69 6e ....{..........string.lazyLoadin
3dc20 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 gAttributeValue.=.null;.........
3dc40 20 73 74 72 69 6e 67 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 4e 61 6d 65 .string.lazyLoadingAttributeName
3dc60 20 3d 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 45 44 4d 5f 41 4e 4e 4f 54 41 54 .=.MetadataConstants.EDM_ANNOTAT
3dc80 49 4f 4e 5f 30 39 5f 30 32 20 2b 20 22 3a 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 ION_09_02.+.":LazyLoadingEnabled
3dca0 22 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 2e 54 72 79 ";..........if(MetadataTools.Try
3dcc0 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 GetStringMetadataPropertySetting
3dce0 28 63 6f 6e 74 61 69 6e 65 72 2c 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 (container,.lazyLoadingAttribute
3dd00 4e 61 6d 65 2c 20 6f 75 74 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 Name,.out.lazyLoadingAttributeVa
3dd20 6c 75 65 29 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 62 6f lue))..........{..............bo
3dd40 6f 6c 20 69 73 4c 61 7a 79 4c 6f 61 64 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 ol.isLazyLoading.=.false;.......
3dd60 20 20 20 20 20 20 20 69 66 28 62 6f 6f 6c 2e 54 72 79 50 61 72 73 65 28 6c 61 7a 79 4c 6f 61 64 .......if(bool.TryParse(lazyLoad
3dd80 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 2c 20 6f 75 74 20 69 73 4c 61 7a 79 4c 6f 61 ingAttributeValue,.out.isLazyLoa
3dda0 64 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 0a 0a 0a 74 68 69 73 2e 57 ding))..............{.....this.W
3ddc0 72 69 74 65 28 22 20 20 20 20 20 20 20 20 74 68 69 73 2e 43 6f 6e 74 65 78 74 4f 70 74 69 6f 6e rite("........this.ContextOption
3dde0 73 2e 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 22 29 3b 0d 0a 0a 0a 0a 74 s.LazyLoadingEnabled.=.");.....t
3de00 68 69 73 2e 57 72 69 74 65 28 74 68 69 73 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f his.Write(this.ToStringHelper.To
3de20 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 73 4c 61 7a 79 4c 6f 61 64 69 6e 67 2e StringWithCulture(isLazyLoading.
3de40 54 6f 53 74 72 69 6e 67 28 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 29 29 3b ToString().ToLowerInvariant()));
3de60 0d 0a 0a 0a 0a 74 68 69 73 2e 57 72 69 74 65 28 22 3b 5c 72 5c 6e 22 29 3b 0d 0a 0a 0a 0a 0d 0a .....this.Write(";\r\n");.......
3de80 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d ............}..........}......}.
3dea0 0a 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f 20 0d 0a 2f 2f 2f 2f 2f 2f 2f 2f ...////////..////////...////////
3dec0 0d 0a 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 7b 20 ..public.string.SourceCsdlPath{.
3dee0 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 4d 6f 64 65 6c get;.set;.}..public.string.Model
3df00 4e 61 6d 65 73 70 61 63 65 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 45 Namespace{.get;.set;.}..public.E
3df20 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 7b dmItemCollection.ItemCollection{
3df40 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 .get;.set;.}..public.IEnumerable
3df60 3c 73 74 72 69 6e 67 3e 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 7b 20 67 65 74 <string>.ReferenceCsdlPaths{.get
3df80 3b 20 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 4e 75 6c 6c 61 62 6c 65 3c 62 6f 6f 6c 3e 20 ;.set;.}..public.Nullable<bool>.
3dfa0 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 7b 20 67 65 74 3b 20 CreateContextAddToMethods{.get;.
3dfc0 73 65 74 3b 20 7d 0d 0a 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 set;.}..public.Dictionary<string
3dfe0 2c 20 73 74 72 69 6e 67 3e 20 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 ,.string>.EdmToObjectNamespaceMa
3e000 70 0d 0a 7b 0d 0a 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 65 64 6d 54 6f 4f 62 6a p..{......get.{.return._edmToObj
3e020 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 3b 20 7d 0d 0a 20 20 20 20 73 65 74 20 7b 20 5f 65 ectNamespaceMap;.}......set.{._e
3e040 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 20 3d 20 76 61 6c 75 65 3b 20 dmToObjectNamespaceMap.=.value;.
3e060 7d 0d 0a 7d 0d 0a 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 }..}..public.Dictionary<string,.
3e080 73 74 72 69 6e 67 3e 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 string>._edmToObjectNamespaceMap
3e0a0 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 .=.new.Dictionary<string,.string
3e0c0 3e 28 29 3b 0d 0a 70 75 62 6c 69 63 20 44 6f 75 62 6c 65 20 53 6f 75 72 63 65 45 64 6d 56 65 72 >();..public.Double.SourceEdmVer
3e0e0 73 69 6f 6e 0d 0a 7b 0d 0a 20 20 20 20 67 65 74 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 sion..{......get......{.........
3e100 20 69 66 20 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 .if.(ItemCollection.!=.null)....
3e120 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 74 65 6d ......{..............return.Item
3e140 43 6f 6c 6c 65 63 74 69 6f 6e 2e 45 64 6d 56 65 72 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 Collection.EdmVersion;..........
3e160 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 30 2e 30 3b 0d 0a 20 20 20 20 7d 0d }............return.0.0;......}.
3e180 0a 7d 0d 0a 0d 0a 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 56 65 72 69 66 79 54 79 70 65 55 6e 69 .}....private.bool.VerifyTypeUni
3e1a0 71 75 65 6e 65 73 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 74 79 70 65 queness(IEnumerable<string>.type
3e1c0 73 29 0d 0a 7b 0d 0a 20 20 20 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 20 68 61 73 68 20 s)..{......HashSet<string>.hash.
3e1e0 3d 20 6e 65 77 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 66 6f =.new.HashSet<string>();......fo
3e200 72 65 61 63 68 20 28 73 74 72 69 6e 67 20 74 79 70 65 20 69 6e 20 74 79 70 65 73 29 0d 0a 20 20 reach.(string.type.in.types)....
3e220 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 68 61 73 68 2e 41 64 64 28 74 79 70 65 29 ..{..........if.(!hash.Add(type)
3e240 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 )..........{..............//....
3e260 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d ...........Errors.Add(new.System
3e280 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 .CodeDom.Compiler.CompilerError(
3e2a0 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 33 34 22 2c 0d SourceCsdlPath,.-1,.-1,."6034",.
3e2c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 .................String.Format(C
3e2e0 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 20 20 ultureInfo.CurrentCulture,......
3e300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ................CodeGenerationTo
3e320 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f ols.GetResourceString("Template_
3e340 44 75 70 6c 69 63 61 74 65 54 6f 70 4c 65 76 65 6c 54 79 70 65 22 29 2c 0d 0a 20 20 20 20 20 20 DuplicateTopLevelType"),........
3e360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 ..............type)));..........
3e380 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ....return.false;..........}....
3e3a0 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 7d 0d 0a 0d 0a 76 6f 69 64 ..}......return.true;..}....void
3e3c0 20 41 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 55 73 65 72 53 65 74 74 69 6e 67 73 20 .ApplyUserSettings(UserSettings.
3e3e0 75 73 65 72 53 65 74 74 69 6e 67 73 29 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 69 userSettings)..{......//.......i
3e400 66 20 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 f.(SourceCsdlPath.==.null)......
3e420 7b 0d 0a 23 69 66 20 21 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 {..#if.!PREPROCESSED_TEMPLATE...
3e440 20 20 20 20 20 20 20 69 66 28 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 .......if(userSettings.SourceCsd
3e460 6c 50 61 74 68 20 3d 3d 20 22 24 22 20 2b 20 22 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 22 20 2b lPath.==."$".+."edmxInputFile".+
3e480 20 22 24 22 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 45 72 ."$")..........{..............Er
3e4a0 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 rors.Add(new.System.CodeDom.Comp
3e4c0 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 iler.CompilerError(Host.Template
3e4e0 46 69 6c 65 2c 20 2d 31 2c 20 2d 31 2c 20 22 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 File,.-1,.-1,."",...............
3e500 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 ...CodeGenerationTools.GetResour
3e520 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 70 6c 61 63 65 56 73 49 74 65 6d ceString("Template_ReplaceVsItem
3e540 54 65 6d 70 6c 61 74 65 54 6f 6b 65 6e 22 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 TemplateToken")));..............
3e560 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 53 6f return;..........}............So
3e580 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 urceCsdlPath.=.Host.ResolvePath(
3e5a0 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 3b 0d 0a 23 userSettings.SourceCsdlPath);..#
3e5c0 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 75 else..........SourceCsdlPath.=.u
3e5e0 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 3b 0d 0a 23 65 6e serSettings.SourceCsdlPath;..#en
3e600 64 69 66 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 20 6e 6f 72 6d 61 6c 69 7a 65 20 74 dif......}........//.normalize.t
3e620 68 65 20 70 61 74 68 2c 20 72 65 6d 6f 76 65 20 2e 2e 5c 20 66 72 6f 6d 20 69 74 0d 0a 20 20 20 he.path,.remove...\.from.it.....
3e640 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 50 61 74 68 2e 47 65 74 46 75 6c 6c 50 61 .SourceCsdlPath.=.Path.GetFullPa
3e660 74 68 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 69 66 20 th(SourceCsdlPath);..........if.
3e680 28 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 (ReferenceCsdlPaths.==.null)....
3e6a0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 ..{..........ReferenceCsdlPaths.
3e6c0 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 =.userSettings.ReferenceCsdlPath
3e6e0 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 21 43 72 65 61 74 65 43 6f 6e 74 s;......}........if.(!CreateCont
3e700 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 2e 48 61 73 56 61 6c 75 65 29 0d 0a 20 20 20 20 7b extAddToMethods.HasValue)......{
3e720 0d 0a 20 20 20 20 20 20 20 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 ..........CreateContextAddToMeth
3e740 6f 64 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 72 65 61 74 65 43 6f 6e 74 65 78 74 ods.=.userSettings.CreateContext
3e760 41 64 64 54 6f 4d 65 74 68 6f 64 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 44 65 66 61 AddToMethods;......}........Defa
3e780 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 20 3d 20 43 6f 64 65 47 65 6e 65 72 61 74 69 ultSummaryComment.=.CodeGenerati
3e7a0 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c onTools.GetResourceString("Templ
3e7c0 61 74 65 5f 43 6f 6d 6d 65 6e 74 4e 6f 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 22 29 3b 0d 0a 7d ate_CommentNoDocumentation");..}
3e7e0 0d 0a 0d 0a 63 6c 61 73 73 20 55 73 65 72 53 65 74 74 69 6e 67 73 0d 0a 7b 0d 0a 20 20 20 20 70 ....class.UserSettings..{......p
3e800 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 7b 20 67 65 74 ublic.string.SourceCsdlPath{.get
3e820 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 5b 5d 20 52 65 ;.set;.}......public.string[].Re
3e840 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 ferenceCsdlPaths{.get;.set;.}...
3e860 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 ...public.bool.FullyQualifySyste
3e880 6d 54 79 70 65 73 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 mTypes{.get;.set;.}......public.
3e8a0 62 6f 6f 6c 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 7b 20 bool.CreateContextAddToMethods{.
3e8c0 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 43 61 6d get;.set;.}......public.bool.Cam
3e8e0 65 6c 43 61 73 65 46 69 65 6c 64 73 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 7d 0d 0a 0d 0a elCaseFields{.get;.set;.}..}....
3e900 73 74 72 69 6e 67 20 47 65 74 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 28 43 6f 64 65 47 65 6e 65 string.GetNamespaceName(CodeGene
3e920 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 rationTools.code)..{......string
3e940 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 56 73 4e 61 6d 65 73 70 61 63 .namespaceName.=.code.VsNamespac
3e960 65 53 75 67 67 65 73 74 69 6f 6e 28 29 3b 0d 0a 0d 0a 23 69 66 20 50 52 45 50 52 4f 43 45 53 53 eSuggestion();....#if.PREPROCESS
3e980 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 ED_TEMPLATE......if.(String.IsNu
3e9a0 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 7b llOrEmpty(namespaceName))......{
3e9c0 0d 0a 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 47 65 74 4f 62 6a ..........namespaceName.=.GetObj
3e9e0 65 63 74 4e 61 6d 65 73 70 61 63 65 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 3b 0d 0a 20 ectNamespace(ModelNamespace);...
3ea00 20 20 20 7d 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 ...}..#endif......return.namespa
3ea20 63 65 4e 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4d 75 6c 74 69 53 63 68 65 6d 61 ceName;..}....string.MultiSchema
3ea40 45 73 63 61 70 65 28 54 79 70 65 55 73 61 67 65 20 75 73 61 67 65 2c 20 43 6f 64 65 47 65 6e 65 Escape(TypeUsage.usage,.CodeGene
3ea60 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 4d 65 74 61 64 61 rationTools.code)..{......Metada
3ea80 74 61 54 6f 6f 6c 73 20 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 taTools.ef.=.new.MetadataTools(t
3eaa0 68 69 73 29 3b 0d 0a 20 20 20 20 69 66 20 28 75 73 61 67 65 2e 45 64 6d 54 79 70 65 20 21 3d 20 his);......if.(usage.EdmType.!=.
3eac0 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 75 73 61 67 65 2e null)......{..........if.(usage.
3eae0 45 64 6d 54 79 70 65 20 69 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 0d 0a 20 20 20 20 EdmType.is.StructuralType)......
3eb00 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4d 75 6c 74 69 53 ....{..............return.MultiS
3eb20 63 68 65 6d 61 45 73 63 61 70 65 28 75 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 63 6f 64 65 29 chemaEscape(usage.EdmType,.code)
3eb40 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 75 ;..........}..........else.if.(u
3eb60 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 79 70 65 29 0d 0a 20 20 20 20 20 sage.EdmType.is.EnumType).......
3eb80 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 74 79 70 65 4e 61 6d ...{..............string.typeNam
3eba0 65 20 3d 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 75 73 61 67 65 2e 45 64 6d 54 e.=.MultiSchemaEscape(usage.EdmT
3ebc0 79 70 65 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 66 2e ype,.code);..............if.(ef.
3ebe0 49 73 4e 75 6c 6c 61 62 6c 65 28 75 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 IsNullable(usage))..............
3ec00 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 53 74 72 69 6e 67 {..................return.String
3ec20 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c .Format(CultureInfo.InvariantCul
3ec40 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 3c 7b 30 7d 3e 22 2c 20 74 79 70 65 4e 61 6d 65 29 ture,."Nullable<{0}>",.typeName)
3ec60 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 ;..............}................
3ec80 72 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 return.typeName;..........}.....
3eca0 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 45 73 63 61 70 65 28 75 73 61 .}........return.code.Escape(usa
3ecc0 67 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 ge);..}....string.MultiSchemaEsc
3ece0 61 70 65 28 45 64 6d 54 79 70 65 20 74 79 70 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e ape(EdmType.type,.CodeGeneration
3ed00 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 74 79 70 65 2e 4e 61 6d Tools.code)..{......if.(type.Nam
3ed20 65 73 70 61 63 65 4e 61 6d 65 20 21 3d 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 espaceName.!=.ModelNamespace)...
3ed40 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 ...{..........return.code.Create
3ed60 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 47 65 FullName(code.EscapeNamespace(Ge
3ed80 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 74 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e tObjectNamespace(type.NamespaceN
3eda0 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 29 29 3b 0d 0a 20 20 20 20 ame)),.code.Escape(type));......
3edc0 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 }........return.code.Escape(type
3ede0 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 4e 61 76 69 );..}....string.NewModifier(Navi
3ee00 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 gationProperty.navigationPropert
3ee20 79 29 0d 0a 7b 0d 0a 20 20 20 20 54 79 70 65 20 62 61 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f y)..{......Type.baseType.=.typeo
3ee40 66 28 45 6e 74 69 74 79 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 4e 65 77 f(EntityObject);......return.New
3ee60 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 6e 61 76 69 67 61 74 69 6f 6e 50 72 6f Modifier(baseType,.navigationPro
3ee80 70 65 72 74 79 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4e 65 77 4d 6f 64 perty.Name);..}....string.NewMod
3eea0 69 66 69 65 72 28 45 64 6d 46 75 6e 63 74 69 6f 6e 20 65 64 6d 46 75 6e 63 74 69 6f 6e 29 0d 0a ifier(EdmFunction.edmFunction)..
3eec0 7b 0d 0a 20 20 20 20 54 79 70 65 20 62 61 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 4f 62 {......Type.baseType.=.typeof(Ob
3eee0 6a 65 63 74 43 6f 6e 74 65 78 74 29 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 4e 65 77 4d 6f 64 jectContext);......return.NewMod
3ef00 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 ifier(baseType,.edmFunction.Name
3ef20 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 45 6e 74 69 );..}....string.NewModifier(Enti
3ef40 74 79 53 65 74 20 73 65 74 29 0d 0a 7b 0d 0a 20 20 20 20 54 79 70 65 20 62 61 73 65 54 79 70 65 tySet.set)..{......Type.baseType
3ef60 20 3d 20 74 79 70 65 6f 66 28 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 29 3b 0d 0a 20 20 20 20 72 .=.typeof(ObjectContext);......r
3ef80 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 73 65 74 2e eturn.NewModifier(baseType,.set.
3efa0 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 Name);..}....string.NewModifier(
3efc0 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 7b 0d 0a 20 20 20 20 54 79 EdmProperty.property)..{......Ty
3efe0 70 65 20 62 61 73 65 54 79 70 65 3b 0d 0a 20 20 20 20 69 66 20 28 70 72 6f 70 65 72 74 79 2e 44 pe.baseType;......if.(property.D
3f000 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 3d 20 eclaringType.BuiltInTypeKind.==.
3f020 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 BuiltInTypeKind.EntityType).....
3f040 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 45 6e .{..........baseType.=.typeof(En
3f060 74 69 74 79 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 0d 0a 20 tityObject);......}......else...
3f080 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 74 79 70 65 6f 66 28 ...{..........baseType.=.typeof(
3f0a0 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 ComplexObject);......}......retu
3f0c0 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 70 72 6f 70 65 72 74 rn.NewModifier(baseType,.propert
3f0e0 79 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4e 65 77 4d 6f 64 69 66 69 65 y.Name);..}....string.NewModifie
3f100 72 28 54 79 70 65 20 74 79 70 65 2c 20 73 74 72 69 6e 67 20 6d 65 6d 62 65 72 4e 61 6d 65 29 0d r(Type.type,.string.memberName).
3f120 0a 7b 0d 0a 20 20 20 20 69 66 20 28 48 61 73 42 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d 61 74 .{......if.(HasBaseMemberWithMat
3f140 63 68 69 6e 67 4e 61 6d 65 28 74 79 70 65 2c 20 6d 65 6d 62 65 72 4e 61 6d 65 29 29 0d 0a 20 20 chingName(type,.memberName))....
3f160 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 6e 65 77 22 3b 0d 0a 20 20 20 20 ..{..........return."new";......
3f180 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 7d 0d 0a }......return.string.Empty;..}..
3f1a0 0d 0a 73 74 61 74 69 63 20 62 6f 6f 6c 20 48 61 73 42 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d ..static.bool.HasBaseMemberWithM
3f1c0 61 74 63 68 69 6e 67 4e 61 6d 65 28 54 79 70 65 20 74 79 70 65 2c 20 73 74 72 69 6e 67 20 6d 65 atchingName(Type.type,.string.me
3f1e0 6d 62 65 72 4e 61 6d 65 29 0d 0a 7b 0d 0a 20 20 20 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 20 62 mberName)..{......BindingFlags.b
3f200 69 6e 64 69 6e 67 46 6c 61 67 73 20 3d 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 46 6c 61 74 74 indingFlags.=.BindingFlags.Flatt
3f220 65 6e 48 69 65 72 61 72 63 68 79 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 enHierarchy.|.BindingFlags.NonPu
3f240 62 6c 69 63 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 50 75 62 6c 69 63 0d 0a 20 20 20 20 blic.|.BindingFlags.Public......
3f260 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 49 6e 73 74 61 ............|.BindingFlags.Insta
3f280 6e 63 65 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 53 74 61 74 69 63 3b 0d 0a 20 20 20 20 nce.|.BindingFlags.Static;......
3f2a0 72 65 74 75 72 6e 20 74 79 70 65 2e 47 65 74 4d 65 6d 62 65 72 73 28 62 69 6e 64 69 6e 67 46 6c return.type.GetMembers(bindingFl
3f2c0 61 67 73 29 2e 57 68 65 72 65 28 6d 20 3d 3e 20 49 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 28 ags).Where(m.=>.IsVisibleMember(
3f2e0 6d 29 29 2e 41 6e 79 28 6d 20 3d 3e 20 6d 2e 4e 61 6d 65 20 3d 3d 20 6d 65 6d 62 65 72 4e 61 6d m)).Any(m.=>.m.Name.==.memberNam
3f300 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 43 61 73 74 54 6f 45 6e 75 6d 54 79 70 65 28 e);..}....string.CastToEnumType(
3f320 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 TypeUsage.typeUsage,.CodeGenerat
3f340 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 45 6e 75 6d 54 79 70 65 20 ionTools.code)..{......EnumType.
3f360 74 79 70 65 20 3d 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 61 73 20 45 6e 75 6d type.=.typeUsage.EdmType.as.Enum
3f380 54 79 70 65 3b 0d 0a 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 Type;......if.(type.==.null)....
3f3a0 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 0d 0a 20 20 ......return.string.Empty;......
3f3c0 20 20 72 65 74 75 72 6e 20 22 28 22 20 2b 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 ..return."(".+.MultiSchemaEscape
3f3e0 28 74 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 20 2b 20 22 29 22 3b 0d 0a 7d 0d 0a 0d 0a 73 (typeUsage,.code).+.")";..}....s
3f400 74 72 69 6e 67 20 43 61 73 74 54 6f 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 28 54 79 70 65 55 tring.CastToUnderlyingType(TypeU
3f420 73 61 67 65 20 74 79 70 65 55 73 61 67 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f sage.typeUsage,.CodeGenerationTo
3f440 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 ols.code)..{......MetadataTools.
3f460 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 68 69 73 29 3b 0d 0a 20 ef.=.new.MetadataTools(this);...
3f480 20 20 20 45 6e 75 6d 54 79 70 65 20 74 79 70 65 20 3d 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d ...EnumType.type.=.typeUsage.Edm
3f4a0 54 79 70 65 20 61 73 20 45 6e 75 6d 54 79 70 65 3b 0d 0a 20 20 20 20 69 66 20 28 74 79 70 65 20 Type.as.EnumType;......if.(type.
3f4c0 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 ==.null)......{..........return.
3f4e0 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 73 74 72 69 string.Empty;......}........stri
3f500 6e 67 20 63 6c 72 54 79 70 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 2e 55 6e ng.clrType.=.code.Escape(type.Un
3f520 64 65 72 6c 79 69 6e 67 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2c 20 derlyingType.ClrEquivalentType,.
3f540 66 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 3a 20 66 61 6c 73 65 29 3b fullyQualifySystemTypes:.false);
3f560 0d 0a 0d 0a 20 20 20 20 69 66 20 28 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 ........if.(ef.IsNullable(typeUs
3f580 61 67 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 63 6c 72 54 79 70 65 20 3d 20 age))......{..........clrType.=.
3f5a0 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 String.Format(CultureInfo.Invari
3f5c0 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 3c 7b 30 7d 3e 22 2c 20 63 6c 72 antCulture,."Nullable<{0}>",.clr
3f5e0 54 79 70 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 22 28 22 20 Type);......}........return."(".
3f600 2b 20 63 6c 72 54 79 70 65 20 2b 20 22 29 22 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 43 68 +.clrType.+.")";..}....string.Ch
3f620 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 angingMethodName(EdmMember.membe
3f640 72 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 r)..{......return.string.Format(
3f660 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4f CultureInfo.InvariantCulture,."O
3f680 6e 7b 30 7d 43 68 61 6e 67 69 6e 67 22 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 3b 0d 0a 7d 0d n{0}Changing",.member.Name);..}.
3f6a0 0a 0d 0a 73 74 72 69 6e 67 20 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 45 64 6d 4d ...string.ChangedMethodName(EdmM
3f6c0 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 ember.member)..{......return.str
3f6e0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 ing.Format(CultureInfo.Invariant
3f700 43 75 6c 74 75 72 65 2c 20 22 4f 6e 7b 30 7d 43 68 61 6e 67 65 64 22 2c 20 6d 65 6d 62 65 72 2e Culture,."On{0}Changed",.member.
3f720 4e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 49 6e 69 74 69 61 6c 69 7a 65 64 54 Name);..}....string.InitializedT
3f740 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 rackingField(EdmProperty.propert
3f760 79 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d y,.CodeGenerationTools.code)..{.
3f780 0a 20 20 20 20 73 74 72 69 6e 67 20 6e 61 6d 65 50 61 72 74 20 3d 20 70 72 6f 70 65 72 74 79 2e .....string.namePart.=.property.
3f7a0 4e 61 6d 65 20 2b 20 22 49 6e 69 74 69 61 6c 69 7a 65 64 22 3b 0d 0a 20 20 20 20 69 66 20 28 63 Name.+."Initialized";......if.(c
3f7c0 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 ode.CamelCaseFields)......{.....
3f7e0 20 20 20 20 20 6e 61 6d 65 50 61 72 74 20 3d 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 6e .....namePart.=.code.CamelCase(n
3f800 61 6d 65 50 61 72 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 22 5f 22 amePart);......}......return."_"
3f820 20 2b 20 6e 61 6d 65 50 61 72 74 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4f 70 74 69 6f 6e .+.namePart;..}....string.Option
3f840 61 6c 4e 75 6c 6c 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 53 65 74 56 61 6c 69 64 56 61 alNullableParameterForSetValidVa
3f860 6c 75 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 2c 20 43 6f 64 65 47 65 6e 65 72 61 lue(EdmMember.member,.CodeGenera
3f880 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 4d 65 74 61 64 61 74 61 tionTools.code)..{......Metadata
3f8a0 54 6f 6f 6c 73 20 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 74 68 69 Tools.ef.=.new.MetadataTools(thi
3f8c0 73 29 3b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 6c 69 73 74 20 3d 20 73 74 72 69 6e 67 2e 45 6d s);......string.list.=.string.Em
3f8e0 70 74 79 3b 0d 0a 20 20 20 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 20 74 79 70 65 20 3d 20 6d pty;......PrimitiveType.type.=.m
3f900 65 6d 62 65 72 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 61 73 20 50 72 69 6d 69 ember.TypeUsage.EdmType.as.Primi
3f920 74 69 76 65 54 79 70 65 3b 0d 0a 20 20 20 20 69 66 20 28 74 79 70 65 20 21 3d 20 6e 75 6c 6c 20 tiveType;......if.(type.!=.null.
3f940 26 26 20 74 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2e 49 73 43 6c 61 73 &&.type.ClrEquivalentType.IsClas
3f960 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 61 64 61 74 61 50 72 6f 70 65 s)......{..........MetadataPrope
3f980 72 74 79 20 73 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 rty.storeGeneratedPatternPropert
3f9a0 79 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 4e 75 6c 6c 61 62 y.=.null;..........bool.isNullab
3f9c0 6c 65 20 3d 20 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 6d 65 6d 62 65 72 2e 54 79 70 65 55 73 le.=.ef.IsNullable(member.TypeUs
3f9e0 61 67 65 29 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 6d 65 6d 62 65 72 2e 4d 65 74 age).||..............(member.Met
3fa00 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 4d 65 74 61 adataProperties.TryGetValue(Meta
3fa20 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 45 44 4d 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f dataConstants.EDM_ANNOTATION_09_
3fa40 30 32 20 2b 20 22 3a 53 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 22 2c 20 66 02.+.":StoreGeneratedPattern",.f
3fa60 61 6c 73 65 2c 20 6f 75 74 20 73 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 alse,.out.storeGeneratedPatternP
3fa80 72 6f 70 65 72 74 79 29 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 roperty).&&...............Object
3faa0 2e 45 71 75 61 6c 73 28 73 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f .Equals(storeGeneratedPatternPro
3fac0 70 65 72 74 79 2e 56 61 6c 75 65 2c 20 22 43 6f 6d 70 75 74 65 64 22 29 29 3b 0d 0a 20 20 20 20 perty.Value,."Computed"));......
3fae0 20 20 20 20 6c 69 73 74 20 2b 3d 20 22 2c 20 22 20 2b 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 ....list.+=.",.".+.code.CreateLi
3fb00 74 65 72 61 6c 28 69 73 4e 75 6c 6c 61 62 6c 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 teral(isNullable);......}......r
3fb20 65 74 75 72 6e 20 6c 69 73 74 3b 0d 0a 7d 0d 0a 0d 0a 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 73 eturn.list;..}....static.bool.Is
3fb40 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 28 4d 65 6d 62 65 72 49 6e 66 6f 20 6d 65 6d 62 65 72 49 VisibleMember(MemberInfo.memberI
3fb60 6e 66 6f 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f 20 69 73 20 45 nfo)..{......if.(memberInfo.is.E
3fb80 76 65 6e 74 49 6e 66 6f 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 45 76 65 6e 74 49 ventInfo)......{..........EventI
3fba0 6e 66 6f 20 65 69 20 3d 20 28 45 76 65 6e 74 49 6e 66 6f 29 6d 65 6d 62 65 72 49 6e 66 6f 3b 0d nfo.ei.=.(EventInfo)memberInfo;.
3fbc0 0a 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 49 6e 66 6f 20 61 64 64 20 3d 20 65 69 2e 47 65 74 .........MethodInfo.add.=.ei.Get
3fbe0 41 64 64 4d 65 74 68 6f 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 49 6e 66 6f AddMethod();..........MethodInfo
3fc00 20 72 65 6d 6f 76 65 20 3d 20 65 69 2e 47 65 74 52 65 6d 6f 76 65 4d 65 74 68 6f 64 28 29 3b 0d .remove.=.ei.GetRemoveMethod();.
3fc20 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 .........return.IsVisibleMethod(
3fc40 61 64 64 29 20 7c 7c 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 72 65 6d 6f 76 65 29 3b add).||.IsVisibleMethod(remove);
3fc60 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f ......}......else.if.(memberInfo
3fc80 20 69 73 20 46 69 65 6c 64 49 6e 66 6f 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 46 .is.FieldInfo)......{..........F
3fca0 69 65 6c 64 49 6e 66 6f 20 66 69 20 3d 20 28 46 69 65 6c 64 49 6e 66 6f 29 6d 65 6d 62 65 72 49 ieldInfo.fi.=.(FieldInfo)memberI
3fcc0 6e 66 6f 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 21 66 69 2e 49 73 50 72 69 76 61 nfo;..........return.!fi.IsPriva
3fce0 74 65 20 26 26 20 21 66 69 2e 49 73 41 73 73 65 6d 62 6c 79 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 te.&&.!fi.IsAssembly;......}....
3fd00 20 20 65 6c 73 65 20 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f 20 69 73 20 4d 65 74 68 6f 64 42 ..else.if.(memberInfo.is.MethodB
3fd20 61 73 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 42 61 73 65 20 ase)......{..........MethodBase.
3fd40 6d 62 20 3d 20 28 4d 65 74 68 6f 64 42 61 73 65 29 6d 65 6d 62 65 72 49 6e 66 6f 3b 0d 0a 20 20 mb.=.(MethodBase)memberInfo;....
3fd60 20 20 20 20 20 20 69 66 20 28 6d 62 2e 49 73 53 70 65 63 69 61 6c 4e 61 6d 65 29 0d 0a 20 20 20 ......if.(mb.IsSpecialName).....
3fd80 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 .........return.false;..........
3fda0 72 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 6d 62 29 3b 0d 0a 20 20 20 return.IsVisibleMethod(mb);.....
3fdc0 20 7d 0d 0a 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 65 6d 62 65 72 49 6e 66 6f 20 69 73 20 50 .}......else.if.(memberInfo.is.P
3fde0 72 6f 70 65 72 74 79 49 6e 66 6f 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 50 72 6f ropertyInfo)......{..........Pro
3fe00 70 65 72 74 79 49 6e 66 6f 20 70 69 20 3d 20 28 50 72 6f 70 65 72 74 79 49 6e 66 6f 29 6d 65 6d pertyInfo.pi.=.(PropertyInfo)mem
3fe20 62 65 72 49 6e 66 6f 3b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 68 6f 64 49 6e 66 6f 20 67 65 74 berInfo;..........MethodInfo.get
3fe40 20 3d 20 70 69 2e 47 65 74 47 65 74 4d 65 74 68 6f 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 4d .=.pi.GetGetMethod();..........M
3fe60 65 74 68 6f 64 49 6e 66 6f 20 73 65 74 20 3d 20 70 69 2e 47 65 74 53 65 74 4d 65 74 68 6f 64 28 ethodInfo.set.=.pi.GetSetMethod(
3fe80 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 );..........return.IsVisibleMeth
3fea0 6f 64 28 67 65 74 29 20 7c 7c 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 73 65 74 29 3b od(get).||.IsVisibleMethod(set);
3fec0 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 7d 0d ......}........return.false;..}.
3fee0 0a 0d 0a 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 4d ...static.bool.IsVisibleMethod(M
3ff00 65 74 68 6f 64 42 61 73 65 20 6d 65 74 68 6f 64 42 61 73 65 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 ethodBase.methodBase)..{......if
3ff20 20 28 6d 65 74 68 6f 64 42 61 73 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 72 .(methodBase.==.null)..........r
3ff40 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 21 6d 65 74 68 eturn.false;........return.!meth
3ff60 6f 64 42 61 73 65 2e 49 73 50 72 69 76 61 74 65 20 26 26 20 21 6d 65 74 68 6f 64 42 61 73 65 2e odBase.IsPrivate.&&.!methodBase.
3ff80 49 73 41 73 73 65 6d 62 6c 79 3b 0d 0a 7d 0d 0a 0d 0a 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 3e IsAssembly;..}....IEnumerable<T>
3ffa0 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 3c 54 3e 28 29 20 77 68 65 72 65 .GetSourceSchemaTypes<T>().where
3ffc0 20 54 20 3a 20 47 6c 6f 62 61 6c 49 74 65 6d 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 50 61 74 68 .T.:.GlobalItem..{......if.(Path
3ffe0 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 21 3d .GetExtension(SourceCsdlPath).!=
40000 20 22 2e 65 64 6d 78 22 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e .".edmx")......{..........return
40020 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 54 3e 28 29 2e 57 68 .ItemCollection.GetItems<T>().Wh
40040 65 72 65 28 65 20 3d 3e 20 65 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 41 6e ere(e.=>.e.MetadataProperties.An
40060 79 28 6d 70 20 3d 3e 20 6d 70 2e 4e 61 6d 65 20 3d 3d 20 22 53 63 68 65 6d 61 53 6f 75 72 63 65 y(mp.=>.mp.Name.==."SchemaSource
40080 22 20 26 26 20 28 73 74 72 69 6e 67 29 6d 70 2e 56 61 6c 75 65 20 3d 3d 20 53 6f 75 72 63 65 43 ".&&.(string)mp.Value.==.SourceC
400a0 73 64 6c 50 61 74 68 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 sdlPath));......}......else.....
400c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f .{..........return.ItemCollectio
400e0 6e 2e 47 65 74 49 74 65 6d 73 3c 54 3e 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 73 74 n.GetItems<T>();......}..}....st
40100 72 69 6e 67 20 45 6e 64 4e 61 6d 65 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 61 73 73 ring.EndName(AssociationType.ass
40120 6f 63 69 61 74 69 6f 6e 2c 20 69 6e 74 20 69 6e 64 65 78 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 ociation,.int.index)..{......ret
40140 75 72 6e 20 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 urn.association.AssociationEndMe
40160 6d 62 65 72 73 5b 69 6e 64 65 78 5d 2e 4e 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 mbers[index].Name;..}....string.
40180 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 EndMultiplicity(AssociationType.
401a0 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 43 6f 64 65 47 65 6e 65 association,.int.index,.CodeGene
401c0 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 75 72 6e rationTools.code)..{......return
401e0 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e .code.CreateLiteral(association.
40200 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 69 6e 64 65 78 5d 2e 52 65 6c AssociationEndMembers[index].Rel
40220 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 ationshipMultiplicity);..}....st
40240 72 69 6e 67 20 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 41 73 73 6f 63 69 61 74 69 ring.EscapeEndTypeName(Associati
40260 6f 6e 54 79 70 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 43 onType.association,.int.index,.C
40280 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 odeGenerationTools.code)..{.....
402a0 20 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 20 3d 20 61 73 73 6f 63 69 61 74 69 6f 6e .EntityType.entity.=.association
402c0 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 69 6e 64 65 78 5d 2e 47 65 .AssociationEndMembers[index].Ge
402e0 74 45 6e 74 69 74 79 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e tEntityType();......return.code.
40300 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e 45 73 63 61 70 65 4e 61 6d 65 73 70 CreateFullName(code.EscapeNamesp
40320 61 63 65 28 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 65 6e 74 69 74 79 2e 4e 61 ace(GetObjectNamespace(entity.Na
40340 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 74 69 74 mespaceName)),.code.Escape(entit
40360 79 29 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 y));..}....string.GetObjectNames
40380 70 61 63 65 28 73 74 72 69 6e 67 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 0d 0a pace(string.csdlNamespaceName)..
403a0 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 3b 0d 0a {......string.objectNamespace;..
403c0 20 20 20 20 69 66 20 28 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e ....if.(EdmToObjectNamespaceMap.
403e0 54 72 79 47 65 74 56 61 6c 75 65 28 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2c 20 6f TryGetValue(csdlNamespaceName,.o
40400 75 74 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 ut.objectNamespace))......{.....
40420 20 20 20 20 20 72 65 74 75 72 6e 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 .....return.objectNamespace;....
40440 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e ..}........return.csdlNamespaceN
40460 61 6d 65 3b 0d 0a 7d 0d 0a 0d 0a 76 6f 69 64 20 55 70 64 61 74 65 4f 62 6a 65 63 74 4e 61 6d 65 ame;..}....void.UpdateObjectName
40480 73 70 61 63 65 4d 61 70 28 73 74 72 69 6e 67 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 29 spaceMap(string.objectNamespace)
404a0 0d 0a 7b 0d 0a 20 20 20 20 69 66 28 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 20 21 3d 20 4d ..{......if(objectNamespace.!=.M
404c0 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 26 26 20 21 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d odelNamespace.&&.!EdmToObjectNam
404e0 65 73 70 61 63 65 4d 61 70 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 4d 6f 64 65 6c 4e 61 6d 65 73 espaceMap.ContainsKey(ModelNames
40500 70 61 63 65 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 54 6f 4f 62 6a 65 pace))......{..........EdmToObje
40520 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 41 64 64 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 ctNamespaceMap.Add(ModelNamespac
40540 65 2c 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a e,.objectNamespace);......}..}..
40560 0d 0a 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 ..static.string.FixParameterName
40580 28 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c (string.name,.CodeGenerationTool
405a0 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 2f 2f 20 0d 0a 20 20 s.code)..{......//.......//.....
405c0 20 20 69 66 20 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f ..if.(StringComparer.OrdinalIgno
405e0 72 65 43 61 73 65 2e 45 71 75 61 6c 73 28 6e 61 6d 65 2c 20 22 69 64 22 29 29 0d 0a 20 20 20 20 reCase.Equals(name,."id"))......
40600 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 {..........//...........return."
40620 69 64 22 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 43 61 6d id";......}......return.code.Cam
40640 65 6c 43 61 73 65 28 6e 61 6d 65 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 42 61 73 65 54 elCase(name);..}....string.BaseT
40660 79 70 65 4e 61 6d 65 28 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 2c 20 43 6f 64 65 47 ypeName(EntityType.entity,.CodeG
40680 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 7b 0d 0a 20 20 20 20 72 65 74 enerationTools.code)..{......ret
406a0 75 72 6e 20 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 20 3f 20 22 45 urn.entity.BaseType.==.null.?."E
406c0 6e 74 69 74 79 4f 62 6a 65 63 74 22 20 3a 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 ntityObject".:.MultiSchemaEscape
406e0 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 2c 20 63 6f 64 65 29 3b 0d 0a 7d 0d 0a 0d 0a 62 (entity.BaseType,.code);..}....b
40700 6f 6f 6c 20 49 6e 63 6c 75 64 65 50 72 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 ool.IncludePropertyInFactoryMeth
40720 6f 64 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 66 61 63 74 6f 72 79 54 79 70 65 2c 20 45 od(StructuralType.factoryType,.E
40740 64 6d 50 72 6f 70 65 72 74 79 20 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 7b 0d 0a 20 20 20 20 dmProperty.edmProperty)..{......
40760 69 66 20 28 65 64 6d 50 72 6f 70 65 72 74 79 2e 4e 75 6c 6c 61 62 6c 65 29 0d 0a 20 20 20 20 7b if.(edmProperty.Nullable)......{
40780 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a ..........return.false;......}..
407a0 0d 0a 20 20 20 20 69 66 20 28 65 64 6d 50 72 6f 70 65 72 74 79 2e 44 65 66 61 75 6c 74 56 61 6c ......if.(edmProperty.DefaultVal
407c0 75 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 ue.!=.null)......{..........retu
407e0 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 28 41 63 63 rn.false;......}........if.((Acc
40800 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 essibility.ForReadOnlyProperty(e
40820 64 6d 50 72 6f 70 65 72 74 79 29 20 21 3d 20 22 70 75 62 6c 69 63 22 20 26 26 20 41 63 63 65 73 dmProperty).!=."public".&&.Acces
40840 73 69 62 69 6c 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 sibility.ForWriteOnlyProperty(ed
40860 6d 50 72 6f 70 65 72 74 79 29 20 21 3d 20 22 70 75 62 6c 69 63 22 29 20 7c 7c 0d 0a 20 20 20 20 mProperty).!=."public").||......
40880 20 20 20 20 28 66 61 63 74 6f 72 79 54 79 70 65 20 21 3d 20 65 64 6d 50 72 6f 70 65 72 74 79 2e ....(factoryType.!=.edmProperty.
408a0 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 26 26 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 DeclaringType.&&.Accessibility.F
408c0 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 orWriteOnlyProperty(edmProperty)
408e0 20 3d 3d 20 22 70 72 69 76 61 74 65 22 29 0d 0a 20 20 20 20 20 20 20 29 0d 0a 20 20 20 20 7b 0d .==."private").........)......{.
40900 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c .........//...........return.fal
40920 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a se;......}........return.true;..
40940 7d 0d 0a 0d 0a 63 6c 61 73 73 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 }....class.FactoryMethodParamete
40960 72 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 50 72 6f 70 65 72 74 79 20 53 6f 75 r..{......public.EdmProperty.Sou
40980 72 63 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 61 77 50 61 72 61 6d rce;......public.string.RawParam
409a0 65 74 65 72 4e 61 6d 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 50 61 72 eterName;......public.string.Par
409c0 61 6d 65 74 65 72 4e 61 6d 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 50 ameterName;......public.string.P
409e0 61 72 61 6d 65 74 65 72 54 79 70 65 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 arameterType;......public.string
40a00 20 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 .ParameterComment;......public.b
40a20 6f 6f 6c 20 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 ool.IsComplexType;........public
40a40 20 73 74 61 74 69 63 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 61 63 74 6f 72 79 4d 65 74 68 6f .static.IEnumerable<FactoryMetho
40a60 64 50 61 72 61 6d 65 74 65 72 3e 20 43 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 73 28 49 45 6e dParameter>.CreateParameters(IEn
40a80 75 6d 65 72 61 62 6c 65 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 70 72 6f 70 65 72 74 69 65 73 umerable<EdmProperty>.properties
40aa0 2c 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 75 6e 69 71 75 65 ,.UniqueIdentifierService.unique
40ac0 2c 20 46 75 6e 63 3c 54 79 70 65 55 73 61 67 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e ,.Func<TypeUsage,.CodeGeneration
40ae0 54 6f 6f 6c 73 2c 20 73 74 72 69 6e 67 3e 20 6d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 Tools,.string>.multiSchemaEscape
40b00 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 29 0d 0a 20 20 20 ,.CodeGenerationTools.code).....
40b20 20 7b 0d 0a 20 20 20 20 20 20 20 20 4c 69 73 74 3c 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 .{..........List<FactoryMethodPa
40b40 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 46 rameter>.parameters.=.new.List<F
40b60 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 actoryMethodParameter>();.......
40b80 20 20 20 66 6f 72 65 61 63 68 20 28 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 ...foreach.(EdmProperty.property
40ba0 20 69 6e 20 70 72 6f 70 65 72 74 69 65 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 .in.properties)..........{......
40bc0 20 20 20 20 20 20 20 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 20 70 ........FactoryMethodParameter.p
40be0 61 72 61 6d 65 74 65 72 20 3d 20 6e 65 77 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 arameter.=.new.FactoryMethodPara
40c00 6d 65 74 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e meter();..............parameter.
40c20 53 6f 75 72 63 65 20 3d 20 70 72 6f 70 65 72 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Source.=.property;..............
40c40 70 61 72 61 6d 65 74 65 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 20 3d 20 70 72 6f 70 65 72 parameter.IsComplexType.=.proper
40c60 74 79 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d 70 6c 65 78 54 ty.TypeUsage.EdmType.is.ComplexT
40c80 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 52 61 77 50 ype;..............parameter.RawP
40ca0 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 65 6e arameterName.=.unique.AdjustIden
40cc0 74 69 66 69 65 72 28 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 70 72 6f 70 65 72 74 79 tifier(FixParameterName(property
40ce0 2e 4e 61 6d 65 2c 20 63 6f 64 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 .Name,.code));..............para
40d00 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 meter.ParameterName.=.code.Escap
40d20 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 3b 0d 0a e(parameter.RawParameterName);..
40d40 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 54 ............parameter.ParameterT
40d60 79 70 65 20 3d 20 6d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 70 72 6f 70 65 72 74 79 ype.=.multiSchemaEscape(property
40d80 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .TypeUsage,.code);..............
40da0 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 20 3d 20 53 74 72 parameter.ParameterComment.=.Str
40dc0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 ing.Format(CultureInfo.CurrentCu
40de0 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 lture,.CodeGenerationTools.GetRe
40e00 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6d 6d 65 6e 74 46 61 sourceString("Template_CommentFa
40e20 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 22 29 2c 20 70 72 6f 70 65 72 74 79 2e 4e 61 6d ctoryMethodParam"),.property.Nam
40e40 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 73 2e 41 64 64 28 e);..............parameters.Add(
40e60 70 61 72 61 6d 65 74 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 parameter);..........}..........
40e80 20 20 72 65 74 75 72 6e 20 70 61 72 61 6d 65 74 65 72 73 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a ..return.parameters;......}..}..
40ea0 0d 0a 73 74 72 69 6e 67 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 7b 20 ..string.DefaultSummaryComment{.
40ec0 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 53 75 6d 6d 61 72 79 43 6f 6d get;.set;.}....string.SummaryCom
40ee0 6d 65 6e 74 28 4d 65 74 61 64 61 74 61 49 74 65 6d 20 69 74 65 6d 29 0d 0a 7b 0d 0a 20 20 20 20 ment(MetadataItem.item)..{......
40f00 69 66 20 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 20 26 if.(item.Documentation.!=.null.&
40f20 26 20 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 53 75 6d 6d 61 72 79 20 21 3d 20 &.item.Documentation.Summary.!=.
40f40 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 50 72 65 null)......{..........return.Pre
40f60 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 58 4d 4c 43 4f fixLinesOfMultilineComment(XMLCO
40f80 4d 4d 45 4e 54 5f 53 54 41 52 54 20 2b 20 22 20 22 2c 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 MMENT_START.+.".",.XmlEntityize(
40fa0 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 53 75 6d 6d 61 72 79 29 29 3b 0d 0a 20 item.Documentation.Summary));...
40fc0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 66 20 28 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f ...}........if.(DefaultSummaryCo
40fe0 6d 6d 65 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 mment.!=.null)......{..........r
41000 65 74 75 72 6e 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 3b 0d 0a 20 20 eturn.DefaultSummaryComment;....
41020 20 20 7d 0d 0a 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d ..}........return.string.Empty;.
41040 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d .}....string.LongDescriptionComm
41060 65 6e 74 45 6c 65 6d 65 6e 74 28 4d 65 74 61 64 61 74 61 49 74 65 6d 20 69 74 65 6d 2c 20 69 6e entElement(MetadataItem.item,.in
41080 74 20 69 6e 64 65 6e 74 4c 65 76 65 6c 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 69 74 65 6d 2e t.indentLevel)..{......if.(item.
410a0 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 53 74 72 69 6e 67 Documentation.!=.null.&&.!String
410c0 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f .IsNullOrEmpty(item.Documentatio
410e0 6e 2e 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 n.LongDescription))......{......
41100 20 20 20 20 73 74 72 69 6e 67 20 63 6f 6d 6d 65 6e 74 20 3d 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 ....string.comment.=.Environment
41120 2e 4e 65 77 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 6c 69 6e 65 53 74 .NewLine;..........string.lineSt
41140 61 72 74 20 3d 20 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e art.=.CodeRegion.GetIndent(inden
41160 74 4c 65 76 65 6c 29 20 2b 20 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 20 2b 20 22 20 22 tLevel).+.XMLCOMMENT_START.+."."
41180 3b 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 ;..........comment.+=.lineStart.
411a0 2b 20 22 3c 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 3e 22 20 2b 20 45 6e 76 69 72 6f 6e 6d +."<LongDescription>".+.Environm
411c0 65 6e 74 2e 4e 65 77 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d ent.NewLine;..........comment.+=
411e0 20 6c 69 6e 65 53 74 61 72 74 20 2b 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c .lineStart.+.PrefixLinesOfMultil
41200 69 6e 65 43 6f 6d 6d 65 6e 74 28 6c 69 6e 65 53 74 61 72 74 2c 20 58 6d 6c 45 6e 74 69 74 79 69 ineComment(lineStart,.XmlEntityi
41220 7a 65 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 4c 6f 6e 67 44 65 73 63 72 69 ze(item.Documentation.LongDescri
41240 70 74 69 6f 6e 29 29 20 2b 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 3b 0d 0a ption)).+.Environment.NewLine;..
41260 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 2b 20 22 ........comment.+=.lineStart.+."
41280 3c 2f 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 3e 22 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 </LongDescription>";..........re
412a0 74 75 72 6e 20 63 6f 6d 6d 65 6e 74 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e turn.comment;......}......return
412c0 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 50 72 65 66 .string.Empty;..}....string.Pref
412e0 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 73 74 72 69 6e 67 ixLinesOfMultilineComment(string
41300 20 70 72 65 66 69 78 2c 20 73 74 72 69 6e 67 20 63 6f 6d 6d 65 6e 74 29 0d 0a 7b 0d 0a 20 20 20 .prefix,.string.comment)..{.....
41320 20 72 65 74 75 72 6e 20 63 6f 6d 6d 65 6e 74 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d .return.comment.Replace(Environm
41340 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 ent.NewLine,.Environment.NewLine
41360 20 2b 20 70 72 65 66 69 78 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e 67 20 50 61 72 61 6d 65 74 .+.prefix);..}....string.Paramet
41380 65 72 43 6f 6d 6d 65 6e 74 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 54 75 70 6c 65 3c 73 74 72 erComments(IEnumerable<Tuple<str
413a0 69 6e 67 2c 20 73 74 72 69 6e 67 3e 3e 20 70 61 72 61 6d 65 74 65 72 73 2c 20 69 6e 74 20 69 6e ing,.string>>.parameters,.int.in
413c0 64 65 6e 74 4c 65 76 65 6c 29 0d 0a 7b 0d 0a 20 20 20 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 dentLevel)..{......System.Text.S
413e0 74 72 69 6e 67 42 75 69 6c 64 65 72 20 62 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 79 73 74 65 tringBuilder.builder.=.new.Syste
41400 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 66 6f 72 m.Text.StringBuilder();......for
41420 65 61 63 68 20 28 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 70 61 72 61 each.(Tuple<string,.string>.para
41440 6d 65 74 65 72 20 69 6e 20 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 meter.in.parameters)......{.....
41460 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 4c 69 6e 65 28 29 3b 0d 0a 20 20 20 20 .....builder.AppendLine();......
41480 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 ....builder.Append(CodeRegion.Ge
414a0 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 tIndent(indentLevel));..........
414c0 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 29 builder.Append(XMLCOMMENT_START)
414e0 3b 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 53 74 72 69 6e 67 ;..........builder.Append(String
41500 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c .Format(CultureInfo.InvariantCul
41520 74 75 72 65 2c 20 22 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 5c 22 7b 30 7d 5c 22 3e 7b 31 7d 3c ture,.".<param.name=\"{0}\">{1}<
41540 2f 70 61 72 61 6d 3e 22 2c 20 70 61 72 61 6d 65 74 65 72 2e 49 74 65 6d 31 2c 20 70 61 72 61 6d /param>",.parameter.Item1,.param
41560 65 74 65 72 2e 49 74 65 6d 32 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 72 65 74 75 72 6e eter.Item2));......}......return
41580 20 62 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 7d 0d 0a 0d 0a 73 74 72 69 6e .builder.ToString();..}....strin
415a0 67 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 73 74 72 69 6e 67 20 74 65 78 74 29 0d 0a 7b 0d 0a g.XmlEntityize(string.text)..{..
415c0 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 74 65 78 ....if.(string.IsNullOrEmpty(tex
415e0 74 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e t))......{..........return.strin
41600 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 g.Empty;......}........text.=.te
41620 78 74 2e 52 65 70 6c 61 63 65 28 22 26 22 2c 22 26 61 6d 70 3b 22 29 3b 0d 0a 20 20 20 20 74 65 xt.Replace("&","&amp;");......te
41640 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 3c 22 2c 22 26 6c 74 3b 22 29 2e 52 65 xt.=.text.Replace("<","&lt;").Re
41660 70 6c 61 63 65 28 22 3e 22 2c 22 26 67 74 3b 22 29 3b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 69 place(">","&gt;");......string.i
41680 64 20 3d 20 47 75 69 64 2e 4e 65 77 47 75 69 64 28 29 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a d.=.Guid.NewGuid().ToString();..
416a0 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d ....text.=.text.Replace(Environm
416c0 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 69 64 29 3b 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 ent.NewLine,.id);......text.=.te
416e0 78 74 2e 52 65 70 6c 61 63 65 28 22 5c 72 22 2c 20 22 26 23 78 44 3b 22 29 2e 52 65 70 6c 61 63 xt.Replace("\r",."&#xD;").Replac
41700 65 28 22 5c 6e 22 2c 22 26 23 78 41 3b 22 29 3b 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 e("\n","&#xA;");......text.=.tex
41720 74 2e 52 65 70 6c 61 63 65 28 69 64 2c 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e t.Replace(id,.Environment.NewLin
41740 65 29 3b 0d 0a 20 20 20 20 72 65 74 75 72 6e 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 5c 27 e);......return.text.Replace("\'
41760 22 2c 22 26 61 70 6f 73 3b 22 29 2e 52 65 70 6c 61 63 65 28 22 5c 22 22 2c 22 26 71 75 6f 74 3b ","&apos;").Replace("\"","&quot;
41780 22 29 3b 0d 0a 7d 0d 0a 0d 0a 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 58 4d 4c 43 4f 4d 4d 45 4e ");..}....const.string.XMLCOMMEN
417a0 54 5f 53 54 41 52 54 20 3d 20 22 2f 2f 2f 22 3b 0d 0a 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 64 T_START.=."///";..IEnumerable<Ed
417c0 6d 50 72 6f 70 65 72 74 79 3e 20 47 65 74 50 72 6f 70 65 72 74 69 65 73 28 53 74 72 75 63 74 75 mProperty>.GetProperties(Structu
417e0 72 61 6c 54 79 70 65 20 74 79 70 65 29 0d 0a 7b 0d 0a 20 20 20 20 69 66 20 28 74 79 70 65 2e 42 ralType.type)..{......if.(type.B
41800 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e uiltInTypeKind.==.BuiltInTypeKin
41820 64 2e 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 d.EntityType)......{..........re
41840 74 75 72 6e 20 28 28 45 6e 74 69 74 79 54 79 70 65 29 74 79 70 65 29 2e 50 72 6f 70 65 72 74 69 turn.((EntityType)type).Properti
41860 65 73 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 es;......}......else......{.....
41880 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 43 6f 6d 70 6c 65 78 54 79 70 65 29 74 79 70 65 29 2e .....return.((ComplexType)type).
418a0 50 72 6f 70 65 72 74 69 65 73 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 70 72 6f 74 65 63 74 Properties;......}..}....protect
418c0 65 64 20 76 6f 69 64 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 ed.void.VerifyGetterAndSetterAcc
418e0 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 45 64 6d 4d 65 6d 62 65 essibilityCompatability(EdmMembe
41900 72 20 6d 65 6d 62 65 72 29 0d 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e 67 20 72 61 77 47 65 74 74 r.member)..{......string.rawGett
41920 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e erAccessibility.=.Accessibility.
41940 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 6d 65 6d 62 65 72 29 3b 0d 0a 20 20 ForReadOnlyProperty(member);....
41960 20 20 73 74 72 69 6e 67 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 ..string.rawSetterAccessibility.
41980 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 =.Accessibility.ForWriteOnlyProp
419a0 65 72 74 79 28 6d 65 6d 62 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 69 66 20 28 28 72 61 77 47 65 74 erty(member);........if.((rawGet
419c0 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 22 69 6e 74 65 72 6e 61 6c 22 20 26 terAccessibility.==."internal".&
419e0 26 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 20 20 22 70 &.rawSetterAccessibility.==..."p
41a00 72 6f 74 65 63 74 65 64 22 29 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 28 72 61 77 47 65 74 74 65 rotected").||..........(rawGette
41a20 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 22 70 72 6f 74 65 63 74 65 64 22 20 26 26 rAccessibility.==."protected".&&
41a40 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 22 69 6e 74 65 .rawSetterAccessibility.==."inte
41a60 72 6e 61 6c 22 29 29 0d 0a 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 45 72 72 rnal"))........{.............Err
41a80 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 ors.Add(new.System.CodeDom.Compi
41aa0 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 ler.CompilerError(SourceCsdlPath
41ac0 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 33 33 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 ,.-1,.-1,."6033",.String.Format(
41ae0 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d 0a 20 20 20 CultureInfo.CurrentCulture,.....
41b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ................CodeGenerationTo
41b20 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 47 65 6e 65 72 61 74 65 64 ols.GetResourceString("Generated
41b40 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e 66 6c 69 63 74 22 29 2c PropertyAccessibilityConflict"),
41b60 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 6d 65 6d 62 65 72 2e .........................member.
41b80 4e 61 6d 65 2c 20 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 2c 20 72 61 Name,.rawGetterAccessibility,.ra
41ba0 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 29 29 3b 0d 0a 20 20 20 20 7d 0d wSetterAccessibility)));......}.
41bc0 0a 7d 0d 0a 0d 0a 70 72 69 76 61 74 65 20 76 6f 69 64 20 56 65 72 69 66 79 45 6e 74 69 74 79 54 .}....private.void.VerifyEntityT
41be0 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c ypeAndSetAccessibilityCompatabil
41c00 69 74 79 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 7b 0d 0a 20 20 20 20 73 74 72 69 6e ity(EntitySet.set)..{......strin
41c20 67 20 74 79 70 65 41 63 63 65 73 73 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 g.typeAccess.=.Accessibility.For
41c40 54 79 70 65 28 73 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 29 3b 0d 0a 20 20 20 20 73 74 72 69 Type(set.ElementType);......stri
41c60 6e 67 20 73 65 74 41 63 63 65 73 73 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 ng.setAccess.=.Accessibility.For
41c80 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 73 65 74 29 3b 0d 0a 0d 0a 20 20 20 20 69 66 ReadOnlyProperty(set);........if
41ca0 28 74 79 70 65 41 63 63 65 73 73 20 3d 3d 20 22 69 6e 74 65 72 6e 61 6c 22 20 26 26 20 28 73 65 (typeAccess.==."internal".&&.(se
41cc0 74 41 63 63 65 73 73 20 3d 3d 20 22 70 75 62 6c 69 63 22 20 7c 7c 20 73 65 74 41 63 63 65 73 73 tAccess.==."public".||.setAccess
41ce0 20 3d 3d 20 22 70 72 6f 74 65 63 74 65 64 22 29 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .==."protected"))......{........
41d00 20 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 .Errors.Add(new.System.CodeDom.C
41d20 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c ompiler.CompilerError(SourceCsdl
41d40 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 33 36 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 Path,.-1,.-1,."6036",.String.For
41d60 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 0d mat(CultureInfo.CurrentCulture,.
41d80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ................CodeGenerationTo
41da0 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 45 6e 74 69 74 79 54 79 70 ols.GetResourceString("EntityTyp
41dc0 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e 66 6c 69 63 74 22 29 2c 0d eAndSetAccessibilityConflict"),.
41de0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 2e 45 6c 65 6d 65 6e 74 54 ....................set.ElementT
41e00 79 70 65 2e 4e 61 6d 65 2c 20 74 79 70 65 41 63 63 65 73 73 2c 20 73 65 74 2e 4e 61 6d 65 2c 20 ype.Name,.typeAccess,.set.Name,.
41e20 73 65 74 41 63 63 65 73 73 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 70 72 69 76 61 setAccess)));......}..}....priva
41e40 74 65 20 76 6f 69 64 20 44 65 66 69 6e 65 4d 65 74 61 64 61 74 61 28 29 0d 0a 7b 0d 0a 20 20 20 te.void.DefineMetadata()..{.....
41e60 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 5b 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 .TemplateMetadata[MetadataConsta
41e80 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 4e 41 4d 45 5d 20 3d 20 22 43 53 68 61 72 70 43 nts.TT_TEMPLATE_NAME].=."CSharpC
41ea0 6f 64 65 47 65 6e 22 3b 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 5b 4d odeGen";......TemplateMetadata[M
41ec0 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 etadataConstants.TT_TEMPLATE_VER
41ee0 53 49 4f 4e 5d 20 3d 20 22 35 2e 30 22 3b 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 SION].=."5.0";......TemplateMeta
41f00 64 61 74 61 5b 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 4d 49 4e 49 4d 55 data[MetadataConstants.TT_MINIMU
41f20 4d 5f 45 4e 54 49 54 59 5f 46 52 41 4d 45 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 5d 20 3d 20 22 35 M_ENTITY_FRAMEWORK_VERSION].=."5
41f40 2e 30 22 3b 0d 0a 7d 0d 0a 0d 0a 73 65 61 6c 65 64 20 63 6c 61 73 73 20 55 6e 69 71 75 65 49 64 .0";..}....sealed.class.UniqueId
41f60 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 entifierService..{......private.
41f80 72 65 61 64 6f 6e 6c 79 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 20 5f 6b 6e 6f 77 6e 49 readonly.HashSet<string>._knownI
41fa0 64 65 6e 74 69 66 69 65 72 73 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 55 6e 69 71 75 65 dentifiers;........public.Unique
41fc0 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 IdentifierService()......{......
41fe0 20 20 20 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 3d 20 6e 65 77 20 48 61 73 68 ...._knownIdentifiers.=.new.Hash
42000 53 65 74 3c 73 74 72 69 6e 67 3e 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 4f 72 64 69 6e Set<string>(StringComparer.Ordin
42020 61 6c 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e al);......}........///.<summary>
42040 0d 0a 20 20 20 20 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 20 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f ......///.......///.......///.</
42060 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 41 64 6a 75 summary>......public.string.Adju
42080 73 74 49 64 65 6e 74 69 66 69 65 72 28 73 74 72 69 6e 67 20 69 64 65 6e 74 69 66 69 65 72 29 0d stIdentifier(string.identifier).
420a0 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 0d 0a 20 20 20 20 20 20 20 20 76 61 72 .....{..........//...........var
420c0 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 .numberOfConflicts.=.0;.........
420e0 20 76 61 72 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 69 .var.adjustedIdentifier.=.identi
42100 66 69 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 21 5f 6b 6e 6f 77 6e 49 fier;............while.(!_knownI
42120 64 65 6e 74 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 dentifiers.Add(adjustedIdentifie
42140 72 29 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 2b 2b 6e 75 r))..........{..............++nu
42160 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 64 mberOfConflicts;..............ad
42180 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 69 66 69 65 72 20 2b 20 justedIdentifier.=.identifier.+.
421a0 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 numberOfConflicts.ToString(Cultu
421c0 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 3b 0d 0a 20 20 20 20 20 reInfo.InvariantCulture);.......
421e0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 64 6a 75 73 74 65 64 49 ...}............return.adjustedI
42200 64 65 6e 74 69 66 69 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0a 0a 0a 0d 0a 2f 2f 20 43 6f dentifier;......}..}.......//.Co
42220 70 79 72 69 67 68 74 20 28 63 29 20 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f pyright.(c).Microsoft.Corporatio
42240 6e 2e 20 20 41 6c 6c 20 72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 2e 0d 0a 0d 0a 70 75 62 6c n...All.rights.reserved.....publ
42260 69 63 20 73 74 61 74 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 ic.static.Dictionary<string,.str
42280 69 6e 67 3e 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 20 3d 20 6e 65 77 20 44 69 63 74 ing>.TemplateMetadata.=.new.Dict
422a0 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 0d 0a 2f 2f 2f ionary<string,.string>();....///
422c0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 .<summary>..///.Responsible.for.
422e0 68 65 6c 70 69 6e 67 20 74 6f 20 63 72 65 61 74 65 20 73 6f 75 72 63 65 20 63 6f 64 65 20 74 68 helping.to.create.source.code.th
42300 61 74 20 69 73 0d 0a 2f 2f 2f 20 63 6f 72 72 65 63 74 6c 79 20 66 6f 72 6d 61 74 65 64 20 61 6e at.is..///.correctly.formated.an
42320 64 20 66 75 6e 63 74 69 6f 6e 61 6c 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 d.functional..///.</summary>..pu
42340 62 6c 69 63 20 63 6c 61 73 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 0d 0a blic.class.CodeGenerationTools..
42360 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 {......private.readonly.DynamicT
42380 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d extTransformation._textTransform
423a0 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 43 53 68 ation;......private.readonly.CSh
423c0 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 20 5f 63 6f 64 65 3b 0d 0a 20 20 20 20 70 72 69 76 arpCodeProvider._code;......priv
423e0 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 5f 65 66 3b 0d ate.readonly.MetadataTools._ef;.
42400 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e .......///.<summary>......///.In
42420 69 74 69 61 6c 69 7a 65 73 20 61 20 6e 65 77 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f itializes.a.new.CodeGenerationTo
42440 6f 6c 73 20 6f 62 6a 65 63 74 20 77 69 74 68 20 74 68 65 20 54 65 78 74 54 72 61 6e 73 66 6f 72 ols.object.with.the.TextTransfor
42460 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 0d 0a 20 20 20 mation.(T4.generated.class).....
42480 20 2f 2f 2f 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a .///.that.is.currently.running..
424a0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 43 ....///.</summary>......public.C
424c0 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 odeGenerationTools(object.textTr
424e0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 ansformation)......{..........if
42500 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 .(textTransformation.==.null)...
42520 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 .......{..............throw.new.
42540 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 ArgumentNullException("textTrans
42560 66 6f 72 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 formation");..........}.........
42580 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 ..._textTransformation.=.Dynamic
425a0 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 TextTransformation.Create(textTr
425c0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 63 6f 64 65 20 3d 20 ansformation);.........._code.=.
425e0 6e 65 77 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 new.CSharpCodeProvider();.......
42600 20 20 20 5f 65 66 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 5f 74 65 78 74 ..._ef.=.new.MetadataTools(_text
42620 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 46 75 6c 6c 79 51 Transformation);..........FullyQ
42640 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 ualifySystemTypes.=.false;......
42660 20 20 20 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 ....CamelCaseFields.=.true;.....
42680 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
426a0 20 57 68 65 6e 20 74 72 75 65 2c 20 61 6c 6c 20 74 79 70 65 73 20 74 68 61 74 20 61 72 65 20 6e .When.true,.all.types.that.are.n
426c0 6f 74 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 61 72 65 20 ot.being.generated......///.are.
426e0 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 74 6f 20 6b 65 65 70 20 74 68 65 6d 20 66 72 6f fully.qualified.to.keep.them.fro
42700 6d 20 63 6f 6e 66 6c 69 63 74 69 6e 67 20 77 69 74 68 0d 0a 20 20 20 20 2f 2f 2f 20 74 79 70 65 m.conflicting.with......///.type
42720 73 20 74 68 61 74 20 61 72 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 2e 20 55 73 65 66 s.that.are.being.generated..Usef
42740 75 6c 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 0d 0a 20 20 20 20 2f 2f 2f 20 73 6f 6d 65 74 68 ul.when.you.have......///.someth
42760 69 6e 67 20 6c 69 6b 65 20 61 20 74 79 70 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 20 ing.like.a.type.being.generated.
42780 6e 61 6d 65 64 20 53 79 73 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 named.System.......///......///.
427a0 44 65 66 61 75 6c 74 20 69 73 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d Default.is.false.......///.</sum
427c0 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 46 75 6c 6c 79 51 75 61 6c mary>......public.bool.FullyQual
427e0 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a ifySystemTypes.{.get;.set;.}....
42800 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 ....///.<summary>......///.When.
42820 74 72 75 65 2c 20 74 68 65 20 66 69 65 6c 64 20 6e 61 6d 65 73 20 61 72 65 20 43 61 6d 65 6c 20 true,.the.field.names.are.Camel.
42840 43 61 73 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 74 68 65 79 20 77 Cased,......///.otherwise.they.w
42860 69 6c 6c 20 70 72 65 73 65 72 76 65 20 74 68 65 20 63 61 73 65 20 74 68 65 79 0d 0a 20 20 20 20 ill.preserve.the.case.they......
42880 2f 2f 2f 20 73 74 61 72 74 20 77 69 74 68 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f ///.start.with.......///......//
428a0 2f 20 44 65 66 61 75 6c 74 20 69 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 /.Default.is.true.......///.</su
428c0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 43 61 6d 65 6c 43 61 73 mmary>......public.bool.CamelCas
428e0 65 46 69 65 6c 64 73 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f eFields.{.get;.set;.}........///
42900 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 .<summary>......///.Returns.the.
42920 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 73 75 67 67 65 73 74 65 64 20 62 79 20 56 53 20 69 66 NamespaceName.suggested.by.VS.if
42940 20 72 75 6e 6e 69 6e 67 20 69 6e 73 69 64 65 20 56 53 2e 20 20 4f 74 68 65 72 77 69 73 65 2c 20 .running.inside.VS...Otherwise,.
42960 72 65 74 75 72 6e 73 0d 0a 20 20 20 20 2f 2f 2f 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 returns......///.null.......///.
42980 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 56 73 </summary>......public.string.Vs
429a0 4e 61 6d 65 73 70 61 63 65 53 75 67 67 65 73 74 69 6f 6e 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 NamespaceSuggestion()......{....
429c0 20 20 20 20 20 20 73 74 72 69 6e 67 20 73 75 67 67 65 73 74 69 6f 6e 20 3d 20 5f 74 65 78 74 54 ......string.suggestion.=._textT
429e0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 ransformation.Host.ResolveParame
42a00 74 65 72 56 61 6c 75 65 28 22 64 69 72 65 63 74 69 76 65 49 64 22 2c 20 22 6e 61 6d 65 73 70 61 terValue("directiveId",."namespa
42a20 63 65 44 69 72 65 63 74 69 76 65 50 72 6f 63 65 73 73 6f 72 22 2c 20 22 6e 61 6d 65 73 70 61 63 ceDirectiveProcessor",."namespac
42a40 65 48 69 6e 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e eHint");..........if.(String.IsN
42a60 75 6c 6c 4f 72 45 6d 70 74 79 28 73 75 67 67 65 73 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 ullOrEmpty(suggestion)).........
42a80 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 .{..............return.null;....
42aa0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 75 67 67 65 73 ......}............return.sugges
42ac0 74 69 6f 6e 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 tion;......}........///.<summary
42ae0 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 61 20 73 74 72 69 6e 67 20 74 68 61 74 >......///.Returns.a.string.that
42b00 20 69 73 20 73 61 66 65 20 66 6f 72 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 .is.safe.for.use.as.an.identifie
42b20 72 20 69 6e 20 43 23 2e 0d 0a 20 20 20 20 2f 2f 2f 20 4b 65 79 77 6f 72 64 73 20 61 72 65 20 65 r.in.C#.......///.Keywords.are.e
42b40 73 63 61 70 65 64 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 scaped.......///.</summary>.....
42b60 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 73 74 72 69 6e 67 20 6e 61 6d .public.string.Escape(string.nam
42b80 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 6d 65 20 3d 3d 20 6e e)......{..........if.(name.==.n
42ba0 75 6c 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 72 65 74 ull)..........{..............ret
42bc0 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 urn.null;..........}............
42be0 72 65 74 75 72 6e 20 5f 63 6f 64 65 2e 43 72 65 61 74 65 45 73 63 61 70 65 64 49 64 65 6e 74 69 return._code.CreateEscapedIdenti
42c00 66 69 65 72 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 fier(name);......}........///.<s
42c20 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d ummary>......///.Returns.the.nam
42c40 65 20 6f 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 27 73 20 45 64 6d 54 79 70 65 20 74 68 61 e.of.the.TypeUsage's.EdmType.tha
42c60 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e t.is.safe.for......///.use.as.an
42c80 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e .identifier.......///.</summary>
42ca0 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 54 79 70 65 55 ......public.string.Escape(TypeU
42cc0 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 sage.typeUsage)......{..........
42ce0 69 66 20 28 74 79 70 65 55 73 61 67 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 if.(typeUsage.==.null)..........
42d00 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 {..............return.null;.....
42d20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 55 73 61 67 65 2e .....}............if.(typeUsage.
42d40 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 7c 7c 0d 0a 20 20 20 20 20 EdmType.is.ComplexType.||.......
42d60 20 20 20 20 20 20 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 45 6e 74 69 .......typeUsage.EdmType.is.Enti
42d80 74 79 54 79 70 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 tyType)..........{..............
42da0 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2e return.Escape(typeUsage.EdmType.
42dc0 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 Name);..........}..........else.
42de0 69 66 20 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 53 69 6d 70 6c 65 54 if.(typeUsage.EdmType.is.SimpleT
42e00 79 70 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 54 79 70 ype)..........{..............Typ
42e20 65 20 63 6c 72 54 79 70 65 20 3d 20 5f 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 e.clrType.=._ef.UnderlyingClrTyp
42e40 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 e(typeUsage.EdmType);...........
42e60 20 20 20 73 74 72 69 6e 67 20 74 79 70 65 4e 61 6d 65 20 3d 20 74 79 70 65 55 73 61 67 65 2e 45 ...string.typeName.=.typeUsage.E
42e80 64 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 79 70 65 20 3f 20 45 73 63 61 70 65 28 74 79 70 65 dmType.is.EnumType.?.Escape(type
42ea0 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2e 4e 61 6d 65 29 20 3a 20 45 73 63 61 70 65 28 63 6c 72 Usage.EdmType.Name).:.Escape(clr
42ec0 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6c 72 54 79 70 65 2e Type);..............if.(clrType.
42ee0 49 73 56 61 6c 75 65 54 79 70 65 20 26 26 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 IsValueType.&&._ef.IsNullable(ty
42f00 70 65 55 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 peUsage))..............{........
42f20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 ..........return.String.Format(C
42f40 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 75 ultureInfo.InvariantCulture,."Nu
42f60 6c 6c 61 62 6c 65 3c 7b 30 7d 3e 22 2c 20 74 79 70 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 llable<{0}>",.typeName);........
42f80 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 74 79 ......}................return.ty
42fa0 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 peName;..........}..........else
42fc0 20 69 66 20 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 43 6f 6c 6c 65 63 .if.(typeUsage.EdmType.is.Collec
42fe0 74 69 6f 6e 54 79 70 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 tionType)..........{............
43000 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e ..return.String.Format(CultureIn
43020 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 49 43 6f 6c 6c 65 63 74 69 6f fo.InvariantCulture,."ICollectio
43040 6e 3c 7b 30 7d 3e 22 2c 20 45 73 63 61 70 65 28 28 28 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 n<{0}>",.Escape(((CollectionType
43060 29 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 54 79 70 65 55 73 61 67 65 29 29 3b )typeUsage.EdmType).TypeUsage));
43080 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 ..........}............throw.new
430a0 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 74 79 70 65 55 73 61 67 65 22 29 3b .ArgumentException("typeUsage");
430c0 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
430e0 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 ..///.Returns.the.name.of.the.Ed
43100 6d 4d 65 6d 62 65 72 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f mMember.that.is.safe.for......//
43120 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f /.use.as.an.identifier.......///
43140 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 .</summary>......public.string.E
43160 73 63 61 70 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a scape(EdmMember.member)......{..
43180 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ........if.(member.==.null).....
431a0 20 20 20 20 20 7b 0d 0a 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;
431c0 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 ..........}............return.Es
431e0 63 61 70 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 cape(member.Name);......}.......
43200 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 .///.<summary>......///.Returns.
43220 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 54 79 70 65 20 74 68 61 74 20 69 73 20 the.name.of.the.EdmType.that.is.
43240 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e safe.for......///.use.as.an.iden
43260 74 69 66 69 65 72 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 tifier.......///.</summary>.....
43280 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 64 6d 54 79 70 65 20 74 79 .public.string.Escape(EdmType.ty
432a0 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 pe)......{..........if.(type.==.
432c0 6e 75 6c 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 72 65 null)..........{..............re
432e0 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 turn.null;..........}...........
43300 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 .return.Escape(type.Name);......
43320 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
43340 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 46 75 6e 63 74 Returns.the.name.of.the.EdmFunct
43360 69 6f 6e 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 ion.that.is.safe.for......///.us
43380 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 e.as.an.identifier.......///.</s
433a0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 ummary>......public.string.Escap
433c0 65 28 45 64 6d 46 75 6e 63 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a e(EdmFunction.function)......{..
433e0 20 20 20 20 20 20 20 20 69 66 20 28 66 75 6e 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 ........if.(function.==.null)...
43400 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c .......{..............return.nul
43420 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 l;..........}............return.
43440 45 73 63 61 70 65 28 66 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d Escape(function.Name);......}...
43460 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 .....///.<summary>......///.Retu
43480 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 75 6d 4d 65 6d 62 65 72 20 74 rns.the.name.of.the.EnumMember.t
434a0 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 hat.is.safe.for......///.use.as.
434c0 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 an.identifier.......///.</summar
434e0 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 6e 75 y>......public.string.Escape(Enu
43500 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 mMember.member)......{..........
43520 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a if.(member.==.null)..........{..
43540 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 ............return.null;........
43560 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 6d 65 6d ..}............return.Escape(mem
43580 62 65 72 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ber.Name);......}........///.<su
435a0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 mmary>......///.Returns.the.name
435c0 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 74 68 61 74 20 69 73 20 .of.the.EntityContainer.that.is.
435e0 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e safe.for......///.use.as.an.iden
43600 74 69 66 69 65 72 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 tifier.......///.</summary>.....
43620 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 6e 74 69 74 79 43 6f 6e 74 .public.string.Escape(EntityCont
43640 61 69 6e 65 72 20 63 6f 6e 74 61 69 6e 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ainer.container)......{.........
43660 20 69 66 20 28 63 6f 6e 74 61 69 6e 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 .if.(container.==.null).........
43680 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 .{..............return.null;....
436a0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 ......}............return.Escape
436c0 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 (container.Name);......}........
436e0 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 ///.<summary>......///.Returns.t
43700 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 53 65 74 20 74 68 61 74 20 69 73 he.name.of.the.EntitySet.that.is
43720 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 .safe.for......///.use.as.an.ide
43740 6e 74 69 66 69 65 72 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 ntifier.......///.</summary>....
43760 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 45 6e 74 69 74 79 53 65 74 ..public.string.Escape(EntitySet
43780 20 73 65 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 65 74 20 3d 3d .set)......{..........if.(set.==
437a0 20 6e 75 6c 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 72 .null)..........{..............r
437c0 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 eturn.null;..........}..........
437e0 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 65 28 73 65 74 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 ..return.Escape(set.Name);......
43800 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
43820 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 53 74 72 75 63 74 75 72 Returns.the.name.of.the.Structur
43840 61 6c 54 79 70 65 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f alType.that.is.safe.for......///
43860 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 .use.as.an.identifier.......///.
43880 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 </summary>......public.string.Es
438a0 63 61 70 65 28 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 74 79 70 65 29 0d 0a 20 20 20 20 7b cape(StructuralType.type)......{
438c0 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ..........if.(type.==.null).....
438e0 20 20 20 20 20 7b 0d 0a 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;
43900 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 ..........}............return.Es
43920 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f cape(type.Name);......}......../
43940 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 //.<summary>......///.Returns.th
43960 65 20 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 77 69 74 68 20 65 61 63 68 20 73 65 67 6d 65 6e e.NamespaceName.with.each.segmen
43980 74 20 73 61 66 65 20 74 6f 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 t.safe.to......///.use.as.an.ide
439a0 6e 74 69 66 69 65 72 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 ntifier.......///.</summary>....
439c0 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 ..public.string.EscapeNamespace(
439e0 73 74 72 69 6e 67 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 string.namespaceName)......{....
43a00 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e ......if.(String.IsNullOrEmpty(n
43a20 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 amespaceName))..........{.......
43a40 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3b 0d 0a 20 20 .......return.namespaceName;....
43a60 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 5b 5d 20 70 61 72 74 ......}............string[].part
43a80 73 20 3d 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2e 53 70 6c 69 74 28 27 2e 27 29 3b 0d 0a 20 s.=.namespaceName.Split('.');...
43aa0 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 53 74 72 69 6e 67 2e 45 6d .......namespaceName.=.String.Em
43ac0 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 73 74 72 69 6e 67 20 70 61 pty;..........foreach.(string.pa
43ae0 72 74 20 69 6e 20 70 61 72 74 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 rt.in.parts)..........{.........
43b00 20 20 20 20 20 69 66 20 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 21 3d 20 53 74 72 69 6e 67 .....if.(namespaceName.!=.String
43b20 2e 45 6d 70 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .Empty)..............{..........
43b40 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 2b 3d 20 22 2e 22 3b 0d 0a 20 ........namespaceName.+=.".";...
43b60 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 6e 61 6d 65 ...........}................name
43b80 73 70 61 63 65 4e 61 6d 65 20 2b 3d 20 45 73 63 61 70 65 28 70 61 72 74 29 3b 0d 0a 20 20 20 20 spaceName.+=.Escape(part);......
43ba0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 ....}............return.namespac
43bc0 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 eName;......}........///.<summar
43be0 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 y>......///.Returns.the.name.of.
43c00 74 68 65 20 45 64 6d 4d 65 6d 62 65 72 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 the.EdmMember.formatted.for.....
43c20 20 2f 2f 2f 20 75 73 65 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d .///.use.as.a.field.identifier..
43c40 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 68 .....///......///.This.method.ch
43c60 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 43 61 6d 65 anges.behavior.based.on.the.Came
43c80 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 2f 2f 2f 20 73 65 74 74 69 6e 67 2e 0d 0a 20 lCaseFields......///.setting....
43ca0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 ...///.</summary>......public.st
43cc0 72 69 6e 67 20 46 69 65 6c 64 4e 61 6d 65 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 ring.FieldName(EdmMember.member)
43ce0 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e ......{..........if.(member.==.n
43d00 75 6c 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 72 65 74 ull)..........{..............ret
43d20 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 urn.null;..........}............
43d40 72 65 74 75 72 6e 20 46 69 65 6c 64 4e 61 6d 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 3b 0d 0a return.FieldName(member.Name);..
43d60 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
43d80 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 ///.Returns.the.name.of.the.Enti
43da0 74 79 53 65 74 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 tySet.formatted.for......///.use
43dc0 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f .as.a.field.identifier.......///
43de0 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 ......///.This.method.changes.be
43e00 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 43 61 6d 65 6c 43 61 73 65 46 69 65 havior.based.on.the.CamelCaseFie
43e20 6c 64 73 0d 0a 20 20 20 20 2f 2f 2f 20 73 65 74 74 69 6e 67 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c lds......///.setting.......///.<
43e40 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 46 69 65 /summary>......public.string.Fie
43e60 6c 64 4e 61 6d 65 28 45 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 ldName(EntitySet.set)......{....
43e80 20 20 20 20 20 20 69 66 20 28 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 ......if.(set.==.null)..........
43ea0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 {..............return.null;.....
43ec0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 46 69 65 6c 64 4e 61 .....}............return.FieldNa
43ee0 6d 65 28 73 65 74 2e 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 me(set.Name);........}........pr
43f00 69 76 61 74 65 20 73 74 72 69 6e 67 20 46 69 65 6c 64 4e 61 6d 65 28 73 74 72 69 6e 67 20 6e 61 ivate.string.FieldName(string.na
43f20 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 43 61 6d 65 6c 43 61 73 me)......{..........if.(CamelCas
43f40 65 46 69 65 6c 64 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 eFields)..........{.............
43f60 20 72 65 74 75 72 6e 20 22 5f 22 20 2b 20 43 61 6d 65 6c 43 61 73 65 28 6e 61 6d 65 29 3b 0d 0a .return."_".+.CamelCase(name);..
43f80 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 ........}..........else.........
43fa0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 5f 22 20 2b 20 6e 61 6d .{..............return."_".+.nam
43fc0 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 e;..........}......}........///.
43fe0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e <summary>......///.Returns.the.n
44000 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 20 6f 62 6a 65 63 74 20 66 6f 72 6d 61 74 74 65 64 ame.of.the.Type.object.formatted
44020 20 66 6f 72 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 63 6f 64 65 .for......///.use.in.source.code
44040 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 .......///......///.This.method.
44060 63 68 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 46 75 changes.behavior.based.on.the.Fu
44080 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 2f 2f 2f 20 73 llyQualifySystemTypes......///.s
440a0 65 74 74 69 6e 67 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 etting.......///.</summary>.....
440c0 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 73 63 61 70 65 28 54 79 70 65 20 63 6c 72 54 79 .public.string.Escape(Type.clrTy
440e0 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 45 73 63 61 70 pe)......{..........return.Escap
44100 65 28 63 6c 72 54 79 70 65 2c 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 e(clrType,.FullyQualifySystemTyp
44120 65 73 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e es);......}........///.<summary>
44140 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 ......///.Returns.the.name.of.th
44160 65 20 54 79 70 65 20 6f 62 6a 65 63 74 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 e.Type.object.formatted.for.....
44180 20 2f 2f 2f 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 63 6f 64 65 2e 0d 0a 20 20 20 20 2f 2f .///.use.in.source.code.......//
441a0 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 /.</summary>......public.string.
441c0 45 73 63 61 70 65 28 54 79 70 65 20 63 6c 72 54 79 70 65 2c 20 62 6f 6f 6c 20 66 75 6c 6c 79 51 Escape(Type.clrType,.bool.fullyQ
441e0 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 ualifySystemTypes)......{.......
44200 20 20 20 69 66 28 63 6c 72 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 ...if(clrType.==.null)..........
44220 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 {..............return.null;.....
44240 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 74 79 70 65 4e 61 6d .....}............string.typeNam
44260 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 e;..........if.(fullyQualifySyst
44280 65 6d 54 79 70 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 emTypes)..........{.............
442a0 20 74 79 70 65 4e 61 6d 65 20 3d 20 22 67 6c 6f 62 61 6c 3a 3a 22 20 2b 20 63 6c 72 54 79 70 65 .typeName.=."global::".+.clrType
442c0 2e 46 75 6c 6c 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 .FullName;..........}..........e
442e0 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 lse..........{..............type
44300 4e 61 6d 65 20 3d 20 5f 63 6f 64 65 2e 47 65 74 54 79 70 65 4f 75 74 70 75 74 28 6e 65 77 20 43 Name.=._code.GetTypeOutput(new.C
44320 6f 64 65 54 79 70 65 52 65 66 65 72 65 6e 63 65 28 63 6c 72 54 79 70 65 29 29 3b 0d 0a 20 20 20 odeTypeReference(clrType));.....
44340 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 3b .....}..........return.typeName;
44360 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
44380 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 61 62 73 74 72 61 63 74 20 6f 70 74 69 6f ..///.Returns.the.abstract.optio
443a0 6e 20 69 66 20 74 68 65 20 65 6e 74 69 74 79 20 69 73 20 41 62 73 74 72 61 63 74 2c 20 6f 74 68 n.if.the.entity.is.Abstract,.oth
443c0 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 erwise.returns.String.Empty.....
443e0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 .///.</summary>......public.stri
44400 6e 67 20 41 62 73 74 72 61 63 74 4f 70 74 69 6f 6e 28 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 ng.AbstractOption(EntityType.ent
44420 69 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 6e 74 69 74 79 2e ity)......{..........if.(entity.
44440 41 62 73 74 72 61 63 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 Abstract)..........{............
44460 20 20 72 65 74 75 72 6e 20 22 61 62 73 74 72 61 63 74 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d ..return."abstract";..........}.
44480 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 .........return.String.Empty;...
444a0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f ...}........///.<summary>....../
444c0 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 20 69 64 65 6e 74 69 66 //.Returns.the.passed.in.identif
444e0 69 65 72 20 77 69 74 68 20 74 68 65 20 66 69 72 73 74 20 6c 65 74 74 65 72 20 63 68 61 6e 67 65 ier.with.the.first.letter.change
44500 64 20 74 6f 20 6c 6f 77 65 72 63 61 73 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 d.to.lowercase......///.</summar
44520 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 61 6d 65 6c 43 61 73 65 28 y>......public.string.CamelCase(
44540 73 74 72 69 6e 67 20 69 64 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 string.identifier)......{.......
44560 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 69 64 65 6e ...if.(String.IsNullOrEmpty(iden
44580 74 69 66 69 65 72 29 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 tifier))..........{.............
445a0 20 72 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a .return.identifier;..........}..
445c0 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 64 65 6e 74 69 66 69 65 72 2e 4c 65 6e 67 74 68 20 ..........if.(identifier.Length.
445e0 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 ==.1)..........{..............re
44600 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 5b 30 5d 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 turn.identifier[0].ToString(Cult
44620 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2e 54 6f 4c 6f 77 65 ureInfo.InvariantCulture).ToLowe
44640 72 49 6e 76 61 72 69 61 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 rInvariant();..........}........
44660 20 20 20 20 72 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 5b 30 5d 2e 54 6f 53 74 72 69 6e ....return.identifier[0].ToStrin
44680 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2e g(CultureInfo.InvariantCulture).
446a0 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 20 2b 20 69 64 65 6e 74 69 66 69 65 72 2e ToLowerInvariant().+.identifier.
446c0 53 75 62 73 74 72 69 6e 67 28 31 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 Substring(1);......}........///.
446e0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 <summary>......///.If.the.value.
44700 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d parameter.is.null.or.empty.an.em
44720 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f pty.string.is.returned,......///
44740 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 .otherwise.it.retuns.value.with.
44760 61 20 73 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 a.single.space.concatenated.on.t
44780 68 65 20 65 6e 64 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 he.end.......///.</summary>.....
447a0 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 70 61 63 65 41 66 74 65 72 28 73 74 72 69 6e 67 .public.string.SpaceAfter(string
447c0 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 .value)......{..........return.S
447e0 74 72 69 6e 67 41 66 74 65 72 28 76 61 6c 75 65 2c 20 22 20 22 29 3b 0d 0a 20 20 20 20 7d 0d 0a tringAfter(value,.".");......}..
44800 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 ......///.<summary>......///.If.
44820 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 the.value.parameter.is.null.or.e
44840 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 mpty.an.empty.string.is.returned
44860 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 ,......///.otherwise.it.retuns.v
44880 61 6c 75 65 20 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 65 alue.with.a.single.space.concate
448a0 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d nated.on.the.end.......///.</sum
448c0 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 70 61 63 65 42 65 mary>......public.string.SpaceBe
448e0 66 6f 72 65 28 73 74 72 69 6e 67 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 fore(string.value)......{.......
44900 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 20 22 2c 20 76 61 6c 75 ...return.StringBefore(".",.valu
44920 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d e);......}........///.<summary>.
44940 0a 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 .....///.If.the.value.parameter.
44960 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 is.null.or.empty.an.empty.string
44980 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 .is.returned,......///.otherwise
449a0 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 61 70 70 65 6e 64 20 63 6f 6e .it.retuns.value.with.append.con
449c0 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c catenated.on.the.end.......///.<
449e0 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 74 72 /summary>......public.string.Str
44a00 69 6e 67 41 66 74 65 72 28 73 74 72 69 6e 67 20 76 61 6c 75 65 2c 20 73 74 72 69 6e 67 20 61 70 ingAfter(string.value,.string.ap
44a20 70 65 6e 64 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 pend)......{..........if.(String
44a40 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 76 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 .IsNullOrEmpty(value))..........
44a60 7b 0d 0a 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 2e 45 6d 70 {..............return.String.Emp
44a80 74 79 3b 0d 0a 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 ty;..........}................re
44aa0 74 75 72 6e 20 76 61 6c 75 65 20 2b 20 61 70 70 65 6e 64 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 turn.value.+.append;......}.....
44ac0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 ...///.<summary>......///.If.the
44ae0 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 .value.parameter.is.null.or.empt
44b00 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a y.an.empty.string.is.returned,..
44b20 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 ....///.otherwise.it.retuns.valu
44b40 65 20 77 69 74 68 20 70 72 65 70 65 6e 64 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 e.with.prepend.concatenated.on.t
44b60 68 65 20 66 72 6f 6e 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 he.front.......///.</summary>...
44b80 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 74 72 69 6e 67 42 65 66 6f 72 65 28 73 74 ...public.string.StringBefore(st
44ba0 72 69 6e 67 20 70 72 65 70 65 6e 64 2c 20 73 74 72 69 6e 67 20 76 61 6c 75 65 29 0d 0a 20 20 20 ring.prepend,.string.value).....
44bc0 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 .{..........if.(String.IsNullOrE
44be0 6d 70 74 79 28 76 61 6c 75 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 mpty(value))..........{.........
44c00 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 .....return.String.Empty;.......
44c20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 65 70 65 6e 64 20 2b ...}............return.prepend.+
44c40 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .value;......}........///.<summa
44c60 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 ry>......///.Returns.false.and.s
44c80 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 74 79 hows.an.error.if.the.supplied.ty
44ca0 70 65 20 6e 61 6d 65 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 pe.names.aren't.case-insensitive
44cc0 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 72 65 ly.unique,......///.otherwise.re
44ce0 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d turns.true.......///.</summary>.
44d00 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e .....public.bool.VerifyCaseInsen
44d20 73 69 74 69 76 65 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 sitiveTypeUniqueness(IEnumerable
44d40 3c 73 74 72 69 6e 67 3e 20 74 79 70 65 73 2c 20 73 74 72 69 6e 67 20 73 6f 75 72 63 65 46 69 6c <string>.types,.string.sourceFil
44d60 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 56 65 72 69 66 79 e)......{..........return.Verify
44d80 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 74 79 70 65 73 2c CaseInsensitiveUniqueness(types,
44da0 20 74 20 3d 3e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e .t.=>.string.Format(CultureInfo.
44dc0 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e CurrentCulture,.GetResourceStrin
44de0 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 43 g("Template_CaseInsensitiveTypeC
44e00 6f 6e 66 6c 69 63 74 22 29 2c 20 74 29 2c 20 73 6f 75 72 63 65 46 69 6c 65 29 3b 0d 0a 20 20 20 onflict"),.t),.sourceFile);.....
44e20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
44e40 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f .Returns.false.and.shows.an.erro
44e60 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 73 74 72 69 6e 67 73 20 61 72 65 6e 27 74 r.if.the.supplied.strings.aren't
44e80 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 .case-insensitively.unique,.....
44ea0 20 2f 2f 2f 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 .///.otherwise.returns.true.....
44ec0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 62 6f ..///.</summary>......private.bo
44ee0 6f 6c 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 ol.VerifyCaseInsensitiveUniquene
44f00 73 73 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 69 74 65 6d 73 2c 20 46 75 ss(IEnumerable<string>.items,.Fu
44f20 6e 63 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 nc<string,.string>.formatMessage
44f40 2c 20 73 74 72 69 6e 67 20 73 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 ,.string.sourceFile)......{.....
44f60 20 20 20 20 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 20 68 61 73 68 20 3d 20 6e 65 77 20 .....HashSet<string>.hash.=.new.
44f80 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 49 HashSet<string>(StringComparer.I
44fa0 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 3b 0d 0a 20 20 20 nvariantCultureIgnoreCase);.....
44fc0 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 73 74 72 69 6e 67 20 69 74 65 6d 20 69 6e 20 69 74 65 .....foreach.(string.item.in.ite
44fe0 6d 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 66 20 28 ms)..........{..............if.(
45000 21 68 61 73 68 2e 41 64 64 28 69 74 65 6d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d !hash.Add(item))..............{.
45020 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 ................._textTransforma
45040 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 tion.Errors.Add(new.System.CodeD
45060 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 73 6f 75 72 63 65 om.Compiler.CompilerError(source
45080 46 69 6c 65 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 32 33 22 2c 20 66 6f 72 6d 61 74 4d 65 73 73 File,.-1,.-1,."6023",.formatMess
450a0 61 67 65 28 69 74 65 6d 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 age(item)));..................re
450c0 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 turn.false;..............}......
450e0 20 20 20 20 7d 0d 0a 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 ....}..........return.true;.....
45100 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
45120 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 74 68 65 20 69 74 65 6d 73 20 .Returns.the.names.of.the.items.
45140 69 6e 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 68 61 74 20 in.the.supplied.collection.that.
45160 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 4f 2d 53 70 61 63 65 20 74 79 70 65 73 2e 0d 0a 20 20 correspond.to.O-Space.types.....
45180 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 45 6e ..///.</summary>......public.IEn
451a0 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 47 65 74 41 6c 6c 47 6c 6f 62 61 6c 49 74 65 umerable<string>.GetAllGlobalIte
451c0 6d 73 28 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 ms(EdmItemCollection.itemCollect
451e0 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 74 65 6d ion)......{..........return.item
45200 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 3c 47 6c 6f 62 61 6c 49 74 65 6d 3e 28 Collection.GetItems<GlobalItem>(
45220 29 2e 57 68 65 72 65 28 69 20 3d 3e 20 69 20 69 73 20 45 6e 74 69 74 79 54 79 70 65 20 7c 7c 20 ).Where(i.=>.i.is.EntityType.||.
45240 69 20 69 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 7c 7c 20 69 20 69 73 20 45 6e 75 6d 54 79 70 i.is.ComplexType.||.i.is.EnumTyp
45260 65 20 7c 7c 20 69 20 69 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 2e 53 65 6c 65 63 e.||.i.is.EntityContainer).Selec
45280 74 28 67 20 3d 3e 20 47 65 74 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 28 67 29 29 3b 0d 0a 20 t(g.=>.GetGlobalItemName(g));...
452a0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f ...}........///.<summary>....../
452c0 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 75 70 70 6c //.Returns.the.name.of.the.suppl
452e0 69 65 64 20 47 6c 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ied.GlobalItem.......///.</summa
45300 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 47 65 74 47 6c 6f 62 61 6c ry>......public.string.GetGlobal
45320 49 74 65 6d 4e 61 6d 65 28 47 6c 6f 62 61 6c 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 20 20 20 7b ItemName(GlobalItem.item)......{
45340 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 69 73 20 45 64 6d 54 79 70 65 29 0d 0a ..........if.(item.is.EdmType)..
45360 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 ........{..............return.((
45380 45 64 6d 54 79 70 65 29 69 74 65 6d 29 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a EdmType)item).Name;..........}..
453a0 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ........else..........{.........
453c0 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 69 74 .....return.((EntityContainer)it
453e0 65 6d 29 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 em).Name;..........}......}.....
45400 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 6e 73 ...///.<summary>......///.Retuns
45420 20 61 73 20 66 75 6c 6c 20 6f 66 20 61 20 6e 61 6d 65 20 61 73 20 70 6f 73 73 69 62 6c 65 2c 20 .as.full.of.a.name.as.possible,.
45440 69 66 20 61 20 6e 61 6d 65 73 70 61 63 65 20 69 73 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 if.a.namespace.is.provided......
45460 2f 2f 2f 20 74 68 65 20 6e 61 6d 65 73 70 61 63 65 20 61 6e 64 20 6e 61 6d 65 20 61 72 65 20 63 ///.the.namespace.and.name.are.c
45480 6f 6d 62 69 6e 65 64 20 77 69 74 68 20 61 20 70 65 72 69 6f 64 2c 20 6f 74 68 65 72 77 69 73 65 ombined.with.a.period,.otherwise
454a0 20 6a 75 73 74 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6e 61 6d 65 20 69 73 20 72 65 74 75 72 .just......///.the.name.is.retur
454c0 6e 65 64 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 20 70 75 ned.......///.</summary>......pu
454e0 62 6c 69 63 20 73 74 72 69 6e 67 20 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 73 74 72 69 6e blic.string.CreateFullName(strin
45500 67 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 g.namespaceName,.string.name)...
45520 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f ...{..........if.(String.IsNullO
45540 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 rEmpty(namespaceName))..........
45560 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 3b 0d 0a 20 20 20 {..............return.name;.....
45580 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 .....}............return.namespa
455a0 63 65 4e 61 6d 65 20 2b 20 22 2e 22 20 2b 20 6e 61 6d 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 ceName.+.".".+.name;......}.....
455c0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 6e 73 ...///.<summary>......///.Retuns
455e0 20 61 20 6c 69 74 65 72 61 6c 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 20 73 75 70 70 .a.literal.representing.the.supp
45600 6c 69 65 64 20 76 61 6c 75 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d lied.value.......///.</summary>.
45620 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 72 65 61 74 65 4c 69 74 65 72 61 6c .....public.string.CreateLiteral
45640 28 6f 62 6a 65 63 74 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 (object.value)......{..........i
45660 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 f.(value.==.null)..........{....
45680 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a ..........return.string.Empty;..
456a0 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 54 79 70 65 20 74 79 70 65 20 3d ........}............Type.type.=
456c0 20 76 61 6c 75 65 2e 47 65 74 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 .value.GetType();..........if.(t
456e0 79 70 65 2e 49 73 45 6e 75 6d 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ype.IsEnum)..........{..........
45700 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 20 2b 20 22 2e 22 20 2b ....return.type.FullName.+.".".+
45720 20 76 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 .value.ToString();..........}...
45740 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 47 75 69 64 29 29 .......if.(type.==.typeof(Guid))
45760 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 ..........{..............return.
45780 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 string.Format(CultureInfo.Invari
457a0 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 47 75 69 64 28 5c 22 7b 30 7d 5c 22 29 22 2c antCulture,."new.Guid(\"{0}\")",
457c0 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 ................................
457e0 20 20 20 28 28 47 75 69 64 29 76 61 6c 75 65 29 2e 54 6f 53 74 72 69 6e 67 28 22 44 22 2c 20 43 ...((Guid)value).ToString("D",.C
45800 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 3b 0d 0a ultureInfo.InvariantCulture));..
45820 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 ........}..........else.if.(type
45840 20 3d 3d 20 74 79 70 65 6f 66 28 44 61 74 65 54 69 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 7b .==.typeof(DateTime))..........{
45860 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d ..............return.string.Form
45880 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c at(CultureInfo.InvariantCulture,
458a0 20 22 6e 65 77 20 44 61 74 65 54 69 6d 65 28 7b 30 7d 2c 20 44 61 74 65 54 69 6d 65 4b 69 6e 64 ."new.DateTime({0},.DateTimeKind
458c0 2e 55 6e 73 70 65 63 69 66 69 65 64 29 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Unspecified)",.................
458e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 44 61 74 65 54 69 6d 65 29 76 61 6c ..................((DateTime)val
45900 75 65 29 2e 54 69 63 6b 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 ue).Ticks);..........}..........
45920 65 6c 73 65 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 62 79 74 65 5b 5d 29 29 else.if.(type.==.typeof(byte[]))
45940 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 72 72 ..........{..............var.arr
45960 61 79 49 6e 69 74 20 3d 20 73 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 28 28 62 79 74 ayInit.=.string.Join(",.",.((byt
45980 65 5b 5d 29 76 61 6c 75 65 29 2e 53 65 6c 65 63 74 28 62 20 3d 3e 20 62 2e 54 6f 53 74 72 69 6e e[])value).Select(b.=>.b.ToStrin
459a0 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 g(CultureInfo.InvariantCulture))
459c0 2e 54 6f 41 72 72 61 79 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e .ToArray());..............return
459e0 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 .string.Format(CultureInfo.Invar
45a00 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 42 79 74 65 5b 5d 20 7b 7b 7b 30 7d 7d 7d iantCulture,."new.Byte[].{{{0}}}
45a20 22 2c 20 61 72 72 61 79 49 6e 69 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 ",.arrayInit);..........}.......
45a40 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 44 61 74 65 54 ...else.if.(type.==.typeof(DateT
45a60 69 6d 65 4f 66 66 73 65 74 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 imeOffset))..........{..........
45a80 20 20 20 20 76 61 72 20 64 74 6f 20 3d 20 28 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 29 76 61 ....var.dto.=.(DateTimeOffset)va
45aa0 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e lue;..............return.string.
45ac0 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 Format(CultureInfo.InvariantCult
45ae0 75 72 65 2c 20 22 6e 65 77 20 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 28 7b 30 7d 2c 20 6e 65 ure,."new.DateTimeOffset({0},.ne
45b00 77 20 54 69 6d 65 53 70 61 6e 28 7b 31 7d 29 29 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 w.TimeSpan({1}))",..............
45b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 74 6f 2e 54 69 63 6b 73 2c 20 .....................dto.Ticks,.
45b40 64 74 6f 2e 4f 66 66 73 65 74 2e 54 69 63 6b 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 dto.Offset.Ticks);..........}...
45b60 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 79 70 65 20 3d 3d 20 74 79 70 65 6f 66 28 54 .......else.if.(type.==.typeof(T
45b80 69 6d 65 53 70 61 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 imeSpan))..........{............
45ba0 20 20 72 65 74 75 72 6e 20 73 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e ..return.string.Format(CultureIn
45bc0 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 6e 65 77 20 54 69 6d 65 53 70 fo.InvariantCulture,."new.TimeSp
45be0 61 6e 28 7b 30 7d 29 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 an({0})",.......................
45c00 20 20 20 20 20 20 20 20 20 20 20 20 28 28 54 69 6d 65 53 70 61 6e 29 76 61 6c 75 65 29 2e 54 69 ............((TimeSpan)value).Ti
45c20 63 6b 73 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 76 61 72 20 cks);..........}............var.
45c40 65 78 70 72 65 73 73 69 6f 6e 20 3d 20 6e 65 77 20 43 6f 64 65 50 72 69 6d 69 74 69 76 65 45 78 expression.=.new.CodePrimitiveEx
45c60 70 72 65 73 73 69 6f 6e 28 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 77 72 pression(value);..........var.wr
45c80 69 74 65 72 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 57 72 69 74 65 72 28 29 3b 0d 0a 20 20 20 20 iter.=.new.StringWriter();......
45ca0 20 20 20 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 20 63 6f 64 65 20 3d 20 6e 65 ....CSharpCodeProvider.code.=.ne
45cc0 77 20 43 53 68 61 72 70 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 w.CSharpCodeProvider();.........
45ce0 20 63 6f 64 65 2e 47 65 6e 65 72 61 74 65 43 6f 64 65 46 72 6f 6d 45 78 70 72 65 73 73 69 6f 6e .code.GenerateCodeFromExpression
45d00 28 65 78 70 72 65 73 73 69 6f 6e 2c 20 77 72 69 74 65 72 2c 20 6e 65 77 20 43 6f 64 65 47 65 6e (expression,.writer,.new.CodeGen
45d20 65 72 61 74 6f 72 4f 70 74 69 6f 6e 73 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 eratorOptions());..........retur
45d40 6e 20 77 72 69 74 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 n.writer.ToString();......}.....
45d60 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e ...///.<summary>......///.Return
45d80 73 20 61 20 72 65 73 6f 75 72 63 65 20 73 74 72 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 53 79 73 s.a.resource.string.from.the.Sys
45da0 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 20 61 73 73 65 6d 62 6c 79 2e tem.Data.Entity.Design.assembly.
45dc0 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 20 70 75 62 6c 69 63 ......///.</summary>......public
45de0 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 .static.string.GetResourceString
45e00 28 73 74 72 69 6e 67 20 72 65 73 6f 75 72 63 65 4e 61 6d 65 2c 20 43 75 6c 74 75 72 65 49 6e 66 (string.resourceName,.CultureInf
45e20 6f 20 63 75 6c 74 75 72 65 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 o.culture.=.null)......{........
45e40 20 20 69 66 28 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ..if(_resourceManager.==.null)..
45e60 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 65 73 6f 75 72 63 65 ........{.............._resource
45e80 4d 61 6e 61 67 65 72 20 3d 20 6e 65 77 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 Manager.=.new.System.Resources.R
45ea0 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 28 22 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 esourceManager("System.Data.Enti
45ec0 74 79 2e 44 65 73 69 67 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 ty.Design",..................typ
45ee0 65 6f 66 28 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 2e 4d 65 eof(System.Data.Entity.Design.Me
45f00 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 29 2e 41 73 73 tadataItemCollectionFactory).Ass
45f20 65 6d 62 6c 79 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 72 65 embly);..........}............re
45f40 74 75 72 6e 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 47 65 74 53 74 72 69 6e 67 28 turn._resourceManager.GetString(
45f60 72 65 73 6f 75 72 63 65 4e 61 6d 65 2c 20 63 75 6c 74 75 72 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a resourceName,.culture);......}..
45f80 20 20 20 20 73 74 61 74 69 63 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f ....static.System.Resources.Reso
45fa0 75 72 63 65 4d 61 6e 61 67 65 72 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 3b 0d 0a 0d urceManager._resourceManager;...
45fc0 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 45 78 74 65 72 6e .....private.const.string.Extern
45fe0 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 20 3d 20 40 22 68 74 74 70 alTypeNameAttributeName.=.@"http
46000 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 ://schemas.microsoft.com/ado/200
46020 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 45 78 74 65 72 6e 61 6c 54 79 70 65 6/04/codegeneration:ExternalType
46040 4e 61 6d 65 22 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 Name";........///.<summary>.....
46060 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 65 6e 74 69 74 79 2c 20 63 6f 6d 70 6c 65 78 2c 20 6f .///.Gets.the.entity,.complex,.o
46080 72 20 65 6e 75 6d 20 74 79 70 65 73 20 66 6f 72 20 77 68 69 63 68 20 63 6f 64 65 20 73 68 6f 75 r.enum.types.for.which.code.shou
460a0 6c 64 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 67 69 76 65 6e 20 69 ld.be.generated.from.the.given.i
460c0 74 65 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 41 6e 79 20 74 79 70 tem.collection.......///.Any.typ
460e0 65 73 20 66 6f 72 20 77 68 69 63 68 20 61 6e 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 es.for.which.an.ExternalTypeName
46100 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 70 70 6c 69 65 64 20 69 6e 20 .annotation.has.been.applied.in.
46120 74 68 65 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 0d 0a 20 20 20 20 2f 2f 2f 20 6d 65 the.conceptual.model......///.me
46140 74 61 64 61 74 61 20 28 43 53 44 4c 29 20 61 72 65 20 66 69 6c 74 65 72 65 64 20 6f 75 74 20 6f tadata.(CSDL).are.filtered.out.o
46160 66 20 74 68 65 20 72 65 74 75 72 6e 65 64 20 6c 69 73 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f f.the.returned.list.......///.</
46180 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 74 79 70 65 70 61 72 61 6d 20 6e 61 6d summary>......///.<typeparam.nam
461a0 65 3d 22 54 22 3e 54 68 65 20 74 79 70 65 20 6f 66 20 69 74 65 6d 20 74 6f 20 72 65 74 75 72 6e e="T">The.type.of.item.to.return
461c0 2e 3c 2f 74 79 70 65 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 .</typeparam>......///.<param.na
461e0 6d 65 3d 22 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 3e 54 68 65 20 69 74 65 6d 20 63 6f 6c me="itemCollection">The.item.col
46200 6c 65 63 74 69 6f 6e 20 74 6f 20 6c 6f 6f 6b 20 69 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 lection.to.look.in.</param>.....
46220 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 69 74 65 6d 73 20 74 6f 20 67 65 6e 65 72 .///.<returns>The.items.to.gener
46240 61 74 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 45 6e 75 6d ate.</returns>......public.IEnum
46260 65 72 61 62 6c 65 3c 54 3e 20 47 65 74 49 74 65 6d 73 54 6f 47 65 6e 65 72 61 74 65 3c 54 3e 28 erable<T>.GetItemsToGenerate<T>(
46280 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 77 ItemCollection.itemCollection).w
462a0 68 65 72 65 20 54 3a 20 47 6c 6f 62 61 6c 49 74 65 6d 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 here.T:.GlobalItem......{.......
462c0 20 20 20 72 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d ...return.itemCollection.GetItem
462e0 73 3c 54 3e 28 29 2e 57 68 65 72 65 28 69 20 3d 3e 20 21 69 2e 4d 65 74 61 64 61 74 61 50 72 6f s<T>().Where(i.=>.!i.MetadataPro
46300 70 65 72 74 69 65 73 2e 41 6e 79 28 70 20 3d 3e 20 70 2e 4e 61 6d 65 20 3d 3d 20 45 78 74 65 72 perties.Any(p.=>.p.Name.==.Exter
46320 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 29 3b 0d 0a 20 20 20 nalTypeNameAttributeName));.....
46340 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
46360 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 .Returns.the.escaped.type.name.t
46380 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 73 61 67 65 20 6f 66 20 61 20 63 o.use.for.the.given.usage.of.a.c
463a0 2d 73 70 61 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 -space.type.in.o-space..This.mig
463c0 68 74 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 ht.be......///.an.external.type.
463e0 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e name.if.the.ExternalTypeName.ann
46400 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 otation.has.been.specified.in.th
46420 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 e......///.conceptual.model.meta
46440 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e data.(CSDL).......///.</summary>
46460 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 ......///.<param.name="typeUsage
46480 22 3e 54 68 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 20 74 6f 20 67 65 74 20 ">The.c-space.type.usage.to.get.
464a0 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 a.name.for.</param>......///.<re
464c0 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 turns>The.type.name.to.use.</ret
464e0 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 urns>......public.string.GetType
46500 4e 61 6d 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b Name(TypeUsage.typeUsage)......{
46520 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 55 73 61 67 65 20 3d 3d 20 6e 75 ..........return.typeUsage.==.nu
46540 6c 6c 20 3f 20 6e 75 6c 6c 20 3a 20 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 ll.?.null.:.GetTypeName(typeUsag
46560 65 2e 45 64 6d 54 79 70 65 2c 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 e.EdmType,._ef.IsNullable(typeUs
46580 61 67 65 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 3a 20 6e 75 6c 6c 29 3b 0d 0a 20 20 age),.modelNamespace:.null);....
465a0 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
465c0 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 /.Returns.the.escaped.type.name.
465e0 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 63 2d 73 70 61 63 65 20 74 79 70 to.use.for.the.given.c-space.typ
46600 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 e.in.o-space..This.might.be.....
46620 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 .///.an.external.type.name.if.th
46640 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 e.ExternalTypeName.annotation.ha
46660 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f s.been.specified.in.the......///
46680 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c .conceptual.model.metadata.(CSDL
466a0 29 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 20 2f 2f 2f 20 ).......///.</summary>......///.
466c0 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 63 2d 73 70 61 63 <param.name="edmType">The.c-spac
466e0 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d e.type.to.get.a.name.for.</param
46700 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d >......///.<returns>The.type.nam
46720 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 e.to.use.</returns>......public.
46740 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 45 64 6d 54 79 70 65 20 65 64 6d 54 79 string.GetTypeName(EdmType.edmTy
46760 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 54 79 pe)......{..........return.GetTy
46780 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 3a 20 6e 75 6c 6c peName(edmType,.isNullable:.null
467a0 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 3a 20 6e 75 6c 6c 29 3b 0d 0a 20 20 20 20 7d 0d ,.modelNamespace:.null);......}.
467c0 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 .......///.<summary>......///.Re
467e0 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 turns.the.escaped.type.name.to.u
46800 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 73 61 67 65 20 6f 66 20 61 6e 20 63 2d 73 se.for.the.given.usage.of.an.c-s
46820 70 61 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 pace.type.in.o-space..This.might
46840 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 .be......///.an.external.type.na
46860 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 me.if.the.ExternalTypeName.annot
46880 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d ation.has.been.specified.in.the.
468a0 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 .....///.conceptual.model.metada
468c0 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a ta.(CSDL).......///.</summary>..
468e0 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 22 3e ....///.<param.name="typeUsage">
46900 54 68 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 20 74 6f 20 67 65 74 20 61 20 The.c-space.type.usage.to.get.a.
46920 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 name.for.</param>......///.<para
46940 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e 49 66 20 6e 6f 74 20 6e m.name="modelNamespace">If.not.n
46960 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 70 61 63 65 20 64 6f 65 ull.and.the.type's.namespace.doe
46980 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 63 65 2c 20 74 68 65 6e s.not.match.this.namespace,.then
469a0 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 6e 61 6d 65 .a......///.fully.qualified.name
469c0 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 .will.be.returned.</param>......
469e0 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 ///.<returns>The.type.name.to.us
46a00 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 e.</returns>......public.string.
46a20 47 65 74 54 79 70 65 4e 61 6d 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 2c GetTypeName(TypeUsage.typeUsage,
46a40 20 73 74 72 69 6e 67 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 7b 0d 0a .string.modelNamespace)......{..
46a60 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 55 73 61 67 65 20 3d 3d 20 6e 75 6c 6c ........return.typeUsage.==.null
46a80 20 3f 20 6e 75 6c 6c 20 3a 20 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 2e .?.null.:.GetTypeName(typeUsage.
46aa0 45 64 6d 54 79 70 65 2c 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 EdmType,._ef.IsNullable(typeUsag
46ac0 65 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 e),.modelNamespace);......}.....
46ae0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e ...///.<summary>......///.Return
46b00 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 s.the.escaped.type.name.to.use.f
46b20 6f 72 20 74 68 65 20 67 69 76 65 6e 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 69 6e 20 6f 2d 73 or.the.given.c-space.type.in.o-s
46b40 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 20 pace..This.might.be......///.an.
46b60 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e external.type.name.if.the.Extern
46b80 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 alTypeName.annotation.has.been.s
46ba0 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 63 65 70 74 pecified.in.the......///.concept
46bc0 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 ual.model.metadata.(CSDL).......
46be0 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e ///.</summary>......///.<param.n
46c00 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 74 ame="edmType">The.c-space.type.t
46c20 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f o.get.a.name.for.</param>....../
46c40 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e //.<param.name="modelNamespace">
46c60 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 If.not.null.and.the.type's.names
46c80 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 pace.does.not.match.this.namespa
46ca0 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 ce,.then.a......///.fully.qualif
46cc0 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 ied.name.will.be.returned.</para
46ce0 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 m>......///.<returns>The.type.na
46d00 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 me.to.use.</returns>......public
46d20 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 45 64 6d 54 79 70 65 20 65 64 6d 54 .string.GetTypeName(EdmType.edmT
46d40 79 70 65 2c 20 73 74 72 69 6e 67 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 ype,.string.modelNamespace).....
46d60 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 .{..........return.GetTypeName(e
46d80 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 3a 20 6e 75 6c 6c 2c 20 6d 6f 64 65 6c 4e dmType,.isNullable:.null,.modelN
46da0 61 6d 65 73 70 61 63 65 3a 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 3b 0d 0a 20 20 20 20 amespace:.modelNamespace);......
46dc0 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
46de0 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f Returns.the.escaped.type.name.to
46e00 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 63 2d 73 70 61 63 65 20 74 79 70 65 20 .use.for.the.given.c-space.type.
46e20 69 6e 20 6f 2d 73 70 61 63 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 2f in.o-space..This.might.be....../
46e40 2f 2f 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 //.an.external.type.name.if.the.
46e60 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 ExternalTypeName.annotation.has.
46e80 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 been.specified.in.the......///.c
46ea0 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e onceptual.model.metadata.(CSDL).
46ec0 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 20 2f 2f 2f 20 3c 70 ......///.</summary>......///.<p
46ee0 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 63 2d 73 70 61 63 65 20 aram.name="edmType">The.c-space.
46f00 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d type.to.get.a.name.for.</param>.
46f20 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 69 73 4e 75 6c 6c 61 62 6c 65 .....///.<param.name="isNullable
46f40 22 3e 53 65 74 20 74 68 69 73 20 74 6f 20 74 72 75 65 20 66 6f 72 20 6e 75 6c 6c 61 62 6c 65 20 ">Set.this.to.true.for.nullable.
46f60 75 73 61 67 65 20 6f 66 20 74 68 69 73 20 74 79 70 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 usage.of.this.type.</param>.....
46f80 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 .///.<param.name="modelNamespace
46fa0 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d ">If.not.null.and.the.type's.nam
46fc0 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 espace.does.not.match.this.names
46fe0 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 66 75 6c 6c 79 20 71 75 61 6c pace,.then.a......///.fully.qual
47000 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 ified.name.will.be.returned.</pa
47020 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 ram>......///.<returns>The.type.
47040 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 72 69 76 name.to.use.</returns>......priv
47060 61 74 65 20 73 74 72 69 6e 67 20 47 65 74 54 79 70 65 4e 61 6d 65 28 45 64 6d 54 79 70 65 20 65 ate.string.GetTypeName(EdmType.e
47080 64 6d 54 79 70 65 2c 20 62 6f 6f 6c 3f 20 69 73 4e 75 6c 6c 61 62 6c 65 2c 20 73 74 72 69 6e 67 dmType,.bool?.isNullable,.string
470a0 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .modelNamespace)......{.........
470c0 20 69 66 20 28 65 64 6d 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b .if.(edmType.==.null)..........{
470e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 ..............return.null;......
47100 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6c 6c 65 63 74 69 6f 6e 54 ....}............var.collectionT
47120 79 70 65 20 3d 20 65 64 6d 54 79 70 65 20 61 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 3b ype.=.edmType.as.CollectionType;
47140 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 20 21 3d 20 ..........if.(collectionType.!=.
47160 6e 75 6c 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 72 65 null)..........{..............re
47180 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 turn.String.Format(CultureInfo.I
471a0 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 49 43 6f 6c 6c 65 63 74 69 6f 6e 3c 7b 30 nvariantCulture,."ICollection<{0
471c0 7d 3e 22 2c 20 47 65 74 54 79 70 65 4e 61 6d 65 28 63 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 2e }>",.GetTypeName(collectionType.
471e0 54 79 70 65 55 73 61 67 65 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 29 3b 0d 0a 20 20 TypeUsage,.modelNamespace));....
47200 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 72 79 20 74 6f 20 67 65 74 ......}............//.Try.to.get
47220 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 2c 20 61 6e 64 20 69 66 20 74 .an.external.type.name,.and.if.t
47240 68 61 74 20 69 73 20 6e 75 6c 6c 2c 20 74 68 65 6e 20 74 72 79 20 74 6f 20 67 65 74 20 65 73 63 hat.is.null,.then.try.to.get.esc
47260 61 70 65 20 74 68 65 20 6e 61 6d 65 20 66 72 6f 6d 20 6d 65 74 61 64 61 74 61 2c 0d 0a 20 20 20 ape.the.name.from.metadata,.....
47280 20 20 20 20 20 2f 2f 20 70 6f 73 73 69 62 6c 79 20 6e 61 6d 65 73 70 61 63 65 2d 71 75 61 6c 69 .....//.possibly.namespace-quali
472a0 66 79 69 6e 67 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 74 79 70 65 4e 61 6d 65 20 fying.it...........var.typeName.
472c0 3d 20 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 =.Escape(edmType.MetadataPropert
472e0 69 65 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 20 20 20 20 ies.............................
47300 20 20 20 2e 57 68 65 72 65 28 70 20 3d 3e 20 70 2e 4e 61 6d 65 20 3d 3d 20 45 78 74 65 72 6e 61 ....Where(p.=>.p.Name.==.Externa
47320 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 lTypeNameAttributeName).........
47340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 53 65 6c 65 63 74 28 70 ........................Select(p
47360 20 3d 3e 20 28 73 74 72 69 6e 67 29 70 2e 56 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .=>.(string)p.Value)............
47380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 46 69 72 73 74 4f 72 44 65 66 61 .....................FirstOrDefa
473a0 75 6c 74 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3f 3f 0d 0a 20 20 20 20 20 20 20 20 ult())..............??..........
473c0 20 20 20 20 28 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 65 ....(modelNamespace.!=.null.&&.e
473e0 64 6d 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 21 3d 20 6d 6f 64 65 6c 4e 61 6d dmType.NamespaceName.!=.modelNam
47400 65 73 70 61 63 65 20 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 46 75 6c espace.?...............CreateFul
47420 6c 4e 61 6d 65 28 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 65 64 6d 54 79 70 65 2e 4e 61 lName(EscapeNamespace(edmType.Na
47440 6d 65 73 70 61 63 65 4e 61 6d 65 29 2c 20 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 29 29 20 3a mespaceName),.Escape(edmType)).:
47460 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 29 29 3b ...............Escape(edmType));
47480 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 54 79 70 65 20 69 73 20 53 74 72 75 63 ............if.(edmType.is.Struc
474a0 74 75 72 61 6c 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 turalType)..........{...........
474c0 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ...return.typeName;..........}..
474e0 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 64 6d 54 79 70 65 20 69 73 20 53 69 6d 70 6c 65 54 ..........if.(edmType.is.SimpleT
47500 79 70 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 76 61 72 ype)..........{..............var
47520 20 63 6c 72 54 79 70 65 20 3d 20 5f 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 .clrType.=._ef.UnderlyingClrType
47540 28 65 64 6d 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 28 65 64 (edmType);..............if.(!(ed
47560 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 mType.is.EnumType)).............
47580 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 45 .{..................typeName.=.E
475a0 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a scape(clrType);..............}..
475c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 6c 72 54 79 70 65 2e 49 73 56 ..............return.clrType.IsV
475e0 61 6c 75 65 54 79 70 65 20 26 26 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3d 3d 20 74 72 75 65 20 3f alueType.&&.isNullable.==.true.?
47600 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 ..................String.Format(
47620 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e CultureInfo.InvariantCulture,."N
47640 75 6c 6c 61 62 6c 65 3c 7b 30 7d 3e 22 2c 20 74 79 70 65 4e 61 6d 65 29 20 3a 0d 0a 20 20 20 20 ullable<{0}>",.typeName).:......
47660 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d ............typeName;..........}
47680 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 ............throw.new.ArgumentEx
476a0 63 65 70 74 69 6f 6e 28 22 74 79 70 65 55 73 61 67 65 22 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d ception("typeUsage");......}..}.
476c0 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c ...///.<summary>..///.Responsibl
476e0 65 20 66 6f 72 20 6d 61 6b 69 6e 67 20 74 68 65 20 45 6e 74 69 74 79 20 46 72 61 6d 65 77 6f 72 e.for.making.the.Entity.Framewor
47700 6b 20 4d 65 74 61 64 61 74 61 20 6d 6f 72 65 0d 0a 2f 2f 2f 20 61 63 63 65 73 73 69 62 6c 65 20 k.Metadata.more..///.accessible.
47720 66 6f 72 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d for.code.generation...///.</summ
47740 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 ary>..public.class.MetadataTools
47760 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 ..{......private.readonly.Dynami
47780 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f cTextTransformation._textTransfo
477a0 72 6d 61 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 rmation;........///.<summary>...
477c0 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 4d 65 74 61 64 61 74 61 54 6f ...///.Initializes.an.MetadataTo
477e0 6f 6c 73 20 49 6e 73 74 61 6e 63 65 20 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 ols.Instance..with.the......///.
47800 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 TextTransformation.(T4.generated
47820 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e .class).that.is.currently.runnin
47840 67 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 20 70 75 62 6c 69 g......///.</summary>......publi
47860 63 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 c.MetadataTools(object.textTrans
47880 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 formation)......{..........if.(t
478a0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 extTransformation.==.null)......
478c0 20 20 20 20 7b 0d 0a 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
478e0 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 umentNullException("textTransfor
47900 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 mation");..........}............
47920 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 _textTransformation.=.DynamicTex
47940 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 tTransformation.Create(textTrans
47960 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 formation);......}........///.<s
47980 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 ummary>......///.This.method.ret
479a0 75 72 6e 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 43 4c 52 20 74 79 70 65 20 6f 66 20 urns.the.underlying.CLR.type.of.
479c0 74 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 the.o-space.type.corresponding.t
479e0 6f 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 74 o.the.supplied.<paramref.name="t
47a00 79 70 65 55 73 61 67 65 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 66 ypeUsage"/>......///.Note.that.f
47a20 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 or.an.enum.type.this.means.that.
47a40 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 6e 75 6d 20 77 69 6c 6c 20 62 the.type.backing.the.enum.will.b
47a60 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e 75 6d 20 74 79 70 65 20 69 74 e.returned,.not.the.enum.type.it
47a80 73 65 6c 66 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 20 70 self.......///.</summary>......p
47aa0 75 62 6c 69 63 20 54 79 70 65 20 43 6c 72 54 79 70 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 ublic.Type.ClrType(TypeUsage.typ
47ac0 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 55 eUsage)......{..........return.U
47ae0 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 nderlyingClrType(typeUsage.EdmTy
47b00 70 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e pe);......}........///.<summary>
47b20 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 20 74 68 ......///.This.method.returns.th
47b40 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 43 4c 52 20 74 79 70 65 20 67 69 76 65 6e 20 74 68 65 20 e.underlying.CLR.type.given.the.
47b60 63 2d 73 70 61 63 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 c-space.type.......///.Note.that
47b80 20 66 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d 65 61 6e 73 20 74 68 61 .for.an.enum.type.this.means.tha
47ba0 74 20 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 6e 75 6d 20 77 69 6c 6c t.the.type.backing.the.enum.will
47bc0 20 62 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e 75 6d 20 74 79 70 65 20 .be.returned,.not.the.enum.type.
47be0 69 74 73 65 6c 66 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 itself.......///.</summary>.....
47c00 20 70 75 62 6c 69 63 20 54 79 70 65 20 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 45 .public.Type.UnderlyingClrType(E
47c20 64 6d 54 79 70 65 20 65 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 dmType.edmType)......{..........
47c40 76 61 72 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 20 3d 20 65 64 6d 54 79 70 65 20 61 73 20 50 var.primitiveType.=.edmType.as.P
47c60 72 69 6d 69 74 69 76 65 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 70 72 69 6d 69 rimitiveType;..........if.(primi
47c80 74 69 76 65 54 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 tiveType.!=.null)..........{....
47ca0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 2e 43 ..........return.primitiveType.C
47cc0 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a lrEquivalentType;..........}....
47ce0 20 20 20 20 20 20 20 20 76 61 72 20 65 6e 75 6d 54 79 70 65 20 3d 20 65 64 6d 54 79 70 65 20 61 ........var.enumType.=.edmType.a
47d00 73 20 45 6e 75 6d 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 6e 75 6d 54 79 70 s.EnumType;..........if.(enumTyp
47d20 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 e.!=.null)..........{...........
47d40 20 20 20 72 65 74 75 72 6e 20 65 6e 75 6d 54 79 70 65 2e 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 ...return.enumType.UnderlyingTyp
47d60 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d e.ClrEquivalentType;..........}.
47d80 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 79 70 65 6f 66 28 6f 62 6a 65 63 74 29 ...........return.typeof(object)
47da0 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 ;......}........///.<summary>...
47dc0 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 ...///.True.if.the.EdmProperty.i
47de0 73 20 61 20 6b 65 79 20 6f 66 20 69 74 73 20 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2c 20 46 61 s.a.key.of.its.DeclaringType,.Fa
47e00 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 lse.otherwise.......///.</summar
47e20 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4b 65 79 28 45 64 6d 50 72 6f y>......public.bool.IsKey(EdmPro
47e40 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 perty.property)......{..........
47e60 69 66 20 28 70 72 6f 70 65 72 74 79 20 21 3d 20 6e 75 6c 6c 20 26 26 20 70 72 6f 70 65 72 74 79 if.(property.!=.null.&&.property
47e80 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d .DeclaringType.BuiltInTypeKind.=
47ea0 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 =.BuiltInTypeKind.EntityType)...
47ec0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 45 .......{..............return.((E
47ee0 6e 74 69 74 79 54 79 70 65 29 70 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 ntityType)property.DeclaringType
47f00 29 2e 4b 65 79 4d 65 6d 62 65 72 73 2e 43 6f 6e 74 61 69 6e 73 28 70 72 6f 70 65 72 74 79 29 3b ).KeyMembers.Contains(property);
47f20 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 ..........}............return.fa
47f40 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e lse;......}........///.<summary>
47f60 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 6d 50 72 6f 70 65 72 74 ......///.True.if.the.EdmPropert
47f80 79 20 54 79 70 65 55 73 61 67 65 20 69 73 20 4e 75 6c 6c 61 62 6c 65 2c 20 46 61 6c 73 65 20 6f y.TypeUsage.is.Nullable,.False.o
47fa0 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 therwise.......///.</summary>...
47fc0 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4e 75 6c 6c 61 62 6c 65 28 45 64 6d 50 72 6f ...public.bool.IsNullable(EdmPro
47fe0 70 65 72 74 79 20 70 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 perty.property)......{..........
48000 72 65 74 75 72 6e 20 70 72 6f 70 65 72 74 79 20 21 3d 20 6e 75 6c 6c 20 26 26 20 49 73 4e 75 6c return.property.!=.null.&&.IsNul
48020 6c 61 62 6c 65 28 70 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 3b 0d 0a 20 20 20 20 lable(property.TypeUsage);......
48040 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
48060 54 72 75 65 20 69 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 20 69 73 20 4e 75 6c 6c 61 62 6c True.if.the.TypeUsage.is.Nullabl
48080 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 e,.False.otherwise.......///.</s
480a0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4e 75 6c 6c 61 ummary>......public.bool.IsNulla
480c0 62 6c 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d ble(TypeUsage.typeUsage)......{.
480e0 0a 20 20 20 20 20 20 20 20 46 61 63 65 74 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 20 3d 20 6e .........Facet.nullableFacet.=.n
48100 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 55 73 61 67 65 20 21 3d 20 6e ull;..........if.(typeUsage.!=.n
48120 75 6c 6c 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 55 73 61 67 65 2e 46 61 ull.&&..............typeUsage.Fa
48140 63 65 74 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 22 4e 75 6c 6c 61 62 6c 65 22 2c 20 74 72 75 cets.TryGetValue("Nullable",.tru
48160 65 2c 20 6f 75 74 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 29 29 0d 0a 20 20 20 20 20 20 20 20 e,.out.nullableFacet))..........
48180 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 62 6f 6f 6c 29 6e 75 6c 6c {..............return.(bool)null
481a0 61 62 6c 65 46 61 63 65 74 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ableFacet.Value;..........}.....
481c0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 .......return.false;......}.....
481e0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 65 ...///.<summary>......///.If.the
48200 20 70 61 73 73 65 64 20 69 6e 20 54 79 70 65 55 73 61 67 65 20 72 65 70 72 65 73 65 6e 74 73 20 .passed.in.TypeUsage.represents.
48220 61 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 a.collection.this.method.returns
48240 20 66 69 6e 61 6c 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 2f 2f 2f 20 74 79 70 65 20 6f 66 20 .final.element......///.type.of.
48260 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 the.collection,.otherwise.it.ret
48280 75 72 6e 73 20 74 68 65 20 76 61 6c 75 65 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 2f urns.the.value.passed.in......./
482a0 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 55 73 //.</summary>......public.TypeUs
482c0 61 67 65 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 54 79 70 65 55 73 61 67 65 20 74 79 70 age.GetElementType(TypeUsage.typ
482e0 65 55 73 61 67 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 eUsage)......{..........if.(type
48300 55 73 61 67 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 Usage.==.null)..........{.......
48320 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a .......return.null;..........}..
48340 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 ..........if.(typeUsage.EdmType.
48360 69 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 is.CollectionType)..........{...
48380 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 ...........return.GetElementType
483a0 28 28 28 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 (((CollectionType)typeUsage.EdmT
483c0 79 70 65 29 2e 54 79 70 65 55 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ype).TypeUsage);..........}.....
483e0 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 .....else..........{............
48400 20 20 72 65 74 75 72 6e 20 74 79 70 65 55 73 61 67 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ..return.typeUsage;..........}..
48420 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
48440 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 ///.Returns.the.NavigationProper
48460 74 79 20 74 68 61 74 20 69 73 20 74 68 65 20 6f 74 68 65 72 20 65 6e 64 20 6f 66 20 74 68 65 20 ty.that.is.the.other.end.of.the.
48480 73 61 6d 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 73 65 74 20 69 66 20 69 74 20 69 73 0d 0a 20 same.association.set.if.it.is...
484a0 20 20 20 2f 2f 2f 20 61 76 61 69 6c 61 62 6c 65 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 ...///.available,.otherwise.it.r
484c0 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e eturns.null.......///.</summary>
484e0 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 ......public.NavigationProperty.
48500 49 6e 76 65 72 73 65 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 72 Inverse(NavigationProperty.navPr
48520 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 6e 61 76 50 72 operty)......{..........if(navPr
48540 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 operty.==.null)..........{......
48560 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d ........return.null;..........}.
48580 0a 0d 0a 20 20 20 20 20 20 20 20 45 6e 74 69 74 79 54 79 70 65 20 74 6f 45 6e 74 69 74 79 20 3d ...........EntityType.toEntity.=
485a0 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 .navProperty.ToEndMember.GetEnti
485c0 74 79 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 6f 45 6e 74 69 tyType();..........return.toEnti
485e0 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 20 20 20 ty.NavigationProperties.........
48600 20 20 20 20 20 2e 53 69 6e 67 6c 65 4f 72 44 65 66 61 75 6c 74 28 6e 20 3d 3e 20 4f 62 6a 65 63 ......SingleOrDefault(n.=>.Objec
48620 74 2e 52 65 66 65 72 65 6e 63 65 45 71 75 61 6c 73 28 6e 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 t.ReferenceEquals(n.Relationship
48640 54 79 70 65 2c 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 Type,.navProperty.RelationshipTy
48660 70 65 29 20 26 26 20 21 4f 62 6a 65 63 74 2e 52 65 66 65 72 65 6e 63 65 45 71 75 61 6c 73 28 6e pe).&&.!Object.ReferenceEquals(n
48680 2c 20 6e 61 76 50 72 6f 70 65 72 74 79 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f ,.navProperty));......}......../
486a0 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 69 76 65 6e 20 61 20 70 72 //.<summary>......///.Given.a.pr
486c0 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 20 6f 66 20 61 operty.on.the.dependent.end.of.a
486e0 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 72 65 74 75 72 6e 73 .referential.constraint,.returns
48700 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 .the.corresponding.property.on.t
48720 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 he.principal.end.......///.Requi
48740 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 res:.The.association.has.a.refer
48760 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 61 6e 64 20 74 68 65 20 73 70 65 63 69 ential.constraint,.and.the.speci
48780 66 69 65 64 20 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 69 73 20 6f 6e 65 20 6f 66 fied.dependentProperty.is.one.of
487a0 20 74 68 65 20 70 72 6f 70 65 72 74 69 65 73 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 .the.properties.on.the.dependent
487c0 20 65 6e 64 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 20 70 .end.......///.</summary>......p
487e0 75 62 6c 69 63 20 45 64 6d 50 72 6f 70 65 72 74 79 20 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 ublic.EdmProperty.GetCorrespondi
48800 6e 67 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 ngPrincipalProperty(NavigationPr
48820 6f 70 65 72 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 45 64 6d 50 72 6f 70 65 72 74 79 20 operty.navProperty,.EdmProperty.
48840 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 dependentProperty)......{.......
48860 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ...if.(navProperty.==.null).....
48880 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 .....{..............throw.new.Ar
488a0 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 gumentNullException("navProperty
488c0 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 64 65 ");..........}............if.(de
488e0 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 pendentProperty.==.null)........
48900 20 20 7b 0d 0a 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
48920 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 entNullException("dependentPrope
48940 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 61 rty");..........}............Rea
48960 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 dOnlyMetadataCollection<EdmPrope
48980 72 74 79 3e 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 74 50 72 69 6e 63 69 70 rty>.fromProperties.=.GetPrincip
489a0 61 6c 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 alProperties(navProperty);......
489c0 20 20 20 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 ....ReadOnlyMetadataCollection<E
489e0 64 6d 50 72 6f 70 65 72 74 79 3e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 74 44 65 dmProperty>.toProperties.=.GetDe
48a00 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 3b 0d pendentProperties(navProperty);.
48a20 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 5b 74 .........return.fromProperties[t
48a40 6f 50 72 6f 70 65 72 74 69 65 73 2e 49 6e 64 65 78 4f 66 28 64 65 70 65 6e 64 65 6e 74 50 72 6f oProperties.IndexOf(dependentPro
48a60 70 65 72 74 79 29 5d 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d perty)];......}........///.<summ
48a80 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 69 76 65 6e 20 61 20 70 72 6f 70 65 72 74 79 20 6f ary>......///.Given.a.property.o
48aa0 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e n.the.principal.end.of.a.referen
48ac0 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 6f 72 tial.constraint,.returns.the.cor
48ae0 72 65 73 70 6f 6e 64 69 6e 67 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 64 65 70 65 6e responding.property.on.the.depen
48b00 64 65 6e 74 20 65 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 dent.end.......///.Requires:.The
48b20 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 .association.has.a.referential.c
48b40 6f 6e 73 74 72 61 69 6e 74 2c 20 61 6e 64 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 70 72 69 onstraint,.and.the.specified.pri
48b60 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 20 69 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 70 72 6f ncipalProperty.is.one.of.the.pro
48b80 70 65 72 74 69 65 73 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 2e 0d 0a 20 perties.on.the.principal.end....
48ba0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 45 64 ...///.</summary>......public.Ed
48bc0 6d 50 72 6f 70 65 72 74 79 20 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 6e 67 44 65 70 65 6e 64 mProperty.GetCorrespondingDepend
48be0 65 6e 74 50 72 6f 70 65 72 74 79 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e entProperty(NavigationProperty.n
48c00 61 76 50 72 6f 70 65 72 74 79 2c 20 45 64 6d 50 72 6f 70 65 72 74 79 20 70 72 69 6e 63 69 70 61 avProperty,.EdmProperty.principa
48c20 6c 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e lProperty)......{..........if.(n
48c40 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a avProperty.==.null)..........{..
48c60 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 4e 75 ............throw.new.ArgumentNu
48c80 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 llException("navProperty");.....
48ca0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 70 72 69 6e 63 69 70 61 6c 50 .....}............if.(principalP
48cc0 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 roperty.==.null)..........{.....
48ce0 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 45 .........throw.new.ArgumentNullE
48d00 78 63 65 70 74 69 6f 6e 28 22 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a xception("principalProperty");..
48d20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 61 64 4f 6e 6c 79 4d 65 74 ........}............ReadOnlyMet
48d40 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 66 72 6f adataCollection<EdmProperty>.fro
48d60 6d 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 74 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 mProperties.=.GetPrincipalProper
48d80 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 52 65 61 64 ties(navProperty);..........Read
48da0 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 72 OnlyMetadataCollection<EdmProper
48dc0 74 79 3e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 20 3d 20 47 65 74 44 65 70 65 6e 64 65 6e 74 50 ty>.toProperties.=.GetDependentP
48de0 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 roperties(navProperty);.........
48e00 20 72 65 74 75 72 6e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 5b 66 72 6f 6d 50 72 6f 70 65 72 74 .return.toProperties[fromPropert
48e20 69 65 73 2e 49 6e 64 65 78 4f 66 28 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 29 5d 3b ies.IndexOf(principalProperty)];
48e40 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
48e60 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 70 72 6f ..///.Gets.the.collection.of.pro
48e80 70 65 72 74 69 65 73 20 74 68 61 74 20 61 72 65 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 perties.that.are.on.the.principa
48ea0 6c 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e l.end.of.a.referential.constrain
48ec0 74 20 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 t.for.the.specified.navigation.p
48ee0 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 roperty.......///.Requires:.The.
48f00 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f association.has.a.referential.co
48f20 6e 73 74 72 61 69 6e 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 nstraint.......///.</summary>...
48f40 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 ...public.ReadOnlyMetadataCollec
48f60 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 72 74 79 3e 20 47 65 74 50 72 69 6e 63 69 70 61 6c 50 72 tion<EdmProperty>.GetPrincipalPr
48f80 6f 70 65 72 74 69 65 73 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 operties(NavigationProperty.navP
48fa0 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 76 roperty)......{..........if.(nav
48fc0 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 Property.==.null)..........{....
48fe0 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
49000 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 Exception("navProperty");.......
49020 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 28 41 73 73 6f 63 69 61 ...}............return.((Associa
49040 74 69 6f 6e 54 79 70 65 29 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 tionType)navProperty.Relationshi
49060 70 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 5b 30 5d pType).ReferentialConstraints[0]
49080 2e 46 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f .FromProperties;......}......../
490a0 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 63 //.<summary>......///.Gets.the.c
490c0 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 70 72 6f 70 65 72 74 69 65 73 20 74 68 61 74 20 61 72 65 ollection.of.properties.that.are
490e0 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 .on.the.dependent.end.of.a.refer
49100 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 ential.constraint.for.the.specif
49120 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 2f 2f ied.navigation.property.......//
49140 2f 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 /.Requires:.The.association.has.
49160 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2e 0d 0a 20 20 20 20 2f a.referential.constraint......./
49180 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e //.</summary>......public.ReadOn
491a0 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 3c 45 64 6d 50 72 6f 70 65 72 74 79 lyMetadataCollection<EdmProperty
491c0 3e 20 47 65 74 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 4e 61 76 69 67 61 74 >.GetDependentProperties(Navigat
491e0 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d ionProperty.navProperty)......{.
49200 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 76 50 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c .........if.(navProperty.==.null
49220 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 )..........{..............throw.
49240 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 new.ArgumentNullException("navPr
49260 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 operty");..........}............
49280 72 65 74 75 72 6e 20 28 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 6e 61 76 50 72 6f 70 return.((AssociationType)navProp
492a0 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 erty.RelationshipType).Referenti
492c0 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 5b 30 5d 2e 54 6f 50 72 6f 70 65 72 74 69 65 73 3b 0d 0a alConstraints[0].ToProperties;..
492e0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
49300 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 69 73 20 65 6e 74 69 74 79 20 74 79 70 65 20 72 65 71 ///.True.if.this.entity.type.req
49320 75 69 72 65 73 20 74 68 65 20 48 61 6e 64 6c 65 43 61 73 63 61 64 65 44 65 6c 65 74 65 20 6d 65 uires.the.HandleCascadeDelete.me
49340 74 68 6f 64 20 64 65 66 69 6e 65 64 20 61 6e 64 20 74 68 65 20 6d 65 74 68 6f 64 20 68 61 73 0d thod.defined.and.the.method.has.
49360 0a 20 20 20 20 2f 2f 2f 20 6e 6f 74 20 62 65 65 6e 20 64 65 66 69 6e 65 64 20 6f 6e 20 61 6e 79 .....///.not.been.defined.on.any
49380 20 62 61 73 65 20 74 79 70 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a .base.type......///.</summary>..
493a0 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 4e 65 65 64 73 48 61 6e 64 6c 65 43 61 73 63 61 ....public.bool.NeedsHandleCasca
493c0 64 65 44 65 6c 65 74 65 4d 65 74 68 6f 64 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 deDeleteMethod(ItemCollection.it
493e0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 29 emCollection,.EntityType.entity)
49400 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 6e 65 65 64 73 4d 65 74 68 6f ......{..........bool.needsMetho
49420 64 20 3d 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 61 d.=.ContainsCascadeDeleteAssocia
49440 74 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 65 6e 74 69 74 79 29 3b 0d 0a 20 tion(itemCollection,.entity);...
49460 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 6e 6f 20 .......//.Check.to.make.sure.no.
49480 62 61 73 65 20 74 79 70 65 73 20 68 61 76 65 20 61 6c 72 65 61 64 79 20 64 65 63 6c 61 72 65 64 base.types.have.already.declared
494a0 20 74 68 69 73 20 6d 65 74 68 6f 64 0d 0a 20 20 20 20 20 20 20 20 45 6e 74 69 74 79 54 79 70 65 .this.method..........EntityType
494c0 20 62 61 73 65 54 79 70 65 20 3d 20 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 20 61 73 20 45 .baseType.=.entity.BaseType.as.E
494e0 6e 74 69 74 79 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 77 68 69 6c 65 28 6e 65 65 64 73 4d ntityType;..........while(needsM
49500 65 74 68 6f 64 20 26 26 20 62 61 73 65 54 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 ethod.&&.baseType.!=.null)......
49520 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 65 64 73 4d 65 74 68 6f 64 20 3d ....{..............needsMethod.=
49540 20 21 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 61 74 69 .!ContainsCascadeDeleteAssociati
49560 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 62 61 73 65 54 79 70 65 29 3b 0d 0a 20 on(itemCollection,.baseType);...
49580 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 62 61 73 65 54 79 70 65 2e 42 ...........baseType.=.baseType.B
495a0 61 73 65 54 79 70 65 20 61 73 20 45 6e 74 69 74 79 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 aseType.as.EntityType;..........
495c0 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 65 64 73 4d 65 74 68 6f 64 3b 0d 0a }..........return.needsMethod;..
495e0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
49600 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 69 73 20 65 6e 74 69 74 79 20 74 79 70 65 20 70 61 72 ///.True.if.this.entity.type.par
49620 74 69 63 69 70 61 74 65 73 20 69 6e 20 61 6e 79 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 20 77 ticipates.in.any.relationships.w
49640 68 65 72 65 20 74 68 65 20 6f 74 68 65 72 20 65 6e 64 20 68 61 73 20 61 6e 20 4f 6e 44 65 6c 65 here.the.other.end.has.an.OnDele
49660 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e te......///.cascade.delete.defin
49680 65 64 2c 20 6f 72 20 69 66 20 69 74 20 69 73 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 69 6e ed,.or.if.it.is.the.dependent.in
496a0 20 61 6e 79 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 0d 0a .any.identifying.relationships..
496c0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 ....///.</summary>......private.
496e0 62 6f 6f 6c 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 bool.ContainsCascadeDeleteAssoci
49700 61 74 69 6f 6e 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 ation(ItemCollection.itemCollect
49720 69 6f 6e 2c 20 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 7b 0d 0a ion,.EntityType.entity)......{..
49740 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 ........return.itemCollection.Ge
49760 74 49 74 65 6d 73 3c 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 3e 28 29 2e 57 68 65 72 65 28 tItems<AssociationType>().Where(
49780 61 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 52 65 66 54 79 70 65 29 a.=>..................((RefType)
497a0 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 30 5d 2e 54 79 70 65 55 a.AssociationEndMembers[0].TypeU
497c0 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 65 6e 74 sage.EdmType).ElementType.==.ent
497e0 69 74 79 20 26 26 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 ity.&&.IsCascadeDeletePrincipal(
49800 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 31 5d 29 20 7c 7c 0d 0a a.AssociationEndMembers[1]).||..
49820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 52 65 66 54 79 70 65 29 61 2e 41 73 73 6f ................((RefType)a.Asso
49840 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 31 5d 2e 54 79 70 65 55 73 61 67 65 2e 45 ciationEndMembers[1].TypeUsage.E
49860 64 6d 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 65 6e 74 69 74 79 20 26 26 dmType).ElementType.==.entity.&&
49880 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 61 2e 41 73 73 6f .IsCascadeDeletePrincipal(a.Asso
498a0 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 30 5d 29 29 2e 41 6e 79 28 29 3b 0d 0a 20 ciationEndMembers[0])).Any();...
498c0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f ...}........///.<summary>....../
498e0 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 73 6f 75 72 63 65 20 65 6e 64 20 6f 66 20 74 68 65 //.True.if.the.source.end.of.the
49900 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 20 69 .specified.navigation.property.i
49920 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e s.the.principal.in.an.identifyin
49940 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 2f 2f 2f 20 6f 72 20 69 66 20 74 g.relationship.......///.or.if.t
49960 68 65 20 73 6f 75 72 63 65 20 65 6e 64 20 68 61 73 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 he.source.end.has.cascade.delete
49980 20 64 65 66 69 6e 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 .defined.......///.</summary>...
499a0 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 ...public.bool.IsCascadeDeletePr
499c0 69 6e 63 69 70 61 6c 28 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 6e 61 76 50 72 incipal(NavigationProperty.navPr
499e0 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 76 50 operty)......{..........if.(navP
49a00 72 6f 70 65 72 74 79 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 roperty.==.null)..........{.....
49a20 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 45 .........throw.new.ArgumentNullE
49a40 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 3b 0d 0a 20 20 20 20 20 20 xception("navProperty");........
49a60 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 73 43 61 73 63 61 64 65 44 ..}............return.IsCascadeD
49a80 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 28 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 eletePrincipal((AssociationEndMe
49aa0 6d 62 65 72 29 6e 61 76 50 72 6f 70 65 72 74 79 2e 46 72 6f 6d 45 6e 64 4d 65 6d 62 65 72 29 3b mber)navProperty.FromEndMember);
49ac0 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
49ae0 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 61 73 73 6f ..///.True.if.the.specified.asso
49b00 63 69 61 74 69 6f 6e 20 65 6e 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 69 6e 20 ciation.end.is.the.principal.in.
49b20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 an.identifying.relationship.....
49b40 20 20 2f 2f 2f 20 6f 72 20 69 66 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 ..///.or.if.the.association.end.
49b60 68 61 73 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2e 0d 0a 20 20 20 has.cascade.delete.defined......
49b80 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c .///.</summary>......public.bool
49ba0 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 41 73 73 6f 63 69 .IsCascadeDeletePrincipal(Associ
49bc0 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 0d 0a ationEndMember.associationEnd)..
49be0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e ....{..........if.(associationEn
49c00 64 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 d.==.null)..........{...........
49c20 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 69 ...throw.new.ArgumentNullExcepti
49c40 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d on("associationEnd");..........}
49c60 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e ............return.associationEn
49c80 64 2e 44 65 6c 65 74 65 42 65 68 61 76 69 6f 72 20 3d 3d 20 4f 70 65 72 61 74 69 6f 6e 41 63 74 d.DeleteBehavior.==.OperationAct
49ca0 69 6f 6e 2e 43 61 73 63 61 64 65 20 7c 7c 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 ion.Cascade.||.IsPrincipalEndOfI
49cc0 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 74 69 dentifyingRelationship(associati
49ce0 6f 6e 45 6e 64 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 onEnd);......}........///.<summa
49d00 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 ry>......///.True.if.the.specifi
49d20 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 ed.association.end.is.the.princi
49d40 70 61 6c 20 65 6e 64 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 pal.end.in.an.identifying.relati
49d60 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 onship.......///.In.order.to.be.
49d80 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2c 20 74 68 65 an.identifying.relationship,.the
49da0 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 6d 75 73 74 20 68 61 76 65 20 61 20 72 65 66 65 72 65 6e .association.must.have.a.referen
49dc0 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 77 68 65 72 65 20 61 6c 6c 20 6f 66 20 74 68 65 tial.constraint.where.all.of.the
49de0 20 64 65 70 65 6e 64 65 6e 74 20 70 72 6f 70 65 72 74 69 65 73 20 61 72 65 20 70 61 72 74 20 6f .dependent.properties.are.part.o
49e00 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 74 79 70 65 27 73 20 70 72 69 6d 61 72 79 20 6b f.the.dependent.type's.primary.k
49e20 65 79 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 20 70 75 62 ey.......///.</summary>......pub
49e40 6c 69 63 20 62 6f 6f 6c 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 lic.bool.IsPrincipalEndOfIdentif
49e60 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d yingRelationship(AssociationEndM
49e80 65 6d 62 65 72 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 ember.associationEnd)......{....
49ea0 20 20 20 20 20 20 69 66 20 28 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 20 3d 3d 20 6e 75 6c 6c ......if.(associationEnd.==.null
49ec0 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 )..........{..............throw.
49ee0 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 new.ArgumentNullException("assoc
49f00 69 61 74 69 6f 6e 45 6e 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 iationEnd");..........}.........
49f20 20 20 20 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 20 72 65 66 43 6f 6e 73 ...ReferentialConstraint.refCons
49f40 74 72 61 69 6e 74 20 3d 20 28 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 61 73 73 6f 63 traint.=.((AssociationType)assoc
49f60 69 61 74 69 6f 6e 45 6e 64 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 29 2e 52 65 66 65 72 65 6e iationEnd.DeclaringType).Referen
49f80 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 2e 57 68 65 72 65 28 72 63 20 3d 3e 20 72 63 2e 46 tialConstraints.Where(rc.=>.rc.F
49fa0 72 6f 6d 52 6f 6c 65 20 3d 3d 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 2e 53 69 6e 67 6c romRole.==.associationEnd).Singl
49fc0 65 4f 72 44 65 66 61 75 6c 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 72 65 66 43 6f eOrDefault();..........if.(refCo
49fe0 6e 73 74 72 61 69 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 nstraint.!=.null)..........{....
4a000 20 20 20 20 20 20 20 20 20 20 45 6e 74 69 74 79 54 79 70 65 20 65 6e 74 69 74 79 20 3d 20 72 65 ..........EntityType.entity.=.re
4a020 66 43 6f 6e 73 74 72 61 69 6e 74 2e 54 6f 52 6f 6c 65 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 fConstraint.ToRole.GetEntityType
4a040 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 21 72 65 66 43 6f 6e 73 ();..............return.!refCons
4a060 74 72 61 69 6e 74 2e 54 6f 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 74 70 20 3d 3e 20 traint.ToProperties.Where(tp.=>.
4a080 21 65 6e 74 69 74 79 2e 4b 65 79 4d 65 6d 62 65 72 73 2e 43 6f 6e 74 61 69 6e 73 28 74 70 29 29 !entity.KeyMembers.Contains(tp))
4a0a0 2e 41 6e 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 .Any();..........}..........retu
4a0c0 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d rn.false;......}........///.<sum
4a0e0 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 mary>......///.True.if.the.speci
4a100 66 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 74 79 70 65 20 69 73 20 61 6e 20 69 64 65 6e fied.association.type.is.an.iden
4a120 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 2f 2f 2f 20 49 tifying.relationship.......///.I
4a140 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c n.order.to.be.an.identifying.rel
4a160 61 74 69 6f 6e 73 68 69 70 2c 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 6d 75 73 74 20 ationship,.the.association.must.
4a180 68 61 76 65 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 77 68 have.a.referential.constraint.wh
4a1a0 65 72 65 20 61 6c 6c 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 70 72 6f 70 65 72 74 ere.all.of.the.dependent.propert
4a1c0 69 65 73 20 61 72 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 74 79 ies.are.part.of.the.dependent.ty
4a1e0 70 65 27 73 20 70 72 69 6d 61 72 79 20 6b 65 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d pe's.primary.key.......///.</sum
4a200 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 49 64 65 6e 74 69 66 mary>......public.bool.IsIdentif
4a220 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 yingRelationship(AssociationType
4a240 20 61 73 73 6f 63 69 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 .association)......{..........if
4a260 20 28 61 73 73 6f 63 69 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 .(association.==.null)..........
4a280 7b 0d 0a 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
4a2a0 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 22 29 3b 0d 0a tNullException("association");..
4a2c0 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 73 50 72 ........}............return.IsPr
4a2e0 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 incipalEndOfIdentifyingRelations
4a300 68 69 70 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 hip(association.AssociationEndMe
4a320 6d 62 65 72 73 5b 30 5d 29 20 7c 7c 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 mbers[0]).||.IsPrincipalEndOfIde
4a340 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 74 69 6f 6e ntifyingRelationship(association
4a360 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 5b 31 5d 29 3b 0d 0a 20 20 20 .AssociationEndMembers[1]);.....
4a380 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
4a3a0 20 72 65 71 75 69 72 65 73 3a 20 66 69 72 73 74 54 79 70 65 20 69 73 20 6e 6f 74 20 6e 75 6c 6c .requires:.firstType.is.not.null
4a3c0 0d 0a 20 20 20 20 2f 2f 2f 20 65 66 66 65 63 74 73 3a 20 69 66 20 73 65 63 6f 6e 64 54 79 70 65 ......///.effects:.if.secondType
4a3e0 20 69 73 20 61 6d 6f 6e 67 20 74 68 65 20 62 61 73 65 20 74 79 70 65 73 20 6f 66 20 74 68 65 20 .is.among.the.base.types.of.the.
4a400 66 69 72 73 74 54 79 70 65 2c 20 72 65 74 75 72 6e 20 74 72 75 65 2c 0d 0a 20 20 20 20 2f 2f 2f firstType,.return.true,......///
4a420 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 2f .otherwise.returns.false......./
4a440 2f 2f 20 77 68 65 6e 20 66 69 72 73 74 54 79 70 65 20 69 73 20 73 61 6d 65 20 61 73 20 74 68 65 //.when.firstType.is.same.as.the
4a460 20 73 65 63 6f 6e 64 54 79 70 65 2c 20 72 65 74 75 72 6e 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 .secondType,.return.false.......
4a480 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 ///.</summary>......public.bool.
4a4a0 49 73 53 75 62 74 79 70 65 4f 66 28 45 64 6d 54 79 70 65 20 66 69 72 73 74 54 79 70 65 2c 20 45 IsSubtypeOf(EdmType.firstType,.E
4a4c0 64 6d 54 79 70 65 20 73 65 63 6f 6e 64 54 79 70 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 dmType.secondType)......{.......
4a4e0 20 20 20 69 66 20 28 73 65 63 6f 6e 64 54 79 70 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 ...if.(secondType.==.null)......
4a500 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b ....{..............return.false;
4a520 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 20 77 61 6c 6b 20 75 ..........}............//.walk.u
4a540 70 20 66 69 72 73 74 54 79 70 65 20 68 69 65 72 61 72 63 68 79 20 6c 69 73 74 0d 0a 20 20 20 20 p.firstType.hierarchy.list......
4a560 20 20 20 20 66 6f 72 20 28 45 64 6d 54 79 70 65 20 74 20 3d 20 66 69 72 73 74 54 79 70 65 2e 42 ....for.(EdmType.t.=.firstType.B
4a580 61 73 65 54 79 70 65 3b 20 74 20 21 3d 20 6e 75 6c 6c 3b 20 74 20 3d 20 74 2e 42 61 73 65 54 79 aseType;.t.!=.null;.t.=.t.BaseTy
4a5a0 70 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 pe)..........{..............if.(
4a5c0 74 20 3d 3d 20 73 65 63 6f 6e 64 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.==.secondType)................
4a5e0 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 ..return.true;..........}.......
4a600 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f ...return.false;......}......../
4a620 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 //.<summary>......///.Returns.th
4a640 65 20 73 75 62 74 79 70 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 54 79 70 65 20 69 6e 20 74 e.subtype.of.the.EntityType.in.t
4a660 68 65 20 63 75 72 72 65 6e 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 2f he.current.itemCollection....../
4a680 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 45 6e 75 6d 65 //.</summary>......public.IEnume
4a6a0 72 61 62 6c 65 3c 45 6e 74 69 74 79 54 79 70 65 3e 20 47 65 74 53 75 62 74 79 70 65 73 4f 66 28 rable<EntityType>.GetSubtypesOf(
4a6c0 45 6e 74 69 74 79 54 79 70 65 20 74 79 70 65 2c 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 EntityType.type,.ItemCollection.
4a6e0 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 62 6f 6f 6c 20 69 6e 63 6c 75 64 65 41 62 73 74 itemCollection,.bool.includeAbst
4a700 72 61 63 74 54 79 70 65 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 ractTypes)......{..........if.(t
4a720 79 70 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ype.!=.null)..........{.........
4a740 20 20 20 20 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 45 6e 74 69 74 79 54 79 70 65 3e 20 74 79 70 .....IEnumerable<EntityType>.typ
4a760 65 73 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e esInCollection.=.itemCollection.
4a780 47 65 74 49 74 65 6d 73 3c 45 6e 74 69 74 79 54 79 70 65 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 GetItems<EntityType>();.........
4a7a0 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 74 69 74 79 54 79 70 65 20 74 79 70 65 49 6e 43 .....foreach.(EntityType.typeInC
4a7c0 6f 6c 6c 65 63 74 69 6f 6e 20 69 6e 20 74 79 70 65 73 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d ollection.in.typesInCollection).
4a7e0 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 .............{..................
4a800 69 66 20 28 74 79 70 65 2e 45 71 75 61 6c 73 28 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e if.(type.Equals(typeInCollection
4a820 29 20 3d 3d 20 66 61 6c 73 65 20 26 26 20 74 68 69 73 2e 49 73 53 75 62 74 79 70 65 4f 66 28 74 ).==.false.&&.this.IsSubtypeOf(t
4a840 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 74 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 ypeInCollection,.type)).........
4a860 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 .........{......................
4a880 69 66 20 28 20 69 6e 63 6c 75 64 65 41 62 73 74 72 61 63 74 54 79 70 65 73 20 7c 7c 20 21 74 79 if.(.includeAbstractTypes.||.!ty
4a8a0 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2e 41 62 73 74 72 61 63 74 29 0d 0a 20 20 20 20 20 20 peInCollection.Abstract)........
4a8c0 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 ..............{.................
4a8e0 20 20 20 20 20 20 20 20 20 79 69 65 6c 64 20 72 65 74 75 72 6e 20 74 79 70 65 49 6e 43 6f 6c 6c .........yield.return.typeInColl
4a900 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ection;......................}..
4a920 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 7d 0d ...............}..............}.
4a940 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 .........}......}........public.
4a960 73 74 61 74 69 63 20 62 6f 6f 6c 20 54 72 79 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 static.bool.TryGetStringMetadata
4a980 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 28 4d 65 74 61 64 61 74 61 49 74 65 6d 20 69 74 65 PropertySetting(MetadataItem.ite
4a9a0 6d 2c 20 73 74 72 69 6e 67 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 2c 20 6f 75 74 20 73 74 72 69 m,.string.propertyName,.out.stri
4a9c0 6e 67 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 76 61 6c 75 65 20 ng.value)......{..........value.
4a9e0 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 =.null;..........MetadataPropert
4aa00 79 20 70 72 6f 70 65 72 74 79 20 3d 20 69 74 65 6d 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 y.property.=.item.MetadataProper
4aa20 74 69 65 73 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 28 70 20 3d 3e 20 70 2e 4e 61 6d 65 20 ties.FirstOrDefault(p.=>.p.Name.
4aa40 3d 3d 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 70 ==.propertyName);..........if.(p
4aa60 72 6f 70 65 72 74 79 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 roperty.!=.null)..........{.....
4aa80 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 20 3d 20 28 73 74 72 69 6e 67 29 70 72 6f 70 65 72 74 .........value.=.(string)propert
4aaa0 79 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 y.Value;..........}..........ret
4aac0 75 72 6e 20 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a urn.value.!=.null;......}..}....
4aae0 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 ///.<summary>..///.Responsible.f
4ab00 6f 72 20 6c 6f 61 64 69 6e 67 20 61 6e 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 or.loading.an.EdmItemCollection.
4ab20 66 72 6f 6d 20 61 20 2e 65 64 6d 78 20 66 69 6c 65 20 6f 72 20 2e 63 73 64 6c 20 66 69 6c 65 73 from.a..edmx.file.or..csdl.files
4ab40 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4d ..///.</summary>..public.class.M
4ab60 65 74 61 64 61 74 61 4c 6f 61 64 65 72 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 etadataLoader..{......private.re
4ab80 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e adonly.DynamicTextTransformation
4aba0 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f ._textTransformation;........///
4abc0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 .<summary>......///.Initializes.
4abe0 61 6e 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 20 49 6e 73 74 61 6e 63 65 20 20 77 69 74 68 an.MetadataLoader.Instance..with
4ac00 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e .the......///.TextTransformation
4ac20 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 .(T4.generated.class).that.is.cu
4ac40 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 rrently.running......///.</summa
4ac60 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 28 6f ry>......public.MetadataLoader(o
4ac80 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b bject.textTransformation)......{
4aca0 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e ..........if.(textTransformation
4acc0 20 3d 3d 20 6e 75 6c 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 .==.null)..........{............
4ace0 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
4ad00 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 n("textTransformation");........
4ad20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 ..}............_textTransformati
4ad40 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 on.=.DynamicTextTransformation.C
4ad60 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 reate(textTransformation);......
4ad80 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
4ada0 4c 6f 61 64 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 66 6f 72 20 45 64 6d 2c 20 53 74 6f 72 65 Load.the.metadata.for.Edm,.Store
4adc0 2c 20 61 6e 64 20 4d 61 70 70 69 6e 67 20 63 6f 6c 6c 65 63 74 69 6f 6e 73 20 61 6e 64 20 72 65 ,.and.Mapping.collections.and.re
4ade0 67 69 73 74 65 72 20 74 68 65 6d 0d 0a 20 20 20 20 2f 2f 2f 20 77 69 74 68 20 61 20 6e 65 77 20 gister.them......///.with.a.new.
4ae00 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2c 20 72 65 74 75 72 6e 73 20 66 61 6c 73 65 MetadataWorkspace,.returns.false
4ae20 20 69 66 20 61 6e 79 20 6f 66 20 74 68 65 20 70 61 72 74 73 20 63 61 6e 27 74 20 62 65 0d 0a 20 .if.any.of.the.parts.can't.be...
4ae40 20 20 20 2f 2f 2f 20 63 72 65 61 74 65 64 2c 20 73 6f 6d 65 20 6f 66 20 74 68 65 20 49 74 65 6d ...///.created,.some.of.the.Item
4ae60 43 6f 6c 6c 65 63 74 69 6f 6e 73 20 6d 61 79 20 62 65 20 72 65 67 69 73 74 65 72 65 64 20 61 6e Collections.may.be.registered.an
4ae80 64 20 75 73 61 62 6c 65 20 65 76 65 6e 20 69 66 20 66 61 6c 73 65 20 69 73 0d 0a 20 20 20 20 2f d.usable.even.if.false.is....../
4aea0 2f 2f 20 72 65 74 75 72 6e 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d //.returned......///.</summary>.
4aec0 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 41 6c 6c 4d 65 74 61 64 .....public.bool.TryLoadAllMetad
4aee0 61 74 61 28 73 74 72 69 6e 67 20 69 6e 70 75 74 46 69 6c 65 2c 20 6f 75 74 20 4d 65 74 61 64 61 ata(string.inputFile,.out.Metada
4af00 74 61 57 6f 72 6b 73 70 61 63 65 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 29 0d 0a taWorkspace.metadataWorkspace)..
4af20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 ....{..........metadataWorkspace
4af40 20 3d 20 6e 65 77 20 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 28 29 3b 0d 0a 0d 0a 20 .=.new.MetadataWorkspace();.....
4af60 20 20 20 20 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d 49 74 65 6d .......EdmItemCollection.edmItem
4af80 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 Collection.=.CreateEdmItemCollec
4afa0 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 tion(inputFile);..........metada
4afc0 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 taWorkspace.RegisterItemCollecti
4afe0 6f 6e 28 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 on(edmItemCollection);..........
4b000 20 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 65 49 74 65 6d 43 ..StoreItemCollection.storeItemC
4b020 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 54 ollection.=.null;..........if.(T
4b040 72 79 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 ryCreateStoreItemCollection(inpu
4b060 74 46 69 6c 65 2c 20 6f 75 74 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 tFile,.out.storeItemCollection))
4b080 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 74 6f 72 61 67 65 ..........{..............Storage
4b0a0 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 61 67 65 4d 61 70 MappingItemCollection.storageMap
4b0c0 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 pingItemCollection.=.null;......
4b0e0 20 20 20 20 20 20 20 20 69 66 20 28 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 70 ........if.(TryCreateStorageMapp
4b100 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 2c 20 65 64 6d ingItemCollection(inputFile,.edm
4b120 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 ItemCollection,.storeItemCollect
4b140 69 6f 6e 2c 20 6f 75 74 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 ion,.out.storageMappingItemColle
4b160 63 74 69 6f 6e 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 ction))..............{..........
4b180 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 ........metadataWorkspace.Regist
4b1a0 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 erItemCollection(storeItemCollec
4b1c0 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 tion);..................metadata
4b1e0 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e Workspace.RegisterItemCollection
4b200 28 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d (storageMappingItemCollection);.
4b220 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 .................return.true;...
4b240 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ...........}..........}.........
4b260 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f ...return.false;......}......../
4b280 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 20 61 6e 20 //.<summary>......///.Create.an.
4b2a0 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 64 65 64 20 77 69 74 68 20 74 68 EdmItemCollection.loaded.with.th
4b2c0 65 20 6d 65 74 61 64 61 74 61 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 e.metadata.provided......///.</s
4b2e0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 ummary>......public.EdmItemColle
4b300 63 74 69 6f 6e 20 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 ction.CreateEdmItemCollection(st
4b320 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 70 61 72 61 6d 73 20 73 74 72 69 6e 67 5b 5d ring.sourcePath,.params.string[]
4b340 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 .referenceSchemas)......{.......
4b360 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c ...EdmItemCollection.edmItemColl
4b380 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 54 72 79 43 72 65 61 74 65 45 64 6d ection;..........if(TryCreateEdm
4b3a0 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 72 65 66 65 72 ItemCollection(sourcePath,.refer
4b3c0 65 6e 63 65 53 63 68 65 6d 61 73 2c 20 6f 75 74 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 enceSchemas,.out.edmItemCollecti
4b3e0 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 on))..........{..............ret
4b400 75 72 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 urn.edmItemCollection;..........
4b420 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 45 64 6d 49 74 65 6d 43 }............return.new.EdmItemC
4b440 6f 6c 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c ollection();......}........///.<
4b460 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 summary>......///.Attempts.to.cr
4b480 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 eate.a.EdmItemCollection.from.th
4b4a0 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 2f e.specified.metadata.file....../
4b4c0 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 //.</summary>......public.bool.T
4b4e0 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 72 69 6e 67 ryCreateEdmItemCollection(string
4b500 20 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 .sourcePath,.out.EdmItemCollecti
4b520 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 on.edmItemCollection)......{....
4b540 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c ......return.TryCreateEdmItemCol
4b560 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 6e 75 6c 6c 2c 20 6f 75 74 20 65 64 lection(sourcePath,.null,.out.ed
4b580 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 mItemCollection);......}........
4b5a0 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 ///.<summary>......///.Attempts.
4b5c0 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 to.create.a.EdmItemCollection.fr
4b5e0 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a om.the.specified.metadata.file..
4b600 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 ....///.</summary>......public.b
4b620 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 ool.TryCreateEdmItemCollection(s
4b640 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 73 74 72 69 6e 67 5b 5d 20 72 65 66 65 72 tring.sourcePath,.string[].refer
4b660 65 6e 63 65 53 63 68 65 6d 61 73 2c 20 6f 75 74 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 enceSchemas,.out.EdmItemCollecti
4b680 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 on.edmItemCollection)......{....
4b6a0 20 20 20 20 20 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d ......edmItemCollection.=.null;.
4b6c0 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 ...........if.(!ValidateInputPat
4b6e0 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f h(sourcePath,._textTransformatio
4b700 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 n))..........{..............retu
4b720 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 rn.false;..........}............
4b740 69 66 20 28 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 if.(referenceSchemas.==.null)...
4b760 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 66 65 72 65 6e 63 65 53 .......{..............referenceS
4b780 63 68 65 6d 61 73 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 30 5d 3b 0d 0a 20 20 20 20 20 20 20 chemas.=.new.string[0];.........
4b7a0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 .}............ItemCollection.ite
4b7c0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 73 6f 75 mCollection.=.null;..........sou
4b7e0 72 63 65 50 61 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f rcePath.=._textTransformation.Ho
4b800 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 3b 0d 0a 20 20 20 st.ResolvePath(sourcePath);.....
4b820 20 20 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6f .....EdmItemCollectionBuilder.co
4b840 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 45 64 6d 49 74 65 6d 43 6f 6c llectionBuilder.=.new.EdmItemCol
4b860 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 lectionBuilder(_textTransformati
4b880 6f 6e 2c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 53 65 6c 65 63 74 28 73 20 3d 3e on,.referenceSchemas.Select(s.=>
4b8a0 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 ._textTransformation.Host.Resolv
4b8c0 65 50 61 74 68 28 73 29 29 2e 57 68 65 72 65 28 73 20 3d 3e 20 73 20 21 3d 20 73 6f 75 72 63 65 ePath(s)).Where(s.=>.s.!=.source
4b8e0 50 61 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e 42 Path));..........if.(collectionB
4b900 75 69 6c 64 65 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 uilder.TryCreateItemCollection(s
4b920 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 0d ourcePath,.out.itemCollection)).
4b940 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 64 6d 49 74 65 6d 43 .........{..............edmItemC
4b960 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 28 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 69 ollection.=.(EdmItemCollection)i
4b980 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 temCollection;..........}.......
4b9a0 20 20 20 20 20 72 65 74 75 72 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 3d .....return.edmItemCollection.!=
4b9c0 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 .null;......}........///.<summar
4b9e0 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 y>......///.Attempts.to.create.a
4ba00 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 .StoreItemCollection.from.the.sp
4ba20 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c ecified.metadata.file......///.<
4ba40 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 43 72 /summary>......public.bool.TryCr
4ba60 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 eateStoreItemCollection(string.s
4ba80 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 ourcePath,.out.StoreItemCollecti
4baa0 6f 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a on.storeItemCollection)......{..
4bac0 20 20 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 ........storeItemCollection.=.nu
4bae0 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c 69 64 61 74 65 49 6e 70 75 ll;............if.(!ValidateInpu
4bb00 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d tPath(sourcePath,._textTransform
4bb20 61 74 69 6f 6e 29 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 ation))..........{..............
4bb40 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 return.false;..........}........
4bb60 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ....ItemCollection.itemCollectio
4bb80 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c n.=.null;..........StoreItemColl
4bba0 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 ectionBuilder.collectionBuilder.
4bbc0 3d 20 6e 65 77 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 =.new.StoreItemCollectionBuilder
4bbe0 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 (_textTransformation);..........
4bc00 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 61 74 65 49 if.(collectionBuilder.TryCreateI
4bc20 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f temCollection(_textTransformatio
4bc40 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 2c 20 n.Host.ResolvePath(sourcePath),.
4bc60 6f 75 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d out.itemCollection))..........{.
4bc80 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e .............storeItemCollection
4bca0 20 3d 20 28 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 69 74 65 6d 43 6f 6c 6c .=.(StoreItemCollection)itemColl
4bcc0 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 ection;..........}..........retu
4bce0 72 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 3b 0d rn.storeItemCollection.!=.null;.
4bd00 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 .....}........///.<summary>.....
4bd20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 53 74 6f 72 61 67 .///.Attempts.to.create.a.Storag
4bd40 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 eMappingItemCollection.from.the.
4bd60 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 2c 20 45 64 6d 49 74 65 6d specified.metadata.file,.EdmItem
4bd80 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 61 6e 64 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 Collection,.and.StoreItemCollect
4bda0 69 6f 6e 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 20 70 75 62 ion......///.</summary>......pub
4bdc0 6c 69 63 20 62 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 lic.bool.TryCreateStorageMapping
4bde0 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 ItemCollection(string.sourcePath
4be00 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 ,.EdmItemCollection.edmItemColle
4be20 63 74 69 6f 6e 2c 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 65 ction,.StoreItemCollection.store
4be40 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 75 74 20 53 74 6f 72 61 67 65 4d 61 70 70 69 ItemCollection,.out.StorageMappi
4be60 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 ngItemCollection.storageMappingI
4be80 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 73 temCollection)......{..........s
4bea0 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 torageMappingItemCollection.=.nu
4bec0 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c 69 64 61 74 65 49 6e 70 75 ll;............if.(!ValidateInpu
4bee0 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d tPath(sourcePath,._textTransform
4bf00 61 74 69 6f 6e 29 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 ation))..........{..............
4bf20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 return.false;..........}........
4bf40 20 20 20 20 69 66 20 28 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c ....if.(edmItemCollection.==.nul
4bf60 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 74 68 72 6f 77 l)..........{..............throw
4bf80 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 65 64 6d 49 .new.ArgumentNullException("edmI
4bfa0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 temCollection");..........}.....
4bfc0 20 20 20 20 20 20 20 69 66 20 28 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d .......if.(storeItemCollection.=
4bfe0 3d 20 6e 75 6c 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 =.null)..........{..............
4c000 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(
4c020 22 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 "storeItemCollection");.........
4c040 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 .}............ItemCollection.ite
4c060 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 53 74 6f mCollection.=.null;..........Sto
4c080 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 rageMappingItemCollectionBuilder
4c0a0 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 53 74 6f 72 61 67 65 .collectionBuilder.=.new.Storage
4c0c0 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 MappingItemCollectionBuilder(_te
4c0e0 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 xtTransformation,.edmItemCollect
4c100 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 ion,.storeItemCollection);......
4c120 20 20 20 20 69 66 20 28 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 ....if.(collectionBuilder.TryCre
4c140 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d ateItemCollection(_textTransform
4c160 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 ation.Host.ResolvePath(sourcePat
4c180 68 29 2c 20 6f 75 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 h),.out.itemCollection))........
4c1a0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 ..{..............storageMappingI
4c1c0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 28 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 temCollection.=.(StorageMappingI
4c1e0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 temCollection)itemCollection;...
4c200 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 74 6f 72 61 67 65 .......}..........return.storage
4c220 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 3b 0d 0a MappingItemCollection.!=.null;..
4c240 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
4c260 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 4d 6f 64 65 6c 20 4e 61 6d 65 73 70 61 63 65 20 66 72 6f ///.Gets.the.Model.Namespace.fro
4c280 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 73 63 68 65 6d 61 20 66 69 6c 65 2e 0d 0a 20 20 20 m.the.provided.schema.file......
4c2a0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 .///.</summary>......public.stri
4c2c0 6e 67 20 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 73 74 72 69 6e 67 20 73 6f 75 72 ng.GetModelNamespace(string.sour
4c2e0 63 65 50 61 74 68 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c cePath)......{..........if.(!Val
4c300 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 idateInputPath(sourcePath,._text
4c320 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 Transformation))..........{.....
4c340 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 .........return.String.Empty;...
4c360 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 .......}............EdmItemColle
4c380 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 62 75 69 6c 64 65 72 20 3d 20 6e 65 77 20 45 64 6d 49 74 ctionBuilder.builder.=.new.EdmIt
4c3a0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f emCollectionBuilder(_textTransfo
4c3c0 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 6d 6f 64 65 rmation);..........XElement.mode
4c3e0 6c 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 28 62 75 69 6c 64 65 72 2e 54 72 79 4c 6f 61 64 52 6f l;..........if(builder.TryLoadRo
4c400 6f 74 45 6c 65 6d 65 6e 74 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f otElement(_textTransformation.Ho
4c420 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 2c 20 6f 75 74 20 st.ResolvePath(sourcePath),.out.
4c440 6d 6f 64 65 6c 29 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 model))..........{..............
4c460 58 41 74 74 72 69 62 75 74 65 20 61 74 74 72 69 62 75 74 65 20 3d 20 6d 6f 64 65 6c 2e 41 74 74 XAttribute.attribute.=.model.Att
4c480 72 69 62 75 74 65 28 22 4e 61 6d 65 73 70 61 63 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ribute("Namespace");............
4c4a0 20 20 69 66 20 28 61 74 74 72 69 62 75 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 ..if.(attribute.!=.null)........
4c4c0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 ......{..................return.
4c4e0 61 74 74 72 69 62 75 74 65 2e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d attribute.Value;..............}.
4c500 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 53 74 72 .........}............return.Str
4c520 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ing.Empty;......}........///.<su
4c540 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 72 75 65 20 69 66 20 mmary>......///.Returns.true.if.
4c560 74 68 65 20 73 70 65 63 69 66 69 65 64 20 66 69 6c 65 20 70 61 74 68 20 69 73 20 76 61 6c 69 64 the.specified.file.path.is.valid
4c580 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 20 70 72 69 76 61 74 ......///.</summary>......privat
4c5a0 65 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 e.static.bool.ValidateInputPath(
4c5c0 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 string.sourcePath,.DynamicTextTr
4c5e0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 ansformation.textTransformation)
4c600 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 53 74 72 69 6e 67 2e 49 73 4e 75 ......{..........if.(String.IsNu
4c620 6c 6c 4f 72 45 6d 70 74 79 28 73 6f 75 72 63 65 50 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 llOrEmpty(sourcePath))..........
4c640 7b 0d 0a 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
4c660 74 45 78 63 65 70 74 69 6f 6e 28 22 73 6f 75 72 63 65 50 61 74 68 22 29 3b 0d 0a 20 20 20 20 20 tException("sourcePath");.......
4c680 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 28 73 6f 75 72 63 65 50 61 74 68 20 3d 3d ...}............if(sourcePath.==
4c6a0 20 22 24 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 24 22 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a ."$edmxInputFile$")..........{..
4c6c0 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 ............textTransformation.E
4c6e0 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 74 65 78 74 rrors.Add(new.CompilerError(text
4c700 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 Transformation.Host.TemplateFile
4c720 20 3f 3f 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 .??.CodeGenerationTools.GetResou
4c740 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e rceString("Template_CurrentlyRun
4c760 6e 69 6e 67 54 65 6d 70 6c 61 74 65 22 29 2c 20 2d 31 2c 20 2d 31 2c 20 73 74 72 69 6e 67 2e 45 ningTemplate"),.-1,.-1,.string.E
4c780 6d 70 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 mpty,..................CodeGener
4c7a0 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ationTools.GetResourceString("Te
4c7c0 6d 70 6c 61 74 65 5f 52 65 70 6c 61 63 65 56 73 49 74 65 6d 54 65 6d 70 6c 61 74 65 54 6f 6b 65 mplate_ReplaceVsItemTemplateToke
4c7e0 6e 22 29 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 n")));..............return.false
4c800 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 ;..........}............return.t
4c820 72 75 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e rue;......}........///.<summary>
4c840 0d 0a 20 20 20 20 2f 2f 2f 20 42 61 73 65 20 63 6c 61 73 73 20 66 6f 72 20 49 74 65 6d 43 6f 6c ......///.Base.class.for.ItemCol
4c860 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6c 61 73 73 65 73 20 74 68 61 74 0d 0a 20 20 20 lectionBuilder.classes.that.....
4c880 20 2f 2f 2f 20 6c 6f 61 64 73 20 74 68 65 20 73 70 65 63 69 66 69 63 20 74 79 70 65 73 20 6f 66 .///.loads.the.specific.types.of
4c8a0 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 .metadata......///.</summary>...
4c8c0 20 20 20 70 72 69 76 61 74 65 20 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 49 74 65 6d 43 6f ...private.abstract.class.ItemCo
4c8e0 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 llectionBuilder......{..........
4c900 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e private.readonly.DynamicTextTran
4c920 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d sformation._textTransformation;.
4c940 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 73 74 72 69 6e 67 .........private.readonly.string
4c960 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 ._fileExtension;..........privat
4c980 65 20 72 65 61 64 6f 6e 6c 79 20 73 74 72 69 6e 67 20 5f 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 e.readonly.string._edmxSectionNa
4c9a0 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 73 74 me;..........private.readonly.st
4c9c0 72 69 6e 67 20 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 ring.._rootElementName;.........
4c9e0 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 20 46 69 ...///.<summary>..........///.Fi
4ca00 6c 65 45 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 69 6e 64 69 76 69 64 75 61 6c 20 28 6e 6f 6e 2d leExtension.for.individual.(non-
4ca20 65 64 6d 78 29 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 66 6f 72 20 74 68 69 73 0d 0a 20 20 edmx).metadata.file.for.this....
4ca40 20 20 20 20 20 20 2f 2f 2f 20 73 70 65 63 69 66 69 63 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ......///.specific.ItemCollectio
4ca60 6e 20 74 79 70 65 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 n.type..........///.</summary>..
4ca80 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 46 69 6c 65 45 78 74 65 6e 73 ........public.string.FileExtens
4caa0 69 6f 6e 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 67 65 74 20 ion..........{..............get.
4cac0 7b 20 72 65 74 75 72 6e 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 3b 20 7d 0d 0a 20 20 20 20 {.return._fileExtension;.}......
4cae0 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 0a ....}............///.<summary>..
4cb00 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 58 6d 6c 45 ........///.The.name.of.the.XmlE
4cb20 6c 65 6d 65 6e 74 20 69 6e 20 74 68 65 20 2e 65 64 6d 78 20 3c 52 75 6e 74 69 6d 65 3e 20 65 6c lement.in.the..edmx.<Runtime>.el
4cb40 65 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 66 69 6e 64 20 74 68 69 73 20 ement..........///.to.find.this.
4cb60 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 20 ItemCollection's.metadata.......
4cb80 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 70 75 62 6c 69 ...///.</summary>..........publi
4cba0 63 20 73 74 72 69 6e 67 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 c.string.EdmxSectionName........
4cbc0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 65 ..{..............get.{.return._e
4cbe0 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a dmxSectionName;.}..........}....
4cc00 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>........../
4cc20 2f 2f 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 //.The.name.of.the.root.element.
4cc40 6f 66 20 74 68 69 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 of.this.ItemCollection's.metadat
4cc60 61 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 a..........///.</summary>.......
4cc80 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 ...public.string.RootElementName
4cca0 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 67 65 74 20 7b 20 72 ..........{..............get.{.r
4ccc0 65 74 75 72 6e 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 3b 20 7d 0d 0a 20 20 20 20 20 eturn._rootElementName;.}.......
4cce0 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>...
4cd00 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 74 6f 20 62 75 69 6c 64 20 74 68 65 20 61 .......///.Method.to.build.the.a
4cd20 70 70 72 6f 70 72 69 61 74 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 ppropriate.ItemCollection.......
4cd40 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 70 72 6f 74 65 ...///.</summary>..........prote
4cd60 63 74 65 64 20 61 62 73 74 72 61 63 74 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 cted.abstract.ItemCollection.Cre
4cd80 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 58 6d ateItemCollection(IEnumerable<Xm
4cda0 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 49 4c 69 73 74 3c 45 64 6d 53 lReader>.readers,.out.IList<EdmS
4cdc0 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 chemaError>.errors);............
4cde0 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 43 74 6f 72 20 ///.<summary>..........///.Ctor.
4ce00 74 6f 20 73 65 74 75 70 20 74 68 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 to.setup.the.ItemCollectionBuild
4ce20 65 72 20 6d 65 6d 62 65 72 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 er.members..........///.</summar
4ce40 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 49 74 65 6d 43 6f 6c 6c 65 63 y>..........protected.ItemCollec
4ce60 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d tionBuilder(DynamicTextTransform
4ce80 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 73 74 72 69 6e 67 ation.textTransformation,.string
4cea0 20 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 65 64 6d 78 53 65 63 74 69 .fileExtension,.string.edmxSecti
4cec0 6f 6e 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 29 0d onName,.string.rootElementName).
4cee0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 .........{.............._textTra
4cf00 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e nsformation.=.textTransformation
4cf20 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 3d 20 ;.............._fileExtension.=.
4cf40 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d fileExtension;.............._edm
4cf60 78 53 65 63 74 69 6f 6e 4e 61 6d 65 20 3d 20 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 3b 0d xSectionName.=.edmxSectionName;.
4cf80 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 3d 20 ............._rootElementName.=.
4cfa0 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 rootElementName;..........}.....
4cfc0 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 2f .......///.<summary>..........//
4cfe0 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 /.Selects.a.namespace.from.the.s
4d000 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 upplied.constants...........///.
4d020 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 61 62 </summary>..........protected.ab
4d040 73 74 72 61 63 74 20 73 74 72 69 6e 67 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 53 63 68 65 6d stract.string.GetNamespace(Schem
4d060 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 61 6e 74 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 aConstants.constants);..........
4d080 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 54 72 79 ..///.<summary>..........///.Try
4d0a0 20 74 6f 20 63 72 65 61 74 65 20 61 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 .to.create.an.ItemCollection.loa
4d0c0 64 65 64 20 77 69 74 68 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 70 72 6f 76 69 64 65 64 0d 0a ded.with.the.metadata.provided..
4d0e0 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>..........
4d100 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 public.bool.TryCreateItemCollect
4d120 69 6f 6e 28 73 74 72 69 6e 67 20 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 49 74 65 6d 43 ion(string.sourcePath,.out.ItemC
4d140 6f 6c 6c 65 63 74 69 6f 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 ollection.itemCollection).......
4d160 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ...{..............itemCollection
4d180 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 56 61 6c .=.null;................if.(!Val
4d1a0 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 idateInputPath(sourcePath,._text
4d1c0 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d Transformation))..............{.
4d1e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a .................return.false;..
4d200 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 58 45 6c ............}................XEl
4d220 65 6d 65 6e 74 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 ement.schemaElement.=.null;.....
4d240 20 20 20 20 20 20 20 20 20 69 66 20 28 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 .........if.(TryLoadRootElement(
4d260 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 29 29 0d sourcePath,.out.schemaElement)).
4d280 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 .............{..................
4d2a0 4c 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 20 3d 20 6e 65 77 20 4c 69 List<XmlReader>.readers.=.new.Li
4d2c0 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 st<XmlReader>();................
4d2e0 20 20 74 72 79 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 ..try..................{........
4d300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61 64 65 72 73 2e 41 64 64 28 73 63 68 65 6d 61 ..............readers.Add(schema
4d320 45 6c 65 6d 65 6e 74 2e 43 72 65 61 74 65 52 65 61 64 65 72 28 29 29 3b 0d 0a 20 20 20 20 20 20 Element.CreateReader());........
4d340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 4c 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 ..............IList<EdmSchemaErr
4d360 6f 72 3e 20 65 72 72 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 or>.errors.=.null;..............
4d380 20 20 20 20 20 20 20 20 20 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 74 65 6d 70 49 74 65 ..........ItemCollection.tempIte
4d3a0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 mCollection.=.CreateItemCollecti
4d3c0 6f 6e 28 72 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b 0d 0a 20 20 20 20 20 20 on(readers,.out.errors);........
4d3e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 72 6f 63 65 73 73 45 72 72 6f 72 73 28 ..............if.(ProcessErrors(
4d400 65 72 72 6f 72 73 2c 20 73 6f 75 72 63 65 50 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 errors,.sourcePath))............
4d420 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 ..........{.....................
4d440 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .....return.false;..............
4d460 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........}.......................
4d480 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 74 65 6d 70 49 74 65 6d 43 6f 6c 6c 65 63 .itemCollection.=.tempItemCollec
4d4a0 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 tion;......................retur
4d4c0 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 n.true;..................}......
4d4e0 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ............finally.............
4d500 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 66 6f 72 65 .....{......................fore
4d520 61 63 68 20 28 58 6d 6c 52 65 61 64 65 72 20 72 65 61 64 65 72 20 69 6e 20 72 65 61 64 65 72 73 ach.(XmlReader.reader.in.readers
4d540 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 )......................{........
4d560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 49 44 69 73 70 6f 73 61 62 6c 65 29 ..................((IDisposable)
4d580 72 65 61 64 65 72 29 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 reader).Dispose();..............
4d5a0 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ........}..................}....
4d5c0 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 75 72 ..........}................retur
4d5e0 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f n.false;..........}............/
4d600 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 54 72 69 65 73 20 //.<summary>..........///.Tries.
4d620 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 to.load.the.root.element.from.th
4d640 65 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 20 20 e.metadata.file.provided........
4d660 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 70 75 62 6c 69 63 ..///.</summary>..........public
4d680 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 73 74 72 69 6e 67 20 .bool.TryLoadRootElement(string.
4d6a0 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 58 45 6c 65 6d 65 6e 74 20 73 63 68 65 6d 61 45 sourcePath,.out.XElement.schemaE
4d6c0 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 lement)..........{..............
4d6e0 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 schemaElement.=.null;...........
4d700 20 20 20 73 74 72 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 20 3d 20 50 61 74 68 2e 47 65 74 45 78 ...string.extension.=.Path.GetEx
4d720 74 65 6e 73 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 tension(sourcePath);............
4d740 20 20 69 66 20 28 65 78 74 65 6e 73 69 6f 6e 2e 45 71 75 61 6c 73 28 22 2e 65 64 6d 78 22 2c 20 ..if.(extension.Equals(".edmx",.
4d760 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 StringComparison.InvariantCultur
4d780 65 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 eIgnoreCase))..............{....
4d7a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 ..............return.TryLoadRoot
4d7c0 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 73 6f 75 72 63 65 50 61 74 68 2c 20 6f 75 74 20 ElementFromEdmx(sourcePath,.out.
4d7e0 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a schemaElement);..............}..
4d800 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 28 65 78 74 65 6e 73 69 6f 6e 2e 45 71 ............else.if(extension.Eq
4d820 75 61 6c 73 28 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 uals(FileExtension,.StringCompar
4d840 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)
4d860 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 )..............{................
4d880 20 20 2f 2f 20 6c 6f 61 64 20 66 72 6f 6d 20 73 69 6e 67 6c 65 20 6d 65 74 61 64 61 74 61 20 66 ..//.load.from.single.metadata.f
4d8a0 69 6c 65 20 28 2e 63 73 64 6c 2c 20 2e 73 73 64 6c 2c 20 6f 72 20 2e 6d 73 6c 29 0d 0a 20 20 20 ile.(.csdl,..ssdl,.or..msl).....
4d8c0 20 20 20 20 20 20 20 20 20 20 20 20 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 58 45 6c .............schemaElement.=.XEl
4d8e0 65 6d 65 6e 74 2e 4c 6f 61 64 28 73 6f 75 72 63 65 50 61 74 68 2c 20 4c 6f 61 64 4f 70 74 69 6f ement.Load(sourcePath,.LoadOptio
4d900 6e 73 2e 53 65 74 42 61 73 65 55 72 69 20 7c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 4c ns.SetBaseUri.|.LoadOptions.SetL
4d920 69 6e 65 49 6e 66 6f 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 ineInfo);..................retur
4d940 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 n.true;..............}..........
4d960 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ......return.false;..........}..
4d980 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>.........
4d9a0 20 2f 2f 2f 20 54 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d .///.Tries.to.load.the.root.elem
4d9c0 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 65 64 6d 78 44 6f 63 75 6d 65 ent.from.the.provided.edmxDocume
4d9e0 6e 74 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 nt..........///.</summary>......
4da00 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d ....private.bool.TryLoadRootElem
4da20 65 6e 74 46 72 6f 6d 45 64 6d 78 28 58 45 6c 65 6d 65 6e 74 20 65 64 6d 78 44 6f 63 75 6d 65 6e entFromEdmx(XElement.edmxDocumen
4da40 74 2c 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e t,.SchemaConstants.schemaConstan
4da60 74 73 2c 20 73 74 72 69 6e 67 20 73 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 72 ts,.string.sectionName,.string.r
4da80 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 58 45 6c 65 6d 65 6e 74 20 72 6f 6f ootElementName,.out.XElement.roo
4daa0 74 45 6c 65 6d 65 6e 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 tElement)..........{............
4dac0 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ..rootElement.=.null;...........
4dae0 20 20 20 20 20 58 4e 61 6d 65 73 70 61 63 65 20 65 64 6d 78 4e 73 20 3d 20 73 63 68 65 6d 61 43 .....XNamespace.edmxNs.=.schemaC
4db00 6f 6e 73 74 61 6e 74 73 2e 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 onstants.EdmxNamespace;.........
4db20 20 20 20 20 20 58 4e 61 6d 65 73 70 61 63 65 20 73 65 63 74 69 6f 6e 4e 73 20 3d 20 47 65 74 4e .....XNamespace.sectionNs.=.GetN
4db40 61 6d 65 73 70 61 63 65 28 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 3b 0d 0a 0d 0a 20 20 amespace(schemaConstants);......
4db60 20 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 72 75 6e 74 69 6d 65 20 3d 20 65 64 6d ..........XElement.runtime.=.edm
4db80 78 44 6f 63 75 6d 65 6e 74 2e 45 6c 65 6d 65 6e 74 28 65 64 6d 78 4e 73 20 20 2b 20 22 52 75 6e xDocument.Element(edmxNs..+."Run
4dba0 74 69 6d 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 75 6e 74 69 6d 65 time");..............if.(runtime
4dbc0 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .==.null)..............{........
4dbe0 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 ..........return.false;.........
4dc00 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 73 .....}................XElement.s
4dc20 65 63 74 69 6f 6e 20 3d 20 72 75 6e 74 69 6d 65 2e 45 6c 65 6d 65 6e 74 28 65 64 6d 78 4e 73 20 ection.=.runtime.Element(edmxNs.
4dc40 2b 20 73 65 63 74 69 6f 6e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 +.sectionName);..............if.
4dc60 28 73 65 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 7b (section.==.null)..............{
4dc80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d ..................return.false;.
4dca0 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 73 74 .............}................st
4dcc0 72 69 6e 67 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ring.templateVersion;...........
4dce0 20 20 20 20 20 69 66 20 28 21 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 2e 54 72 79 47 65 .....if.(!TemplateMetadata.TryGe
4dd00 74 56 61 6c 75 65 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d 50 tValue(MetadataConstants.TT_TEMP
4dd20 4c 41 54 45 5f 56 45 52 53 49 4f 4e 2c 20 6f 75 74 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f LATE_VERSION,.out.templateVersio
4dd40 6e 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 20 20 20 n))..............{..............
4dd60 20 20 20 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 4d 65 74 61 64 61 74 61 43 6f ....templateVersion.=.MetadataCo
4dd80 6e 73 74 61 6e 74 73 2e 44 45 46 41 55 4c 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e nstants.DEFAULT_TEMPLATE_VERSION
4dda0 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 ;..............}................
4ddc0 69 66 20 28 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c if.(schemaConstants.MinimumTempl
4dde0 61 74 65 56 65 72 73 69 6f 6e 20 3e 20 6e 65 77 20 56 65 72 73 69 6f 6e 28 74 65 6d 70 6c 61 74 ateVersion.>.new.Version(templat
4de00 65 56 65 72 73 69 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 eVersion))..............{.......
4de20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 ..........._textTransformation.E
4de40 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 0d 0a 20 20 rrors.Add(new.CompilerError(....
4de60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d .................._textTransform
4de80 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 20 3f 3f 20 43 6f 64 65 47 ation.Host.TemplateFile.??.CodeG
4dea0 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 enerationTools.GetResourceString
4dec0 28 22 54 65 6d 70 6c 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e 6e 69 6e 67 54 65 6d 70 6c ("Template_CurrentlyRunningTempl
4dee0 61 74 65 22 29 2c 20 2d 31 2c 20 2d 31 2c 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 2c 0d 0a 20 20 ate"),.-1,.-1,.string.Empty,....
4df00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 ......................CodeGenera
4df20 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d tionTools.GetResourceString("Tem
4df40 70 6c 61 74 65 5f 55 6e 73 75 70 70 6f 72 74 65 64 53 63 68 65 6d 61 22 29 29 0d 0a 20 20 20 20 plate_UnsupportedSchema"))......
4df60 20 20 20 20 20 20 20 20 20 20 20 20 7b 49 73 57 61 72 6e 69 6e 67 20 3d 20 74 72 75 65 7d 29 3b ............{IsWarning.=.true});
4df80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 ..............}................r
4dfa0 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 73 65 63 74 69 6f 6e 2e 45 6c 65 6d 65 6e 74 28 73 65 63 ootElement.=.section.Element(sec
4dfc0 74 69 6f 6e 4e 73 20 2b 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 tionNs.+.rootElementName);......
4dfe0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 21 3d 20 6e 75 ........return.rootElement.!=.nu
4e000 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 ll;..........}............///.<s
4e020 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 72 69 65 73 20 74 6f 20 6c 6f ummary>..........///.Tries.to.lo
4e040 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 70 72 6f ad.the.root.element.from.the.pro
4e060 76 69 64 65 64 20 2e 65 64 6d 78 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 20 vided..edmx.metadata.file.......
4e080 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 70 72 69 76 61 ...///.</summary>..........priva
4e0a0 74 65 20 62 6f 6f 6c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 te.bool.TryLoadRootElementFromEd
4e0c0 6d 78 28 73 74 72 69 6e 67 20 65 64 6d 78 50 61 74 68 2c 20 6f 75 74 20 58 45 6c 65 6d 65 6e 74 mx(string.edmxPath,.out.XElement
4e0e0 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .rootElement)..........{........
4e100 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 ......rootElement.=.null;.......
4e120 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 65 6c 65 6d 65 6e 74 20 3d 20 58 45 6c 65 .........XElement.element.=.XEle
4e140 6d 65 6e 74 2e 4c 6f 61 64 28 65 64 6d 78 50 61 74 68 2c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e ment.Load(edmxPath,.LoadOptions.
4e160 53 65 74 42 61 73 65 55 72 69 20 7c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 4c 69 6e 65 SetBaseUri.|.LoadOptions.SetLine
4e180 49 6e 66 6f 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 79 Info);................return.Try
4e1a0 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c LoadRootElementFromEdmx(element,
4e1c0 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 33 5f 53 43 48 45 4d 41 5f 43 4f 4e .MetadataConstants.V3_SCHEMA_CON
4e1e0 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 STANTS,.EdmxSectionName,.RootEle
4e200 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 mentName,.out.rootElement)......
4e220 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e ............||.TryLoadRootElemen
4e240 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 tFromEdmx(element,.MetadataConst
4e260 61 6e 74 73 2e 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 ants.V2_SCHEMA_CONSTANTS,.EdmxSe
4e280 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 ctionName,.RootElementName,.out.
4e2a0 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c rootElement)..................||
4e2c0 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d .TryLoadRootElementFromEdmx(elem
4e2e0 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 31 5f 53 43 48 45 4d 41 ent,.MetadataConstants.V1_SCHEMA
4e300 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f _CONSTANTS,.EdmxSectionName,.Roo
4e320 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 6f 75 74 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 3b 0d tElementName,.out.rootElement);.
4e340 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .........}............///.<summa
4e360 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 61 6b 65 73 20 61 6e 20 45 6e 75 6d 65 72 ry>..........///.Takes.an.Enumer
4e380 61 62 6c 65 20 6f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 73 2c 20 61 6e 64 20 61 64 64 able.of.EdmSchemaErrors,.and.add
4e3a0 73 20 74 68 65 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 74 68 65 20 65 72 72 6f 72 s.them..........///.to.the.error
4e3c0 73 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 s.collection.of.the.template.cla
4e3e0 73 73 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 ss..........///.</summary>......
4e400 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 50 72 6f 63 65 73 73 45 72 72 6f 72 73 28 49 ....private.bool.ProcessErrors(I
4e420 45 6e 75 6d 65 72 61 62 6c 65 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 Enumerable<EdmSchemaError>.error
4e440 73 2c 20 73 74 72 69 6e 67 20 73 6f 75 72 63 65 46 69 6c 65 50 61 74 68 29 0d 0a 20 20 20 20 20 s,.string.sourceFilePath).......
4e460 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 66 6f 75 6e 64 45 72 72 6f ...{..............bool.foundErro
4e480 72 73 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 rs.=.false;..............foreach
4e4a0 20 28 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 20 65 72 72 6f 72 20 69 6e 20 65 72 72 6f 72 73 .(EdmSchemaError.error.in.errors
4e4c0 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 )..............{................
4e4e0 20 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 6e 65 77 45 72 72 6f 72 20 3d 20 6e 65 77 20 43 ..CompilerError.newError.=.new.C
4e500 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 65 72 72 6f 72 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 6f ompilerError(error.SchemaLocatio
4e520 6e 2c 20 65 72 72 6f 72 2e 4c 69 6e 65 2c 20 65 72 72 6f 72 2e 43 6f 6c 75 6d 6e 2c 0d 0a 20 20 n,.error.Line,.error.Column,....
4e540 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 ................................
4e560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 72 72 6f 72 2e 45 72 72 6f 72 43 6f 64 65 2e 54 ...............error.ErrorCode.T
4e580 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c oString(CultureInfo.InvariantCul
4e5a0 74 75 72 65 29 2c 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 ture),..........................
4e5c0 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 65 72 72 6f 72 2e 4d .........................error.M
4e5e0 65 73 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 45 72 72 essage);..................newErr
4e600 6f 72 2e 49 73 57 61 72 6e 69 6e 67 20 3d 20 65 72 72 6f 72 2e 53 65 76 65 72 69 74 79 20 3d 3d or.IsWarning.=.error.Severity.==
4e620 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 53 65 76 65 72 69 74 79 2e 57 61 72 6e 69 6e 67 3b .EdmSchemaErrorSeverity.Warning;
4e640 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 75 6e 64 45 72 72 6f 72 73 20 7c 3d ..................foundErrors.|=
4e660 20 65 72 72 6f 72 2e 53 65 76 65 72 69 74 79 20 3d 3d 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f .error.Severity.==.EdmSchemaErro
4e680 72 53 65 76 65 72 69 74 79 2e 45 72 72 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rSeverity.Error;................
4e6a0 20 20 69 66 20 28 65 72 72 6f 72 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 6f 6e 20 3d 3d 20 6e 75 ..if.(error.SchemaLocation.==.nu
4e6c0 6c 6c 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 ll)..................{..........
4e6e0 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 45 72 72 6f 72 2e 46 69 6c 65 4e 61 6d 65 20 3d 20 ............newError.FileName.=.
4e700 73 6f 75 72 63 65 46 69 6c 65 50 61 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sourceFilePath;.................
4e720 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f .}.................._textTransfo
4e740 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 45 72 72 6f 72 29 3b 0d 0a 20 rmation.Errors.Add(newError);...
4e760 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 75 ...........}................retu
4e780 72 6e 20 66 6f 75 6e 64 45 72 72 6f 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 rn.foundErrors;..........}......
4e7a0 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 }........///.<summary>......///.
4e7c0 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 53 74 6f Builder.class.for.creating.a.Sto
4e7e0 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 2f rageMappingItemCollection....../
4e800 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6c 61 73 73 //.</summary>......private.class
4e820 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 .StorageMappingItemCollectionBui
4e840 6c 64 65 72 20 3a 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 lder.:.ItemCollectionBuilder....
4e860 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 45 64 ..{..........private.readonly.Ed
4e880 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 5f 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 mItemCollection._edmItemCollecti
4e8a0 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 53 74 on;..........private.readonly.St
4e8c0 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c oreItemCollection._storeItemColl
4e8e0 65 63 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 53 74 6f 72 61 67 ection;............public.Storag
4e900 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 eMappingItemCollectionBuilder(Dy
4e920 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e namicTextTransformation.textTran
4e940 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 65 64 sformation,.EdmItemCollection.ed
4e960 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 mItemCollection,.StoreItemCollec
4e980 74 69 6f 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 tion.storeItemCollection).......
4e9a0 20 20 20 20 20 20 20 3a 20 62 61 73 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e .......:.base(textTransformation
4e9c0 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 45 58 54 45 4e 53 49 4f ,.MetadataConstants.MSL_EXTENSIO
4e9e0 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 45 44 4d 58 5f 53 45 N,.MetadataConstants.MSL_EDMX_SE
4ea00 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 CTION_NAME,.MetadataConstants.MS
4ea20 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d L_ROOT_ELEMENT_NAME)..........{.
4ea40 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 ............._edmItemCollection.
4ea60 3d 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 =.edmItemCollection;............
4ea80 20 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 73 74 6f 72 65 49 74 .._storeItemCollection.=.storeIt
4eaa0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 emCollection;..........}........
4eac0 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 49 74 65 6d 43 6f 6c 6c 65 ....protected.override.ItemColle
4eae0 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 49 45 6e 75 6d ction.CreateItemCollection(IEnum
4eb00 65 72 61 62 6c 65 3c 58 6d 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 49 erable<XmlReader>.readers,.out.I
4eb20 4c 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 73 29 0d 0a 20 20 List<EdmSchemaError>.errors)....
4eb40 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4d 65 74 61 ......{..............return.Meta
4eb60 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 dataItemCollectionFactory.Create
4eb80 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 65 64 StorageMappingItemCollection(_ed
4eba0 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 mItemCollection,._storeItemColle
4ebc0 63 74 69 6f 6e 2c 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b 0d 0a 20 20 ction,.readers,.out.errors);....
4ebe0 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>
4ec00 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 ..........///.Selects.a.namespac
4ec20 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a e.from.the.supplied.constants...
4ec40 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>..........
4ec60 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 47 65 74 4e 61 6d protected.override.string.GetNam
4ec80 65 73 70 61 63 65 28 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 61 6e 74 73 espace(SchemaConstants.constants
4eca0 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e )..........{..............return
4ecc0 20 63 6f 6e 73 74 61 6e 74 73 2e 4d 73 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 .constants.MslNamespace;........
4ece0 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ..}......}........///.<summary>.
4ed00 0a 20 20 20 20 2f 2f 2f 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 .....///.Builder.class.for.creat
4ed20 69 6e 67 20 61 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 2f ing.a.StoreItemCollection....../
4ed40 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6c 61 73 73 //.</summary>......private.class
4ed60 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3a 20 49 74 .StoreItemCollectionBuilder.:.It
4ed80 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 emCollectionBuilder......{......
4eda0 20 20 20 20 70 75 62 6c 69 63 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 ....public.StoreItemCollectionBu
4edc0 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 ilder(DynamicTextTransformation.
4ede0 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 textTransformation).............
4ee00 20 3a 20 62 61 73 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 .:.base(textTransformation,.Meta
4ee20 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 dataConstants.SSDL_EXTENSION,.Me
4ee40 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f tadataConstants.SSDL_EDMX_SECTIO
4ee60 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 52 N_NAME,.MetadataConstants.SSDL_R
4ee80 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 OOT_ELEMENT_NAME)..........{....
4eea0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 ......}............protected.ove
4eec0 72 72 69 64 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 rride.ItemCollection.CreateItemC
4eee0 6f 6c 6c 65 63 74 69 6f 6e 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 58 6d 6c 52 65 61 64 65 72 3e ollection(IEnumerable<XmlReader>
4ef00 20 72 65 61 64 65 72 73 2c 20 6f 75 74 20 49 4c 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 .readers,.out.IList<EdmSchemaErr
4ef20 6f 72 3e 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 or>.errors)..........{..........
4ef40 20 20 20 20 72 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ....return.MetadataItemCollectio
4ef60 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 nFactory.CreateStoreItemCollecti
4ef80 6f 6e 28 72 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b 0d 0a 20 20 20 20 20 20 on(readers,.out.errors);........
4efa0 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 20 ..}............///.<summary>....
4efc0 20 20 20 20 20 20 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 ......///.Selects.a.namespace.fr
4efe0 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 om.the.supplied.constants.......
4f000 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 70 72 6f 74 ....///.</summary>..........prot
4f020 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 47 65 74 4e 61 6d 65 73 70 61 ected.override.string.GetNamespa
4f040 63 65 28 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 61 6e 74 73 29 0d 0a 20 ce(SchemaConstants.constants)...
4f060 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6e .......{..............return.con
4f080 73 74 61 6e 74 73 2e 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d stants.SsdlNamespace;..........}
4f0a0 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ......}........///.<summary>....
4f0c0 20 20 2f 2f 2f 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 69 6e 67 ..///.Builder.class.for.creating
4f0e0 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f .a.EdmItemCollection......///.</
4f100 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6c 61 73 73 20 45 64 6d 49 summary>......private.class.EdmI
4f120 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 3a 20 49 74 65 6d 43 6f 6c 6c 65 temCollectionBuilder.:.ItemColle
4f140 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 ctionBuilder......{..........pri
4f160 76 61 74 65 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 vate.List<string>._referenceSche
4f180 6d 61 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 0d 0a 20 20 20 mas.=.new.List<string>();.......
4f1a0 20 20 20 20 20 70 75 62 6c 69 63 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 .....public.EdmItemCollectionBui
4f1c0 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 lder(DynamicTextTransformation.t
4f1e0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 extTransformation)..............
4f200 3a 20 62 61 73 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 64 :.base(textTransformation,.Metad
4f220 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 74 ataConstants.CSDL_EXTENSION,.Met
4f240 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e adataConstants.CSDL_EDMX_SECTION
4f260 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 52 4f _NAME,.MetadataConstants.CSDL_RO
4f280 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 OT_ELEMENT_NAME)..........{.....
4f2a0 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 45 64 6d 49 74 65 6d .....}............public.EdmItem
4f2c0 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 CollectionBuilder(DynamicTextTra
4f2e0 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 nsformation.textTransformation,.
4f300 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 72 65 66 65 72 65 6e 63 65 53 63 68 IEnumerable<string>.referenceSch
4f320 65 6d 61 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 74 68 69 73 28 74 65 78 74 54 72 emas)..............:.this(textTr
4f340 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ansformation)..........{........
4f360 20 20 20 20 20 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 41 64 64 52 61 6e 67 65 ......_referenceSchemas.AddRange
4f380 28 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a (referenceSchemas);..........}..
4f3a0 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 49 74 65 ..........protected.override.Ite
4f3c0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e mCollection.CreateItemCollection
4f3e0 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 58 6d 6c 52 65 61 64 65 72 3e 20 72 65 61 64 65 72 73 2c (IEnumerable<XmlReader>.readers,
4f400 20 6f 75 74 20 49 4c 69 73 74 3c 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 3e 20 65 72 72 6f 72 .out.IList<EdmSchemaError>.error
4f420 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 4c 69 73 74 3c s)..........{..............List<
4f440 58 6d 6c 52 65 61 64 65 72 3e 20 6f 77 6e 65 64 52 65 61 64 65 72 73 20 3d 20 6e 65 77 20 4c 69 XmlReader>.ownedReaders.=.new.Li
4f460 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4c 69 st<XmlReader>();..............Li
4f480 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 20 61 6c 6c 52 65 61 64 65 72 73 20 3d 20 6e 65 77 20 4c st<XmlReader>.allReaders.=.new.L
4f4a0 69 73 74 3c 58 6d 6c 52 65 61 64 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ist<XmlReader>();..............t
4f4c0 72 79 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 ry..............{...............
4f4e0 20 20 20 61 6c 6c 52 65 61 64 65 72 73 2e 41 64 64 52 61 6e 67 65 28 72 65 61 64 65 72 73 29 3b ...allReaders.AddRange(readers);
4f500 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 73 74 72 69 6e ..................foreach.(strin
4f520 67 20 70 61 74 68 20 69 6e 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 44 69 73 74 g.path.in._referenceSchemas.Dist
4f540 69 6e 63 74 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 inct())..................{......
4f560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 58 45 6c 65 6d 65 6e 74 20 72 65 66 65 72 65 6e ................XElement.referen
4f580 63 65 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 28 54 72 79 4c ce;......................if(TryL
4f5a0 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 70 61 74 68 2c 20 6f 75 74 20 72 65 66 65 72 65 6e oadRootElement(path,.out.referen
4f5c0 63 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 7b 0d 0a 20 20 20 ce))......................{.....
4f5e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 58 6d 6c 52 65 61 64 65 72 20 72 .....................XmlReader.r
4f600 65 61 64 65 72 20 3d 20 72 65 66 65 72 65 6e 63 65 2e 43 72 65 61 74 65 52 65 61 64 65 72 28 29 eader.=.reference.CreateReader()
4f620 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 61 6c 6c 52 65 ;..........................allRe
4f640 61 64 65 72 73 2e 41 64 64 28 72 65 61 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 aders.Add(reader);..............
4f660 20 20 20 20 20 20 20 20 20 20 20 20 6f 77 6e 65 64 52 65 61 64 65 72 73 2e 41 64 64 28 72 65 61 ............ownedReaders.Add(rea
4f680 64 65 72 29 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 der);......................}....
4f6a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
4f6c0 20 20 20 72 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ...return.MetadataItemCollection
4f6e0 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 Factory.CreateEdmItemCollection(
4f700 61 6c 6c 52 65 61 64 65 72 73 2c 20 6f 75 74 20 65 72 72 6f 72 73 29 3b 0d 0a 20 20 20 20 20 20 allReaders,.out.errors);........
4f720 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 0d 0a 20 20 ......}..............finally....
4f740 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 66 6f 72 ..........{..................for
4f760 65 61 63 68 20 28 58 6d 6c 52 65 61 64 65 72 20 72 65 61 64 65 72 20 69 6e 20 6f 77 6e 65 64 52 each.(XmlReader.reader.in.ownedR
4f780 65 61 64 65 72 73 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 eaders)..................{......
4f7a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 49 44 69 73 70 6f 73 61 62 6c 65 29 72 65 ................((IDisposable)re
4f7c0 61 64 65 72 29 2e 44 69 73 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ader).Dispose();................
4f7e0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ..}..............}..........}...
4f800 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>..........
4f820 2f 2f 2f 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 ///.Selects.a.namespace.from.the
4f840 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f .supplied.constants...........//
4f860 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 /.</summary>..........protected.
4f880 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 53 63 68 override.string.GetNamespace(Sch
4f8a0 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 63 6f 6e 73 74 61 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 emaConstants.constants).........
4f8c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 .{..............return.constants
4f8e0 2e 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 .CsdlNamespace;..........}......
4f900 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f }..}....///.<summary>..///.Respo
4f920 6e 73 69 62 6c 65 20 66 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 69 6e 67 20 74 68 65 20 72 65 74 nsible.for.encapsulating.the.ret
4f940 72 69 65 76 61 6c 20 61 6e 64 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 43 6f rieval.and.translation.of.the.Co
4f960 64 65 47 65 6e 65 72 61 74 69 6f 6e 0d 0a 2f 2f 2f 20 61 6e 6e 6f 74 61 74 69 6f 6e 73 20 69 6e deGeneration..///.annotations.in
4f980 20 74 68 65 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 20 4d 65 74 61 64 61 74 61 20 74 6f .the.EntityFramework.Metadata.to
4f9a0 20 61 20 66 6f 72 6d 20 74 68 61 74 20 69 73 20 75 73 65 66 75 6c 20 69 6e 20 63 6f 64 65 20 67 .a.form.that.is.useful.in.code.g
4f9c0 65 6e 65 72 61 74 69 6f 6e 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c eneration...///.</summary>..publ
4f9e0 69 63 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 0d 0a 7b ic.static.class.Accessibility..{
4fa00 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 47 45 54 54 45 ......private.const.string.GETTE
4fa20 52 5f 41 43 43 45 53 53 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f R_ACCESS.=."http://schemas.micro
4fa40 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 soft.com/ado/2006/04/codegenerat
4fa60 69 6f 6e 3a 47 65 74 74 65 72 41 63 63 65 73 73 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 ion:GetterAccess";......private.
4fa80 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 20 3d 20 22 68 74 const.string.SETTER_ACCESS.=."ht
4faa0 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 tp://schemas.microsoft.com/ado/2
4fac0 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 53 65 74 74 65 72 41 63 63 65 006/04/codegeneration:SetterAcce
4fae0 73 73 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 54 ss";......private.const.string.T
4fb00 59 50 45 5f 41 43 43 45 53 53 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 YPE_ACCESS.=."http://schemas.mic
4fb20 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 rosoft.com/ado/2006/04/codegener
4fb40 61 74 69 6f 6e 3a 54 79 70 65 41 63 63 65 73 73 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 ation:TypeAccess";......private.
4fb60 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 4d 45 54 48 4f 44 5f 41 43 43 45 53 53 20 3d 20 22 68 74 const.string.METHOD_ACCESS.=."ht
4fb80 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 tp://schemas.microsoft.com/ado/2
4fba0 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 4d 65 74 68 6f 64 41 63 63 65 006/04/codegeneration:MethodAcce
4fbc0 73 73 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 41 ss";......private.const.string.A
4fbe0 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 44 20 3d 20 22 50 72 6f 74 65 63 74 65 64 22 3b 0d 0a CCESS_PROTECTED.=."Protected";..
4fc00 20 20 20 20 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 41 43 43 45 53 53 5f ....private.const.string.ACCESS_
4fc20 49 4e 54 45 52 4e 41 4c 20 3d 20 22 49 6e 74 65 72 6e 61 6c 22 3b 0d 0a 20 20 20 20 70 72 69 76 INTERNAL.=."Internal";......priv
4fc40 61 74 65 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 41 43 43 45 53 53 5f 50 52 49 56 41 54 45 20 ate.const.string.ACCESS_PRIVATE.
4fc60 3d 20 22 50 72 69 76 61 74 65 22 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 =."Private";......private.static
4fc80 20 72 65 61 64 6f 6e 6c 79 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 69 6e 74 .readonly.Dictionary<string,.int
4fca0 3e 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 20 3d 20 6e 65 >.AccessibilityRankIdLookup.=.ne
4fcc0 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 69 6e 74 3e 0d 0a 20 20 20 20 20 w.Dictionary<string,.int>.......
4fce0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 70 72 69 76 61 74 65 22 2c 20 31 ...{..............{."private",.1
4fd00 7d 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 69 6e 74 65 72 6e 61 6c 22 2c 20 32 7d },..............{."internal",.2}
4fd20 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 70 72 6f 74 65 63 74 65 64 22 2c 20 33 7d ,..............{."protected",.3}
4fd40 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 70 75 62 6c 69 63 22 2c 20 34 7d 2c 0d 0a ,..............{."public",.4},..
4fd60 20 20 20 20 20 20 20 20 7d 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ........};........///.<summary>.
4fd80 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 .....///.Gets.the.accessibility.
4fda0 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 74 6f 20 61 20 74 79 70 65 that.should.be.applied.to.a.type
4fdc0 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 .being.generated.from.the.provid
4fde0 65 64 20 47 6c 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f ed.GlobalItem.......///......///
4fe00 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 .defaults.to.public.if.no.annota
4fe20 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 tion.is.found.......///.</summar
4fe40 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 y>......public.static.string.For
4fe60 54 79 70 65 28 47 6c 6f 62 61 6c 49 74 65 6d 20 69 74 65 6d 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 Type(GlobalItem.item)......{....
4fe80 20 20 20 20 20 20 69 66 20 28 69 74 65 6d 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 ......if.(item.==.null).........
4fea0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 .{..............return.null;....
4fec0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 41 63 63 ......}............return.GetAcc
4fee0 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 54 59 50 45 5f 41 43 43 45 53 53 29 3b 0d 0a essibility(item,.TYPE_ACCESS);..
4ff00 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
4ff20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 ///.Gets.the.accessibility.that.
4ff40 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 should.be.applied.at.the.propert
4ff60 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 y.level.for.a.property.being....
4ff80 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 ..///.generated.from.the.provide
4ffa0 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 d.EdmMember.......///......///.d
4ffc0 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 efaults.to.public.if.no.annotati
4ffe0 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e on.is.found.......///.</summary>
50000 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 50 72 ......public.static.string.ForPr
50020 6f 70 65 72 74 79 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 7b 0d operty(EdmMember.member)......{.
50040 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 .........if.(member.==.null)....
50060 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c ......{..............return.null
50080 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 67 ;..........}............string.g
500a0 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 73 2c 20 70 72 6f 70 65 etterAccess,.setterAccess,.prope
500c0 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 75 6c 61 74 65 50 72 6f rtyAccess;..........CalculatePro
500e0 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 6f 75 74 20 70 pertyAccessibility(member,.out.p
50100 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 6f 75 74 20 67 65 74 74 65 72 41 63 63 65 73 73 2c ropertyAccess,.out.getterAccess,
50120 20 6f 75 74 20 73 65 74 74 65 72 41 63 63 65 73 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 .out.setterAccess);..........ret
50140 75 72 6e 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 urn.propertyAccess;......}......
50160 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 ..///.<summary>......///.Gets.th
50180 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 e.accessibility.that.should.be.a
501a0 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 pplied.at.the.property.level.for
501c0 20 61 20 52 65 61 64 2d 4f 6e 6c 79 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 .a.Read-Only.property.being.....
501e0 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 .///.generated.from.the.provided
50200 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 .EdmMember.......///......///.de
50220 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f faults.to.public.if.no.annotatio
50240 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d n.is.found.......///.</summary>.
50260 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 52 65 61 .....public.static.string.ForRea
50280 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d dOnlyProperty(EdmMember.member).
502a0 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 .....{..........if.(member.==.nu
502c0 6c 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 72 65 74 75 ll)..........{..............retu
502e0 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 rn.null;..........}............r
50300 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 47 eturn.GetAccessibility(member,.G
50320 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f ETTER_ACCESS);......}........///
50340 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 61 63 63 .<summary>......///.Gets.the.acc
50360 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 essibility.that.should.be.applie
50380 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 d.at.the.property.level.for.a.pr
503a0 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 operty.being......///.generated.
503c0 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 6e 74 69 74 79 53 65 74 2e 0d 0a 20 20 from.the.provided.EntitySet.....
503e0 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 ..///......///.defaults.to.publi
50400 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 c.if.no.annotation.is.found.....
50420 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 ..///.</summary>......public.sta
50440 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 45 tic.string.ForReadOnlyProperty(E
50460 6e 74 69 74 79 53 65 74 20 73 65 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 ntitySet.set)......{..........if
50480 20 28 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .(set.==.null)..........{.......
504a0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a .......return.null;..........}..
504c0 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 ..........return.GetAccessibilit
504e0 79 28 73 65 74 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d y(set,.GETTER_ACCESS);......}...
50500 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 .....///.<summary>......///.Gets
50520 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 .the.accessibility.that.should.b
50540 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 e.applied.at.the.property.level.
50560 66 6f 72 20 61 20 57 72 69 74 65 2d 4f 6e 6c 79 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d for.a.Write-Only.property.being.
50580 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 .....///.generated.from.the.prov
505a0 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f ided.EdmMember.......///......//
505c0 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 /.defaults.to.public.if.no.annot
505e0 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ation.is.found.......///.</summa
50600 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f ry>......public.static.string.Fo
50620 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d rWriteOnlyProperty(EdmMember.mem
50640 62 65 72 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 ber)......{..........if.(member.
50660 3d 3d 20 6e 75 6c 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 ==.null)..........{.............
50680 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 .return.null;..........}........
506a0 20 20 20 20 72 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 ....return.GetAccessibility(memb
506c0 65 72 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 0d 0a er,.SETTER_ACCESS);......}......
506e0 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 ....///.<summary>......///.Gets.
50700 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 the.accessibility.that.should.be
50720 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 67 65 74 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 .applied.at.the.get.level.for.a.
50740 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 74 65 property.being......///.generate
50760 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a d.from.the.provided.EdmMember...
50780 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 65 6d 70 ....///......///.defaults.to.emp
507a0 74 79 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 20 6f 72 20 ty.if.no.annotation.is.found.or.
507c0 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 the.accessibility.is.the.same.as
507e0 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f .the.property.level.......///.</
50800 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 summary>......public.static.stri
50820 6e 67 20 46 6f 72 47 65 74 74 65 72 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 0d 0a ng.ForGetter(EdmMember.member)..
50840 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e 75 6c ....{..........if.(member.==.nul
50860 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 72 65 74 75 72 l)..........{..............retur
50880 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 n.null;..........}............st
508a0 72 69 6e 67 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 73 2c ring.getterAccess,.setterAccess,
508c0 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 75 6c .propertyAccess;..........Calcul
508e0 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c atePropertyAccessibility(member,
50900 20 6f 75 74 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 6f 75 74 20 67 65 74 74 65 72 41 .out.propertyAccess,.out.getterA
50920 63 63 65 73 73 2c 20 6f 75 74 20 73 65 74 74 65 72 41 63 63 65 73 73 29 3b 0d 0a 20 20 20 20 20 ccess,.out.setterAccess);.......
50940 20 20 20 72 65 74 75 72 6e 20 67 65 74 74 65 72 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 7d 0d 0a ...return.getterAccess;......}..
50960 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 ......///.<summary>......///.Get
50980 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 s.the.accessibility.that.should.
509a0 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 73 65 74 20 6c 65 76 65 6c 20 66 6f 72 20 be.applied.at.the.set.level.for.
509c0 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 67 65 6e 65 72 61 a.property.being......///.genera
509e0 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e ted.from.the.provided.EdmMember.
50a00 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c 74 73 20 74 6f 20 65 ......///......///.defaults.to.e
50a20 6d 70 74 79 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 20 6f mpty.if.no.annotation.is.found.o
50a40 72 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 68 65 20 73 61 6d 65 20 r.the.accessibility.is.the.same.
50a60 61 73 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 as.the.property.level.......///.
50a80 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 </summary>......public.static.st
50aa0 72 69 6e 67 20 46 6f 72 53 65 74 74 65 72 28 45 64 6d 4d 65 6d 62 65 72 20 6d 65 6d 62 65 72 29 ring.ForSetter(EdmMember.member)
50ac0 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6d 65 6d 62 65 72 20 3d 3d 20 6e ......{..........if.(member.==.n
50ae0 75 6c 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 72 65 74 ull)..........{..............ret
50b00 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 urn.null;..........}............
50b20 73 74 72 69 6e 67 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 string.getterAccess,.setterAcces
50b40 73 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 s,.propertyAccess;..........Calc
50b60 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 ulatePropertyAccessibility(membe
50b80 72 2c 20 6f 75 74 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 6f 75 74 20 67 65 74 74 65 r,.out.propertyAccess,.out.gette
50ba0 72 41 63 63 65 73 73 2c 20 6f 75 74 20 73 65 74 74 65 72 41 63 63 65 73 73 29 3b 0d 0a 20 20 20 rAccess,.out.setterAccess);.....
50bc0 20 20 20 20 20 72 65 74 75 72 6e 20 73 65 74 74 65 72 41 63 63 65 73 73 3b 0d 0a 20 20 20 20 7d .....return.setterAccess;......}
50be0 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 ........///.<summary>......///.G
50c00 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c ets.the.accessibility.that.shoul
50c20 64 20 62 65 20 61 70 70 6c 69 65 64 20 74 6f 20 61 20 6d 65 74 68 6f 64 20 62 65 69 6e 67 20 67 d.be.applied.to.a.method.being.g
50c40 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 46 75 enerated.from.the.provided.EdmFu
50c60 6e 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 66 61 75 6c nction.......///......///.defaul
50c80 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 ts.to.public.if.no.annotation.is
50ca0 20 66 6f 75 6e 64 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 .found.......///.</summary>.....
50cc0 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 46 6f 72 4d 65 74 68 6f 64 28 .public.static.string.ForMethod(
50ce0 45 64 6d 46 75 6e 63 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 EdmFunction.function)......{....
50d00 20 20 20 20 20 20 69 66 20 28 66 75 6e 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ......if.(function.==.null).....
50d20 20 20 20 20 20 7b 0d 0a 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;
50d40 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 47 65 ..........}............return.Ge
50d60 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 66 75 6e 63 74 69 6f 6e 2c 20 4d 45 54 48 4f 44 5f tAccessibility(function,.METHOD_
50d80 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 ACCESS);......}........private.s
50da0 74 61 74 69 63 20 76 6f 69 64 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 tatic.void.CalculatePropertyAcce
50dc0 73 73 69 62 69 6c 69 74 79 28 4d 65 74 61 64 61 74 61 49 74 65 6d 20 69 74 65 6d 2c 0d 0a 20 20 ssibility(MetadataItem.item,....
50de0 20 20 20 20 20 20 6f 75 74 20 73 74 72 69 6e 67 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 ......out.string.propertyAccessi
50e00 62 69 6c 69 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 6f 75 74 20 73 74 72 69 6e 67 20 67 65 74 74 bility,..........out.string.gett
50e20 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 6f 75 74 20 73 74 erAccessibility,..........out.st
50e40 72 69 6e 67 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 0d 0a 20 20 20 20 7b ring.setterAccessibility)......{
50e60 0d 0a 20 20 20 20 20 20 20 20 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 ..........getterAccessibility.=.
50e80 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 47 45 54 54 45 52 5f 41 43 GetAccessibility(item,.GETTER_AC
50ea0 43 45 53 53 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 20 67 65 74 74 65 72 52 61 6e 6b 20 3d CESS);..........int.getterRank.=
50ec0 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 5b 67 65 74 74 65 .AccessibilityRankIdLookup[gette
50ee0 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 65 74 74 rAccessibility];............sett
50f00 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 erAccessibility.=.GetAccessibili
50f20 74 79 28 69 74 65 6d 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 3b 0d 0a 20 20 20 20 20 20 ty(item,.SETTER_ACCESS);........
50f40 20 20 69 6e 74 20 73 65 74 74 65 72 52 61 6e 6b 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 ..int.setterRank.=.Accessibility
50f60 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 5b 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 RankIdLookup[setterAccessibility
50f80 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 20 70 72 6f 70 65 72 74 79 52 61 6e 6b 20 3d ];............int.propertyRank.=
50fa0 20 4d 61 74 68 2e 4d 61 78 28 67 65 74 74 65 72 52 61 6e 6b 2c 20 73 65 74 74 65 72 52 61 6e 6b .Math.Max(getterRank,.setterRank
50fc0 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 65 74 74 65 72 52 61 6e 6b 20 3d 3d 20 70 72 );..........if.(setterRank.==.pr
50fe0 6f 70 65 72 74 79 52 61 6e 6b 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 opertyRank)..........{..........
51000 20 20 20 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 53 74 72 69 6e 67 ....setterAccessibility.=.String
51020 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 .Empty;..........}............if
51040 20 28 67 65 74 74 65 72 52 61 6e 6b 20 3d 3d 20 70 72 6f 70 65 72 74 79 52 61 6e 6b 29 0d 0a 20 .(getterRank.==.propertyRank)...
51060 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 74 65 72 41 63 63 65 .......{..............getterAcce
51080 73 73 69 62 69 6c 69 74 79 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 20 20 ssibility.=.String.Empty;.......
510a0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 ...}............propertyAccessib
510c0 69 6c 69 74 79 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 ility.=.AccessibilityRankIdLooku
510e0 70 2e 57 68 65 72 65 28 76 20 3d 3e 20 76 2e 56 61 6c 75 65 20 3d 3d 20 70 72 6f 70 65 72 74 79 p.Where(v.=>.v.Value.==.property
51100 52 61 6e 6b 29 2e 53 65 6c 65 63 74 28 76 20 3d 3e 20 76 2e 4b 65 79 29 2e 53 69 6e 67 6c 65 28 Rank).Select(v.=>.v.Key).Single(
51120 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 );......}........private.static.
51140 73 74 72 69 6e 67 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 4d 65 74 61 64 61 74 61 string.GetAccessibility(Metadata
51160 49 74 65 6d 20 69 74 65 6d 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a Item.item,.string.name)......{..
51180 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 3b 0d 0a 20 ........string.accessibility;...
511a0 20 20 20 20 20 20 20 69 66 20 28 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 2e 54 72 79 47 65 74 53 .......if.(MetadataTools.TryGetS
511c0 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 28 69 74 65 tringMetadataPropertySetting(ite
511e0 6d 2c 20 6e 61 6d 65 2c 20 6f 75 74 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 29 29 0d 0a 20 20 m,.name,.out.accessibility))....
51200 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 61 6e ......{..............return.Tran
51220 73 6c 61 74 65 55 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 54 6f 43 53 68 61 72 70 41 63 slateUserAccessibilityToCSharpAc
51240 63 65 73 73 69 62 69 6c 69 74 79 28 61 63 63 65 73 73 69 62 69 6c 69 74 79 29 3b 0d 0a 20 20 20 cessibility(accessibility);.....
51260 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 70 75 62 6c 69 63 .....}............return."public
51280 22 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 ";......}........private.static.
512a0 73 74 72 69 6e 67 20 54 72 61 6e 73 6c 61 74 65 55 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 string.TranslateUserAccessibilit
512c0 79 54 6f 43 53 68 61 72 70 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 73 74 72 69 6e 67 20 75 73 yToCSharpAccessibility(string.us
512e0 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 erAccessibility)......{.........
51300 20 69 66 20 28 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 41 43 43 45 53 53 .if.(userAccessibility.==.ACCESS
51320 5f 50 52 4f 54 45 43 54 45 44 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 _PROTECTED)..........{..........
51340 20 20 20 20 72 65 74 75 72 6e 20 22 70 72 6f 74 65 63 74 65 64 22 3b 0d 0a 20 20 20 20 20 20 20 ....return."protected";.........
51360 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 75 73 65 72 41 63 63 65 73 73 69 .}..........else.if.(userAccessi
51380 62 69 6c 69 74 79 20 3d 3d 20 41 43 43 45 53 53 5f 49 4e 54 45 52 4e 41 4c 29 0d 0a 20 20 20 20 bility.==.ACCESS_INTERNAL)......
513a0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 69 6e 74 65 72 ....{..............return."inter
513c0 6e 61 6c 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 nal";..........}..........else.i
513e0 66 20 28 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 3d 20 41 43 43 45 53 53 5f 50 f.(userAccessibility.==.ACCESS_P
51400 52 49 56 41 54 45 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 RIVATE)..........{..............
51420 72 65 74 75 72 6e 20 22 70 72 69 76 61 74 65 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 return."private";..........}....
51440 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ......else..........{...........
51460 20 20 20 2f 2f 20 64 65 66 61 75 6c 74 20 74 6f 20 70 75 62 6c 69 63 0d 0a 20 20 20 20 20 20 20 ...//.default.to.public.........
51480 20 20 20 20 20 72 65 74 75 72 6e 20 22 70 75 62 6c 69 63 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d .....return."public";..........}
514a0 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f ......}..}....///.<summary>..///
514c0 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 73 6f 75 72 63 65 .Responsible.for.creating.source
514e0 20 63 6f 64 65 20 72 65 67 69 6f 6e 73 20 69 6e 20 63 6f 64 65 20 77 68 65 6e 20 74 68 65 20 6c .code.regions.in.code.when.the.l
51500 6f 6f 70 20 69 6e 73 69 64 65 0d 0a 2f 2f 2f 20 61 63 74 75 61 6c 6c 79 20 70 72 6f 64 75 63 65 oop.inside..///.actually.produce
51520 73 20 73 6f 6d 65 74 68 69 6e 67 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 s.something...///.</summary>..pu
51540 62 6c 69 63 20 63 6c 61 73 73 20 43 6f 64 65 52 65 67 69 6f 6e 0d 0a 7b 0d 0a 20 20 20 20 70 72 blic.class.CodeRegion..{......pr
51560 69 76 61 74 65 20 63 6f 6e 73 74 20 69 6e 74 20 53 54 41 4e 44 41 52 44 5f 49 4e 44 45 4e 54 5f ivate.const.int.STANDARD_INDENT_
51580 4c 45 4e 47 54 48 20 3d 20 34 3b 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f LENGTH.=.4;........private.reado
515a0 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 5f 74 nly.DynamicTextTransformation._t
515c0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 extTransformation;......private.
515e0 69 6e 74 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 70 72 int._beforeRegionLength;......pr
51600 69 76 61 74 65 20 69 6e 74 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 74 68 3b 0d 0a 20 ivate.int._emptyRegionLength;...
51620 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 ...private.int._regionIndentLeve
51640 6c 20 3d 20 2d 31 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 l.=.-1;........///.<summary>....
51660 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 43 6f 64 65 52 65 67 69 6f 6e 20 ..///.Initializes.an.CodeRegion.
51680 69 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 instance.with.the......///.TextT
516a0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 ransformation.(T4.generated.clas
516c0 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 s).that.is.currently.running....
516e0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 43 6f 64 ..///.</summary>......public.Cod
51700 65 52 65 67 69 6f 6e 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f eRegion(object.textTransformatio
51720 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 72 61 6e 73 n)......{..........if.(textTrans
51740 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 formation.==.null)..........{...
51760 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
51780 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 lException("textTransformation")
517a0 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 ;..........}............_textTra
517c0 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f nsformation.=.DynamicTextTransfo
517e0 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f rmation.Create(textTransformatio
51800 6e 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d n);......}........///.<summary>.
51820 0a 20 20 20 20 2f 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 43 6f 64 65 52 65 67 69 .....///.Initializes.an.CodeRegi
51840 6f 6e 20 69 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 on.instance.with.the......///.Te
51860 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 xtTransformation.(T4.generated.c
51880 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 2c lass).that.is.currently.running,
518a0 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 64 20 74 68 65 20 69 6e 64 65 6e 74 20 6c 65 76 65 6c 20 74 ......///.and.the.indent.level.t
518c0 6f 20 73 74 61 72 74 20 74 68 65 20 66 69 72 73 74 20 72 65 67 69 6f 6e 20 61 74 2e 0d 0a 20 20 o.start.the.first.region.at.....
518e0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 43 6f 64 ..///.</summary>......public.Cod
51900 65 52 65 67 69 6f 6e 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f eRegion(object.textTransformatio
51920 6e 2c 20 69 6e 74 20 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 0d 0a 20 20 20 20 20 20 n,.int.firstIndentLevel)........
51940 20 20 3a 20 74 68 69 73 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 ..:.this(textTransformation)....
51960 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 ..{..........if.(firstIndentLeve
51980 6c 20 3c 20 30 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 l.<.0)..........{..............t
519a0 68 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 22 66 69 72 73 hrow.new.ArgumentException("firs
519c0 74 49 6e 64 65 6e 74 4c 65 76 65 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 tIndentLevel");..........}......
519e0 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 3d 20 66 69 72 73 74 ......_regionIndentLevel.=.first
51a00 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2d 20 31 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f IndentLevel.-.1;......}......../
51a20 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 61 72 74 73 20 74 68 65 //.<summary>......///.Starts.the
51a40 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 3c .begining.of.a.region......///.<
51a60 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 42 65 67 69 6e /summary>......public.void.Begin
51a80 28 73 74 72 69 6e 67 20 72 65 67 69 6f 6e 4e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 (string.regionName)......{......
51aa0 20 20 20 20 69 66 20 28 72 65 67 69 6f 6e 4e 61 6d 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ....if.(regionName.==.null).....
51ac0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 .....{..............throw.new.Ar
51ae0 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 72 65 67 69 6f 6e 4e 61 6d 65 22 gumentNullException("regionName"
51b00 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 42 65 67 69 6e 28 72 );..........}............Begin(r
51b20 65 67 69 6f 6e 4e 61 6d 65 2c 20 31 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f egionName,.1);......}........///
51b40 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 61 72 74 20 74 68 65 20 62 65 .<summary>......///.Start.the.be
51b60 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 2c 20 69 6e 64 65 6e 74 65 64 0d 0a 20 20 gining.of.a.region,.indented....
51b80 20 20 2f 2f 2f 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f 66 20 6c 65 76 65 6c 73 20 73 70 65 63 ..///.the.numbers.of.levels.spec
51ba0 69 66 69 65 64 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 20 70 ified......///.</summary>......p
51bc0 75 62 6c 69 63 20 76 6f 69 64 20 42 65 67 69 6e 28 73 74 72 69 6e 67 20 72 65 67 69 6f 6e 4e 61 ublic.void.Begin(string.regionNa
51be0 6d 65 2c 20 69 6e 74 20 6c 65 76 65 6c 73 54 6f 49 6e 63 72 65 61 73 65 49 6e 64 65 6e 74 29 0d me,.int.levelsToIncreaseIndent).
51c00 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 72 65 67 69 6f 6e 4e 61 6d 65 20 3d .....{..........if.(regionName.=
51c20 3d 20 6e 75 6c 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 =.null)..........{..............
51c40 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(
51c60 22 72 65 67 69 6f 6e 4e 61 6d 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 "regionName");..........}.......
51c80 20 20 20 20 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 5f 74 65 78 74 ....._beforeRegionLength.=._text
51ca0 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e Transformation.GenerationEnviron
51cc0 6d 65 6e 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 ment.Length;.........._regionInd
51ce0 65 6e 74 4c 65 76 65 6c 20 2b 3d 20 6c 65 76 65 6c 73 54 6f 49 6e 63 72 65 61 73 65 49 6e 64 65 entLevel.+=.levelsToIncreaseInde
51d00 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e nt;.........._textTransformation
51d20 2e 57 72 69 74 65 28 47 65 74 49 6e 64 65 6e 74 28 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 .Write(GetIndent(_regionIndentLe
51d40 76 65 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 vel));.........._textTransformat
51d60 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 22 23 72 65 67 69 6f 6e 20 22 20 2b 20 72 65 67 69 6f ion.WriteLine("#region.".+.regio
51d80 6e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e nName);.........._emptyRegionLen
51da0 67 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 gth.=._textTransformation.Genera
51dc0 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 7d 0d 0a tionEnvironment.Length;......}..
51de0 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 45 6e 64 ......///.<summary>......///.End
51e00 73 20 61 20 72 65 67 69 6f 6e 2c 20 6f 72 20 74 6f 74 61 6c 79 20 72 65 6d 6f 76 65 73 20 69 74 s.a.region,.or.totaly.removes.it
51e20 20 69 66 20 6e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 77 61 73 20 67 65 6e 65 72 74 65 .if.nothing......///.was.generte
51e40 64 20 73 69 6e 63 65 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 74 68 65 20 72 65 67 69 d.since.the.begining.of.the.regi
51e60 6f 6e 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 20 70 75 62 on.......///.</summary>......pub
51e80 6c 69 63 20 76 6f 69 64 20 45 6e 64 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 45 lic.void.End()......{..........E
51ea0 6e 64 28 31 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 nd(1);......}........///.<summar
51ec0 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 45 6e 64 73 20 61 20 72 65 67 69 6f 6e 2c 20 6f 72 20 74 6f y>......///.Ends.a.region,.or.to
51ee0 74 61 6c 79 20 72 65 6d 6f 76 65 73 20 69 74 20 69 66 20 6e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 taly.removes.it.if.nothing......
51f00 2f 2f 2f 20 77 61 73 20 67 65 6e 65 72 74 65 64 20 73 69 6e 63 65 20 74 68 65 20 62 65 67 69 6e ///.was.generted.since.the.begin
51f20 69 6e 67 20 6f 66 20 74 68 65 20 72 65 67 69 6f 6e 2c 20 61 6c 73 6f 20 6f 75 74 64 65 6e 74 73 ing.of.the.region,.also.outdents
51f40 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 6c 65 76 65 6c 73 20 73 ......///.the.number.of.levels.s
51f60 70 65 63 69 66 69 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 pecified.......///.</summary>...
51f80 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e 64 28 69 6e 74 20 6c 65 76 65 6c 73 54 6f 44 ...public.void.End(int.levelsToD
51fa0 65 63 72 65 61 73 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 20 69 6e 64 ecrease)......{..........int.ind
51fc0 65 6e 74 4c 65 76 65 6c 20 3d 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 3b 0d 0a entLevel.=._regionIndentLevel;..
51fe0 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2d 3d 20 6c 65 ........_regionIndentLevel.-=.le
52000 76 65 6c 73 54 6f 44 65 63 72 65 61 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 5f velsToDecrease;............if.(_
52020 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 emptyRegionLength.==._textTransf
52040 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c ormation.GenerationEnvironment.L
52060 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f ength).............._textTransfo
52080 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 rmation.GenerationEnvironment.Le
520a0 6e 67 74 68 20 3d 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 ngth.=._beforeRegionLength;.....
520c0 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 .....else..........{............
520e0 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 .._textTransformation.WriteLine(
52100 53 74 72 69 6e 67 2e 45 6d 70 74 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 String.Empty);.............._tex
52120 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 47 65 74 49 6e 64 65 6e 74 28 tTransformation.Write(GetIndent(
52140 69 6e 64 65 6e 74 4c 65 76 65 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 indentLevel));.............._tex
52160 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 22 23 65 6e 64 72 tTransformation.WriteLine("#endr
52180 65 67 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 egion");.............._textTrans
521a0 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 53 74 72 69 6e 67 2e 45 6d 70 74 79 formation.WriteLine(String.Empty
521c0 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 );..........}......}........///.
521e0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 63 75 72 72 <summary>......///.Gets.the.curr
52200 65 6e 74 20 69 6e 64 65 6e 74 20 6c 65 76 65 6c 20 74 68 61 74 20 74 68 65 20 6e 65 78 74 20 65 ent.indent.level.that.the.next.e
52220 6e 64 20 72 65 67 69 6f 6e 20 73 74 61 74 65 6d 65 6e 74 20 77 69 6c 6c 20 62 65 20 77 72 69 74 nd.region.statement.will.be.writ
52240 74 65 6e 0d 0a 20 20 20 20 2f 2f 2f 20 61 74 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ten......///.at......///.</summa
52260 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 43 75 72 72 65 6e 74 49 6e 64 65 6e ry>......public.int.CurrentInden
52280 74 4c 65 76 65 6c 20 7b 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 5f 72 65 67 69 6f 6e 49 6e 64 tLevel.{.get.{.return._regionInd
522a0 65 6e 74 4c 65 76 65 6c 3b 20 7d 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 entLevel;.}.}........///.<summar
522c0 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 20 61 20 73 74 72 69 6e 67 20 6f 66 20 73 70 61 63 y>......///.Get.a.string.of.spac
522e0 65 73 20 65 71 75 69 76 65 6c 65 6e 74 20 74 6f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 69 es.equivelent.to.the.number.of.i
52300 6e 64 65 6e 74 73 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 73 69 72 65 64 2e 0d 0a 20 20 20 20 2f 2f ndents......///.desired.......//
52320 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 /.</summary>......public.static.
52340 73 74 72 69 6e 67 20 47 65 74 49 6e 64 65 6e 74 28 69 6e 74 20 69 6e 64 65 6e 74 4c 65 76 65 6c string.GetIndent(int.indentLevel
52360 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 64 65 6e 74 4c 65 76 65 )......{..........if.(indentLeve
52380 6c 20 3c 20 30 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 l.<.0)..........{..............t
523a0 68 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 22 69 6e 64 65 hrow.new.ArgumentException("inde
523c0 6e 74 4c 65 76 65 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 ntLevel");..........}...........
523e0 20 72 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 2e 50 61 64 4c 65 66 74 28 69 6e 64 .return.String.Empty.PadLeft(ind
52400 65 6e 74 4c 65 76 65 6c 20 2a 20 53 54 41 4e 44 41 52 44 5f 49 4e 44 45 4e 54 5f 4c 45 4e 47 54 entLevel.*.STANDARD_INDENT_LENGT
52420 48 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e H);......}..}......///.<summary>
52440 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 63 6f 6c 6c 65 63 74 69 6e 67 ..///.Responsible.for.collecting
52460 20 74 6f 67 65 74 68 65 72 20 74 68 65 20 61 63 74 75 61 6c 20 6d 65 74 68 6f 64 20 70 61 72 61 .together.the.actual.method.para
52480 6d 65 74 65 72 73 0d 0a 2f 2f 2f 20 61 6e 64 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 74 meters..///.and.the.parameters.t
524a0 68 61 74 20 6e 65 65 64 20 74 6f 20 62 65 20 73 65 6e 74 20 74 6f 20 74 68 65 20 45 78 65 63 75 hat.need.to.be.sent.to.the.Execu
524c0 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c te.method...///.</summary>..publ
524e0 69 63 20 63 6c 61 73 73 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 ic.class.FunctionImportParameter
52500 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 ..{......public.FunctionParamete
52520 72 20 53 6f 75 72 63 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c r.Source.{.get;.set;.}......publ
52540 69 63 20 73 74 72 69 6e 67 20 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 ic.string.RawFunctionParameterNa
52560 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 me.{.get;.set;.}......public.str
52580 69 6e 67 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 7b 20 67 65 74 3b ing.FunctionParameterName.{.get;
525a0 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 46 75 6e 63 74 .set;.}......public.string.Funct
525c0 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a ionParameterType.{.get;.set;.}..
525e0 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e ....public.string.LocalVariableN
52600 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 ame.{.get;.set;.}......public.st
52620 72 69 6e 67 20 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 ring.RawClrTypeName.{.get;.set;.
52640 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 45 78 65 63 75 74 65 50 61 72 61 }......public.string.ExecutePara
52660 6d 65 74 65 72 4e 61 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 meterName.{.get;.set;.}......pub
52680 6c 69 63 20 73 74 72 69 6e 67 20 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 7b 20 67 lic.string.EsqlParameterName.{.g
526a0 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 4e 65 65 64 et;.set;.}......public.bool.Need
526c0 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 sLocalVariable.{.get;.set;.}....
526e0 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 7b 20 67 65 ..public.bool.IsNullableOfT.{.ge
52700 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e t;.set;.}..........///.<summary>
52720 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 20 73 65 74 20 6f 66 20 46 75 6e 63 74 ......///.Creates.a.set.of.Funct
52740 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 6f 62 6a 65 63 74 73 20 66 72 6f 6d 20 ionImportParameter.objects.from.
52760 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 2f the.parameters.passed.in......./
52780 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 //.</summary>......public.static
527a0 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d .IEnumerable<FunctionImportParam
527c0 65 74 65 72 3e 20 43 72 65 61 74 65 28 49 45 6e 75 6d 65 72 61 62 6c 65 3c 46 75 6e 63 74 69 6f eter>.Create(IEnumerable<Functio
527e0 6e 50 61 72 61 6d 65 74 65 72 3e 20 70 61 72 61 6d 65 74 65 72 73 2c 20 43 6f 64 65 47 65 6e 65 nParameter>.parameters,.CodeGene
52800 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 63 6f 64 65 2c 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 rationTools.code,.MetadataTools.
52820 65 66 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 70 61 72 61 6d 65 74 65 ef)......{..........if.(paramete
52840 72 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 rs.==.null)..........{..........
52860 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
52880 69 6f 6e 28 22 70 61 72 61 6d 65 74 65 72 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ion("parameters");..........}...
528a0 0a 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 64 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 .........if.(code.==.null)......
528c0 20 20 20 20 7b 0d 0a 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
528e0 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 63 6f 64 65 22 29 3b 0d 0a 20 20 20 umentNullException("code");.....
52900 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 65 66 20 3d 3d 20 6e 75 6c 6c .....}............if.(ef.==.null
52920 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 )..........{..............throw.
52940 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 65 66 22 29 3b new.ArgumentNullException("ef");
52960 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 55 6e 69 71 75 65 49 64 65 ..........}............UniqueIde
52980 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 75 6e 69 71 75 65 20 3d 20 6e 65 77 20 55 6e 69 71 ntifierService.unique.=.new.Uniq
529a0 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 ueIdentifierService();..........
529c0 4c 69 73 74 3c 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 3e 20 69 6d List<FunctionImportParameter>.im
529e0 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 46 75 6e 63 74 69 portParameters.=.new.List<Functi
52a00 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 onImportParameter>();..........f
52a20 6f 72 65 61 63 68 20 28 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 20 70 61 72 61 6d 65 oreach.(FunctionParameter.parame
52a40 74 65 72 20 69 6e 20 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 ter.in.parameters)..........{...
52a60 20 20 20 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 ...........FunctionImportParamet
52a80 65 72 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 3d 20 6e 65 77 20 46 75 6e 63 74 69 6f er.importParameter.=.new.Functio
52aa0 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nImportParameter();.............
52ac0 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 20 3d 20 70 61 72 61 6d 65 .importParameter.Source.=.parame
52ae0 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 ter;..............importParamete
52b00 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 r.RawFunctionParameterName.=.uni
52b20 71 75 65 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 63 6f 64 65 2e 43 61 6d 65 6c 43 que.AdjustIdentifier(code.CamelC
52b40 61 73 65 28 70 61 72 61 6d 65 74 65 72 2e 4e 61 6d 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ase(parameter.Name));...........
52b60 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d ...importParameter.FunctionParam
52b80 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 69 6d 70 6f 72 74 50 61 72 eterName.=.code.Escape(importPar
52ba0 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 ameter.RawFunctionParameterName)
52bc0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 72 61 6d 65 74 65 72 2e 4d 6f 64 ;..............if.(parameter.Mod
52be0 65 20 3d 3d 20 50 61 72 61 6d 65 74 65 72 4d 6f 64 65 2e 49 6e 29 0d 0a 20 20 20 20 20 20 20 20 e.==.ParameterMode.In)..........
52c00 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 79 70 65 55 73 61 67 65 ....{..................TypeUsage
52c20 20 74 79 70 65 55 73 61 67 65 20 3d 20 70 61 72 61 6d 65 74 65 72 2e 54 79 70 65 55 73 61 67 65 .typeUsage.=.parameter.TypeUsage
52c40 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 ;..................importParamet
52c60 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 3d 20 74 72 75 65 3b 0d 0a 20 er.NeedsLocalVariable.=.true;...
52c80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 ...............importParameter.F
52ca0 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 63 6f 64 65 2e 47 65 74 54 unctionParameterType.=.code.GetT
52cc0 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ypeName(typeUsage);.............
52ce0 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 .....importParameter.EsqlParamet
52d00 65 72 4e 61 6d 65 20 3d 20 70 61 72 61 6d 65 74 65 72 2e 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 erName.=.parameter.Name;........
52d20 20 20 20 20 20 20 20 20 20 20 54 79 70 65 20 63 6c 72 54 79 70 65 20 3d 20 65 66 2e 55 6e 64 65 ..........Type.clrType.=.ef.Unde
52d40 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 70 61 72 61 6d 65 74 65 72 2e 54 79 70 65 55 73 61 67 rlyingClrType(parameter.TypeUsag
52d60 65 2e 45 64 6d 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 e.EdmType);..................imp
52d80 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 20 3d 20 74 79 ortParameter.RawClrTypeName.=.ty
52da0 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 69 73 20 45 6e 75 6d 54 79 70 65 20 3f 20 63 6f peUsage.EdmType.is.EnumType.?.co
52dc0 64 65 2e 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 de.GetTypeName(typeUsage.EdmType
52de0 29 20 3a 20 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 3b 0d 0a 20 20 20 20 20 ).:.code.Escape(clrType);.......
52e00 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 49 73 4e 75 6c ...........importParameter.IsNul
52e20 6c 61 62 6c 65 4f 66 54 20 3d 20 63 6c 72 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 3b 0d lableOfT.=.clrType.IsValueType;.
52e40 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 .............}..............else
52e60 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 ..............{.................
52e80 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 .importParameter.NeedsLocalVaria
52ea0 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d ble.=.false;..................im
52ec0 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 portParameter.FunctionParameterT
52ee0 79 70 65 20 3d 20 22 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 22 3b 0d 0a 20 20 20 20 20 20 ype.=."ObjectParameter";........
52f00 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 45 78 65 63 75 74 ..........importParameter.Execut
52f20 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 eParameterName.=.importParameter
52f40 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 .FunctionParameterName;.........
52f60 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 .....}..............importParame
52f80 74 65 72 73 2e 41 64 64 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 3b 0d 0a 20 20 20 20 ters.Add(importParameter);......
52fa0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 73 61 76 65 20 74 68 65 20 ....}............//.we.save.the.
52fc0 6c 6f 63 61 6c 20 70 61 72 61 6d 65 74 65 72 20 75 6e 69 71 75 69 66 69 63 61 74 69 6f 6e 20 66 local.parameter.uniquification.f
52fe0 6f 72 20 61 20 73 65 63 6f 6e 64 20 70 61 73 73 20 74 6f 20 6d 61 6b 65 20 74 68 65 20 76 69 73 or.a.second.pass.to.make.the.vis
53000 69 62 6c 65 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 61 73 20 70 ible.parameters..........//.as.p
53020 72 65 74 74 79 20 61 6e 64 20 73 65 6e 73 69 62 6c 65 20 61 73 20 70 6f 73 73 69 62 6c 65 0d 0a retty.and.sensible.as.possible..
53040 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 69 6d 70 6f ........for.(int.i.=.0;.i.<.impo
53060 72 74 50 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 rtParameters.Count;.i++)........
53080 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 ..{..............FunctionImportP
530a0 61 72 61 6d 65 74 65 72 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 3d 20 69 6d 70 6f 72 arameter.importParameter.=.impor
530c0 74 50 61 72 61 6d 65 74 65 72 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 tParameters[i];..............if.
530e0 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 (importParameter.NeedsLocalVaria
53100 62 6c 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 20 20 20 20 20 ble)..............{.............
53120 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 .....importParameter.LocalVariab
53140 6c 65 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 leName.=.unique.AdjustIdentifier
53160 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 (importParameter.RawFunctionPara
53180 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 50 61 72 61 6d 65 74 65 72 22 29 3b 0d 0a 20 20 20 20 20 meterName.+."Parameter");.......
531a0 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 45 78 65 63 75 ...........importParameter.Execu
531c0 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 teParameterName.=.importParamete
531e0 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 r.LocalVariableName;............
53200 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 72 65 74 75 72 6e ..}..........}............return
53220 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 .importParameters;......}.......
53240 20 2f 2f 0d 0a 20 20 20 20 2f 2f 20 43 6c 61 73 73 20 74 6f 20 63 72 65 61 74 65 20 75 6e 69 71 .//......//.Class.to.create.uniq
53260 75 65 20 76 61 72 69 61 62 6c 65 73 20 77 69 74 68 69 6e 20 74 68 65 20 73 61 6d 65 20 73 63 6f ue.variables.within.the.same.sco
53280 70 65 0d 0a 20 20 20 20 2f 2f 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 65 61 6c 65 64 20 63 pe......//......private.sealed.c
532a0 6c 61 73 73 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 0d 0a 20 20 lass.UniqueIdentifierService....
532c0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 48 61 ..{..........private.readonly.Ha
532e0 73 68 53 65 74 3c 73 74 72 69 6e 67 3e 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 3b shSet<string>._knownIdentifiers;
53300 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 ............public.UniqueIdentif
53320 69 65 72 53 65 72 76 69 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ierService()..........{.........
53340 20 20 20 20 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 3d 20 6e 65 77 20 48 61 73 ....._knownIdentifiers.=.new.Has
53360 68 53 65 74 3c 73 74 72 69 6e 67 3e 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 4f 72 64 69 hSet<string>(StringComparer.Ordi
53380 6e 61 6c 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 nal);..........}............///.
533a0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 69 76 65 6e 20 61 6e 20 <summary>..........///.Given.an.
533c0 69 64 65 6e 74 69 66 69 65 72 2c 20 6d 61 6b 65 73 20 69 74 20 75 6e 69 71 75 65 20 77 69 74 68 identifier,.makes.it.unique.with
533e0 69 6e 20 74 68 65 20 73 63 6f 70 65 20 62 79 20 61 64 64 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 in.the.scope.by.adding..........
53400 2f 2f 2f 20 61 20 73 75 66 66 69 78 20 28 31 2c 20 32 2c 20 33 2c 20 2e 2e 2e 29 2c 20 61 6e 64 ///.a.suffix.(1,.2,.3,....),.and
53420 20 72 65 74 75 72 6e 73 20 74 68 65 20 61 64 6a 75 73 74 65 64 20 69 64 65 6e 74 69 66 69 65 72 .returns.the.adjusted.identifier
53440 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>.......
53460 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 ...public.string.AdjustIdentifie
53480 72 28 73 74 72 69 6e 67 20 69 64 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d r(string.identifier)..........{.
534a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 66 69 6e 64 20 61 20 75 6e 69 71 75 65 20 6e 61 .............//.find.a.unique.na
534c0 6d 65 20 62 79 20 61 64 64 69 6e 67 20 73 75 66 66 69 78 20 61 73 20 6e 65 63 65 73 73 61 72 79 me.by.adding.suffix.as.necessary
534e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 ..............int.numberOfConfli
53500 63 74 73 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 61 64 6a cts.=.0;..............string.adj
53520 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 69 66 69 65 72 3b 0d 0a 0d ustedIdentifier.=.identifier;...
53540 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 21 5f 6b 6e 6f 77 6e 49 64 65 6e 74 .............while.(!_knownIdent
53560 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 29 29 0d ifiers.Add(adjustedIdentifier)).
53580 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 .............{..................
535a0 2b 2b 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ++numberOfConflicts;............
535c0 20 20 20 20 20 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 ......adjustedIdentifier.=.ident
535e0 69 66 69 65 72 20 2b 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 2e 54 6f 53 74 72 69 ifier.+.numberOfConflicts.ToStri
53600 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 ng(CultureInfo.InvariantCulture)
53620 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 ;..............}................
53640 72 65 74 75 72 6e 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 3b 0d 0a 20 20 20 20 return.adjustedIdentifier;......
53660 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ....}......}..}....///.<summary>
53680 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6d 61 72 6b 69 6e 67 20 74 68 ..///.Responsible.for.marking.th
536a0 65 20 76 61 72 69 6f 75 73 20 73 65 63 74 69 6f 6e 73 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 e.various.sections.of.the.genera
536c0 74 69 6f 6e 2c 0d 0a 2f 2f 2f 20 73 6f 20 74 68 65 79 20 63 61 6e 20 62 65 20 73 70 6c 69 74 20 tion,..///.so.they.can.be.split.
536e0 75 70 20 69 6e 74 6f 20 73 65 70 61 72 61 74 65 20 66 69 6c 65 73 0d 0a 2f 2f 2f 20 3c 2f 73 75 up.into.separate.files..///.</su
53700 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 45 6e 74 69 74 79 46 72 61 6d 65 mmary>..public.class.EntityFrame
53720 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 7b 0d 0a 20 20 20 20 workTemplateFileManager..{......
53740 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 74 ///.<summary>......///.Creates.t
53760 68 65 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 he.VsEntityFrameworkTemplateFile
53780 4d 61 6e 61 67 65 72 20 69 66 20 56 53 20 69 73 20 64 65 74 65 63 74 65 64 2c 20 6f 74 68 65 72 Manager.if.VS.is.detected,.other
537a0 77 69 73 65 0d 0a 20 20 20 20 2f 2f 2f 20 63 72 65 61 74 65 73 20 74 68 65 20 66 69 6c 65 20 73 wise......///.creates.the.file.s
537c0 79 73 74 65 6d 20 76 65 72 73 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 ystem.version.......///.</summar
537e0 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 45 6e 74 69 74 79 46 72 61 6d y>......public.static.EntityFram
53800 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 43 72 65 61 74 65 28 eworkTemplateFileManager.Create(
53820 6f 62 6a 65 63 74 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 object.textTransformation)......
53840 7b 0d 0a 20 20 20 20 20 20 20 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 {..........DynamicTextTransforma
53860 74 69 6f 6e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 tion.transformation.=.DynamicTex
53880 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 tTransformation.Create(textTrans
538a0 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 49 44 79 6e 61 6d 69 63 48 6f 73 formation);..........IDynamicHos
538c0 74 20 68 6f 73 74 20 3d 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 3b 0d 0a 0d t.host.=.transformation.Host;...
538e0 0a 23 69 66 20 21 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 20 .#if.!PREPROCESSED_TEMPLATE.....
53900 20 20 20 20 20 76 61 72 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 3d 20 68 .....var.hostServiceProvider.=.h
53920 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 0d 0a 20 20 20 ost.AsIServiceProvider();.......
53940 20 20 20 20 20 69 66 20 28 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 21 3d 20 .....if.(hostServiceProvider.!=.
53960 6e 75 6c 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 45 6e null)..........{..............En
53980 76 44 54 45 2e 44 54 45 20 64 74 65 20 3d 20 28 45 6e 76 44 54 45 2e 44 54 45 29 20 68 6f 73 74 vDTE.DTE.dte.=.(EnvDTE.DTE).host
539a0 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 2e 47 65 74 53 65 72 76 69 63 65 28 74 79 70 65 6f ServiceProvider.GetService(typeo
539c0 66 28 45 6e 76 44 54 45 2e 44 54 45 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 f(EnvDTE.DTE));................i
539e0 66 20 28 64 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a f.(dte.!=.null)..............{..
53a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 56 73 45 6e 74 ................return.new.VsEnt
53a20 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 ityFrameworkTemplateFileManager(
53a40 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d transformation);..............}.
53a60 0a 20 20 20 20 20 20 20 20 7d 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 .........}..#endif..........retu
53a80 72 6e 20 6e 65 77 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 rn.new.EntityFrameworkTemplateFi
53aa0 6c 65 4d 61 6e 61 67 65 72 28 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 leManager(transformation);......
53ac0 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 65 61 6c 65 64 20 63 6c 61 73 73 20 42 6c }........private.sealed.class.Bl
53ae0 6f 63 6b 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 53 74 72 69 6e ock......{..........public.Strin
53b00 67 20 4e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 53 74 61 72 g.Name;..........public.int.Star
53b20 74 2c 20 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 t,.Length;......}........private
53b40 20 72 65 61 64 6f 6e 6c 79 20 4c 69 73 74 3c 42 6c 6f 63 6b 3e 20 66 69 6c 65 73 20 3d 20 6e 65 .readonly.List<Block>.files.=.ne
53b60 77 20 4c 69 73 74 3c 42 6c 6f 63 6b 3e 28 29 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 w.List<Block>();......private.re
53b80 61 64 6f 6e 6c 79 20 42 6c 6f 63 6b 20 66 6f 6f 74 65 72 20 3d 20 6e 65 77 20 42 6c 6f 63 6b 28 adonly.Block.footer.=.new.Block(
53ba0 29 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 42 6c 6f 63 6b 20 68 );......private.readonly.Block.h
53bc0 65 61 64 65 72 20 3d 20 6e 65 77 20 42 6c 6f 63 6b 28 29 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 eader.=.new.Block();......privat
53be0 65 20 72 65 61 64 6f 6e 6c 79 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 e.readonly.DynamicTextTransforma
53c00 74 69 6f 6e 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 tion._textTransformation;.......
53c20 20 2f 2f 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 47 65 6e 65 72 61 74 69 6f 6e 45 .//.reference.to.the.GenerationE
53c40 6e 76 69 72 6f 6e 6d 65 6e 74 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 6f 6e 20 74 68 65 0d nvironment.StringBuilder.on.the.
53c60 0a 20 20 20 20 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6f 62 6a 65 63 .....//.TextTransformation.objec
53c80 74 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 53 74 72 69 6e 67 42 75 t......private.readonly.StringBu
53ca0 69 6c 64 65 72 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 3b 0d 0a 0d ilder._generationEnvironment;...
53cc0 0a 20 20 20 20 70 72 69 76 61 74 65 20 42 6c 6f 63 6b 20 63 75 72 72 65 6e 74 42 6c 6f 63 6b 3b .....private.Block.currentBlock;
53ce0 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 ........///.<summary>......///.I
53d00 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d nitializes.an.EntityFrameworkTem
53d20 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 49 6e 73 74 61 6e 63 65 20 20 77 69 74 68 20 plateFileManager.Instance..with.
53d40 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 the......///.TextTransformation.
53d60 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 (T4.generated.class).that.is.cur
53d80 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 rently.running......///.</summar
53da0 79 3e 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 y>......private.EntityFrameworkT
53dc0 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 6f 62 6a 65 63 74 20 74 65 78 74 54 72 emplateFileManager(object.textTr
53de0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 ansformation)......{..........if
53e00 20 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 .(textTransformation.==.null)...
53e20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 .......{..............throw.new.
53e40 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 ArgumentNullException("textTrans
53e60 66 6f 72 6d 61 74 69 6f 6e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 formation");..........}.........
53e80 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 ..._textTransformation.=.Dynamic
53ea0 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 TextTransformation.Create(textTr
53ec0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 ansformation);.........._generat
53ee0 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 ionEnvironment.=._textTransforma
53f00 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 3b 0d 0a 20 20 20 tion.GenerationEnvironment;.....
53f20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f .}........///.<summary>......///
53f40 20 4d 61 72 6b 73 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 6c 61 73 74 20 66 69 6c 65 20 .Marks.the.end.of.the.last.file.
53f60 69 66 20 74 68 65 72 65 20 77 61 73 20 6f 6e 65 2c 20 61 6e 64 20 73 74 61 72 74 73 20 61 20 6e if.there.was.one,.and.starts.a.n
53f80 65 77 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 64 20 6d 61 72 6b 73 20 74 68 69 73 20 70 6f 69 6e 74 ew......///.and.marks.this.point
53fa0 20 69 6e 20 67 65 6e 65 72 61 74 69 6f 6e 20 61 73 20 61 20 6e 65 77 20 66 69 6c 65 2e 0d 0a 20 .in.generation.as.a.new.file....
53fc0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f ...///.</summary>......public.vo
53fe0 69 64 20 53 74 61 72 74 4e 65 77 46 69 6c 65 28 73 74 72 69 6e 67 20 6e 61 6d 65 29 0d 0a 20 20 id.StartNewFile(string.name)....
54000 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 6e 61 6d 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a ..{..........if.(name.==.null)..
54020 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 ........{..............throw.new
54040 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 6d 65 22 29 3b 0d .ArgumentNullException("name");.
54060 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f .........}............CurrentBlo
54080 63 6b 20 3d 20 6e 65 77 20 42 6c 6f 63 6b 20 7b 20 4e 61 6d 65 20 3d 20 6e 61 6d 65 20 7d 3b 0d ck.=.new.Block.{.Name.=.name.};.
540a0 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 74 61 72 74 46 .....}........public.void.StartF
540c0 6f 6f 74 65 72 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 ooter()......{..........CurrentB
540e0 6c 6f 63 6b 20 3d 20 66 6f 6f 74 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 lock.=.footer;......}........pub
54100 6c 69 63 20 76 6f 69 64 20 53 74 61 72 74 48 65 61 64 65 72 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 lic.void.StartHeader()......{...
54120 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 68 65 61 64 65 72 3b 0d 0a 20 .......CurrentBlock.=.header;...
54140 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e 64 42 6c 6f 63 6b ...}........public.void.EndBlock
54160 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 43 75 72 72 65 6e 74 42 6c ()......{..........if.(CurrentBl
54180 6f 63 6b 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ock.==.null)..........{.........
541a0 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 .....return;..........}.........
541c0 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 2e 4c 65 6e 67 74 68 20 3d 20 5f 67 65 6e 65 72 61 ...CurrentBlock.Length.=._genera
541e0 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 2d 20 43 75 72 72 65 6e 74 tionEnvironment.Length.-.Current
54200 42 6c 6f 63 6b 2e 53 74 61 72 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 43 75 72 72 Block.Start;............if.(Curr
54220 65 6e 74 42 6c 6f 63 6b 20 21 3d 20 68 65 61 64 65 72 20 26 26 20 43 75 72 72 65 6e 74 42 6c 6f entBlock.!=.header.&&.CurrentBlo
54240 63 6b 20 21 3d 20 66 6f 6f 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ck.!=.footer)..........{........
54260 20 20 20 20 20 20 66 69 6c 65 73 2e 41 64 64 28 43 75 72 72 65 6e 74 42 6c 6f 63 6b 29 3b 0d 0a ......files.Add(CurrentBlock);..
54280 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 42 6c 6f 63 ........}............currentBloc
542a0 6b 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d k.=.null;......}........///.<sum
542c0 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 50 72 6f 64 75 63 65 20 74 68 65 20 74 65 6d 70 6c mary>......///.Produce.the.templ
542e0 61 74 65 20 6f 75 74 70 75 74 20 66 69 6c 65 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ate.output.files.......///.</sum
54300 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 69 72 74 75 61 6c 20 49 45 6e 75 6d 65 mary>......public.virtual.IEnume
54320 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 50 72 6f 63 65 73 73 28 62 6f 6f 6c 20 73 70 6c 69 74 rable<string>.Process(bool.split
54340 20 3d 20 74 72 75 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 76 61 72 20 67 65 6e .=.true)......{..........var.gen
54360 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 73 74 72 69 6e eratedFileNames.=.new.List<strin
54380 67 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 70 6c 69 74 29 0d 0a 20 20 20 g>();............if.(split).....
543a0 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 42 6c 6f 63 6b 28 29 3b 0d .....{..............EndBlock();.
543c0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 65 61 64 65 72 54 65 78 74 20 3d 20 ...............var.headerText.=.
543e0 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 _generationEnvironment.ToString(
54400 68 65 61 64 65 72 2e 53 74 61 72 74 2c 20 68 65 61 64 65 72 2e 4c 65 6e 67 74 68 29 3b 0d 0a 20 header.Start,.header.Length);...
54420 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 66 6f 6f 74 65 72 54 65 78 74 20 3d 20 5f 67 65 6e ...........var.footerText.=._gen
54440 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 66 6f 6f 74 erationEnvironment.ToString(foot
54460 65 72 2e 53 74 61 72 74 2c 20 66 6f 6f 74 65 72 2e 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 20 20 er.Start,.footer.Length);.......
54480 20 20 20 20 20 20 20 76 61 72 20 6f 75 74 70 75 74 50 61 74 68 20 3d 20 50 61 74 68 2e 47 65 74 .......var.outputPath.=.Path.Get
544a0 44 69 72 65 63 74 6f 72 79 4e 61 6d 65 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f DirectoryName(_textTransformatio
544c0 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 n.Host.TemplateFile);...........
544e0 20 20 20 20 20 66 69 6c 65 73 2e 52 65 76 65 72 73 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 .....files.Reverse();...........
54500 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 62 6c 6f 63 6b 20 69 6e 20 66 69 6c 65 73 .....foreach.(var.block.in.files
54520 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 )..............{................
54540 20 20 76 61 72 20 66 69 6c 65 4e 61 6d 65 20 3d 20 50 61 74 68 2e 43 6f 6d 62 69 6e 65 28 6f 75 ..var.fileName.=.Path.Combine(ou
54560 74 70 75 74 50 61 74 68 2c 20 62 6c 6f 63 6b 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 tputPath,.block.Name);..........
54580 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 65 6e 74 20 3d 20 68 65 61 64 65 72 54 65 78 74 ........var.content.=.headerText
545a0 20 2b 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 .+._generationEnvironment.ToStri
545c0 6e 67 28 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 6e 67 74 68 29 20 2b 20 ng(block.Start,.block.Length).+.
545e0 66 6f 6f 74 65 72 54 65 78 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 footerText;....................g
54600 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 2e 41 64 64 28 66 69 6c 65 4e 61 6d 65 29 3b eneratedFileNames.Add(fileName);
54620 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 46 69 6c 65 28 66 69 6c ..................CreateFile(fil
54640 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eName,.content);................
54660 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 52 65 6d 6f 76 65 28 .._generationEnvironment.Remove(
54680 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 block.Start,.block.Length);.....
546a0 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 .........}..........}...........
546c0 20 72 65 74 75 72 6e 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 3b 0d 0a 20 20 20 .return.generatedFileNames;.....
546e0 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 76 69 72 74 75 61 6c 20 76 6f 69 64 .}........protected.virtual.void
54700 20 43 72 65 61 74 65 46 69 6c 65 28 73 74 72 69 6e 67 20 66 69 6c 65 4e 61 6d 65 2c 20 73 74 72 .CreateFile(string.fileName,.str
54720 69 6e 67 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 ing.content)......{..........if.
54740 28 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 66 69 6c 65 4e 61 6d 65 (IsFileContentDifferent(fileName
54760 2c 20 63 6f 6e 74 65 6e 74 29 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ,.content))..........{..........
54780 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 ....File.WriteAllText(fileName,.
547a0 63 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 content);..........}......}.....
547c0 20 20 20 70 72 6f 74 65 63 74 65 64 20 62 6f 6f 6c 20 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 ...protected.bool.IsFileContentD
547e0 69 66 66 65 72 65 6e 74 28 53 74 72 69 6e 67 20 66 69 6c 65 4e 61 6d 65 2c 20 73 74 72 69 6e 67 ifferent(String.fileName,.string
54800 20 6e 65 77 43 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 .newContent)......{..........ret
54820 75 72 6e 20 21 28 46 69 6c 65 2e 45 78 69 73 74 73 28 66 69 6c 65 4e 61 6d 65 29 20 26 26 20 46 urn.!(File.Exists(fileName).&&.F
54840 69 6c 65 2e 52 65 61 64 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 29 20 3d 3d 20 6e 65 77 ile.ReadAllText(fileName).==.new
54860 43 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 Content);......}........private.
54880 42 6c 6f 63 6b 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 Block.CurrentBlock......{.......
548a0 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 63 75 72 72 65 6e 74 42 6c 6f 63 6b 3b 20 7d 0d ...get.{.return.currentBlock;.}.
548c0 0a 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .........set..........{.........
548e0 20 20 20 20 20 69 66 20 28 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 21 3d 20 6e 75 6c 6c 29 0d 0a .....if.(CurrentBlock.!=.null)..
54900 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 45 ............{..................E
54920 6e 64 42 6c 6f 63 6b 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 ndBlock();..............}.......
54940 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 .........if.(value.!=.null).....
54960 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 76 61 6c 75 .........{..................valu
54980 65 2e 53 74 61 72 74 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 e.Start.=._generationEnvironment
549a0 2e 4c 65 6e 67 74 68 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 .Length;..............}.........
549c0 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 .......currentBlock.=.value;....
549e0 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 23 69 66 20 21 50 52 45 50 52 4f 43 45 53 ......}......}....#if.!PREPROCES
54a00 53 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 73 65 61 6c 65 64 SED_TEMPLATE......private.sealed
54a20 20 63 6c 61 73 73 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 .class.VsEntityFrameworkTemplate
54a40 46 69 6c 65 4d 61 6e 61 67 65 72 20 3a 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d FileManager.:.EntityFrameworkTem
54a60 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 plateFileManager......{.........
54a80 20 70 72 69 76 61 74 65 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 20 74 65 6d 70 .private.EnvDTE.ProjectItem.temp
54aa0 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 lateProjectItem;..........privat
54ac0 65 20 45 6e 76 44 54 45 2e 44 54 45 20 64 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 e.EnvDTE.DTE.dte;..........priva
54ae0 74 65 20 41 63 74 69 6f 6e 3c 73 74 72 69 6e 67 3e 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e te.Action<string>.checkOutAction
54b00 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 3c 49 45 6e 75 6d 65 ;..........private.Action<IEnume
54b20 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 3e 20 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e rable<string>>.projectSyncAction
54b40 3b 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>......
54b60 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 ....///.Creates.an.instance.of.t
54b80 68 65 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 he.VsEntityFrameworkTemplateFile
54ba0 4d 61 6e 61 67 65 72 20 63 6c 61 73 73 20 77 69 74 68 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 Manager.class.with.the.IDynamicH
54bc0 6f 73 74 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d ost.instance..........///.</summ
54be0 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 73 45 6e 74 69 74 79 46 72 61 ary>..........public.VsEntityFra
54c00 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 6f 62 6a 65 63 74 meworkTemplateFileManager(object
54c20 20 74 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 .textTemplating)..............:.
54c40 62 61 73 65 28 74 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d base(textTemplating)..........{.
54c60 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 .............var.hostServiceProv
54c80 69 64 65 72 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e ider.=._textTransformation.Host.
54ca0 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 AsIServiceProvider();...........
54cc0 20 20 20 69 66 20 28 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 3d 3d 20 6e 75 ...if.(hostServiceProvider.==.nu
54ce0 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ll)..............{..............
54d00 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
54d20 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 6f 62 74 61 69 6e 20 68 6f 73 74 53 65 72 76 69 63 ion("Could.not.obtain.hostServic
54d40 65 50 72 6f 76 69 64 65 72 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 eProvider");..............}.....
54d60 20 20 20 20 20 20 20 20 20 20 20 64 74 65 20 3d 20 28 45 6e 76 44 54 45 2e 44 54 45 29 20 68 6f ...........dte.=.(EnvDTE.DTE).ho
54d80 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 2e 47 65 74 53 65 72 76 69 63 65 28 74 79 70 stServiceProvider.GetService(typ
54da0 65 6f 66 28 45 6e 76 44 54 45 2e 44 54 45 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 eof(EnvDTE.DTE));..............i
54dc0 66 20 28 64 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 7b 0d 0a f.(dte.==.null)..............{..
54de0 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
54e00 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 6f 62 74 61 69 ntNullException("Could.not.obtai
54e20 6e 20 44 54 45 20 66 72 6f 6d 20 68 6f 73 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 n.DTE.from.host");..............
54e40 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 }................templateProject
54e60 49 74 65 6d 20 3d 20 64 74 65 2e 53 6f 6c 75 74 69 6f 6e 2e 46 69 6e 64 50 72 6f 6a 65 63 74 49 Item.=.dte.Solution.FindProjectI
54e80 74 65 6d 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d tem(_textTransformation.Host.Tem
54ea0 70 6c 61 74 65 46 69 6c 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 65 63 6b plateFile);................check
54ec0 4f 75 74 41 63 74 69 6f 6e 20 3d 20 66 69 6c 65 4e 61 6d 65 20 3d 3e 20 64 74 65 2e 53 6f 75 72 OutAction.=.fileName.=>.dte.Sour
54ee0 63 65 43 6f 6e 74 72 6f 6c 2e 43 68 65 63 6b 4f 75 74 49 74 65 6d 28 66 69 6c 65 4e 61 6d 65 29 ceControl.CheckOutItem(fileName)
54f00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e ;..............projectSyncAction
54f20 20 3d 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 20 3d 3e 20 50 72 6f 6a 65 63 74 53 79 6e 63 28 .=.keepFileNames.=>.ProjectSync(
54f40 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2c 20 6b 65 65 70 46 69 6c 65 4e 61 6d templateProjectItem,.keepFileNam
54f60 65 73 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 es);..........}............publi
54f80 63 20 6f 76 65 72 72 69 64 65 20 49 45 6e 75 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 50 c.override.IEnumerable<string>.P
54fa0 72 6f 63 65 73 73 28 62 6f 6f 6c 20 73 70 6c 69 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 rocess(bool.split)..........{...
54fc0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 ...........if.(templateProjectIt
54fe0 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 em.ProjectItems.==.null)........
55000 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 ......{..................return.
55020 6e 65 77 20 4c 69 73 74 3c 73 74 72 69 6e 67 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 new.List<string>();.............
55040 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 67 65 6e 65 72 61 74 65 64 46 .}................var.generatedF
55060 69 6c 65 4e 61 6d 65 73 20 3d 20 62 61 73 65 2e 50 72 6f 63 65 73 73 28 73 70 6c 69 74 29 3b 0d ileNames.=.base.Process(split);.
55080 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e ...............projectSyncAction
550a0 2e 45 6e 64 49 6e 76 6f 6b 65 28 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e 2e 42 65 67 .EndInvoke(projectSyncAction.Beg
550c0 69 6e 49 6e 76 6f 6b 65 28 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 2c 20 6e 75 6c inInvoke(generatedFileNames,.nul
550e0 6c 2c 20 6e 75 6c 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e l,.null));................return
55100 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d .generatedFileNames;..........}.
55120 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f ...........protected.override.vo
55140 69 64 20 43 72 65 61 74 65 46 69 6c 65 28 73 74 72 69 6e 67 20 66 69 6c 65 4e 61 6d 65 2c 20 73 id.CreateFile(string.fileName,.s
55160 74 72 69 6e 67 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 tring.content)..........{.......
55180 20 20 20 20 20 20 20 69 66 20 28 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e .......if.(IsFileContentDifferen
551a0 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 t(fileName,.content))...........
551c0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 68 65 63 6b 6f 75 74 46 69 ...{..................CheckoutFi
551e0 6c 65 49 66 52 65 71 75 69 72 65 64 28 66 69 6c 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 leIfRequired(fileName);.........
55200 20 20 20 20 20 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e .........File.WriteAllText(fileN
55220 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 ame,.content);..............}...
55240 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 73 74 61 74 .......}............private.stat
55260 69 63 20 76 6f 69 64 20 50 72 6f 6a 65 63 74 53 79 6e 63 28 45 6e 76 44 54 45 2e 50 72 6f 6a 65 ic.void.ProjectSync(EnvDTE.Proje
55280 63 74 49 74 65 6d 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2c 20 49 45 6e 75 ctItem.templateProjectItem,.IEnu
552a0 6d 65 72 61 62 6c 65 3c 73 74 72 69 6e 67 3e 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 0d 0a merable<string>.keepFileNames)..
552c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6b 65 65 70 46 ........{..............var.keepF
552e0 69 6c 65 4e 61 6d 65 53 65 74 20 3d 20 6e 65 77 20 48 61 73 68 53 65 74 3c 73 74 72 69 6e 67 3e ileNameSet.=.new.HashSet<string>
55300 28 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 (keepFileNames);..............va
55320 72 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c r.projectFiles.=.new.Dictionary<
55340 73 74 72 69 6e 67 2c 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 3e 28 29 3b 0d 0a string,.EnvDTE.ProjectItem>();..
55360 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6f 72 69 67 69 6e 61 6c 4f 75 74 70 75 74 20 3d ............var.originalOutput.=
55380 20 50 61 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f .Path.GetFileNameWithoutExtensio
553a0 6e 28 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 46 69 6c 65 4e 61 6d 65 73 5b n(templateProjectItem.FileNames[
553c0 30 5d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 45 6e 76 0]);................foreach.(Env
553e0 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 20 70 72 6f 6a 65 63 74 49 74 65 6d 20 69 6e 20 74 DTE.ProjectItem.projectItem.in.t
55400 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 29 emplateProjectItem.ProjectItems)
55420 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 ..............{.................
55440 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 2e 41 64 64 28 70 72 6f 6a 65 63 74 49 74 65 6d 2e 46 69 .projectFiles.Add(projectItem.Fi
55460 6c 65 4e 61 6d 65 73 5b 30 5d 2c 20 70 72 6f 6a 65 63 74 49 74 65 6d 29 3b 0d 0a 20 20 20 20 20 leNames[0],.projectItem);.......
55480 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 6d 6f 76 .......}................//.Remov
554a0 65 20 75 6e 75 73 65 64 20 69 74 65 6d 73 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 6a 65 63 74 0d e.unused.items.from.the.project.
554c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 70 61 69 72 20 69 .............foreach.(var.pair.i
554e0 6e 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a n.projectFiles)..............{..
55500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6b 65 65 70 46 69 6c 65 4e 61 6d ................if.(!keepFileNam
55520 65 73 2e 43 6f 6e 74 61 69 6e 73 28 70 61 69 72 2e 4b 65 79 29 0d 0a 20 20 20 20 20 20 20 20 20 es.Contains(pair.Key)...........
55540 20 20 20 20 20 20 20 20 20 20 20 26 26 20 21 28 50 61 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 ...........&&.!(Path.GetFileName
55560 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 70 61 69 72 2e 4b 65 79 29 20 2b 20 22 2e 22 WithoutExtension(pair.Key).+."."
55580 29 2e 53 74 61 72 74 73 57 69 74 68 28 6f 72 69 67 69 6e 61 6c 4f 75 74 70 75 74 20 2b 20 22 2e ).StartsWith(originalOutput.+.".
555a0 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 "))..................{..........
555c0 20 20 20 20 20 20 20 20 20 20 20 20 70 61 69 72 2e 56 61 6c 75 65 2e 44 65 6c 65 74 65 28 29 3b ............pair.Value.Delete();
555e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
55600 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6d 69 73 73 69 6e 67 .}................//.Add.missing
55620 20 66 69 6c 65 73 20 74 6f 20 74 68 65 20 70 72 6f 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 .files.to.the.project...........
55640 20 20 20 66 6f 72 65 61 63 68 20 28 73 74 72 69 6e 67 20 66 69 6c 65 4e 61 6d 65 20 69 6e 20 6b ...foreach.(string.fileName.in.k
55660 65 65 70 46 69 6c 65 4e 61 6d 65 53 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a eepFileNameSet)..............{..
55680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 70 72 6f 6a 65 63 74 46 69 6c 65 ................if.(!projectFile
556a0 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 66 69 6c 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 s.ContainsKey(fileName))........
556c0 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 ..........{.....................
556e0 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d .templateProjectItem.ProjectItem
55700 73 2e 41 64 64 46 72 6f 6d 46 69 6c 65 28 66 69 6c 65 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 s.AddFromFile(fileName);........
55720 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ..........}..............}......
55740 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 43 68 ....}............private.void.Ch
55760 65 63 6b 6f 75 74 46 69 6c 65 49 66 52 65 71 75 69 72 65 64 28 73 74 72 69 6e 67 20 66 69 6c 65 eckoutFileIfRequired(string.file
55780 4e 61 6d 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 Name)..........{..............if
557a0 20 28 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 0d 0a 20 20 20 .(dte.SourceControl.==.null.....
557c0 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 21 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 .............||.!dte.SourceContr
557e0 6f 6c 2e 49 73 49 74 65 6d 55 6e 64 65 72 53 43 43 28 66 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 ol.IsItemUnderSCC(fileName).....
55800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 64 74 65 2e 53 6f 75 72 63 65 43 6f .................||.dte.SourceCo
55820 6e 74 72 6f 6c 2e 49 73 49 74 65 6d 43 68 65 63 6b 65 64 4f 75 74 28 66 69 6c 65 4e 61 6d 65 29 ntrol.IsItemCheckedOut(fileName)
55840 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 )..............{................
55860 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ..return;..............}........
55880 20 20 20 20 20 20 20 20 2f 2f 20 72 75 6e 20 6f 6e 20 77 6f 72 6b 65 72 20 74 68 72 65 61 64 20 ........//.run.on.worker.thread.
558a0 74 6f 20 70 72 65 76 65 6e 74 20 54 34 20 63 61 6c 6c 69 6e 67 20 62 61 63 6b 20 69 6e 74 6f 20 to.prevent.T4.calling.back.into.
558c0 56 53 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 2e 45 VS..............checkOutAction.E
558e0 6e 64 49 6e 76 6f 6b 65 28 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 2e 42 65 67 69 6e 49 6e 76 ndInvoke(checkOutAction.BeginInv
55900 6f 6b 65 28 66 69 6c 65 4e 61 6d 65 2c 20 6e 75 6c 6c 2c 20 6e 75 6c 6c 29 29 3b 0d 0a 20 20 20 oke(fileName,.null,.null));.....
55920 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 23 65 6e 64 69 66 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 .....}......}..#endif..}....///.
55940 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 63 72 65 61 74 <summary>..///.Responsible.creat
55960 69 6e 67 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 74 68 61 74 20 63 61 6e 20 62 65 20 70 61 73 73 ing.an.instance.that.can.be.pass
55980 65 64 0d 0a 2f 2f 2f 20 74 6f 20 68 65 6c 70 65 72 20 63 6c 61 73 73 65 73 20 74 68 61 74 20 6e ed..///.to.helper.classes.that.n
559a0 65 65 64 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 eed.to.access.the.TextTransforma
559c0 74 69 6f 6e 0d 0a 2f 2f 2f 20 6d 65 6d 62 65 72 73 2e 20 20 49 74 20 61 63 63 65 73 73 65 73 20 tion..///.members...It.accesses.
559e0 6d 65 6d 62 65 72 20 62 79 20 6e 61 6d 65 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 72 61 74 member.by.name.and.signature.rat
55a00 68 65 72 20 74 68 61 6e 0d 0a 2f 2f 2f 20 62 79 20 74 79 70 65 2e 20 20 54 68 69 73 20 69 73 20 her.than..///.by.type...This.is.
55a20 6e 65 63 65 73 73 61 72 79 20 77 68 65 6e 20 74 68 65 0d 0a 2f 2f 2f 20 74 65 6d 70 6c 61 74 65 necessary.when.the..///.template
55a40 20 69 73 20 62 65 69 6e 67 20 75 73 65 64 20 69 6e 20 50 72 65 70 72 6f 63 65 73 73 65 64 20 6d .is.being.used.in.Preprocessed.m
55a60 6f 64 65 0d 0a 2f 2f 2f 20 61 6e 64 20 74 68 65 72 65 20 69 73 20 6e 6f 20 63 6f 6d 6d 6f 6e 20 ode..///.and.there.is.no.common.
55a80 6b 6e 6f 77 6e 20 74 79 70 65 20 74 68 61 74 20 63 61 6e 20 62 65 0d 0a 2f 2f 2f 20 70 61 73 73 known.type.that.can.be..///.pass
55aa0 65 64 20 69 6e 73 74 65 61 64 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c ed.instead..///.</summary>..publ
55ac0 69 63 20 63 6c 61 73 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 ic.class.DynamicTextTransformati
55ae0 6f 6e 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 6f 62 6a 65 63 74 20 5f 69 6e 73 74 61 on..{......private.object._insta
55b00 6e 63 65 3b 0d 0a 20 20 20 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 5f 64 79 6e 61 6d 69 63 48 nce;......IDynamicHost._dynamicH
55b20 6f 73 74 3b 0d 0a 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 ost;........private.readonly.Met
55b40 68 6f 64 49 6e 66 6f 20 5f 77 72 69 74 65 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 hodInfo._write;......private.rea
55b60 64 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 6e 66 6f 20 5f 77 72 69 74 65 4c 69 6e 65 3b 0d 0a 20 20 donly.MethodInfo._writeLine;....
55b80 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 ..private.readonly.PropertyInfo.
55ba0 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 3b 0d 0a 20 20 20 20 70 72 69 _generationEnvironment;......pri
55bc0 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 5f 65 72 72 6f vate.readonly.PropertyInfo._erro
55be0 72 73 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 50 72 6f 70 65 72 rs;......private.readonly.Proper
55c00 74 79 49 6e 66 6f 20 5f 68 6f 73 74 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 tyInfo._host;........///.<summar
55c20 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 y>......///.Creates.an.instance.
55c40 6f 66 20 74 68 65 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e of.the.DynamicTextTransformation
55c60 20 63 6c 61 73 73 20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 0d 0a 20 20 20 .class.around.the.passed.in.....
55c80 20 2f 2f 2f 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 68 61 70 70 65 64 20 .///.TextTransformation.shapped.
55ca0 69 6e 73 74 61 6e 63 65 20 70 61 73 73 65 64 20 69 6e 2c 20 6f 72 20 69 66 20 74 68 65 20 70 61 instance.passed.in,.or.if.the.pa
55cc0 73 73 65 64 20 69 6e 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 6c 72 65 61 64 ssed.in.instance......///.alread
55ce0 79 20 69 73 20 61 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e y.is.a.DynamicTextTransformation
55d00 2c 20 69 74 20 63 61 73 74 73 20 69 74 20 61 6e 64 20 73 65 6e 64 73 20 69 74 20 62 61 63 6b 2e ,.it.casts.it.and.sends.it.back.
55d20 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 20 70 75 62 6c 69 63 ......///.</summary>......public
55d40 20 73 74 61 74 69 63 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f .static.DynamicTextTransformatio
55d60 6e 20 43 72 65 61 74 65 28 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 29 0d 0a 20 20 20 20 7b n.Create(object.instance)......{
55d80 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 73 74 61 6e 63 65 20 3d 3d 20 6e 75 6c 6c 29 0d ..........if.(instance.==.null).
55da0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 .........{..............throw.ne
55dc0 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 69 6e 73 74 61 6e 63 w.ArgumentNullException("instanc
55de0 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 79 6e 61 6d e");..........}............Dynam
55e00 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 74 65 78 74 54 72 61 6e 73 66 6f icTextTransformation.textTransfo
55e20 72 6d 61 74 69 6f 6e 20 3d 20 69 6e 73 74 61 6e 63 65 20 61 73 20 44 79 6e 61 6d 69 63 54 65 78 rmation.=.instance.as.DynamicTex
55e40 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 74 65 tTransformation;..........if.(te
55e60 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 xtTransformation.!=.null).......
55e80 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 65 78 74 54 72 61 ...{..............return.textTra
55ea0 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 nsformation;..........}.........
55ec0 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f ...return.new.DynamicTextTransfo
55ee0 72 6d 61 74 69 6f 6e 28 69 6e 73 74 61 6e 63 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 rmation(instance);......}.......
55f00 20 70 72 69 76 61 74 65 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 .private.DynamicTextTransformati
55f20 6f 6e 28 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 on(object.instance)......{......
55f40 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 6e 73 74 61 6e 63 65 3b 0d 0a 20 20 20 20 20 ...._instance.=.instance;.......
55f60 20 20 20 54 79 70 65 20 74 79 70 65 20 3d 20 5f 69 6e 73 74 61 6e 63 65 2e 47 65 74 54 79 70 65 ...Type.type.=._instance.GetType
55f80 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 ();.........._write.=.type.GetMe
55fa0 74 68 6f 64 28 22 57 72 69 74 65 22 2c 20 6e 65 77 20 54 79 70 65 5b 5d 20 7b 20 74 79 70 65 6f thod("Write",.new.Type[].{.typeo
55fc0 66 28 73 74 72 69 6e 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 4c 69 6e f(string).});.........._writeLin
55fe0 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 57 72 69 74 65 4c 69 6e 65 22 2c 20 e.=.type.GetMethod("WriteLine",.
56000 6e 65 77 20 54 79 70 65 5b 5d 20 7b 20 74 79 70 65 6f 66 28 73 74 72 69 6e 67 29 20 7d 29 3b 0d new.Type[].{.typeof(string).});.
56020 0a 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 ........._generationEnvironment.
56040 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 47 65 6e 65 72 61 74 69 6f 6e 45 6e =.type.GetProperty("GenerationEn
56060 76 69 72 6f 6e 6d 65 6e 74 22 2c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 49 6e 73 74 61 6e 63 vironment",.BindingFlags.Instanc
56080 65 20 7c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 62 6c 69 63 29 3b 0d 0a 20 20 e.|.BindingFlags.NonPublic);....
560a0 20 20 20 20 20 20 5f 68 6f 73 74 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 ......_host.=.type.GetProperty("
560c0 48 6f 73 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 65 72 72 6f 72 73 20 3d 20 74 79 70 65 2e Host");.........._errors.=.type.
560e0 47 65 74 50 72 6f 70 65 72 74 79 28 22 45 72 72 6f 72 73 22 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d GetProperty("Errors");......}...
56100 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 .....///.<summary>......///.Gets
56120 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 .the.value.of.the.wrapped.TextTr
56140 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 47 65 6e 65 72 61 74 69 6f anformation.instance's.Generatio
56160 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 70 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 2f 2f 2f 20 3c nEnvironment.property......///.<
56180 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 53 74 72 69 6e 67 42 75 69 6c /summary>......public.StringBuil
561a0 64 65 72 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 7b 20 67 65 74 20 der.GenerationEnvironment.{.get.
561c0 7b 20 72 65 74 75 72 6e 20 28 53 74 72 69 6e 67 42 75 69 6c 64 65 72 29 5f 67 65 6e 65 72 61 74 {.return.(StringBuilder)_generat
561e0 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 ionEnvironment.GetValue(_instanc
56200 65 2c 20 6e 75 6c 6c 29 3b 20 7d 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 e,.null);.}.}........///.<summar
56220 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 y>......///.Gets.the.value.of.th
56240 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 e.wrapped.TextTranformation.inst
56260 61 6e 63 65 27 73 20 45 72 72 6f 72 73 20 70 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 2f 2f 2f 20 ance's.Errors.property......///.
56280 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 53 79 73 74 65 6d 2e 43 6f </summary>......public.System.Co
562a0 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c deDom.Compiler.CompilerErrorColl
562c0 65 63 74 69 6f 6e 20 45 72 72 6f 72 73 20 7b 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 28 53 79 ection.Errors.{.get.{.return.(Sy
562e0 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 stem.CodeDom.Compiler.CompilerEr
56300 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 29 5f 65 72 72 6f 72 73 2e 47 65 74 56 61 6c 75 65 28 5f rorCollection)_errors.GetValue(_
56320 69 6e 73 74 61 6e 63 65 2c 20 6e 75 6c 6c 29 3b 20 7d 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 instance,.null);.}.}........///.
56340 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 73 20 74 68 65 20 77 72 61 <summary>......///.Calls.the.wra
56360 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 pped.TextTranformation.instance'
56380 73 20 57 72 69 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 s.Write.method.......///.</summa
563a0 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 28 73 74 72 69 6e ry>......public.void.Write(strin
563c0 67 20 74 65 78 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 2e 49 g.text)......{.........._write.I
563e0 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 20 nvoke(_instance,.new.object[].{.
56400 74 65 78 74 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d text.});......}........///.<summ
56420 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 73 20 74 68 65 20 77 72 61 70 70 65 64 20 ary>......///.Calls.the.wrapped.
56440 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 57 72 69 TextTranformation.instance's.Wri
56460 74 65 4c 69 6e 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 teLine.method.......///.</summar
56480 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 4c 69 6e 65 28 73 74 y>......public.void.WriteLine(st
564a0 72 69 6e 67 20 74 65 78 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 ring.text)......{.........._writ
564c0 65 4c 69 6e 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 65 77 20 6f 62 6a 65 eLine.Invoke(_instance,.new.obje
564e0 63 74 5b 5d 20 7b 20 74 65 78 74 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f ct[].{.text.});......}........//
56500 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 76 61 /.<summary>......///.Gets.the.va
56520 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 lue.of.the.wrapped.TextTranforma
56540 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 48 6f 73 74 20 70 72 6f 70 65 72 74 79 0d 0a 20 tion.instance's.Host.property...
56560 20 20 20 2f 2f 2f 20 69 66 20 61 76 61 69 6c 61 62 6c 65 20 28 73 68 6f 77 73 20 75 70 20 77 68 ...///.if.available.(shows.up.wh
56580 65 6e 20 68 6f 73 74 73 70 65 63 69 66 69 63 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 20 69 en.hostspecific.is.set.to.true.i
565a0 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 64 69 72 65 63 74 69 76 65 29 20 61 6e 64 20 72 65 n.the.template.directive).and.re
565c0 74 75 72 6e 73 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 69 turns......///.the.appropriate.i
565e0 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 6f 66 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 mplementation.of.IDynamicHost...
56600 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 44 ...///.</summary>......public.ID
56620 79 6e 61 6d 69 63 48 6f 73 74 20 48 6f 73 74 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ynamicHost.Host......{..........
56640 67 65 74 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 get..........{..............if.(
56660 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 _dynamicHost.==.null)...........
56680 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 28 5f 68 6f 73 74 20 3d ...{..................if(_host.=
566a0 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 7b 0d 0a 20 20 20 20 =.null)..................{......
566c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 20 6e ................_dynamicHost.=.n
566e0 65 77 20 4e 75 6c 6c 48 6f 73 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ew.NullHost();..................
56700 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 20 20 20 20 20 }..................else.........
56720 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 .........{......................
56740 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 20 6e 65 77 20 44 79 6e 61 6d 69 63 48 6f 73 74 28 5f _dynamicHost.=.new.DynamicHost(_
56760 68 6f 73 74 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 75 6c 6c 29 29 3b host.GetValue(_instance,.null));
56780 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
567a0 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f 64 79 6e 61 6d 69 63 48 .}..............return._dynamicH
567c0 6f 73 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 0d 0a 2f ost;..........}......}..}....../
567e0 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 //.<summary>..///.Reponsible.for
56800 20 61 62 73 74 72 61 63 74 69 6e 67 20 74 68 65 20 75 73 65 20 6f 66 20 48 6f 73 74 20 62 65 74 .abstracting.the.use.of.Host.bet
56820 77 65 65 6e 20 74 69 6d 65 73 0d 0a 2f 2f 2f 20 77 68 65 6e 20 69 74 20 69 73 20 61 76 61 69 6c ween.times..///.when.it.is.avail
56840 61 62 6c 65 20 61 6e 64 20 6e 6f 74 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 75 able.and.not..///.</summary>..pu
56860 62 6c 69 63 20 69 6e 74 65 72 66 61 63 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 7b 0d 0a blic.interface.IDynamicHost..{..
56880 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 6e 20 61 62 ....///.<summary>......///.An.ab
568a0 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 stracted.call.to.Microsoft.Visua
568c0 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 lStudio.TextTemplating.ITextTemp
568e0 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 latingEngineHost.ResolveParamete
56900 72 56 61 6c 75 65 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 20 rValue......///.</summary>......
56920 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 73 74 72 string.ResolveParameterValue(str
56940 69 6e 67 20 69 64 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 6f 74 68 65 ing.id,.string.name,.string.othe
56960 72 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 rName);........///.<summary>....
56980 20 20 2f 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 ..///.An.abstracted.call.to.Micr
569a0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e osoft.VisualStudio.TextTemplatin
569c0 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f g.ITextTemplatingEngineHost.Reso
569e0 6c 76 65 50 61 74 68 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 lvePath......///.</summary>.....
56a00 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 74 68 28 73 74 72 69 6e 67 20 70 61 74 68 29 .string.ResolvePath(string.path)
56a20 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 ;........///.<summary>......///.
56a40 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e An.abstracted.call.to.Microsoft.
56a60 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 VisualStudio.TextTemplating.ITex
56a80 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 6d 70 6c 61 74 65 46 69 tTemplatingEngineHost.TemplateFi
56aa0 6c 65 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 20 73 74 72 69 le......///.</summary>......stri
56ac0 6e 67 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 20 7b 20 67 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 ng.TemplateFile.{.get;.}........
56ae0 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 ///.<summary>......///.Returns.t
56b00 68 65 20 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e 20 49 53 65 72 he.Host.instance.cast.as.an.ISer
56b20 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e viceProvider......///.</summary>
56b40 0d 0a 20 20 20 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 41 73 49 53 65 72 76 69 63 ......IServiceProvider.AsIServic
56b60 65 50 72 6f 76 69 64 65 72 28 29 3b 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e eProvider();..}....///.<summary>
56b80 0d 0a 2f 2f 2f 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 69 6e ..///.Reponsible.for.implementin
56ba0 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 61 73 20 61 20 64 79 6e 61 6d 69 63 0d g.the.IDynamicHost.as.a.dynamic.
56bc0 0a 2f 2f 2f 20 73 68 61 70 65 20 77 72 61 70 70 65 72 20 6f 76 65 72 20 74 68 65 20 4d 69 63 72 .///.shape.wrapper.over.the.Micr
56be0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e osoft.VisualStudio.TextTemplatin
56c00 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 69 6e 74 65 g.ITextTemplatingEngineHost.inte
56c20 72 66 61 63 65 0d 0a 2f 2f 2f 20 72 61 74 68 65 72 20 74 68 61 6e 20 74 79 70 65 20 64 65 70 65 rface..///.rather.than.type.depe
56c40 6e 64 65 6e 74 20 77 72 61 70 70 65 72 2e 20 20 57 65 20 64 6f 6e 27 74 20 75 73 65 20 74 68 65 ndent.wrapper...We.don't.use.the
56c60 0d 0a 2f 2f 2f 20 69 6e 74 65 72 66 61 63 65 20 74 79 70 65 20 73 6f 20 74 68 61 74 20 74 68 65 ..///.interface.type.so.that.the
56c80 20 63 6f 64 65 20 63 61 6e 20 62 65 20 72 75 6e 20 69 6e 20 70 72 65 70 72 6f 63 65 73 73 65 64 .code.can.be.run.in.preprocessed
56ca0 20 6d 6f 64 65 0d 0a 2f 2f 2f 20 6f 6e 20 61 20 2e 6e 65 74 20 66 72 61 6d 65 77 6f 72 6b 20 6f .mode..///.on.a..net.framework.o
56cc0 6e 6c 79 20 69 6e 73 74 61 6c 6c 65 64 20 6d 61 63 68 69 6e 65 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 nly.installed.machine...///.</su
56ce0 6d 6d 61 72 79 3e 0d 0a 70 75 62 6c 69 63 20 63 6c 61 73 73 20 44 79 6e 61 6d 69 63 48 6f 73 74 mmary>..public.class.DynamicHost
56d00 20 3a 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 7b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 .:.IDynamicHost..{......private.
56d20 72 65 61 64 6f 6e 6c 79 20 6f 62 6a 65 63 74 20 5f 69 6e 73 74 61 6e 63 65 3b 0d 0a 20 20 20 20 readonly.object._instance;......
56d40 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 6e 66 6f 20 5f 72 65 73 private.readonly.MethodInfo._res
56d60 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 olveParameterValue;......private
56d80 20 72 65 61 64 6f 6e 6c 79 20 4d 65 74 68 6f 64 49 6e 66 6f 20 5f 72 65 73 6f 6c 76 65 50 61 74 .readonly.MethodInfo._resolvePat
56da0 68 3b 0d 0a 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 50 72 6f 70 65 72 74 h;......private.readonly.Propert
56dc0 79 49 6e 66 6f 20 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 yInfo._templateFile;........///.
56de0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e <summary>......///.Creates.an.in
56e00 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 44 79 6e 61 6d 69 63 48 6f 73 74 20 63 6c 61 73 73 20 stance.of.the.DynamicHost.class.
56e20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 0d 0a 20 20 20 20 2f 2f 2f 20 4d 69 around.the.passed.in......///.Mi
56e40 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 crosoft.VisualStudio.TextTemplat
56e60 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 73 68 ing.ITextTemplatingEngineHost.sh
56e80 61 70 70 65 64 20 69 6e 73 74 61 6e 63 65 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 2f apped.instance.passed.in......./
56ea0 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 44 79 6e 61 6d 69 //.</summary>......public.Dynami
56ec0 63 48 6f 73 74 28 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 cHost(object.instance)......{...
56ee0 20 20 20 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 6e 73 74 61 6e 63 65 3b 0d 0a 20 20 ......._instance.=.instance;....
56f00 20 20 20 20 20 20 54 79 70 65 20 74 79 70 65 20 3d 20 5f 69 6e 73 74 61 6e 63 65 2e 47 65 74 54 ......Type.type.=._instance.GetT
56f20 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 ype();.........._resolveParamete
56f40 72 56 61 6c 75 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 52 65 73 6f 6c 76 65 rValue.=.type.GetMethod("Resolve
56f60 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 22 2c 20 6e 65 77 20 54 79 70 65 5b 5d 20 7b 20 74 79 ParameterValue",.new.Type[].{.ty
56f80 70 65 6f 66 28 73 74 72 69 6e 67 29 2c 20 74 79 70 65 6f 66 28 73 74 72 69 6e 67 29 2c 20 74 79 peof(string),.typeof(string),.ty
56fa0 70 65 6f 66 28 73 74 72 69 6e 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 73 6f 6c peof(string).});.........._resol
56fc0 76 65 50 61 74 68 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 52 65 73 6f 6c 76 65 vePath.=.type.GetMethod("Resolve
56fe0 50 61 74 68 22 2c 20 6e 65 77 20 54 79 70 65 5b 5d 20 7b 20 74 79 70 65 6f 66 28 73 74 72 69 6e Path",.new.Type[].{.typeof(strin
57000 67 29 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 20 3d 20 g).});.........._templateFile.=.
57020 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 54 65 6d 70 6c 61 74 65 46 69 6c 65 22 29 type.GetProperty("TemplateFile")
57040 3b 0d 0a 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d ;........}........///.<summary>.
57060 0a 20 20 20 20 2f 2f 2f 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 .....///.A.call.to.Microsoft.Vis
57080 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 ualStudio.TextTemplating.ITextTe
570a0 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 mplatingEngineHost.ResolveParame
570c0 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 terValue......///.</summary>....
570e0 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 ..public.string.ResolveParameter
57100 56 61 6c 75 65 28 73 74 72 69 6e 67 20 69 64 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 73 74 Value(string.id,.string.name,.st
57120 72 69 6e 67 20 6f 74 68 65 72 4e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ring.otherName)......{..........
57140 72 65 74 75 72 6e 20 28 73 74 72 69 6e 67 29 5f 72 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 return.(string)_resolveParameter
57160 56 61 6c 75 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 65 77 20 6f 62 6a 65 Value.Invoke(_instance,.new.obje
57180 63 74 5b 5d 20 7b 20 69 64 2c 20 6e 61 6d 65 2c 20 6f 74 68 65 72 4e 61 6d 65 20 7d 29 3b 0d 0a ct[].{.id,.name,.otherName.});..
571a0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ....}........///.<summary>......
571c0 2f 2f 2f 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 ///.A.call.to.Microsoft.VisualSt
571e0 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 udio.TextTemplating.ITextTemplat
57200 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 2f ingEngineHost.ResolvePath....../
57220 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 //.</summary>......public.string
57240 20 52 65 73 6f 6c 76 65 50 61 74 68 28 73 74 72 69 6e 67 20 70 61 74 68 29 0d 0a 20 20 20 20 7b .ResolvePath(string.path)......{
57260 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 73 74 72 69 6e 67 29 5f 72 65 73 6f 6c 76 ..........return.(string)_resolv
57280 65 50 61 74 68 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 65 77 20 6f 62 6a 65 ePath.Invoke(_instance,.new.obje
572a0 63 74 5b 5d 20 7b 20 70 61 74 68 20 7d 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f ct[].{.path.});......}........//
572c0 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 63 61 6c 6c 20 74 6f 20 4d /.<summary>......///.A.call.to.M
572e0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 icrosoft.VisualStudio.TextTempla
57300 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 ting.ITextTemplatingEngineHost.T
57320 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d emplateFile......///.</summary>.
57340 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d .....public.string.TemplateFile.
57360 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a .....{..........get..........{..
57380 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 73 74 72 69 6e 67 29 5f 74 65 6d 70 ............return.(string)_temp
573a0 6c 61 74 65 46 69 6c 65 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 6e 75 6c lateFile.GetValue(_instance,.nul
573c0 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f l);..........}......}........///
573e0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 .<summary>......///.Returns.the.
57400 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e 20 49 53 65 72 76 69 63 Host.instance.cast.as.an.IServic
57420 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 eProvider......///.</summary>...
57440 20 20 20 70 75 62 6c 69 63 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 41 73 49 53 65 ...public.IServiceProvider.AsISe
57460 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 rviceProvider()......{..........
57480 72 65 74 75 72 6e 20 5f 69 6e 73 74 61 6e 63 65 20 61 73 20 49 53 65 72 76 69 63 65 50 72 6f 76 return._instance.as.IServiceProv
574a0 69 64 65 72 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ider;......}..}....///.<summary>
574c0 0d 0a 2f 2f 2f 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 69 6e ..///.Reponsible.for.implementin
574e0 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 77 68 65 6e 20 74 68 65 0d 0a 2f 2f 2f g.the.IDynamicHost.when.the..///
57500 20 48 6f 73 74 20 70 72 6f 70 65 72 74 79 20 69 73 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 .Host.property.is.not.available.
57520 6f 6e 20 74 68 65 20 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 20 74 79 70 65 2e 20 54 68 65 20 on.the.TextTemplating.type..The.
57540 48 6f 73 74 0d 0a 2f 2f 2f 20 70 72 6f 70 65 72 74 79 20 6f 6e 6c 79 20 65 78 69 73 74 73 20 77 Host..///.property.only.exists.w
57560 68 65 6e 20 74 68 65 20 68 6f 73 74 73 70 65 63 69 66 69 63 20 61 74 74 72 69 62 75 74 65 20 6f hen.the.hostspecific.attribute.o
57580 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 0d 0a 2f 2f 2f 20 64 69 72 65 63 74 69 76 65 20 69 73 f.the.template..///.directive.is
575a0 20 73 65 74 20 74 6f 20 74 72 75 65 2e 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 70 .set.to.true...///.</summary>..p
575c0 75 62 6c 69 63 20 63 6c 61 73 73 20 4e 75 6c 6c 48 6f 73 74 20 3a 20 49 44 79 6e 61 6d 69 63 48 ublic.class.NullHost.:.IDynamicH
575e0 6f 73 74 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 20 2f ost..{......///.<summary>....../
57600 2f 2f 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c 20 74 6f //.An.abstraction.of.the.call.to
57620 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 .Microsoft.VisualStudio.TextTemp
57640 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 lating.ITextTemplatingEngineHost
57660 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 2f 2f 2f 20 .ResolveParameterValue......///.
57680 74 68 61 74 20 73 69 6d 70 6c 79 20 72 65 74 75 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f that.simply.retuns.null.......//
576a0 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 /.</summary>......public.string.
576c0 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 73 74 72 69 6e 67 20 69 64 2c ResolveParameterValue(string.id,
576e0 20 73 74 72 69 6e 67 20 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 6f 74 68 65 72 4e 61 6d 65 29 0d .string.name,.string.otherName).
57700 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 .....{..........return.null;....
57720 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
57740 2f 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 /.An.abstraction.of.the.call.to.
57760 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c Microsoft.VisualStudio.TextTempl
57780 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 ating.ITextTemplatingEngineHost.
577a0 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 73 69 6d 70 6c 79 ResolvePath......///.that.simply
577c0 20 72 65 74 75 6e 73 20 74 68 65 20 70 61 74 68 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 .retuns.the.path.passed.in......
577e0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 .///.</summary>......public.stri
57800 6e 67 20 52 65 73 6f 6c 76 65 50 61 74 68 28 73 74 72 69 6e 67 20 70 61 74 68 29 0d 0a 20 20 20 ng.ResolvePath(string.path).....
57820 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 61 74 68 3b 0d 0a 20 20 20 20 7d 0d .{..........return.path;......}.
57840 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 6e .......///.<summary>......///.An
57860 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 .abstraction.of.the.call.to.Micr
57880 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e osoft.VisualStudio.TextTemplatin
578a0 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 6d 70 g.ITextTemplatingEngineHost.Temp
578c0 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 72 65 74 75 72 6e 73 20 6e lateFile......///.that.returns.n
578e0 75 6c 6c 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 20 70 75 ull.......///.</summary>......pu
57900 62 6c 69 63 20 73 74 72 69 6e 67 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 7b 0d blic.string.TemplateFile......{.
57920 0a 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .........get..........{.........
57940 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 .....return.null;..........}....
57960 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f ..}........///.<summary>......//
57980 2f 20 52 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /.Returns.null.......///.</summa
579a0 72 79 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 ry>......public.IServiceProvider
579c0 20 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 .AsIServiceProvider()......{....
579e0 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a ......return.null;......}..}....
57a00 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 2f 2f 2f 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 ///.<summary>..///.Responsible.f
57a20 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 69 6e 67 20 74 68 65 20 63 6f 6e 73 74 61 6e 74 73 20 64 or.encapsulating.the.constants.d
57a40 65 66 69 6e 65 64 20 69 6e 20 4d 65 74 61 64 61 74 61 0d 0a 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 efined.in.Metadata..///.</summar
57a60 79 3e 0d 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 63 6c 61 73 73 20 4d 65 74 61 64 61 74 61 y>..public.static.class.Metadata
57a80 43 6f 6e 73 74 61 6e 74 73 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 Constants..{......public.const.s
57aa0 74 72 69 6e 67 20 43 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 3d 20 22 2e 63 73 64 6c 22 3b 0d tring.CSDL_EXTENSION.=.".csdl";.
57ac0 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 43 53 44 4c 5f .......public.const.string.CSDL_
57ae0 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 3d 20 22 43 6f 6e 63 65 70 74 75 61 6c 4d EDMX_SECTION_NAME.=."ConceptualM
57b00 6f 64 65 6c 73 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 odels";......public.const.string
57b20 20 43 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 3d 20 22 53 63 68 65 6d .CSDL_ROOT_ELEMENT_NAME.=."Schem
57b40 61 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 45 44 4d a";......public.const.string.EDM
57b60 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 _ANNOTATION_09_02.=."http://sche
57b80 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 30 32 2f 65 64 mas.microsoft.com/ado/2009/02/ed
57ba0 6d 2f 61 6e 6e 6f 74 61 74 69 6f 6e 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e m/annotation";........public.con
57bc0 73 74 20 73 74 72 69 6e 67 20 53 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 3d 20 22 2e 73 73 64 st.string.SSDL_EXTENSION.=.".ssd
57be0 6c 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 53 l";........public.const.string.S
57c00 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 3d 20 22 53 74 6f 72 61 67 65 SDL_EDMX_SECTION_NAME.=."Storage
57c20 4d 6f 64 65 6c 73 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e Models";......public.const.strin
57c40 67 20 53 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 3d 20 22 53 63 68 65 g.SSDL_ROOT_ELEMENT_NAME.=."Sche
57c60 6d 61 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 ma";........public.const.string.
57c80 4d 53 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 3d 20 22 2e 6d 73 6c 22 3b 0d 0a 0d 0a 20 20 20 20 70 MSL_EXTENSION.=.".msl";........p
57ca0 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 4d 53 4c 5f 45 44 4d 58 5f 53 45 43 54 ublic.const.string.MSL_EDMX_SECT
57cc0 49 4f 4e 5f 4e 41 4d 45 20 3d 20 22 4d 61 70 70 69 6e 67 73 22 3b 0d 0a 20 20 20 20 70 75 62 6c ION_NAME.=."Mappings";......publ
57ce0 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 4d 53 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 ic.const.string.MSL_ROOT_ELEMENT
57d00 5f 4e 41 4d 45 20 3d 20 22 4d 61 70 70 69 6e 67 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 _NAME.=."Mapping";........public
57d20 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 54 54 5f 54 45 4d 50 4c 41 54 45 5f 4e 41 4d 45 20 3d .const.string.TT_TEMPLATE_NAME.=
57d40 20 22 54 65 6d 70 6c 61 74 65 4e 61 6d 65 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e ."TemplateName";......public.con
57d60 73 74 20 73 74 72 69 6e 67 20 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 20 3d 20 st.string.TT_TEMPLATE_VERSION.=.
57d80 22 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 22 3b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 "TemplateVersion";......public.c
57da0 6f 6e 73 74 20 73 74 72 69 6e 67 20 54 54 5f 4d 49 4e 49 4d 55 4d 5f 45 4e 54 49 54 59 5f 46 52 onst.string.TT_MINIMUM_ENTITY_FR
57dc0 41 4d 45 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 20 3d 20 22 4d 69 6e 69 6d 75 6d 45 6e 74 69 74 79 AMEWORK_VERSION.=."MinimumEntity
57de0 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f 6e 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 FrameworkVersion";........public
57e00 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 44 45 46 41 55 4c 54 5f 54 45 4d 50 4c 41 54 45 5f 56 .const.string.DEFAULT_TEMPLATE_V
57e20 45 52 53 49 4f 4e 20 3d 20 22 34 2e 30 22 3b 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 ERSION.=."4.0";........public.st
57e40 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 56 31 atic.readonly.SchemaConstants.V1
57e60 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 3d 20 6e 65 77 20 53 63 68 65 6d 61 43 6f _SCHEMA_CONSTANTS.=.new.SchemaCo
57e80 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 nstants(.........."http://schema
57ea0 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 37 2f 30 36 2f 65 64 6d 78 s.microsoft.com/ado/2007/06/edmx
57ec0 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 ",.........."http://schemas.micr
57ee0 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 6d 22 2c 0d 0a 20 20 20 osoft.com/ado/2006/04/edm",.....
57f00 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 ....."http://schemas.microsoft.c
57f20 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 om/ado/2006/04/edm/ssdl",.......
57f40 20 20 20 22 75 72 6e 3a 73 63 68 65 6d 61 73 2d 6d 69 63 72 6f 73 6f 66 74 2d 63 6f 6d 3a 77 69 ..."urn:schemas-microsoft-com:wi
57f60 6e 64 6f 77 73 3a 73 74 6f 72 61 67 65 3a 6d 61 70 70 69 6e 67 3a 43 53 22 2c 0d 0a 20 20 20 20 ndows:storage:mapping:CS",......
57f80 20 20 20 20 6e 65 77 20 56 65 72 73 69 6f 6e 28 22 33 2e 35 22 29 29 3b 0d 0a 0d 0a 20 20 20 20 ....new.Version("3.5"));........
57fa0 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 53 63 68 65 6d 61 43 6f 6e public.static.readonly.SchemaCon
57fc0 73 74 61 6e 74 73 20 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 3d 20 6e 65 77 stants.V2_SCHEMA_CONSTANTS.=.new
57fe0 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 .SchemaConstants(.........."http
58000 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 ://schemas.microsoft.com/ado/200
58020 38 2f 31 30 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 8/10/edmx",.........."http://sch
58040 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 30 39 2f 65 emas.microsoft.com/ado/2008/09/e
58060 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 dm",.........."http://schemas.mi
58080 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 30 32 2f 65 64 6d 2f 73 73 64 6c crosoft.com/ado/2009/02/edm/ssdl
580a0 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 ",.........."http://schemas.micr
580c0 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 30 39 2f 6d 61 70 70 69 6e 67 2f 63 73 osoft.com/ado/2008/09/mapping/cs
580e0 22 2c 0d 0a 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 72 73 69 6f 6e 28 22 34 2e 30 22 29 29 3b ",..........new.Version("4.0"));
58100 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 72 65 61 64 6f 6e 6c 79 20 53 ........public.static.readonly.S
58120 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 56 33 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e chemaConstants.V3_SCHEMA_CONSTAN
58140 54 53 20 3d 20 6e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 TS.=.new.SchemaConstants(.......
58160 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d ..."http://schemas.microsoft.com
58180 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 /ado/2009/11/edmx",.........."ht
581a0 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 tp://schemas.microsoft.com/ado/2
581c0 30 30 39 2f 31 31 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 009/11/edm",.........."http://sc
581e0 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f hemas.microsoft.com/ado/2009/11/
58200 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 edm/ssdl",.........."http://sche
58220 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 6d 61 mas.microsoft.com/ado/2009/11/ma
58240 70 70 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 6e 65 77 20 56 65 72 73 69 6f 6e 28 pping/cs",..........new.Version(
58260 22 35 2e 30 22 29 29 3b 0d 0a 7d 0d 0a 0d 0a 70 75 62 6c 69 63 20 73 74 72 75 63 74 20 53 63 68 "5.0"));..}....public.struct.Sch
58280 65 6d 61 43 6f 6e 73 74 61 6e 74 73 0d 0a 7b 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 53 63 68 65 emaConstants..{......public.Sche
582a0 6d 61 43 6f 6e 73 74 61 6e 74 73 28 73 74 72 69 6e 67 20 65 64 6d 78 4e 61 6d 65 73 70 61 63 65 maConstants(string.edmxNamespace
582c0 2c 20 73 74 72 69 6e 67 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 2c 20 73 74 72 69 6e 67 20 73 ,.string.csdlNamespace,.string.s
582e0 73 64 6c 4e 61 6d 65 73 70 61 63 65 2c 20 73 74 72 69 6e 67 20 6d 73 6c 4e 61 6d 65 73 70 61 63 sdlNamespace,.string.mslNamespac
58300 65 2c 20 56 65 72 73 69 6f 6e 20 6d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f e,.Version.minimumTemplateVersio
58320 6e 29 20 3a 20 74 68 69 73 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 78 n).:.this()......{..........Edmx
58340 4e 61 6d 65 73 70 61 63 65 20 3d 20 65 64 6d 78 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 Namespace.=.edmxNamespace;......
58360 20 20 20 20 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 ....CsdlNamespace.=.csdlNamespac
58380 65 3b 0d 0a 20 20 20 20 20 20 20 20 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 73 73 64 6c e;..........SsdlNamespace.=.ssdl
583a0 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 4d 73 6c 4e 61 6d 65 73 70 61 63 65 Namespace;..........MslNamespace
583c0 20 3d 20 6d 73 6c 4e 61 6d 65 73 70 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 4d 69 6e 69 6d 75 .=.mslNamespace;..........Minimu
583e0 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 6d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 mTemplateVersion.=.minimumTempla
58400 74 65 56 65 72 73 69 6f 6e 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 teVersion;......}........public.
58420 73 74 72 69 6e 67 20 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 7b 20 67 65 74 3b 20 70 72 69 76 string.EdmxNamespace.{.get;.priv
58440 61 74 65 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 73 ate.set;.}......public.string.Cs
58460 64 6c 4e 61 6d 65 73 70 61 63 65 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 dlNamespace.{.get;.private.set;.
58480 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 53 73 64 6c 4e 61 6d 65 73 70 61 }......public.string.SsdlNamespa
584a0 63 65 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 ce.{.get;.private.set;.}......pu
584c0 62 6c 69 63 20 73 74 72 69 6e 67 20 4d 73 6c 4e 61 6d 65 73 70 61 63 65 20 7b 20 67 65 74 3b 20 blic.string.MslNamespace.{.get;.
584e0 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 56 65 72 73 69 private.set;.}......public.Versi
58500 6f 6e 20 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 7b 20 67 65 74 3b on.MinimumTemplateVersion.{.get;
58520 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 7d 0d 0a 0a 0a 20 20 20 20 7d 0d 0a 0a 0a 20 .private.set;.}..}........}.....
58540 20 20 20 23 72 65 67 69 6f 6e 20 42 61 73 65 20 63 6c 61 73 73 0d 0a 20 20 20 20 2f 2f 2f 20 3c ...#region.Base.class......///.<
58560 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 42 61 73 65 20 63 6c 61 73 73 20 66 6f 72 summary>......///.Base.class.for
58580 20 74 68 69 73 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f .this.transformation......///.</
585a0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 5b 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f summary>......[global::System.Co
585c0 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 65 6e 65 72 61 74 65 64 43 6f 64 65 41 74 74 72 deDom.Compiler.GeneratedCodeAttr
585e0 69 62 75 74 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 ibute("Microsoft.VisualStudio.Te
58600 78 74 54 65 6d 70 6c 61 74 69 6e 67 22 2c 20 22 31 31 2e 30 2e 30 2e 30 22 29 5d 0d 0a 20 20 20 xtTemplating",."11.0.0.0")].....
58620 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 43 53 68 61 72 70 43 6f 64 65 47 65 6e 54 65 6d 70 6c .public.class.CSharpCodeGenTempl
58640 61 74 65 56 35 30 42 61 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 ateV50Base......{..........#regi
58660 6f 6e 20 46 69 65 6c 64 73 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 67 6c 6f 62 61 on.Fields..........private.globa
58680 6c 3a 3a 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 67 65 6e l::System.Text.StringBuilder.gen
586a0 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 erationEnvironmentField;........
586c0 20 20 70 72 69 76 61 74 65 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d ..private.global::System.CodeDom
586e0 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f .Compiler.CompilerErrorCollectio
58700 6e 20 65 72 72 6f 72 73 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 n.errorsField;..........private.
58720 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 global::System.Collections.Gener
58740 69 63 2e 4c 69 73 74 3c 69 6e 74 3e 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 3b ic.List<int>.indentLengthsField;
58760 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 63 75 72 72 65 6e 74 ..........private.string.current
58780 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 22 22 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 IndentField.=."";..........priva
587a0 74 65 20 62 6f 6f 6c 20 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 te.bool.endsWithNewline;........
587c0 20 20 70 72 69 76 61 74 65 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 ..private.global::System.Collect
587e0 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c ions.Generic.IDictionary<string,
58800 20 6f 62 6a 65 63 74 3e 20 73 65 73 73 69 6f 6e 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 .object>.sessionField;..........
58820 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 50 72 6f 70 #endregion..........#region.Prop
58840 65 72 74 69 65 73 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 erties..........///.<summary>...
58860 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 73 74 72 69 6e 67 20 62 75 69 6c 64 65 72 20 74 68 .......///.The.string.builder.th
58880 61 74 20 67 65 6e 65 72 61 74 69 6f 6e 2d 74 69 6d 65 20 63 6f 64 65 20 69 73 20 75 73 69 6e 67 at.generation-time.code.is.using
588a0 20 74 6f 20 61 73 73 65 6d 62 6c 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 .to.assemble.generated.output...
588c0 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 70 .......///.</summary>..........p
588e0 72 6f 74 65 63 74 65 64 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 rotected.System.Text.StringBuild
58900 65 72 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 0d 0a 20 20 20 20 20 20 er.GenerationEnvironment........
58920 20 20 7b 0d 0a 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 20 ..{..............get............
58940 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 67 ..{..................if.((this.g
58960 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 3d 3d 20 6e 75 6c enerationEnvironmentField.==.nul
58980 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 l))..................{..........
589a0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 ............this.generationEnvir
589c0 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d onmentField.=.new.global::System
589e0 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 .Text.StringBuilder();..........
58a00 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 72 65 74 75 72 ........}..................retur
58a20 6e 20 74 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c n.this.generationEnvironmentFiel
58a40 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 d;..............}..............s
58a60 65 74 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 et..............{...............
58a80 20 20 20 74 68 69 73 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 ...this.generationEnvironmentFie
58aa0 6c 64 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ld.=.value;..............}......
58ac0 20 20 20 20 7d 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 ....}..........///.<summary>....
58ae0 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 65 72 72 6f 72 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 66 ......///.The.error.collection.f
58b00 6f 72 20 74 68 65 20 67 65 6e 65 72 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 0d 0a 20 20 20 20 20 or.the.generation.process.......
58b20 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 70 75 62 6c 69 ...///.</summary>..........publi
58b40 63 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c c.System.CodeDom.Compiler.Compil
58b60 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 20 45 72 72 6f 72 73 0d 0a 20 20 20 20 20 20 erErrorCollection.Errors........
58b80 20 20 7b 0d 0a 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 20 ..{..............get............
58ba0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 65 ..{..................if.((this.e
58bc0 72 72 6f 72 73 46 69 65 6c 64 20 3d 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 rrorsField.==.null))............
58be0 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 74 68 69 ......{......................thi
58c00 73 2e 65 72 72 6f 72 73 46 69 65 6c 64 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 s.errorsField.=.new.global::Syst
58c20 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f em.CodeDom.Compiler.CompilerErro
58c40 72 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rCollection();..................
58c60 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 65 }..................return.this.e
58c80 72 72 6f 72 73 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 rrorsField;..............}......
58ca0 20 20 20 20 7d 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 ....}..........///.<summary>....
58cc0 20 20 20 20 20 20 2f 2f 2f 20 41 20 6c 69 73 74 20 6f 66 20 74 68 65 20 6c 65 6e 67 74 68 73 20 ......///.A.list.of.the.lengths.
58ce0 6f 66 20 65 61 63 68 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 61 73 20 61 64 64 65 64 20 77 69 of.each.indent.that.was.added.wi
58d00 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d th.PushIndent..........///.</sum
58d20 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 53 79 73 74 65 6d 2e 43 6f mary>..........private.System.Co
58d40 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 4c 69 73 74 3c 69 6e 74 3e 20 69 6e 64 65 llections.Generic.List<int>.inde
58d60 6e 74 4c 65 6e 67 74 68 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ntLengths..........{............
58d80 20 20 67 65 74 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 ..get..............{............
58da0 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 ......if.((this.indentLengthsFie
58dc0 6c 64 20 3d 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d ld.==.null))..................{.
58de0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 65 6e 74 .....................this.indent
58e00 4c 65 6e 67 74 68 73 46 69 65 6c 64 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 LengthsField.=.new.global::Syste
58e20 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 4c 69 73 74 3c 69 6e 74 3e 28 m.Collections.Generic.List<int>(
58e40 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 );..................}...........
58e60 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 .......return.this.indentLengths
58e80 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d Field;..............}..........}
58ea0 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>.........
58ec0 20 2f 2f 2f 20 47 65 74 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 77 65 20 .///.Gets.the.current.indent.we.
58ee0 75 73 65 20 77 68 65 6e 20 61 64 64 69 6e 67 20 6c 69 6e 65 73 20 74 6f 20 74 68 65 20 6f 75 74 use.when.adding.lines.to.the.out
58f00 70 75 74 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 put..........///.</summary>.....
58f20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 .....public.string.CurrentIndent
58f40 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 67 65 74 0d 0a 20 20 ..........{..............get....
58f60 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 72 65 74 ..........{..................ret
58f80 75 72 6e 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 3b 0d 0a 20 20 urn.this.currentIndentField;....
58fa0 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 ..........}..........}..........
58fc0 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 43 75 72 72 65 ///.<summary>..........///.Curre
58fe0 6e 74 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 65 73 73 69 6f 6e 0d 0a 20 20 20 20 20 nt.transformation.session.......
59000 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 70 75 62 6c 69 ...///.</summary>..........publi
59020 63 20 76 69 72 74 75 61 6c 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 c.virtual.global::System.Collect
59040 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c ions.Generic.IDictionary<string,
59060 20 6f 62 6a 65 63 74 3e 20 53 65 73 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .object>.Session..........{.....
59080 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .........get..............{.....
590a0 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 68 69 73 2e 73 65 73 73 69 6f 6e .............return.this.session
590c0 46 69 65 6c 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 Field;..............}...........
590e0 20 20 20 73 65 74 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 ...set..............{...........
59100 20 20 20 20 20 20 20 74 68 69 73 2e 73 65 73 73 69 6f 6e 46 69 65 6c 64 20 3d 20 76 61 6c 75 65 .......this.sessionField.=.value
59120 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 ;..............}..........}.....
59140 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e .....#endregion..........#region
59160 20 54 72 61 6e 73 66 6f 72 6d 2d 74 69 6d 65 20 68 65 6c 70 65 72 73 0d 0a 20 20 20 20 20 20 20 .Transform-time.helpers.........
59180 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 57 72 69 74 .///.<summary>..........///.Writ
591a0 65 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 e.text.directly.into.the.generat
591c0 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 ed.output..........///.</summary
591e0 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 28 73 74 72 >..........public.void.Write(str
59200 69 6e 67 20 74 65 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ing.textToAppend)..........{....
59220 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 72 45 6d 70 ..........if.(string.IsNullOrEmp
59240 74 79 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b ty(textToAppend))..............{
59260 0d 0a 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 20 20 20 20 20 ..................return;.......
59280 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 27 72 .......}..............//.If.we'r
592a0 65 20 73 74 61 72 74 69 6e 67 20 6f 66 66 2c 20 6f 72 20 69 66 20 74 68 65 20 70 72 65 76 69 6f e.starting.off,.or.if.the.previo
592c0 75 73 20 74 65 78 74 20 65 6e 64 65 64 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 2c 0d 0a 20 us.text.ended.with.a.newline,...
592e0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 68 61 76 65 20 74 6f 20 61 70 70 65 6e 64 20 ...........//.we.have.to.append.
59300 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 66 69 72 73 74 2e 0d 0a 20 20 20 20 20 the.current.indent.first........
59320 20 20 20 20 20 20 20 69 66 20 28 28 28 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 .......if.(((this.GenerationEnvi
59340 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 20 0d 0a 20 20 20 20 20 20 20 20 20 ronment.Length.==.0)............
59360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 7c 20 74 68 69 73 2e 65 6e 64 73 57 69 74 68 4e ...............||.this.endsWithN
59380 65 77 6c 69 6e 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ewline))..............{.........
593a0 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d .........this.GenerationEnvironm
593c0 65 6e 74 2e 41 70 70 65 6e 64 28 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 ent.Append(this.currentIndentFie
593e0 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 65 6e 64 73 57 ld);..................this.endsW
59400 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ithNewline.=.false;.............
59420 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 74 68 65 20 .}..............//.Check.if.the.
59440 63 75 72 72 65 6e 74 20 74 65 78 74 20 65 6e 64 73 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 current.text.ends.with.a.newline
59460 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 45 ..............if.(textToAppend.E
59480 6e 64 73 57 69 74 68 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 ndsWith(global::System.Environme
594a0 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 53 74 72 69 6e nt.NewLine,.global::System.Strin
594c0 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 29 29 0d 0a 20 20 gComparison.CurrentCulture))....
594e0 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 74 68 69 ..........{..................thi
59500 73 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 s.endsWithNewline.=.true;.......
59520 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 69 73 .......}..............//.This.is
59540 20 61 6e 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 49 66 20 74 68 65 20 63 75 72 72 65 6e 74 .an.optimization..If.the.current
59560 20 69 6e 64 65 6e 74 20 69 73 20 22 22 2c 20 74 68 65 6e 20 77 65 20 64 6f 6e 27 74 20 68 61 76 .indent.is."",.then.we.don't.hav
59580 65 20 74 6f 20 64 6f 20 61 6e 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 66 20 74 e.to.do.any..............//.of.t
595a0 68 65 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 20 73 74 75 66 66 20 66 75 72 74 68 65 72 20 64 6f he.more.complex.stuff.further.do
595c0 77 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 63 75 72 72 65 wn...............if.((this.curre
595e0 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 29 0d 0a 20 20 20 ntIndentField.Length.==.0)).....
59600 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 74 68 69 73 .........{..................this
59620 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 .GenerationEnvironment.Append(te
59640 78 74 54 6f 41 70 70 65 6e 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 xtToAppend);..................re
59660 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 turn;..............}............
59680 20 20 2f 2f 20 45 76 65 72 79 77 68 65 72 65 20 74 68 65 72 65 20 69 73 20 61 20 6e 65 77 6c 69 ..//.Everywhere.there.is.a.newli
596a0 6e 65 20 69 6e 20 74 68 65 20 74 65 78 74 2c 20 61 64 64 20 61 6e 20 69 6e 64 65 6e 74 20 61 66 ne.in.the.text,.add.an.indent.af
596c0 74 65 72 20 69 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 54 6f 41 70 70 65 6e 64 ter.it..............textToAppend
596e0 20 3d 20 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 52 65 70 6c 61 63 65 28 67 6c 6f 62 61 6c 3a 3a .=.textToAppend.Replace(global::
59700 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 28 67 6c 6f System.Environment.NewLine,.(glo
59720 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 20 bal::System.Environment.NewLine.
59740 2b 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 29 29 3b 0d 0a 20 20 +.this.currentIndentField));....
59760 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 74 65 78 74 20 65 6e 64 73 20 77 69 ..........//.If.the.text.ends.wi
59780 74 68 20 61 20 6e 65 77 6c 69 6e 65 2c 20 74 68 65 6e 20 77 65 20 73 68 6f 75 6c 64 20 73 74 72 th.a.newline,.then.we.should.str
597a0 69 70 20 6f 66 66 20 74 68 65 20 69 6e 64 65 6e 74 20 61 64 64 65 64 20 61 74 20 74 68 65 20 76 ip.off.the.indent.added.at.the.v
597c0 65 72 79 20 65 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 65 63 61 75 73 65 20 ery.end..............//.because.
597e0 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 69 6e 64 65 6e 74 20 77 69 6c 6c 20 62 65 20 61 the.appropriate.indent.will.be.a
59800 64 64 65 64 20 77 68 65 6e 20 74 68 65 20 6e 65 78 74 20 74 69 6d 65 20 57 72 69 74 65 28 29 20 dded.when.the.next.time.Write().
59820 69 73 20 63 61 6c 6c 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 68 69 73 2e is.called..............if.(this.
59840 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d endsWithNewline)..............{.
59860 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e .................this.Generation
59880 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 78 74 54 6f 41 70 70 65 6e 64 2c Environment.Append(textToAppend,
598a0 20 30 2c 20 28 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 4c 65 6e 67 74 68 20 2d 20 74 68 69 73 2e .0,.(textToAppend.Length.-.this.
598c0 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 29 29 3b 0d 0a 20 20 currentIndentField.Length));....
598e0 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 65 6c 73 65 0d 0a 20 ..........}..............else...
59900 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 74 68 ...........{..................th
59920 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 is.GenerationEnvironment.Append(
59940 74 65 78 74 54 6f 41 70 70 65 6e 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 textToAppend);..............}...
59960 20 20 20 20 20 20 20 7d 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>.
59980 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 72 69 74 65 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 .........///.Write.text.directly
599a0 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 .into.the.generated.output......
599c0 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 70 75 62 6c ....///.</summary>..........publ
599e0 69 63 20 76 6f 69 64 20 57 72 69 74 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 74 65 78 74 54 6f 41 ic.void.WriteLine(string.textToA
59a00 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ppend)..........{..............t
59a20 68 69 73 2e 57 72 69 74 65 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 3b 0d 0a 20 20 20 20 20 20 his.Write(textToAppend);........
59a40 20 20 20 20 20 20 74 68 69 73 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 ......this.GenerationEnvironment
59a60 2e 41 70 70 65 6e 64 4c 69 6e 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 .AppendLine();..............this
59a80 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 .endsWithNewline.=.true;........
59aa0 20 20 7d 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>......
59ac0 20 20 20 20 2f 2f 2f 20 57 72 69 74 65 20 66 6f 72 6d 61 74 74 65 64 20 74 65 78 74 20 64 69 72 ....///.Write.formatted.text.dir
59ae0 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d ectly.into.the.generated.output.
59b00 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 20 .........///.</summary>.........
59b20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 57 72 69 74 65 28 73 74 72 69 6e 67 20 66 6f 72 6d 61 74 .public.void.Write(string.format
59b40 2c 20 70 61 72 61 6d 73 20 6f 62 6a 65 63 74 5b 5d 20 61 72 67 73 29 0d 0a 20 20 20 20 20 20 20 ,.params.object[].args).........
59b60 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 28 73 74 72 69 6e .{..............this.Write(strin
59b80 67 2e 46 6f 72 6d 61 74 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a g.Format(global::System.Globaliz
59ba0 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 ation.CultureInfo.CurrentCulture
59bc0 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ,.format,.args));..........}....
59be0 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>..........///
59c00 20 57 72 69 74 65 20 66 6f 72 6d 61 74 74 65 64 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 .Write.formatted.text.directly.i
59c20 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 nto.the.generated.output........
59c40 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 70 75 62 6c 69 63 ..///.</summary>..........public
59c60 20 76 6f 69 64 20 57 72 69 74 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 66 6f 72 6d 61 74 2c 20 70 .void.WriteLine(string.format,.p
59c80 61 72 61 6d 73 20 6f 62 6a 65 63 74 5b 5d 20 61 72 67 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d arams.object[].args)..........{.
59ca0 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 57 72 69 74 65 4c 69 6e 65 28 73 74 72 69 .............this.WriteLine(stri
59cc0 6e 67 2e 46 6f 72 6d 61 74 28 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 ng.Format(global::System.Globali
59ce0 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 zation.CultureInfo.CurrentCultur
59d00 65 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 e,.format,.args));..........}...
59d20 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 2f .......///.<summary>..........//
59d40 2f 20 52 61 69 73 65 20 61 6e 20 65 72 72 6f 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f /.Raise.an.error..........///.</
59d60 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 72 summary>..........public.void.Er
59d80 72 6f 72 28 73 74 72 69 6e 67 20 6d 65 73 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a ror(string.message)..........{..
59da0 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 ............System.CodeDom.Compi
59dc0 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 65 72 72 6f 72 20 3d 20 6e 65 77 20 67 6c ler.CompilerError.error.=.new.gl
59de0 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f obal::System.CodeDom.Compiler.Co
59e00 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 72 72 6f mpilerError();..............erro
59e20 72 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 6d 65 73 73 61 67 65 3b 0d 0a 20 20 20 20 20 20 20 20 r.ErrorText.=.message;..........
59e40 20 20 20 20 74 68 69 73 2e 45 72 72 6f 72 73 2e 41 64 64 28 65 72 72 6f 72 29 3b 0d 0a 20 20 20 ....this.Errors.Add(error);.....
59e60 20 20 20 20 20 7d 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>...
59e80 20 20 20 20 20 20 20 2f 2f 2f 20 52 61 69 73 65 20 61 20 77 61 72 6e 69 6e 67 0d 0a 20 20 20 20 .......///.Raise.a.warning......
59ea0 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 70 75 62 6c ....///.</summary>..........publ
59ec0 69 63 20 76 6f 69 64 20 57 61 72 6e 69 6e 67 28 73 74 72 69 6e 67 20 6d 65 73 73 61 67 65 29 0d ic.void.Warning(string.message).
59ee0 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 43 .........{..............System.C
59f00 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 65 72 odeDom.Compiler.CompilerError.er
59f20 72 6f 72 20 3d 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d ror.=.new.global::System.CodeDom
59f40 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 3b 0d 0a 20 20 20 20 .Compiler.CompilerError();......
59f60 20 20 20 20 20 20 20 20 65 72 72 6f 72 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 6d 65 73 73 61 67 ........error.ErrorText.=.messag
59f80 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 72 72 6f 72 2e 49 73 57 61 72 6e 69 6e 67 20 e;..............error.IsWarning.
59fa0 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 45 72 72 6f 72 73 =.true;..............this.Errors
59fc0 2e 41 64 64 28 65 72 72 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 .Add(error);..........}.........
59fe0 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 49 6e 63 72 .///.<summary>..........///.Incr
5a000 65 61 73 65 20 74 68 65 20 69 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 ease.the.indent..........///.</s
5a020 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 75 73 ummary>..........public.void.Pus
5a040 68 49 6e 64 65 6e 74 28 73 74 72 69 6e 67 20 69 6e 64 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 hIndent(string.indent)..........
5a060 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 69 6e 64 65 6e 74 20 3d 3d 20 6e 75 {..............if.((indent.==.nu
5a080 6c 6c 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 20 20 ll))..............{.............
5a0a0 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 41 72 .....throw.new.global::System.Ar
5a0c0 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 69 6e 64 65 6e 74 22 29 3b 0d 0a gumentNullException("indent");..
5a0e0 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 74 68 69 73 2e ............}..............this.
5a100 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 28 74 68 69 73 2e 63 75 72 72 65 currentIndentField.=.(this.curre
5a120 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 2b 20 69 6e 64 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 ntIndentField.+.indent);........
5a140 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 41 64 64 28 69 6e 64 ......this.indentLengths.Add(ind
5a160 65 6e 74 2e 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ent.Length);..........}.........
5a180 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 52 65 6d 6f .///.<summary>..........///.Remo
5a1a0 76 65 20 74 68 65 20 6c 61 73 74 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 61 73 20 61 64 64 65 ve.the.last.indent.that.was.adde
5a1c0 64 20 77 69 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c d.with.PushIndent..........///.<
5a1e0 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 /summary>..........public.string
5a200 20 50 6f 70 49 6e 64 65 6e 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .PopIndent()..........{.........
5a220 20 20 20 20 20 73 74 72 69 6e 67 20 72 65 74 75 72 6e 56 61 6c 75 65 20 3d 20 22 22 3b 0d 0a 20 .....string.returnValue.=."";...
5a240 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 ...........if.((this.indentLengt
5a260 68 73 2e 43 6f 75 6e 74 20 3e 20 30 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 hs.Count.>.0))..............{...
5a280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 20 ...............int.indentLength.
5a2a0 3d 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 5b 28 74 68 69 73 2e 69 6e 64 65 6e =.this.indentLengths[(this.inden
5a2c0 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 2d 20 31 29 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 tLengths.Count.-.1)];...........
5a2e0 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 52 65 6d 6f 76 65 .......this.indentLengths.Remove
5a300 41 74 28 28 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 2d 20 31 At((this.indentLengths.Count.-.1
5a320 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 69 6e 64 65 6e 74 ));..................if.((indent
5a340 4c 65 6e 67 74 68 20 3e 20 30 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d Length.>.0))..................{.
5a360 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 56 61 6c 75 65 .....................returnValue
5a380 20 3d 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 53 75 62 73 74 .=.this.currentIndentField.Subst
5a3a0 72 69 6e 67 28 28 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 ring((this.currentIndentField.Le
5a3c0 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 ngth.-.indentLength));..........
5a3e0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 ............this.currentIndentFi
5a400 65 6c 64 20 3d 20 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 52 65 eld.=.this.currentIndentField.Re
5a420 6d 6f 76 65 28 28 74 68 69 73 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 move((this.currentIndentField.Le
5a440 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 ngth.-.indentLength));..........
5a460 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ........}..............}........
5a480 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 74 75 72 6e 56 61 6c 75 65 3b 0d 0a 20 20 20 20 20 ......return.returnValue;.......
5a4a0 20 20 20 7d 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>.....
5a4c0 20 20 20 20 20 2f 2f 2f 20 52 65 6d 6f 76 65 20 61 6e 79 20 69 6e 64 65 6e 74 61 74 69 6f 6e 0d .....///.Remove.any.indentation.
5a4e0 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 20 .........///.</summary>.........
5a500 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 6c 65 61 72 49 6e 64 65 6e 74 28 29 0d 0a 20 20 20 20 .public.void.ClearIndent()......
5a520 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 64 65 6e 74 4c 65 ....{..............this.indentLe
5a540 6e 67 74 68 73 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 ngths.Clear();..............this
5a560 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 22 22 3b 0d 0a 20 20 20 20 20 .currentIndentField.=."";.......
5a580 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 ...}..........#endregion........
5a5a0 20 20 23 72 65 67 69 6f 6e 20 54 6f 53 74 72 69 6e 67 20 48 65 6c 70 65 72 73 0d 0a 20 20 20 20 ..#region.ToString.Helpers......
5a5c0 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 20 55 ....///.<summary>..........///.U
5a5e0 74 69 6c 69 74 79 20 63 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 63 65 20 63 75 6c 74 75 72 65 2d tility.class.to.produce.culture-
5a600 6f 72 69 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 61 6e 20 6f 62 oriented.representation.of.an.ob
5a620 6a 65 63 74 20 61 73 20 61 20 73 74 72 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ject.as.a.string...........///.<
5a640 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 /summary>..........public.class.
5a660 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 0d 0a 20 20 20 20 20 20 20 20 ToStringInstanceHelper..........
5a680 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 53 79 73 74 65 6d 2e 49 46 {..............private.System.IF
5a6a0 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 20 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c ormatProvider.formatProviderFiel
5a6c0 64 20 20 3d 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f d..=.global::System.Globalizatio
5a6e0 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 3b 0d n.CultureInfo.InvariantCulture;.
5a700 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>......
5a720 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 73 20 6f 72 20 73 65 74 73 20 66 6f 72 6d 61 74 20 ........///.Gets.or.sets.format.
5a740 70 72 6f 76 69 64 65 72 20 74 6f 20 62 65 20 75 73 65 64 20 62 79 20 54 6f 53 74 72 69 6e 67 57 provider.to.be.used.by.ToStringW
5a760 69 74 68 43 75 6c 74 75 72 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ithCulture.method...............
5a780 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 70 75 62 6c ///.</summary>..............publ
5a7a0 69 63 20 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 20 46 6f 72 6d 61 74 ic.System.IFormatProvider.Format
5a7c0 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 Provider..............{.........
5a7e0 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d .........get..................{.
5a800 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
5a820 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 3b 0d 0a 20 20 20 20 20 20 20 20 .formatProviderField.;..........
5a840 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 73 65 74 0d 0a ........}..................set..
5a860 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 ................{...............
5a880 20 20 20 20 20 20 20 69 66 20 28 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 .......if.((value.!=.null)).....
5a8a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
5a8c0 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 ............this.formatProviderF
5a8e0 69 65 6c 64 20 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ield..=.value;..................
5a900 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ....}..................}........
5a920 20 20 20 20 20 20 7d 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
5a940 79 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 63 61 6c 6c y>..............///.This.is.call
5a960 65 64 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d 70 69 6c 65 2f 72 75 6e 20 61 70 70 64 6f 6d 61 69 ed.from.the.compile/run.appdomai
5a980 6e 20 74 6f 20 63 6f 6e 76 65 72 74 20 6f 62 6a 65 63 74 73 20 77 69 74 68 69 6e 20 61 6e 20 65 n.to.convert.objects.within.an.e
5a9a0 78 70 72 65 73 73 69 6f 6e 20 62 6c 6f 63 6b 20 74 6f 20 61 20 73 74 72 69 6e 67 0d 0a 20 20 20 xpression.block.to.a.string.....
5a9c0 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 20 .........///.</summary>.........
5a9e0 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 54 6f 53 74 72 69 6e 67 57 69 74 68 43 .....public.string.ToStringWithC
5aa00 75 6c 74 75 72 65 28 6f 62 6a 65 63 74 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 29 0d 0a ulture(object.objectToConvert)..
5aa20 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 69 ............{..................i
5aa40 66 20 28 28 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 20 3d 3d 20 6e 75 6c 6c 29 29 0d 0a 20 f.((objectToConvert.==.null))...
5aa60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
5aa80 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 67 6c 6f 62 61 6c 3a 3a 53 79 73 74 65 6d 2e 41 ......throw.new.global::System.A
5aaa0 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6f 62 6a 65 63 74 54 6f 43 6f rgumentNullException("objectToCo
5aac0 6e 76 65 72 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 nvert");..................}.....
5aae0 20 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 54 79 70 65 20 74 20 3d 20 6f 62 6a .............System.Type.t.=.obj
5ab00 65 63 74 54 6f 43 6f 6e 76 65 72 74 2e 47 65 74 54 79 70 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 ectToConvert.GetType();.........
5ab20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f 6e 2e 4d 65 74 68 6f .........System.Reflection.Metho
5ab40 64 49 6e 66 6f 20 6d 65 74 68 6f 64 20 3d 20 74 2e 47 65 74 4d 65 74 68 6f 64 28 22 54 6f 53 74 dInfo.method.=.t.GetMethod("ToSt
5ab60 72 69 6e 67 22 2c 20 6e 65 77 20 53 79 73 74 65 6d 2e 54 79 70 65 5b 5d 20 7b 0d 0a 20 20 20 20 ring",.new.System.Type[].{......
5ab80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 6f 66 28 53 ........................typeof(S
5aba0 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 29 7d 29 3b 0d 0a 20 20 20 20 20 ystem.IFormatProvider)});.......
5abc0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 65 74 68 6f 64 20 3d 3d 20 6e 75 6c 6c 29 29 ...........if.((method.==.null))
5abe0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
5ac00 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2e .........return.objectToConvert.
5ac20 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ToString();..................}..
5ac40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 ................else............
5ac60 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 ......{......................ret
5ac80 75 72 6e 20 28 28 73 74 72 69 6e 67 29 28 6d 65 74 68 6f 64 2e 49 6e 76 6f 6b 65 28 6f 62 6a 65 urn.((string)(method.Invoke(obje
5aca0 63 74 54 6f 43 6f 6e 76 65 72 74 2c 20 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 0d 0a 20 20 20 ctToConvert,.new.object[].{.....
5acc0 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 74 68 69 .............................thi
5ace0 73 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 7d 29 29 29 3b 0d 0a 20 20 20 s.formatProviderField.})));.....
5ad00 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 .............}..............}...
5ad20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 54 6f 53 74 72 69 .......}..........private.ToStri
5ad40 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 20 74 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 46 ngInstanceHelper.toStringHelperF
5ad60 69 65 6c 64 20 3d 20 6e 65 77 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 ield.=.new.ToStringInstanceHelpe
5ad80 72 28 29 3b 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 r();..........///.<summary>.....
5ada0 20 20 20 20 20 2f 2f 2f 20 48 65 6c 70 65 72 20 74 6f 20 70 72 6f 64 75 63 65 20 63 75 6c 74 75 .....///.Helper.to.produce.cultu
5adc0 72 65 2d 6f 72 69 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 61 6e re-oriented.representation.of.an
5ade0 20 6f 62 6a 65 63 74 20 61 73 20 61 20 73 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f .object.as.a.string..........///
5ae00 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 6f 53 74 .</summary>..........public.ToSt
5ae20 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 20 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 ringInstanceHelper.ToStringHelpe
5ae40 72 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 67 65 74 0d 0a 20 r..........{..............get...
5ae60 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 72 65 ...........{..................re
5ae80 74 75 72 6e 20 74 68 69 73 2e 74 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 46 69 65 6c 64 3b 0d 0a turn.this.toStringHelperField;..
5aea0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ............}..........}........
5aec0 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 20 23 65 6e 64 72 65 67 ..#endregion......}......#endreg
5aee0 69 6f 6e 0d 0a 7d 0d 0a c5 0a 03 00 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 0d 0a 49 6d 70 6f ion..}......Imports.System..Impo
5af00 72 74 73 20 53 79 73 74 65 6d 2e 4c 69 6e 71 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e rts.System.Linq..Imports.System.
5af20 49 4f 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 IO..Imports.System.Collections.G
5af40 65 6e 65 72 69 63 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 eneric..Imports.System.Data.Obje
5af60 63 74 73 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 cts..Imports.System.Data.Objects
5af80 2e 44 61 74 61 43 6c 61 73 73 65 73 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 58 6d 6c .DataClasses..Imports.System.Xml
5afa0 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 58 6d 6c 2e 4c 69 6e 71 0d 0a 49 6d 70 6f 72 ..Imports.System.Xml.Linq..Impor
5afc0 74 73 20 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 0d 0a 49 6d 70 6f 72 74 73 ts.System.Globalization..Imports
5afe0 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f 6e 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 .System.Reflection..Imports.Syst
5b000 65 6d 2e 44 61 74 61 2e 4d 65 74 61 64 61 74 61 2e 45 64 6d 0d 0a 49 6d 70 6f 72 74 73 20 53 79 em.Data.Metadata.Edm..Imports.Sy
5b020 73 74 65 6d 2e 44 61 74 61 2e 4d 61 70 70 69 6e 67 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 stem.Data.Mapping..Imports.Syste
5b040 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 0d 0a 49 6d 70 6f 72 74 73 20 53 79 m.Data.Entity.Design..Imports.Sy
5b060 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 43 6f 64 stem.CodeDom..Imports.System.Cod
5b080 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 0d 0a 49 6d 70 6f 72 74 73 20 4d 69 63 72 6f 73 6f 66 74 eDom.Compiler..Imports.Microsoft
5b0a0 2e 56 69 73 75 61 6c 42 61 73 69 63 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 54 65 78 .VisualBasic..Imports.System.Tex
5b0c0 74 0d 0a 0d 0a 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d t....'--------------------------
5b0e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
5b100 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 27 3c 61 75 74 6f 2d 67 65 6e --------------------..'<auto-gen
5b120 65 72 61 74 65 64 3e 0d 0a 27 20 20 20 20 54 68 69 73 20 63 6f 64 65 20 77 61 73 20 67 65 6e 65 erated>..'....This.code.was.gene
5b140 72 61 74 65 64 20 62 79 20 61 20 74 6f 6f 6c 2e 0d 0a 27 20 20 20 20 52 75 6e 74 69 6d 65 20 56 rated.by.a.tool...'....Runtime.V
5b160 65 72 73 69 6f 6e 3a 20 31 31 2e 30 2e 30 2e 30 0d 0a 27 20 0d 0a 27 20 20 20 20 43 68 61 6e 67 ersion:.11.0.0.0..'...'....Chang
5b180 65 73 20 74 6f 20 74 68 69 73 20 66 69 6c 65 20 6d 61 79 20 63 61 75 73 65 20 69 6e 63 6f 72 72 es.to.this.file.may.cause.incorr
5b1a0 65 63 74 20 62 65 68 61 76 69 6f 72 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 6c 6f 73 74 20 69 66 ect.behavior.and.will.be.lost.if
5b1c0 0d 0a 27 20 20 20 20 74 68 65 20 63 6f 64 65 20 69 73 20 72 65 67 65 6e 65 72 61 74 65 64 2e 0d ..'....the.code.is.regenerated..
5b1e0 0a 27 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 0d 0a 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d .'</auto-generated>..'----------
5b200 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
5b220 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
5b240 2d 2d 2d 2d 0d 0a 4e 61 6d 65 73 70 61 63 65 20 54 65 6d 70 6c 61 74 65 43 6f 64 65 47 65 6e 65 ----..Namespace.TemplateCodeGene
5b260 72 61 74 6f 72 73 0d 0a 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 rators......'''<summary>......''
5b280 27 43 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 63 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 'Class.to.produce.the.template.o
5b2a0 75 74 70 75 74 0d 0a 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 3c 47 utput......'''</summary>......<G
5b2c0 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 65 lobal.System.CodeDom.Compiler.Ge
5b2e0 6e 65 72 61 74 65 64 43 6f 64 65 41 74 74 72 69 62 75 74 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e neratedCodeAttribute("Microsoft.
5b300 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 22 2c 20 22 31 VisualStudio.TextTemplating",."1
5b320 31 2e 30 2e 30 2e 30 22 29 3e 20 20 5f 0d 0a 20 20 20 20 50 61 72 74 69 61 6c 20 50 75 62 6c 69 1.0.0.0")>.._......Partial.Publi
5b340 63 20 43 6c 61 73 73 20 56 42 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 0d 0a 20 20 20 20 20 c.Class.VBCodeGenTemplate.......
5b360 20 20 20 49 6e 68 65 72 69 74 73 20 56 42 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 42 61 73 ...Inherits.VBCodeGenTemplateBas
5b380 65 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 e..........'''<summary>.........
5b3a0 20 27 27 27 43 72 65 61 74 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 0d 0a .'''Create.the.template.output..
5b3c0 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 ........'''</summary>..........P
5b3e0 75 62 6c 69 63 20 4f 76 65 72 72 69 64 61 62 6c 65 20 46 75 6e 63 74 69 6f 6e 20 54 72 61 6e 73 ublic.Overridable.Function.Trans
5b400 66 6f 72 6d 54 65 78 74 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0a 0d 0a 27 20 0d 0a 27 20 0d formText().As.String.....'...'..
5b420 0a 27 20 0d 0a 27 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a .'...'..'...'...'...'...'...'...
5b440 27 20 0d 0a 27 20 0d 0a 27 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 0a 0a 0d 0a 0d '...'...'..'...'...'...'........
5b460 0a 44 65 66 69 6e 65 4d 65 74 61 64 61 74 61 28 29 0d 0a 0d 0a 20 20 20 20 44 69 6d 20 75 73 65 .DefineMetadata()........Dim.use
5b480 72 53 65 74 74 69 6e 67 73 20 41 73 20 55 73 65 72 53 65 74 74 69 6e 67 73 20 3d 0d 0a 20 20 20 rSettings.As.UserSettings.=.....
5b4a0 20 20 20 20 20 4e 65 77 20 55 73 65 72 53 65 74 74 69 6e 67 73 20 57 69 74 68 20 5f 0d 0a 20 20 .....New.UserSettings.With._....
5b4c0 20 20 20 20 20 20 7b 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2e 53 6f 75 72 63 65 43 73 ......{._...............SourceCs
5b4e0 64 6c 50 61 74 68 20 3d 20 22 24 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 24 22 2c 20 5f 0d 0a 20 dlPath.=."$edmxInputFile$",._...
5b500 20 20 20 20 20 20 20 20 20 20 20 2e 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 3d ............ReferenceCsdlPaths.=
5b520 20 4e 65 77 20 73 74 72 69 6e 67 20 28 29 20 7b 7d 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 .New.string.().{},._............
5b540 20 20 2e 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 54 72 75 ...FullyQualifySystemTypes.=.Tru
5b560 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2e 43 72 65 61 74 65 43 6f 6e 74 65 78 74 e,._...............CreateContext
5b580 41 64 64 54 6f 4d 65 74 68 6f 64 73 20 3d 20 54 72 75 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 AddToMethods.=.True,._..........
5b5a0 20 20 20 20 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 46 61 6c 73 65 20 5f 0d 0a .....CamelCaseFields.=.False._..
5b5c0 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 41 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 75 ........}....ApplyUserSettings(u
5b5e0 73 65 72 53 65 74 74 69 6e 67 73 29 0d 0a 49 66 20 45 72 72 6f 72 73 2e 48 61 73 45 72 72 6f 72 serSettings)..If.Errors.HasError
5b600 73 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 45 6e 64 20 s......Return.String.Empty..End.
5b620 49 66 0d 0a 44 69 6d 20 6c 6f 61 64 65 72 20 41 73 20 4e 65 77 20 4d 65 74 61 64 61 74 61 4c 6f If..Dim.loader.As.New.MetadataLo
5b640 61 64 65 72 28 4d 65 29 0d 0a 44 69 6d 20 65 66 20 41 73 20 4e 65 77 20 4d 65 74 61 64 61 74 61 ader(Me)..Dim.ef.As.New.Metadata
5b660 54 6f 6f 6c 73 28 4d 65 29 0d 0a 44 69 6d 20 72 65 67 69 6f 6e 20 41 73 20 4e 65 77 20 43 6f 64 Tools(Me)..Dim.region.As.New.Cod
5b680 65 52 65 67 69 6f 6e 28 4d 65 29 0d 0a 44 69 6d 20 63 6f 64 65 20 41 73 20 4e 65 77 20 43 6f 64 eRegion(Me)..Dim.code.As.New.Cod
5b6a0 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 28 4d 65 29 20 57 69 74 68 20 7b 2e 46 75 6c 6c eGenerationTools(Me).With.{.Full
5b6c0 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e yQualifySystemTypes.=.userSettin
5b6e0 67 73 2e 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 2c 20 2e 43 61 6d gs.FullyQualifySystemTypes,..Cam
5b700 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 61 6d 65 elCaseFields.=.userSettings.Came
5b720 6c 43 61 73 65 46 69 65 6c 64 73 7d 0d 0a 0d 0a 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d lCaseFields}....ItemCollection.=
5b740 20 6c 6f 61 64 65 72 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 .loader.CreateEdmItemCollection(
5b760 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 SourceCsdlPath,.ReferenceCsdlPat
5b780 68 73 2e 54 6f 41 72 72 61 79 28 29 29 0d 0a 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 hs.ToArray())..ModelNamespace.=.
5b7a0 6c 6f 61 64 65 72 2e 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 53 6f 75 72 63 65 43 loader.GetModelNamespace(SourceC
5b7c0 73 64 6c 50 61 74 68 29 0d 0a 44 69 6d 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 sdlPath)..Dim.namespaceName.As.S
5b7e0 74 72 69 6e 67 20 3d 20 47 65 74 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 28 63 6f 64 65 29 0d 0a tring.=.GetNamespaceName(code)..
5b800 55 70 64 61 74 65 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 28 6e 61 6d 65 73 70 61 UpdateObjectNamespaceMap(namespa
5b820 63 65 4e 61 6d 65 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 ceName)...............Me.Write("
5b840 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
5b860 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
5b880 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d asic.ChrW(10)&"'----------------
5b8a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
5b8c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 26 ------------------------------"&
5b8e0 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 22 26 47 6c 6f 62 ._.......................""&Glob
5b900 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
5b920 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
5b940 68 72 57 28 31 30 29 26 22 27 20 3c 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 22 26 47 6c 6f hrW(10)&"'.<auto-generated>"&Glo
5b960 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
5b980 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
5b9a0 43 68 72 57 28 31 30 29 26 22 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e ChrW(10)&"'.")...............Me.
5b9c0 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
5b9e0 57 69 74 68 43 75 6c 74 75 72 65 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 WithCulture(GetResourceString("T
5ba00 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 emplate_GeneratedCodeCommentLine
5ba20 31 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 1")))...............Me.Write(""&
5ba40 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5ba60 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
5ba80 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ic.ChrW(10)&"'"&Global.Microsoft
5baa0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
5bac0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 20 22 rosoft.VisualBasic.ChrW(10)&"'."
5bae0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
5bb00 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 ringHelper.ToStringWithCulture(G
5bb20 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 etResourceString("Template_Gener
5bb40 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 32 22 29 29 29 0d 0a 0a 20 20 20 20 20 atedCodeCommentLine2")))........
5bb60 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 .......Me.Write(""&Global.Micros
5bb80 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
5bba0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
5bbc0 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 '.")...............Me.Write(Me.T
5bbe0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
5bc00 65 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 e(GetResourceString("Template_Ge
5bc20 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 33 22 29 29 29 0d 0a 0a 20 20 neratedCodeCommentLine3"))).....
5bc40 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ..........Me.Write(""&Global.Mic
5bc60 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
5bc80 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
5bca0 29 26 22 27 20 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 22 26 47 6c 6f 62 61 6c 2e 4d )&"'.</auto-generated>"&Global.M
5bcc0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
5bce0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
5bd00 31 30 29 26 22 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 10)&"'--------------------------
5bd20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 -------------------------------"
5bd40 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 2d 2d 2d 2d 2d &._......................."-----
5bd60 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ----------------"&Global.Microso
5bd80 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
5bda0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c icrosoft.VisualBasic.ChrW(10)&Gl
5bdc0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
5bde0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
5be00 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 22 26 47 6c 6f 62 61 .ChrW(10)&"Imports.System"&Globa
5be20 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
5be40 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5be60 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 43 6f 6d 70 6f 6e 65 6e 74 rW(10)&"Imports.System.Component
5be80 4d 6f 64 65 6c 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 Model"&Global.Microsoft.VisualBa
5bea0 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
5bec0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 22 26 20 5f sualBasic.ChrW(10)&"Imports."&._
5bee0 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 53 79 73 74 65 6d 2e 44 ......................."System.D
5bf00 61 74 61 2e 45 6e 74 69 74 79 43 6c 69 65 6e 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ata.EntityClient"&Global.Microso
5bf20 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
5bf40 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 icrosoft.VisualBasic.ChrW(10)&"I
5bf60 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 22 26 47 6c 6f 62 mports.System.Data.Objects"&Glob
5bf80 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
5bfa0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
5bfc0 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a hrW(10)&"Imports.System.Data.Obj
5bfe0 65 63 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 73 ec"&._......................."ts
5c000 2e 44 61 74 61 43 6c 61 73 73 65 73 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .DataClasses"&Global.Microsoft.V
5c020 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
5c040 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 soft.VisualBasic.ChrW(10)&"Impor
5c060 74 73 20 53 79 73 74 65 6d 2e 4c 69 6e 71 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ts.System.Linq"&Global.Microsoft
5c080 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
5c0a0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 rosoft.VisualBasic.ChrW(10)&"Imp
5c0c0 6f 72 74 73 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f orts.System.Runtime.Serializatio
5c0e0 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e n"&Global.Microsoft.VisualBasic.
5c100 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
5c120 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 22 26 20 5f 20 0d 0a 20 20 20 20 Basic.ChrW(10)&"Impor"&._.......
5c140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 73 20 53 79 73 74 65 6d 2e 58 6d 6c 2e 53 ................"ts.System.Xml.S
5c160 65 72 69 61 6c 69 7a 61 74 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 erialization"&Global.Microsoft.V
5c180 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
5c1a0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(10)&Global
5c1c0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
5c1e0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5c200 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(10)&Global.Microsoft.VisualBas
5c220 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
5c240 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 41 73 73 65 6d 62 6c 79 3a 20 45 64 ualBasic.ChrW(10)&"<Assembly:.Ed
5c260 6d 53 63 68 65 6d 61 41 74 74 72 69 62 75 74 65 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 mSchemaAttribute(""")...........
5c280 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
5c2a0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 75 69 64 2e 4e 65 77 47 75 69 64 28 oStringWithCulture(Guid.NewGuid(
5c2c0 29 2e 54 6f 53 74 72 69 6e 67 28 22 44 22 2c 20 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 ).ToString("D",.CultureInfo.Inva
5c2e0 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 riantCulture)))...............Me
5c300 2e 57 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .Write(""")>"&Global.Microsoft.V
5c320 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
5c340 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 soft.VisualBasic.ChrW(10))......
5c360 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 57 72 69 74 65 20 ...''''''''......''''''''.Write.
5c380 52 65 6c 61 74 69 6f 6e 73 68 69 70 20 41 74 74 72 69 62 75 74 65 73 2e 0d 0a 20 20 20 20 27 27 Relationship.Attributes.......''
5c3a0 27 27 27 27 27 27 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f ''''''......region.Begin(GetReso
5c3c0 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 52 65 6c 61 74 urceString("Template_RegionRelat
5c3e0 69 6f 6e 73 68 69 70 73 22 29 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 61 73 73 6f 63 69 ionships"))......For.Each.associ
5c400 61 74 69 6f 6e 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 69 6e 20 47 65 74 53 ation.As.AssociationType.in.GetS
5c420 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 28 4f 66 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 ourceSchemaTypes(Of.AssociationT
5c440 79 70 65 29 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 3c ype)()...............Me.Write("<
5c460 41 73 73 65 6d 62 6c 79 3a 20 45 64 6d 52 65 6c 61 74 69 6f 6e 73 68 69 70 41 74 74 72 69 62 75 Assembly:.EdmRelationshipAttribu
5c480 74 65 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d te(""")...............Me.Write(M
5c4a0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
5c4c0 74 75 72 65 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 ture(association.NamespaceName))
5c4e0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 ...............Me.Write(""",."""
5c500 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
5c520 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 ringHelper.ToStringWithCulture(a
5c540 73 73 6f 63 69 61 74 69 6f 6e 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ssociation.Name))...............
5c560 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 Me.Write(""",.""")..............
5c580 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
5c5a0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 ringWithCulture(EndName(associat
5c5c0 69 6f 6e 2c 20 30 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ion,.0)))...............Me.Write
5c5e0 28 22 22 22 2c 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 (""",.")...............Me.Write(
5c600 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
5c620 6c 74 75 72 65 28 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 28 61 73 73 6f 63 69 61 74 69 6f lture(EndMultiplicity(associatio
5c640 6e 2c 20 30 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 n,.0,.code)))...............Me.W
5c660 72 69 74 65 28 22 2c 20 47 65 74 54 79 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 rite(",.GetType(")..............
5c680 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
5c6a0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d ringWithCulture(EscapeEndTypeNam
5c6c0 65 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 30 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 e(association,.0,.code))).......
5c6e0 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 ........Me.Write("),.""").......
5c700 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
5c720 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 er.ToStringWithCulture(EndName(a
5c740 73 73 6f 63 69 61 74 69 6f 6e 2c 20 31 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d ssociation,.1)))...............M
5c760 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 e.Write(""",.")...............Me
5c780 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
5c7a0 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 28 61 73 73 gWithCulture(EndMultiplicity(ass
5c7c0 6f 63 69 61 74 69 6f 6e 2c 20 31 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ociation,.1,.code)))............
5c7e0 20 20 20 4d 65 2e 57 72 69 74 65 28 22 2c 20 47 65 74 54 79 70 65 28 22 29 0d 0a 0a 20 20 20 20 ...Me.Write(",.GetType(").......
5c800 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
5c820 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 73 63 61 70 65 45 6e 64 er.ToStringWithCulture(EscapeEnd
5c840 54 79 70 65 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 31 2c 20 63 6f 64 65 29 29 29 TypeName(association,.1,.code)))
5c860 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 29 0d 0a 0a 20 ...............Me.Write(")")....
5c880 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
5c8a0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 elper.ToStringWithCulture(code.S
5c8c0 74 72 69 6e 67 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 49 66 28 61 73 73 6f 63 69 61 74 69 6f 6e tringBefore(",.",.If(association
5c8e0 2e 49 73 46 6f 72 65 69 67 6e 4b 65 79 2c 20 22 54 72 75 65 22 2c 20 4e 6f 74 68 69 6e 67 29 29 .IsForeignKey,."True",.Nothing))
5c900 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 3e 22 26 47 ))...............Me.Write(")>"&G
5c920 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
5c940 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
5c960 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 72 65 c.ChrW(10)).........Next......re
5c980 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 49 66 28 4e 6f 74 20 53 74 72 69 6e 67 2e gion.End()........If(Not.String.
5c9a0 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 20 54 68 IsNullOrEmpty(namespaceName)).Th
5c9c0 65 6e 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 4e 61 6d 65 73 en...............Me.Write("Names
5c9e0 70 61 63 65 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d pace.")...............Me.Write(M
5ca00 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
5ca20 74 75 72 65 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ture(namespaceName))............
5ca40 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
5ca60 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
5ca80 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(10)&Globa
5caa0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
5cac0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5cae0 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 73 68 49 6e 64 65 6e 74 28 43 rW(10)).............PushIndent(C
5cb00 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 31 29 29 0d 0a 20 20 20 20 45 6e 64 odeRegion.GetIndent(1))......End
5cb20 20 49 66 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 .If........''''''''......'''''''
5cb40 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 '.......''''''''......region.Beg
5cb60 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 in(GetResourceString("Template_R
5cb80 65 67 69 6f 6e 43 6f 6e 74 65 78 74 73 22 29 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 63 egionContexts"))......For.Each.c
5cba0 6f 6e 74 61 69 6e 65 72 20 61 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 69 6e 20 47 ontainer.as.EntityContainer.in.G
5cbc0 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 28 4f 66 20 45 6e 74 69 74 79 43 6f 6e etSourceSchemaTypes(Of.EntityCon
5cbe0 74 61 69 6e 65 72 29 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 tainer)()...............Me.Write
5cc00 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
5cc20 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
5cc40 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 lBasic.ChrW(10)&"'''.<summary>"&
5cc60 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5cc80 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
5cca0 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ic.ChrW(10)&"'''.").............
5ccc0 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
5cce0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 tringWithCulture(SummaryComment(
5cd00 63 6f 6e 74 61 69 6e 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 container)))...............Me.Wr
5cd20 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 ite(""&Global.Microsoft.VisualBa
5cd40 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
5cd60 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c 2f 73 75 6d 6d 61 72 sualBasic.ChrW(10)&"'''.</summar
5cd80 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 y>")...............Me.Write(Me.T
5cda0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
5cdc0 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 e(LongDescriptionCommentElement(
5cde0 63 6f 6e 74 61 69 6e 65 72 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c container,.region.CurrentIndentL
5ce00 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 evel)))...............Me.Write("
5ce20 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
5ce40 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
5ce60 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e asic.ChrW(10))...............Me.
5ce80 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
5cea0 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 WithCulture(Accessibility.ForTyp
5cec0 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e e(container)))...............Me.
5cee0 57 72 69 74 65 28 22 20 50 61 72 74 69 61 6c 20 43 6c 61 73 73 20 22 29 0d 0a 0a 20 20 20 20 20 Write(".Partial.Class.")........
5cf00 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .......Me.Write(Me.ToStringHelpe
5cf20 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 r.ToStringWithCulture(code.Escap
5cf40 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e e(container)))...............Me.
5cf60 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
5cf80 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
5cfa0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 49 6e 68 65 72 69 VisualBasic.ChrW(10)&"....Inheri
5cfc0 74 73 20 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ts.ObjectContext"&Global.Microso
5cfe0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
5d000 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c icrosoft.VisualBasic.ChrW(10)&Gl
5d020 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
5d040 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
5d060 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 23 52 65 67 69 6f 6e 20 22 22 22 29 0d 0a 0a 20 20 .ChrW(10)&"....#Region.""").....
5d080 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
5d0a0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 65 74 52 65 73 6f lper.ToStringWithCulture(GetReso
5d0c0 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6e 73 74 urceString("Template_RegionConst
5d0e0 72 75 63 74 6f 72 73 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 ructors")))...............Me.Wri
5d100 74 65 28 22 22 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 te(""""&Global.Microsoft.VisualB
5d120 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
5d140 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(10)&Global.Micro
5d160 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
5d180 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
5d1a0 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f "....'''.<summary>"&Global.Micro
5d1c0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
5d1e0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
5d200 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 "....'''.")...............Me.Wri
5d220 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
5d240 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e hCulture(String.Format(CultureIn
5d260 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 fo.CurrentCulture,.GetResourceSt
5d280 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 74 44 65 66 61 75 6c 74 43 74 6f ring("Template_ContextDefaultCto
5d2a0 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 2c 20 63 6f 6e 74 rComment"),.container.Name,.cont
5d2c0 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 ainer.Name)))...............Me.W
5d2e0 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 rite(""&Global.Microsoft.VisualB
5d300 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
5d320 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 isualBasic.ChrW(10)&"....'''.</s
5d340 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ummary>"&Global.Microsoft.Visual
5d360 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
5d380 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 75 62 6c 69 63 VisualBasic.ChrW(10)&"....Public
5d3a0 20 53 75 62 20 4e 65 77 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 .Sub.New()"&Global.Microsoft.Vis
5d3c0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
5d3e0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
5d400 20 4d 79 42 61 73 65 2e 4e 65 77 28 22 22 6e 61 6d 65 3d 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 .MyBase.New(""name=")...........
5d420 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
5d440 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d oStringWithCulture(container.Nam
5d460 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 e))...............Me.Write(""",.
5d480 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 """)...............Me.Write(Me.T
5d4a0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
5d4c0 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 e(container.Name))..............
5d4e0 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 .Me.Write(""")"&Global.Microsoft
5d500 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
5d520 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d rosoft.VisualBasic.ChrW(10))....
5d540 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 .........WriteLazyLoadingEnabled
5d560 28 63 6f 6e 74 61 69 6e 65 72 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 (container)...............Me.Wri
5d580 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 22 26 te("........OnContextCreated()"&
5d5a0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5d5c0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
5d5e0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c ic.ChrW(10)&"....End.Sub"&Global
5d600 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
5d620 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5d640 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(10)&Global.Microsoft.VisualBas
5d660 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
5d680 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ualBasic.ChrW(10)&"....'''.<summ
5d6a0 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 ary>"&Global.Microsoft.VisualBas
5d6c0 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
5d6e0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a ualBasic.ChrW(10)&"....'''.")...
5d700 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
5d720 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e Helper.ToStringWithCulture(Strin
5d740 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 g.Format(CultureInfo.CurrentCult
5d760 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 ure,.GetResourceString("Template
5d780 5f 43 6f 6e 74 65 78 74 43 6f 6d 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e _ContextCommonCtorComment"),.con
5d7a0 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e tainer.Name)))...............Me.
5d7c0 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
5d7e0 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
5d800 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f VisualBasic.ChrW(10)&"....'''.</
5d820 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 summary>"&Global.Microsoft.Visua
5d840 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
5d860 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 75 62 6c 69 .VisualBasic.ChrW(10)&"....Publi
5d880 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e 67 c.Sub.New(ByVal.connectionString
5d8a0 20 41 73 20 53 74 72 69 6e 67 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 .As.String)"&Global.Microsoft.Vi
5d8c0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
5d8e0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 22 oft.VisualBasic.ChrW(10)&"....."
5d900 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 20 20 4d 79 &._......................."...My
5d920 42 61 73 65 2e 4e 65 77 28 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e 67 2c 20 22 22 22 29 0d Base.New(connectionString,.""").
5d940 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
5d960 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e ngHelper.ToStringWithCulture(con
5d980 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 tainer.Name))...............Me.W
5d9a0 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 rite(""")"&Global.Microsoft.Visu
5d9c0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
5d9e0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 t.VisualBasic.ChrW(10)).........
5da00 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 63 6f 6e 74 ....WriteLazyLoadingEnabled(cont
5da20 61 69 6e 65 72 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 ainer)...............Me.Write(".
5da40 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 22 26 47 6c 6f 62 61 .......OnContextCreated()"&Globa
5da60 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
5da80 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5daa0 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 rW(10)&"....End.Sub"&Global.Micr
5dac0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
5dae0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
5db00 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5db20 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5db40 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 sic.ChrW(10)&"....'''.<summary>"
5db60 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5db80 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5dba0 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 sic.ChrW(10)&"....'''.")........
5dbc0 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .......Me.Write(Me.ToStringHelpe
5dbe0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 r.ToStringWithCulture(String.For
5dc00 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 mat(CultureInfo.CurrentCulture,.
5dc20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 GetResourceString("Template_Cont
5dc40 65 78 74 43 6f 6d 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 extCommonCtorComment"),.containe
5dc60 72 2e 4e 61 6d 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 r.Name)))...............Me.Write
5dc80 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
5dca0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
5dcc0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 lBasic.ChrW(10)&"....'''.</summa
5dce0 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 ry>"&Global.Microsoft.VisualBasi
5dd00 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
5dd20 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 alBasic.ChrW(10)&"....Public.Sub
5dd40 20 4e 65 77 28 42 79 56 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 41 73 20 45 6e 74 69 74 79 43 .New(ByVal.connection.As.EntityC
5dd60 6f 6e 6e 65 63 74 69 6f 6e 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 onnection)"&Global.Microsoft.Vis
5dd80 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
5dda0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 22 26 20 5f 20 0d ft.VisualBasic.ChrW(10)&"."&._..
5ddc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 20 20 20 20 20 20 4d 79 42 .....................".......MyB
5dde0 61 73 65 2e 4e 65 77 28 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 ase.New(connection,.""")........
5de00 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .......Me.Write(Me.ToStringHelpe
5de20 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e r.ToStringWithCulture(container.
5de40 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 Name))...............Me.Write(""
5de60 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 ")"&Global.Microsoft.VisualBasic
5de80 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
5dea0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 lBasic.ChrW(10)).............Wri
5dec0 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 0d teLazyLoadingEnabled(container).
5dee0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 ..............Me.Write("........
5df00 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f OnContextCreated()"&Global.Micro
5df20 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
5df40 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
5df60 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 "....End.Sub"&Global.Microsoft.V
5df80 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
5dfa0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(10)&Global
5dfc0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
5dfe0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5e000 57 28 31 30 29 26 22 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d W(10)&"....#End.Region"&Global.M
5e020 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
5e040 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
5e060 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 10)&Global.Microsoft.VisualBasic
5e080 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
5e0a0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 23 52 65 67 69 6f 6e 20 22 22 22 lBasic.ChrW(10)&"....#Region."""
5e0c0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
5e0e0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 ringHelper.ToStringWithCulture(G
5e100 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f etResourceString("Template_Regio
5e120 6e 50 61 72 74 69 61 6c 4d 65 74 68 6f 64 73 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 nPartialMethods"))).............
5e140 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ..Me.Write(""""&Global.Microsoft
5e160 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
5e180 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(10)&Glob
5e1a0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
5e1c0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
5e1e0 68 72 57 28 31 30 29 26 22 20 20 20 20 50 61 72 74 69 61 6c 20 50 72 69 76 61 74 65 20 53 75 62 hrW(10)&"....Partial.Private.Sub
5e200 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 .OnContextCreated()"&Global.Micr
5e220 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
5e240 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
5e260 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e &"....End.Sub"&Global.Microsoft.
5e280 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
5e2a0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(10)&Globa
5e2c0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
5e2e0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5e300 72 57 28 31 30 29 26 22 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e rW(10)&"....#End.Region"&Global.
5e320 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
5e340 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
5e360 28 31 30 29 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 22 (10)&._.......................""
5e380 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5e3a0 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5e3c0 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 sic.ChrW(10)).............''''''
5e3e0 27 27 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 ''..........''''''''...........'
5e400 27 27 27 27 27 27 27 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 '''''''..........region.Begin(Ge
5e420 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e tResourceString("Template_Region
5e440 4f 62 6a 65 63 74 53 65 74 50 72 6f 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 ObjectSetProperties"))..........
5e460 46 6f 72 20 45 61 63 68 20 65 6e 74 69 74 79 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 20 For.Each.entitySet.As.EntitySet.
5e480 49 6e 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 73 2e 4f 66 54 79 In.container.BaseEntitySets.OfTy
5e4a0 70 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 pe(Of.EntitySet)()..............
5e4c0 56 65 72 69 66 79 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c VerifyEntityTypeAndSetAccessibil
5e4e0 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 65 6e 74 69 74 79 53 65 74 29 0d 0a 0a 20 20 ityCompatability(entitySet).....
5e500 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ..........Me.Write(""&Global.Mic
5e520 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
5e540 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
5e560 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 )&"....'''.<summary>"&Global.Mic
5e580 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
5e5a0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
5e5c0 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 )&"....'''.")...............Me.W
5e5e0 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
5e600 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 6e 74 69 74 79 ithCulture(SummaryComment(entity
5e620 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 Set)))...............Me.Write(""
5e640 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5e660 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5e680 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e sic.ChrW(10)&"....'''.</summary>
5e6a0 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
5e6c0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
5e6e0 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 6e LongDescriptionCommentElement(en
5e700 74 69 74 79 53 65 74 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 titySet,.region.CurrentIndentLev
5e720 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 el)))...............Me.Write(""&
5e740 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
5e760 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
5e780 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ic.ChrW(10)&"....").............
5e7a0 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
5e7c0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 tringWithCulture(code.SpaceAfter
5e7e0 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 6e 74 69 74 79 53 65 74 29 29 29 29 0d 0a 0a 0a 20 20 (NewModifier(entitySet))))......
5e800 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
5e820 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 lper.ToStringWithCulture(Accessi
5e840 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 6e 74 69 74 bility.ForReadOnlyProperty(entit
5e860 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 ySet)))...............Me.Write("
5e880 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 .ReadOnly.Property.")...........
5e8a0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
5e8c0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 oStringWithCulture(code.Escape(e
5e8e0 6e 74 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 ntitySet)))...............Me.Wri
5e900 74 65 28 22 28 29 20 41 73 20 4f 62 6a 65 63 74 53 65 74 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 te("().As.ObjectSet(Of.").......
5e920 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
5e940 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 er.ToStringWithCulture(MultiSche
5e960 6d 61 45 73 63 61 70 65 28 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 maEscape(entitySet.ElementType,.
5e980 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 code)))...............Me.Write("
5e9a0 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e )"&Global.Microsoft.VisualBasic.
5e9c0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
5e9e0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 47 65 74 22 26 47 6c 6f Basic.ChrW(10)&"........Get"&Glo
5ea00 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
5ea20 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
5ea40 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 22 29 0d 0a 0a 20 ChrW(10)&"............If.(")....
5ea60 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
5ea80 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 elper.ToStringWithCulture(code.F
5eaa0 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 ieldName(entitySet)))...........
5eac0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 22 ....Me.Write(".Is.Nothing).Then"
5eae0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5eb00 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5eb20 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 29 sic.ChrW(10)&"................")
5eb40 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
5eb60 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f ingHelper.ToStringWithCulture(co
5eb80 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 de.FieldName(entitySet))).......
5eba0 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4d 79 42 61 73 65 2e 43 72 65 61 ........Me.Write(".=.MyBase.Crea
5ebc0 74 65 4f 62 6a 65 63 74 53 65 74 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 teObjectSet(Of.")...............
5ebe0 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
5ec00 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 ingWithCulture(MultiSchemaEscape
5ec20 28 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d (entitySet.ElementType,.code))).
5ec40 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a ..............Me.Write(")(""")..
5ec60 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
5ec80 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 74 69 gHelper.ToStringWithCulture(enti
5eca0 74 79 53 65 74 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 tySet.Name))...............Me.Wr
5ecc0 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 ite(""")"&Global.Microsoft.Visua
5ece0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
5ed00 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 .VisualBasic.ChrW(10)&".........
5ed20 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ...End.If"&Global.Microsoft.Visu
5ed40 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
5ed60 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 t.VisualBasic.ChrW(10)&"........
5ed80 20 20 20 20 52 65 74 75 72 6e 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 ....Return.")...............Me.W
5eda0 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
5edc0 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 ithCulture(code.FieldName(entity
5ede0 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 Set)))...............Me.Write(""
5ee00 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5ee20 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5ee40 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 sic.ChrW(10)&"........End.Get"&G
5ee60 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
5ee80 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
5eea0 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 22 26 47 6c c.ChrW(10)&"....End.Property"&Gl
5eec0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
5eee0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
5ef00 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(10)&Global.Microsoft.Visua
5ef20 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
5ef40 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 .VisualBasic.ChrW(10)&"....Priva
5ef60 74 65 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e te.")...............Me.Write(Me.
5ef80 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
5efa0 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 53 65 74 29 29 29 0d 0a re(code.FieldName(entitySet)))..
5efc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 4f 62 6a 65 63 .............Me.Write(".As.Objec
5efe0 74 53 65 74 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 tSet(Of.")...............Me.Writ
5f000 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
5f020 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 65 6e 74 69 74 79 Culture(MultiSchemaEscape(entity
5f040 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 Set.ElementType,.code)))........
5f060 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f .......Me.Write(")"&Global.Micro
5f080 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
5f0a0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 .Microsoft.VisualBasic.ChrW(10))
5f0c0 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f .............Next..........regio
5f0e0 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 n.End()............''''''''.....
5f100 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 .....''''''''...........''''''''
5f120 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 ..........''''''''...........'''
5f140 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 20 20 '''''...........''''''''........
5f160 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a ..''''''''...........''''''''...
5f180 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 ........''''''''...........'''''
5f1a0 27 27 27 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 '''..........region.Begin(GetRes
5f1c0 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 41 64 64 54 ourceString("Template_RegionAddT
5f1e0 6f 4d 65 74 68 6f 64 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 61 64 64 54 6f 4d 65 oMethods"))..........Dim.addToMe
5f200 74 68 6f 64 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 6e 74 69 74 79 53 65 thods.As.IEnumerable(Of.EntitySe
5f220 74 29 20 3d 20 49 66 28 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 t).=.If(CreateContextAddToMethod
5f240 73 2e 56 61 6c 75 65 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 s.Value,.container.BaseEntitySet
5f260 73 2e 4f 66 54 79 70 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 2c 20 45 6e 75 6d 65 72 s.OfType(Of.EntitySet)(),.Enumer
5f280 61 62 6c 65 2e 45 6d 70 74 79 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 29 0d 0a 20 20 20 able.Empty(Of.EntitySet)()).....
5f2a0 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 61 64 64 54 6f 20 41 73 20 45 6e 74 69 74 79 53 65 74 .....For.Each.addTo.As.EntitySet
5f2c0 20 69 6e 20 61 64 64 54 6f 4d 65 74 68 6f 64 73 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 .in.addToMethods..........Dim.pa
5f2e0 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e 45 73 63 rameterName.As.String.=.code.Esc
5f300 61 70 65 28 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 61 64 64 54 6f 2e 45 6c 65 6d 65 ape(FixParameterName(addTo.Eleme
5f320 6e 74 54 79 70 65 2e 4e 61 6d 65 2c 20 63 6f 64 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ntType.Name,.code)).............
5f340 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ..Me.Write(""&Global.Microsoft.V
5f360 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
5f380 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 soft.VisualBasic.ChrW(10)&"....'
5f3a0 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ''.<summary>"&Global.Microsoft.V
5f3c0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
5f3e0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 soft.VisualBasic.ChrW(10)&"....'
5f400 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e ''.")...............Me.Write(Me.
5f420 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
5f440 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 re(String.Format(CultureInfo.Cur
5f460 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 rentCulture,.GetResourceString("
5f480 54 65 6d 70 6c 61 74 65 5f 47 65 6e 43 6f 6d 6d 65 6e 74 41 64 64 54 6f 4d 65 74 68 6f 64 56 62 Template_GenCommentAddToMethodVb
5f4a0 22 29 2c 20 61 64 64 54 6f 2e 4e 61 6d 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 "),.addTo.Name)))...............
5f4c0 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Me.Write(""&Global.Microsoft.Vis
5f4e0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
5f500 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 ft.VisualBasic.ChrW(10)&"....'''
5f520 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 .</summary>"&Global.Microsoft.Vi
5f540 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
5f560 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 29 oft.VisualBasic.ChrW(10)&"....")
5f580 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
5f5a0 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 ingHelper.ToStringWithCulture(Ac
5f5c0 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 61 64 64 54 6f 2e 45 6c 65 6d 65 6e cessibility.ForType(addTo.Elemen
5f5e0 74 54 79 70 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 tType)))...............Me.Write(
5f600 22 20 53 75 62 20 41 64 64 54 6f 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 ".Sub.AddTo")...............Me.W
5f620 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
5f640 69 74 68 43 75 6c 74 75 72 65 28 61 64 64 54 6f 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 ithCulture(addTo.Name)).........
5f660 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 42 79 56 61 6c 20 22 29 0d 0a 0a 20 20 20 20 ......Me.Write("(ByVal.").......
5f680 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
5f6a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 er.ToStringWithCulture(parameter
5f6c0 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 Name))...............Me.Write(".
5f6e0 41 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e As.")...............Me.Write(Me.
5f700 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
5f720 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 61 64 64 54 6f 2e 45 6c 65 6d 65 re(MultiSchemaEscape(addTo.Eleme
5f740 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 ntType,.code)))...............Me
5f760 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 .Write(")"&Global.Microsoft.Visu
5f780 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
5f7a0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 t.VisualBasic.ChrW(10)&"........
5f7c0 4d 79 42 61 73 65 2e 41 64 64 4f 62 6a 65 63 74 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 MyBase.AddObject(""")...........
5f7e0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
5f800 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 64 64 54 6f 2e 4e 61 6d 65 29 29 0d oStringWithCulture(addTo.Name)).
5f820 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 29 0d 0a ..............Me.Write(""",.")..
5f840 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
5f860 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 gHelper.ToStringWithCulture(para
5f880 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 meterName))...............Me.Wri
5f8a0 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 te(")"&Global.Microsoft.VisualBa
5f8c0 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
5f8e0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 sualBasic.ChrW(10)&"....End.Sub"
5f900 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
5f920 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
5f940 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a sic.ChrW(10)).............Next..
5f960 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ........region.End()............
5f980 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 region.Begin(GetResourceString("
5f9a0 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 73 22 29 Template_RegionFunctionImports")
5f9c0 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 )..........For.Each.edmFunction.
5f9e0 41 73 20 45 64 6d 46 75 6e 63 74 69 6f 6e 20 69 6e 20 63 6f 6e 74 61 69 6e 65 72 2e 46 75 6e 63 As.EdmFunction.in.container.Func
5fa00 74 69 6f 6e 49 6d 70 6f 72 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 tionImports..............Dim.par
5fa20 61 6d 65 74 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 75 6e 63 74 69 ameters.As.IEnumerable(Of.Functi
5fa40 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 20 3d 20 46 75 6e 63 74 69 6f 6e 49 6d 70 onImportParameter).=.FunctionImp
5fa60 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 43 72 65 61 74 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e ortParameter.Create(edmFunction.
5fa80 50 61 72 61 6d 65 74 65 72 73 2c 20 63 6f 64 65 2c 20 65 66 29 0d 0a 20 20 20 20 20 20 20 20 20 Parameters,.code,.ef)...........
5faa0 20 20 20 44 69 6d 20 70 61 72 61 6d 4c 69 73 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 53 74 72 ...Dim.paramList.As.String.=.Str
5fac0 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 ing.Join(",.",.parameters.Select
5fae0 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 (Function(p).p.FunctionParameter
5fb00 4e 61 6d 65 20 26 20 22 20 41 73 20 22 20 26 20 70 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 Name.&.".As.".&.p.FunctionParame
5fb20 74 65 72 54 79 70 65 29 2e 54 6f 41 72 72 61 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 terType).ToArray()).............
5fb40 20 44 69 6d 20 72 65 74 75 72 6e 54 79 70 65 20 41 73 20 54 79 70 65 55 73 61 67 65 20 3d 20 49 .Dim.returnType.As.TypeUsage.=.I
5fb60 66 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 72 73 2e 43 f(edmFunction.ReturnParameters.C
5fb80 6f 75 6e 74 20 3d 20 30 2c 20 4e 6f 74 68 69 6e 67 2c 20 65 66 2e 47 65 74 45 6c 65 6d 65 6e 74 ount.=.0,.Nothing,.ef.GetElement
5fba0 54 79 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 72 Type(edmFunction.ReturnParameter
5fbc0 73 28 30 29 2e 54 79 70 65 55 73 61 67 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d s(0).TypeUsage))...............M
5fbe0 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 e.Write(""&Global.Microsoft.Visu
5fc00 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
5fc20 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 t.VisualBasic.ChrW(10)&"....'''.
5fc40 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 <summary>"&Global.Microsoft.Visu
5fc60 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
5fc80 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 t.VisualBasic.ChrW(10)&"....'''.
5fca0 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
5fcc0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
5fce0 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a SummaryComment(edmFunction)))...
5fd00 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d ............Me.Write(""&Global.M
5fd20 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
5fd40 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
5fd60 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 10)&"....'''.</summary>").......
5fd80 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
5fda0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 er.ToStringWithCulture(LongDescr
5fdc0 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e iptionCommentElement(edmFunction
5fde0 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a ,.region.CurrentIndentLevel)))..
5fe00 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
5fe20 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 ngHelper.ToStringWithCulture(Par
5fe40 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 ameterComments(parameters.Select
5fe60 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 4e 65 77 20 54 75 70 6c 65 28 4f 66 20 73 74 72 69 6e 67 (Function(p).New.Tuple(Of.string
5fe80 2c 20 73 74 72 69 6e 67 29 28 70 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 ,.string)(p.RawFunctionParameter
5fea0 4e 61 6d 65 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 72 63 65 29 29 29 Name,.SummaryComment(p.Source)))
5fec0 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a ,.region.CurrentIndentLevel)))..
5fee0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e .............Me.Write(""&Global.
5ff00 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
5ff20 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
5ff40 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 (10)&"....")...............Me.Wr
5ff60 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
5ff80 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 thCulture(code.SpaceAfter(NewMod
5ffa0 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 ifier(edmFunction))))...........
5ffc0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
5ffe0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 ToStringWithCulture(Accessibilit
60000 79 2e 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 y.ForMethod(edmFunction)))......
60020 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 46 75 6e 63 74 69 6f 6e 20 22 29 0d .........Me.Write(".Function.").
60040 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
60060 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
60080 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 e.Escape(edmFunction))).........
600a0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ......Me.Write("(").............
600c0 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
600e0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 4c 69 73 74 29 29 0d 0a 0a 20 tringWithCulture(paramList))....
60100 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 20 41 73 20 22 29 0d 0a 0a 20 ...........Me.Write(").As.")....
60120 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
60140 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 66 28 72 65 74 elper.ToStringWithCulture(If(ret
60160 75 72 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 2c 20 22 4f 62 6a 65 63 74 52 65 urnType.IsNot.Nothing,."ObjectRe
60180 73 75 6c 74 28 4f 66 20 22 20 26 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 sult(Of.".&.MultiSchemaEscape(re
601a0 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 26 20 22 29 22 2c 20 22 49 6e 74 65 67 65 72 22 turnType,.code).&.")",."Integer"
601c0 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c )))...............Me.Write(""&Gl
601e0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
60200 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
60220 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 .ChrW(10)).................For.E
60240 61 63 68 20 70 61 72 61 6d 65 74 65 72 20 41 73 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 ach.parameter.As.FunctionImportP
60260 61 72 61 6d 65 74 65 72 20 49 6e 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 arameter.In.parameters..........
60280 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 70 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c ........If.(Not.parameter.NeedsL
602a0 6f 63 61 6c 56 61 72 69 61 62 6c 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ocalVariable).Then..............
602c0 20 20 20 20 20 20 20 20 43 6f 6e 74 69 6e 75 65 20 46 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 ........Continue.For............
602e0 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 ......End.If...............Me.Wr
60300 69 74 65 28 22 20 20 20 20 20 20 20 20 44 69 6d 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ite("........Dim.").............
60320 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
60340 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c tringWithCulture(parameter.Local
60360 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e VariableName))...............Me.
60380 57 72 69 74 65 28 22 20 41 73 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 22 26 47 6c 6f 62 Write(".As.ObjectParameter"&Glob
603a0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
603c0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
603e0 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 49 66 20 28 22 29 0d 0a 0a 20 20 20 20 20 20 hrW(10)&"........If.(").........
60400 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
60420 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 66 28 70 61 72 61 6d 65 74 65 .ToStringWithCulture(If(paramete
60440 72 2e 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 2c 20 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 r.IsNullableOfT,.parameter.Funct
60460 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 2e 48 61 73 56 61 6c 75 65 22 2c 20 ionParameterName.+.".HasValue",.
60480 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 parameter.FunctionParameterName.
604a0 26 20 22 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 &.".IsNot.Nothing")))...........
604c0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 ....Me.Write(")"&Global.Microsof
604e0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
60500 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
60520 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 ..........")...............Me.Wr
60540 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
60560 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c thCulture(parameter.LocalVariabl
60580 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 eName))...............Me.Write("
605a0 20 3d 20 4e 65 77 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 28 22 22 22 29 0d 0a 0a 20 20 .=.New.ObjectParameter(""").....
605c0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
605e0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 lper.ToStringWithCulture(paramet
60600 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 er.EsqlParameterName))..........
60620 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 .....Me.Write(""",.")...........
60640 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
60660 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 46 75 6e oStringWithCulture(parameter.Fun
60680 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ctionParameterName))............
606a0 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ...Me.Write(")"&Global.Microsoft
606c0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
606e0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
60700 20 20 20 20 20 45 6c 73 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 .....Else"&Global.Microsoft.Visu
60720 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
60740 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 t.VisualBasic.ChrW(10)&"........
60760 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 ....")...............Me.Write(Me
60780 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
607a0 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 ure(parameter.LocalVariableName)
607c0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4e 65 77 )...............Me.Write(".=.New
607e0 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 .ObjectParameter(""")...........
60800 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
60820 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 oStringWithCulture(parameter.Esq
60840 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d lParameterName))...............M
60860 65 2e 57 72 69 74 65 28 22 22 22 2c 20 47 65 74 54 79 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 e.Write(""",.GetType(").........
60880 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
608a0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 52 .ToStringWithCulture(parameter.R
608c0 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 awClrTypeName))...............Me
608e0 2e 57 72 69 74 65 28 22 29 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 .Write("))"&Global.Microsoft.Vis
60900 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
60920 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
60940 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c .End.If"&Global.Microsoft.Visual
60960 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
60980 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(10)&Global.Micr
609a0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
609c0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
609e0 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0a 20 20 20 20 20 20 20 ).................Next..........
60a00 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 79 .....Me.Write("........Return.My
60a20 42 61 73 65 2e 45 78 65 63 75 74 65 46 75 6e 63 74 69 6f 6e 22 29 0d 0a 0a 20 20 20 20 20 20 20 Base.ExecuteFunction")..........
60a40 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
60a60 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 66 28 72 65 74 75 72 6e 54 79 70 ToStringWithCulture(If(returnTyp
60a80 65 20 49 73 20 4e 6f 74 68 69 6e 67 2c 20 22 22 2c 20 22 28 4f 66 20 22 20 26 20 4d 75 6c 74 69 e.Is.Nothing,."",."(Of.".&.Multi
60aa0 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 26 SchemaEscape(returnType,.code).&
60ac0 20 22 29 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 .")")))...............Me.Write("
60ae0 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e (""")...............Me.Write(Me.
60b00 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
60b20 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 re(edmFunction.Name))...........
60b40 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ....Me.Write("""")..............
60b60 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
60b80 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 ringWithCulture(code.StringBefor
60ba0 65 28 22 2c 20 22 2c 20 53 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 e(",.",.String.Join(",.",.parame
60bc0 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 45 78 65 63 75 74 ters.Select(Function(p).p.Execut
60be0 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 0d 0a 0a eParameterName).ToArray()))))...
60c00 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e ............Me.Write(")"&Global.
60c20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
60c40 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
60c60 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (10)&Global.Microsoft.VisualBasi
60c80 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
60ca0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 alBasic.ChrW(10)&"....End.Functi
60cc0 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 on"&Global.Microsoft.VisualBasic
60ce0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
60d00 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 lBasic.ChrW(10))................
60d20 20 49 66 20 28 72 65 74 75 72 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e .If.(returnType.IsNot.Nothing.An
60d40 64 41 6c 73 6f 20 72 65 74 75 72 6e 54 79 70 65 2e 45 64 6d 54 79 70 65 2e 42 75 69 6c 74 49 6e dAlso.returnType.EdmType.BuiltIn
60d60 54 79 70 65 4b 69 6e 64 20 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 TypeKind.=.BuiltInTypeKind.Entit
60d80 79 54 79 70 65 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 yType)...............Me.Write(".
60da0 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ...'''.<summary>"&Global.Microso
60dc0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
60de0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
60e00 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ...'''.")...............Me.Write
60e20 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
60e40 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f ulture(SummaryComment(edmFunctio
60e60 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 n)))...............Me.Write(""&G
60e80 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
60ea0 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
60ec0 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 c.ChrW(10)&"....'''.</summary>")
60ee0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
60f00 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f ingHelper.ToStringWithCulture(Lo
60f20 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 ngDescriptionCommentElement(edmF
60f40 75 6e 63 74 69 6f 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 unction,.region.CurrentIndentLev
60f60 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 el)))...............Me.Write(""&
60f80 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
60fa0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
60fc0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 ic.ChrW(10)&"....'''.<param.name
60fe0 3d 22 22 6d 65 72 67 65 4f 70 74 69 6f 6e 22 22 3e 3c 2f 70 61 72 61 6d 3e 22 29 0d 0a 0a 20 20 =""mergeOption""></param>").....
61000 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
61020 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 lper.ToStringWithCulture(Paramet
61040 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e erComments(parameters.Select(Fun
61060 63 74 69 6f 6e 28 70 29 20 4e 65 77 20 54 75 70 6c 65 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 ction(p).New.Tuple(Of.string,.st
61080 72 69 6e 67 29 28 70 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 ring)(p.RawFunctionParameterName
610a0 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 ,.SummaryComment(p.Source))),.re
610c0 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 gion.CurrentIndentLevel)))......
610e0 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 .........Me.Write(""&Global.Micr
61100 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
61120 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
61140 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 &"....")...............Me.Write(
61160 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
61180 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 lture(code.SpaceAfter(NewModifie
611a0 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 r(edmFunction))))...............
611c0 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
611e0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f ringWithCulture(Accessibility.Fo
61200 72 4d 65 74 68 6f 64 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 rMethod(edmFunction)))..........
61220 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 46 75 6e 63 74 69 6f 6e 20 22 29 0d 0a 0a 20 20 .....Me.Write(".Function.").....
61240 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
61260 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 lper.ToStringWithCulture(code.Es
61280 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 cape(edmFunction))).............
612a0 20 20 4d 65 2e 57 72 69 74 65 28 22 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 ..Me.Write("(")...............Me
612c0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
612e0 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 41 66 74 65 72 28 70 61 gWithCulture(code.StringAfter(pa
61300 72 61 6d 4c 69 73 74 2c 20 22 2c 20 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d ramList,.",.")))...............M
61320 65 2e 57 72 69 74 65 28 22 6d 65 72 67 65 4f 70 74 69 6f 6e 20 41 73 20 4d 65 72 67 65 4f 70 74 e.Write("mergeOption.As.MergeOpt
61340 69 6f 6e 29 20 41 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 ion).As.")...............Me.Writ
61360 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
61380 43 75 6c 74 75 72 65 28 49 66 28 72 65 74 75 72 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 Culture(If(returnType.IsNot.Noth
613a0 69 6e 67 2c 20 22 4f 62 6a 65 63 74 52 65 73 75 6c 74 28 4f 66 20 22 20 26 20 4d 75 6c 74 69 53 ing,."ObjectResult(Of.".&.MultiS
613c0 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 26 20 chemaEscape(returnType,.code).&.
613e0 22 29 22 2c 20 22 49 6e 74 65 67 65 72 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ")",."Integer")))...............
61400 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Me.Write(""&Global.Microsoft.Vis
61420 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
61440 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 ft.VisualBasic.ChrW(10))........
61460 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 72 61 6d 65 74 65 72 20 41 73 20 46 .........For.Each.parameter.As.F
61480 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 49 6e 20 70 61 72 61 6d 65 unctionImportParameter.In.parame
614a0 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 70 61 ters..................If.(Not.pa
614c0 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 29 20 54 68 65 6e rameter.NeedsLocalVariable).Then
614e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6e 74 69 6e 75 65 20 46 ......................Continue.F
61500 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 20 20 20 or..................End.If......
61520 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 44 69 6d 20 22 .........Me.Write("........Dim."
61540 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
61560 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 ringHelper.ToStringWithCulture(p
61580 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 0d 0a 0a 20 arameter.LocalVariableName))....
615a0 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 4f 62 6a 65 63 74 50 ...........Me.Write(".As.ObjectP
615c0 61 72 61 6d 65 74 65 72 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 arameter"&Global.Microsoft.Visua
615e0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
61600 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 49 .VisualBasic.ChrW(10)&"........I
61620 66 20 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e f.(")...............Me.Write(Me.
61640 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
61660 72 65 28 49 66 28 70 61 72 61 6d 65 74 65 72 2e 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 2c 20 70 re(If(parameter.IsNullableOfT,.p
61680 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 2b arameter.FunctionParameterName.+
616a0 20 22 2e 48 61 73 56 61 6c 75 65 22 2c 20 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e .".HasValue",.parameter.Function
616c0 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 26 20 22 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 22 ParameterName.&.".IsNot.Nothing"
616e0 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 )))...............Me.Write(")"&G
61700 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
61720 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
61740 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 c.ChrW(10)&"............")......
61760 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c .........Me.Write(Me.ToStringHel
61780 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 per.ToStringWithCulture(paramete
617a0 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 r.LocalVariableName))...........
617c0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4e 65 77 20 4f 62 6a 65 63 74 50 61 72 61 6d ....Me.Write(".=.New.ObjectParam
617e0 65 74 65 72 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 eter(""")...............Me.Write
61800 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
61820 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 ulture(parameter.EsqlParameterNa
61840 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c me))...............Me.Write(""",
61860 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f .")...............Me.Write(Me.To
61880 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
618a0 28 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 (parameter.FunctionParameterName
618c0 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c ))...............Me.Write(")"&Gl
618e0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
61900 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
61920 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6c 73 65 22 26 47 6c 6f 62 61 6c 2e .ChrW(10)&"........Else"&Global.
61940 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
61960 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
61980 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 (10)&"............")............
619a0 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
619c0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 StringWithCulture(parameter.Loca
619e0 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 lVariableName))...............Me
61a00 2e 57 72 69 74 65 28 22 20 3d 20 4e 65 77 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 28 22 .Write(".=.New.ObjectParameter("
61a20 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f "")...............Me.Write(Me.To
61a40 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
61a60 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a (parameter.EsqlParameterName))..
61a80 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 47 65 74 54 79 .............Me.Write(""",.GetTy
61aa0 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e pe(")...............Me.Write(Me.
61ac0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
61ae0 72 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 29 29 0d 0a 0a re(parameter.RawClrTypeName))...
61b00 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 29 22 26 47 6c 6f 62 61 6c ............Me.Write("))"&Global
61b20 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
61b40 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
61b60 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 W(10)&"........End.If"&Global.Mi
61b80 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f crosoft.VisualBasic.ChrW(13)&Glo
61ba0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
61bc0 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 0)&Global.Microsoft.VisualBasic.
61be0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
61c00 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Basic.ChrW(10)).................
61c20 20 20 20 20 4e 65 78 74 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 ....Next...............Me.Write(
61c40 22 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 79 42 61 73 65 2e 45 78 65 63 75 74 65 46 75 "........Return.MyBase.ExecuteFu
61c60 6e 63 74 69 6f 6e 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 nction(Of.")...............Me.Wr
61c80 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
61ca0 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 thCulture(MultiSchemaEscape(retu
61cc0 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 rnType,.code)))...............Me
61ce0 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e .Write(")(""")...............Me.
61d00 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
61d20 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 0d 0a WithCulture(edmFunction.Name))..
61d40 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 6d 65 72 67 65 .............Me.Write(""",.merge
61d60 4f 70 74 69 6f 6e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 Option")...............Me.Write(
61d80 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
61da0 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 53 74 lture(code.StringBefore(",.",.St
61dc0 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 ring.Join(",.",.parameters.Selec
61de0 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 t(Function(p).p.ExecuteParameter
61e00 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 Name).ToArray())))).............
61e20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ..Me.Write(")"&Global.Microsoft.
61e40 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
61e60 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(10)&Globa
61e80 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
61ea0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
61ec0 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 22 26 47 6c 6f 62 61 6c rW(10)&"....End.Function"&Global
61ee0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
61f00 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
61f20 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 W(10)).................End.If...
61f40 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 .......Next..........region.End(
61f60 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 45 6e 64 20 43 6c )...............Me.Write("End.Cl
61f80 61 73 73 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 ass"&Global.Microsoft.VisualBasi
61fa0 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
61fc0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 56 65 alBasic.ChrW(10)).............Ve
61fe0 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 45 6e 74 69 74 79 53 65 74 55 6e 69 71 rifyCaseInsensitiveEntitySetUniq
62000 75 65 6e 65 73 73 28 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 73 2e ueness(container.BaseEntitySets.
62020 4f 66 54 79 70 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 29 0d 0a 20 20 20 20 4e 65 78 OfType(Of.EntitySet)())......Nex
62040 74 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 t......region.End()........'''''
62060 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 '''......''''''''.......''''''''
62080 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 ......region.Begin(GetResourceSt
620a0 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 45 6e 74 69 74 69 65 73 22 29 29 ring("Template_RegionEntities"))
620c0 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 6c 6f 6f 70 45 6e 74 69 74 79 20 41 73 20 45 6e 74 ......For.Each.loopEntity.As.Ent
620e0 69 74 79 54 79 70 65 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 28 ityType.in.GetSourceSchemaTypes(
62100 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 28 29 2e 4f 72 64 65 72 42 79 28 46 75 6e 63 74 69 6f Of.EntityType)().OrderBy(Functio
62120 6e 28 65 29 20 65 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e 74 69 74 79 n(e).e.Name)..........Dim.entity
62140 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 6c 6f 6f 70 45 6e 74 69 74 79 0d 0a 0a 20 20 .As.EntityType.=.loopEntity.....
62160 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ..........Me.Write(""&Global.Mic
62180 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
621a0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
621c0 29 26 22 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f )&"'''.<summary>"&Global.Microso
621e0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
62200 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 icrosoft.VisualBasic.ChrW(10)&"'
62220 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e ''.")...............Me.Write(Me.
62240 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
62260 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 6e 74 69 74 79 29 29 29 0d 0a 0a 20 20 re(SummaryComment(entity))).....
62280 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ..........Me.Write(""&Global.Mic
622a0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
622c0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
622e0 29 26 22 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 )&"'''.</summary>").............
62300 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
62320 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e tringWithCulture(LongDescription
62340 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 6e 74 69 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 CommentElement(entity,.region.Cu
62360 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 rrentIndentLevel))).............
62380 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ..Me.Write(""&Global.Microsoft.V
623a0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
623c0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 45 64 6d 45 soft.VisualBasic.ChrW(10)&"<EdmE
623e0 6e 74 69 74 79 54 79 70 65 41 74 74 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 ntityTypeAttribute(NamespaceName
62400 3a 3d 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 :=""")...............Me.Write(Me
62420 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
62440 75 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 ure(entity.NamespaceName))......
62460 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 4e 61 6d 65 3a 3d 22 22 22 .........Me.Write(""",.Name:="""
62480 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
624a0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 ringHelper.ToStringWithCulture(e
624c0 6e 74 69 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 ntity.Name))...............Me.Wr
624e0 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ite(""")>"&Global.Microsoft.Visu
62500 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
62520 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 53 65 72 69 61 6c 69 t.VisualBasic.ChrW(10)&"<Seriali
62540 7a 61 62 6c 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 zable()>"&Global.Microsoft.Visua
62560 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
62580 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 44 61 74 61 43 6f 6e 74 .VisualBasic.ChrW(10)&"<DataCont
625a0 72 61 63 74 41 74 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3a 3d 54 72 75 65 29 ractAttribute(IsReference:=True)
625c0 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e >"&Global.Microsoft.VisualBasic.
625e0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
62600 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 Basic.ChrW(10)).............For.
62620 45 61 63 68 20 73 75 62 54 79 70 65 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 69 6e 20 49 74 Each.subType.As.EntityType.in.It
62640 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 45 6e 74 69 74 79 54 emCollection.GetItems(Of.EntityT
62660 79 70 65 29 28 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 62 29 20 62 2e 42 61 73 65 54 ype)().Where(Function(b).b.BaseT
62680 79 70 65 20 69 73 20 65 6e 74 69 74 79 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e ype.is.entity)...............Me.
626a0 57 72 69 74 65 28 22 3c 4b 6e 6f 77 6e 54 79 70 65 41 74 74 72 69 62 75 74 65 28 47 65 74 54 79 Write("<KnownTypeAttribute(GetTy
626c0 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e pe(")...............Me.Write(Me.
626e0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
62700 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 75 62 54 79 70 65 2c 20 63 6f re(MultiSchemaEscape(subType,.co
62720 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 29 de)))...............Me.Write("))
62740 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e >"&Global.Microsoft.VisualBasic.
62760 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
62780 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 Basic.ChrW(10)).............Next
627a0 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 ................Me.Write(Me.ToSt
627c0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 ringHelper.ToStringWithCulture(A
627e0 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 65 6e 74 69 74 79 29 29 29 0d 0a ccessibility.ForType(entity)))..
62800 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 22 29 0d 0a 0a 20 20 20 .............Me.Write(".")......
62820 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c .........Me.Write(Me.ToStringHel
62840 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 per.ToStringWithCulture(code.Spa
62860 63 65 41 66 74 65 72 28 63 6f 64 65 2e 4d 75 73 74 49 6e 68 65 72 69 74 4f 70 74 69 6f 6e 28 65 ceAfter(code.MustInheritOption(e
62880 6e 74 69 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ntity))))...............Me.Write
628a0 28 22 50 61 72 74 69 61 6c 20 43 6c 61 73 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ("Partial.Class.")..............
628c0 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
628e0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 74 69 ringWithCulture(code.Escape(enti
62900 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 ty)))...............Me.Write(""&
62920 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
62940 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
62960 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 49 6e 68 65 72 69 74 73 20 22 29 0d 0a 0a 20 ic.ChrW(10)&"....Inherits.")....
62980 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
629a0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 42 61 73 65 54 79 elper.ToStringWithCulture(BaseTy
629c0 70 65 4e 61 6d 65 28 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 peName(entity,.code)))..........
629e0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 .....Me.Write(""&Global.Microsof
62a00 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
62a20 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a crosoft.VisualBasic.ChrW(10))...
62a40 0d 0a 20 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 65 6e 74 69 74 79 2e 41 62 73 74 72 61 63 74 ..........If(Not.entity.Abstract
62a60 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 61 63 74 6f 72 79 ).Then..............WriteFactory
62a80 4d 65 74 68 6f 64 28 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e Method(entity,.code)..........En
62aa0 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 d.If............region.Begin(Get
62ac0 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 50 ResourceString("Template_RegionP
62ae0 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 rimitiveProperties"))..........F
62b00 6f 72 20 45 61 63 68 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 or.Each.edmProperty.As.EdmProper
62b20 74 79 20 69 6e 20 65 6e 74 69 74 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 ty.in.entity.Properties.Where(Fu
62b40 6e 63 74 69 6f 6e 28 70 29 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 nction(p).p.DeclaringType.Is.ent
62b60 69 74 79 20 41 6e 64 41 6c 73 6f 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 ity.AndAlso.TypeOf.p.TypeUsage.E
62b80 64 6d 54 79 70 65 20 49 73 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 dmType.Is.PrimitiveType)........
62ba0 20 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 ......VerifyGetterAndSetterAcces
62bc0 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 sibilityCompatability(edmPropert
62be0 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 50 72 69 6d 69 74 69 76 65 54 79 y)..............WritePrimitiveTy
62c00 70 65 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 peProperty(edmProperty,.code)...
62c20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 .......Next..........region.End(
62c40 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 )............region.Begin(GetRes
62c60 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 ourceString("Template_RegionComp
62c80 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 lexProperties"))..........For.Ea
62ca0 63 68 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 6e ch.edmProperty.As.EdmProperty.in
62cc0 20 65 6e 74 69 74 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f .entity.Properties.Where(Functio
62ce0 6e 28 70 29 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 20 41 n(p).p.DeclaringType.Is.entity.A
62d00 6e 64 41 6c 73 6f 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 ndAlso.TypeOf.p.TypeUsage.EdmTyp
62d20 65 20 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 e.Is.ComplexType)..............V
62d40 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 erifyGetterAndSetterAccessibilit
62d60 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 yCompatability(edmProperty).....
62d80 20 20 20 20 20 20 20 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 .........WriteComplexTypePropert
62da0 79 28 65 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 y(edmProperty,.code)..........Ne
62dc0 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 xt..........region.End()........
62de0 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d ....''''''''..........''''''''..
62e00 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f .........''''''''..........regio
62e20 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c n.Begin(GetResourceString("Templ
62e40 61 74 65 5f 52 65 67 69 6f 6e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 22 29 ate_RegionNavigationProperties")
62e60 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 6e 61 76 50 72 6f 70 65 72 74 79 20 )..........For.Each.navProperty.
62e80 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 79 2e As.NavigationProperty.in.entity.
62ea0 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 NavigationProperties.Where(Funct
62ec0 69 6f 6e 28 6e 29 20 6e 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 ion(n).n.DeclaringType.Is.entity
62ee0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 )...............Me.Write(""&Glob
62f00 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
62f20 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
62f40 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 hrW(10)&"....'''.<summary>"&Glob
62f60 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
62f80 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
62fa0 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 hrW(10)&"....'''.").............
62fc0 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
62fe0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 tringWithCulture(SummaryComment(
63000 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e navProperty)))...............Me.
63020 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
63040 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
63060 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f VisualBasic.ChrW(10)&"....'''.</
63080 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 summary>")...............Me.Writ
630a0 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
630c0 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c Culture(LongDescriptionCommentEl
630e0 65 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e ement(navProperty,.region.Curren
63100 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 tIndentLevel)))...............Me
63120 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .Write(""&Global.Microsoft.Visua
63140 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
63160 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 58 6d 6c 49 .VisualBasic.ChrW(10)&"....<XmlI
63180 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 gnoreAttribute()>"&Global.Micros
631a0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
631c0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
631e0 20 20 20 20 3c 53 6f 61 70 49 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f ....<SoapIgnoreAttribute()>"&Glo
63200 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
63220 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
63240 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 ChrW(10)&"....<DataMemberAttribu
63260 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 65 28 29 "&._......................."te()
63280 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e >"&Global.Microsoft.VisualBasic.
632a0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
632c0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 45 64 6d 52 65 6c 61 74 69 6f 6e Basic.ChrW(10)&"....<EdmRelation
632e0 73 68 69 70 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 shipNavigationPropertyAttribute(
63300 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 """)...............Me.Write(Me.T
63320 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
63340 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 4e e(navProperty.RelationshipType.N
63360 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e amespaceName))...............Me.
63380 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 Write(""",.""")...............Me
633a0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
633c0 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f gWithCulture(navProperty.Relatio
633e0 6e 73 68 69 70 54 79 70 65 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d nshipType.Name))...............M
63400 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 e.Write(""",.""")...............
63420 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
63440 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 ingWithCulture(navProperty.ToEnd
63460 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 Member.Name))...............Me.W
63480 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 rite(""")>"&Global.Microsoft.Vis
634a0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
634c0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 ft.VisualBasic.ChrW(10))........
634e0 20 20 20 20 20 20 20 20 20 49 66 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d .........If(navProperty.ToEndMem
63500 62 65 72 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 20 3d 20 52 ber.RelationshipMultiplicity.=.R
63520 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 2e 4d 61 6e 79 29 20 54 68 elationshipMultiplicity.Many).Th
63540 65 6e 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 en...............Me.Write(".....
63560 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
63580 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
635a0 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 6e 61 76 50 code.SpaceAfter(NewModifier(navP
635c0 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 roperty))))................Me.Wr
635e0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
63600 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 thCulture(Accessibility.ForPrope
63620 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 rty(navProperty)))..............
63640 20 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 20 20 20 20 20 .Me.Write(".Property.").........
63660 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
63680 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 .ToStringWithCulture(code.Escape
636a0 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 (navProperty)))...............Me
636c0 2e 57 72 69 74 65 28 22 28 29 20 41 73 20 45 6e 74 69 74 79 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f .Write("().As.EntityCollection(O
636e0 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 f.")...............Me.Write(Me.T
63700 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
63720 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e e(MultiSchemaEscape(navProperty.
63740 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 ToEndMember.GetEntityType(),.cod
63760 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 e)))...............Me.Write(")"&
63780 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
637a0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
637c0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 ic.ChrW(10)&"........").........
637e0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
63800 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
63820 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 fter(Accessibility.ForGetter(nav
63840 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 Property))))...............Me.Wr
63860 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 ite("Get"&Global.Microsoft.Visua
63880 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
638a0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 .VisualBasic.ChrW(10)&".........
638c0 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 4d 65 2c 49 45 6e 74 69 74 79 57 69 74 68 52 65 ...Return.CType(Me,IEntityWithRe
638e0 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 lationships).RelationshipManager
63900 2e 47 65 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 .Ge"&._......................."t
63920 52 65 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 RelatedCollection(Of.").........
63940 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
63960 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 .ToStringWithCulture(MultiSchema
63980 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 Escape(navProperty.ToEndMember.G
639a0 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 etEntityType(),.code))).........
639c0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 ......Me.Write(")(""")..........
639e0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
63a00 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e ToStringWithCulture(navProperty.
63a20 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 RelationshipType.FullName)).....
63a40 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 ..........Me.Write(""",.""")....
63a60 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
63a80 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f elper.ToStringWithCulture(navPro
63aa0 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 perty.ToEndMember.Name))........
63ac0 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 .......Me.Write(""")"&Global.Mic
63ae0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
63b00 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
63b20 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f )&"........End.Get"&Global.Micro
63b40 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
63b60 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
63b80 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 "........")...............Me.Wri
63ba0 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
63bc0 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 hCulture(code.SpaceAfter(Accessi
63be0 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 bility.ForSetter(navProperty))))
63c00 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c ...............Me.Write("Set"&Gl
63c20 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
63c40 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
63c60 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 76 .ChrW(10)&"............If.(Not.v
63c80 61 6c 75 65 20 49 73 20 4e 6f 74 68 69 6e 67 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f alue.Is.Nothing)"&Global.Microso
63ca0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
63cc0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
63ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 79 ...............CType(Me,.IEntity
63d00 57 69 74 68 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 With"&._......................."
63d20 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 Relationships).RelationshipManag
63d40 65 72 2e 49 6e 69 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f er.InitializeRelatedCollection(O
63d60 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 f.")...............Me.Write(Me.T
63d80 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
63da0 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e e(MultiSchemaEscape(navProperty.
63dc0 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 ToEndMember.GetEntityType(),.cod
63de0 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 e)))...............Me.Write(")("
63e00 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f "")...............Me.Write(Me.To
63e20 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
63e40 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 (navProperty.RelationshipType.Fu
63e60 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 llName))...............Me.Write(
63e80 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 """,.""")...............Me.Write
63ea0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
63ec0 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e ulture(navProperty.ToEndMember.N
63ee0 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 ame))...............Me.Write("""
63f00 2c 20 76 61 6c 75 65 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 ,.value)"&Global.Microsoft.Visua
63f20 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
63f40 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 .VisualBasic.ChrW(10)&".........
63f60 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ...End.If"&Global.Microsoft.Visu
63f80 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
63fa0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 t.VisualBasic.ChrW(10)&"........
63fc0 45 6e 64 20 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c End.Set"&Global.Microsoft.Visual
63fe0 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
64000 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 VisualBasic.ChrW(10)&"....End.Pr
64020 6f 70 65 72 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 operty"&Global.Microsoft.VisualB
64040 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
64060 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 isualBasic.ChrW(10))............
64080 20 20 20 20 45 6c 73 65 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 ....Else...............Me.Write(
640a0 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d "....")...............Me.Write(M
640c0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
640e0 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 ture(code.SpaceAfter(NewModifier
64100 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 (navProperty))))................
64120 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
64140 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 ingWithCulture(Accessibility.For
64160 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 Property(navProperty))).........
64180 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 ......Me.Write(".Property.")....
641a0 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
641c0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 elper.ToStringWithCulture(code.E
641e0 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 scape(navProperty)))............
64200 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 29 20 41 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 ...Me.Write("().As.")...........
64220 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
64240 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 oStringWithCulture(MultiSchemaEs
64260 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 cape(navProperty.ToEndMember.Get
64280 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 EntityType(),.code)))...........
642a0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ....Me.Write(""&Global.Microsoft
642c0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
642e0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
64300 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d .....")...............Me.Write(M
64320 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
64340 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 ture(code.SpaceAfter(Accessibili
64360 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 ty.ForGetter(navProperty))))....
64380 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c ...........Me.Write("Get"&Global
643a0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
643c0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
643e0 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 W(10)&"............Return.CType(
64400 4d 65 2c 20 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 Me,.IEntityWithRelationships).Re
64420 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 47 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 lationshipManager.G"&._.........
64440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 65 74 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 .............."etRelatedReferenc
64460 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d e(Of.")...............Me.Write(M
64480 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
644a0 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 ture(MultiSchemaEscape(navProper
644c0 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 ty.ToEndMember.GetEntityType(),.
644e0 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 code)))...............Me.Write("
64500 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 )(""")...............Me.Write(Me
64520 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
64540 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 ure(navProperty.RelationshipType
64560 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 .FullName))...............Me.Wri
64580 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 te(""",.""")...............Me.Wr
645a0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
645c0 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 thCulture(navProperty.ToEndMembe
645e0 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 r.Name))...............Me.Write(
64600 22 22 22 29 2e 56 61 6c 75 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 """).Value"&Global.Microsoft.Vis
64620 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
64640 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
64660 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .End.Get"&Global.Microsoft.Visua
64680 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
646a0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 .VisualBasic.ChrW(10)&"........"
646c0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
646e0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
64700 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 ode.SpaceAfter(Accessibility.For
64720 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 Setter(navProperty))))..........
64740 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f .....Me.Write("Set"&Global.Micro
64760 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
64780 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
647a0 22 20 20 20 20 20 20 20 20 20 20 20 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 79 57 69 "............CType(Me,.IEntityWi
647c0 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e thRelationships).RelationshipMan
647e0 61 67 65 72 2e 47 65 74 52 65 6c 61 74 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ager.GetRelat"&._...............
64800 20 20 20 20 20 20 20 20 22 65 64 52 65 66 65 72 65 6e 63 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 ........"edReference(Of.")......
64820 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c .........Me.Write(Me.ToStringHel
64840 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 per.ToStringWithCulture(MultiSch
64860 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 emaEscape(navProperty.ToEndMembe
64880 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 r.GetEntityType(),.code)))......
648a0 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 .........Me.Write(")(""").......
648c0 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
648e0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 er.ToStringWithCulture(navProper
64900 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a ty.RelationshipType.FullName))..
64920 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d .............Me.Write(""",.""").
64940 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
64960 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 ngHelper.ToStringWithCulture(nav
64980 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 Property.ToEndMember.Name)).....
649a0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 2e 56 61 6c 75 65 20 3d 20 ..........Me.Write(""").Value.=.
649c0 76 61 6c 75 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 value"&Global.Microsoft.VisualBa
649e0 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
64a00 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 sualBasic.ChrW(10)&"........End.
64a20 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 Set"&Global.Microsoft.VisualBasi
64a40 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
64a60 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 alBasic.ChrW(10)&"....End.Proper
64a80 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 ty"&Global.Microsoft.VisualBasic
64aa0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
64ac0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d lBasic.ChrW(10)).............Dim
64ae0 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 6e 61 76 .refPropertyName.As.String.=.nav
64b00 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 20 26 20 22 52 65 66 65 72 65 6e 63 65 22 0d 0a 20 20 20 Property.Name.&."Reference".....
64b20 20 20 20 20 20 49 66 28 65 6e 74 69 74 79 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 46 75 6e 63 74 .....If(entity.Members.Any(Funct
64b40 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 20 3d 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 ion(m).m.Name.=.refPropertyName)
64b60 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 0d 0a 20 20 20 20 20 20 20 20 20 ).Then..............'...........
64b80 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d ...Errors.Add(New.System.CodeDom
64ba0 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 .Compiler.CompilerError(SourceCs
64bc0 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 31 37 22 2c 0d 0a 20 20 20 20 20 20 20 dlPath,.-1,.-1,."6017",.........
64be0 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e .........String.Format(CultureIn
64c00 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 fo.CurrentCulture,.GetResourceSt
64c20 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 66 6c 69 63 74 69 6e 67 47 65 6e 65 72 61 ring("Template_ConflictingGenera
64c40 74 65 64 4e 61 76 50 72 6f 70 4e 61 6d 65 22 29 2c 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 4e 61 tedNavPropName"),.navProperty.Na
64c60 6d 65 2c 20 65 6e 74 69 74 79 2e 46 75 6c 6c 4e 61 6d 65 2c 20 72 65 66 50 72 6f 70 65 72 74 79 me,.entity.FullName,.refProperty
64c80 4e 61 6d 65 29 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 20 20 20 20 20 20 Name)))..........End.If.........
64ca0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 ......Me.Write("....'''.<summary
64cc0 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e >"&Global.Microsoft.VisualBasic.
64ce0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
64d00 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 Basic.ChrW(10)&"....'''.")......
64d20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c .........Me.Write(Me.ToStringHel
64d40 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 per.ToStringWithCulture(SummaryC
64d60 6f 6d 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 omment(navProperty)))...........
64d80 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ....Me.Write(""&Global.Microsoft
64da0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
64dc0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
64de0 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 .'''.</summary>")...............
64e00 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
64e20 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f ingWithCulture(LongDescriptionCo
64e40 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e mmentElement(navProperty,.region
64e60 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 .CurrentIndentLevel)))..........
64e80 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 .....Me.Write(""&Global.Microsof
64ea0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
64ec0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
64ee0 20 20 3c 42 72 6f 77 73 61 62 6c 65 41 74 74 72 69 62 75 74 65 28 46 61 6c 73 65 29 3e 22 26 47 ..<BrowsableAttribute(False)>"&G
64f00 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
64f20 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
64f40 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 c.ChrW(10)&"....<DataMemberAttri
64f60 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c bute()>"&Global.Microsoft.Visual
64f80 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
64fa0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 VisualBasic.ChrW(10)&"....")....
64fc0 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
64fe0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 elper.ToStringWithCulture(Access
65000 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 ibility.ForProperty(navProperty)
65020 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 ))...............Me.Write(".Prop
65040 65 72 74 79 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d erty.")...............Me.Write(M
65060 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
65080 74 75 72 65 28 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 ture(refPropertyName))..........
650a0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 29 20 41 73 20 45 6e 74 69 74 79 52 65 66 65 72 .....Me.Write("().As.EntityRefer
650c0 65 6e 63 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 ence(Of.")...............Me.Writ
650e0 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
65100 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f Culture(MultiSchemaEscape(navPro
65120 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 perty.ToEndMember.GetEntityType(
65140 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 ),.code)))...............Me.Writ
65160 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 e(")"&Global.Microsoft.VisualBas
65180 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
651a0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a ualBasic.ChrW(10)&"........")...
651c0 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
651e0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e Helper.ToStringWithCulture(code.
65200 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 SpaceAfter(Accessibility.ForGett
65220 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 er(navProperty))))..............
65240 20 4d 65 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 .Me.Write("Get"&Global.Microsoft
65260 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
65280 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
652a0 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 .........Return.CType(Me,.IEntit
652c0 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 yWithRelationships).Relationship
652e0 4d 61 6e 61 67 65 72 2e 47 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Manager.G"&._...................
65300 20 20 20 20 22 65 74 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 65 28 4f 66 20 22 29 0d 0a 0a ...."etRelatedReference(Of.")...
65320 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
65340 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 Helper.ToStringWithCulture(Multi
65360 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 SchemaEscape(navProperty.ToEndMe
65380 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a mber.GetEntityType(),.code)))...
653a0 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 ............Me.Write(")(""")....
653c0 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
653e0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f elper.ToStringWithCulture(navPro
65400 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 perty.RelationshipType.FullName)
65420 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 )...............Me.Write(""",.""
65440 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
65460 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
65480 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a navProperty.ToEndMember.Name))..
654a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 .............Me.Write(""")"&Glob
654c0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
654e0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
65500 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c hrW(10)&"........End.Get"&Global
65520 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
65540 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
65560 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 W(10)&"........")...............
65580 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
655a0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 ingWithCulture(code.SpaceAfter(A
655c0 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 ccessibility.ForSetter(navProper
655e0 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 53 ty))))...............Me.Write("S
65600 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 et"&Global.Microsoft.VisualBasic
65620 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
65640 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 lBasic.ChrW(10)&"............If.
65660 28 4e 6f 74 20 76 61 6c 75 65 20 49 73 20 4e 6f 74 68 69 6e 67 29 22 26 47 6c 6f 62 61 6c 2e 4d (Not.value.Is.Nothing)"&Global.M
65680 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
656a0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
656c0 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 54 79 70 65 28 4d 65 2c 20 49 10)&"................CType(Me,.I
656e0 45 6e 74 69 74 79 57 69 74 68 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 EntityWith"&._..................
65700 20 20 20 20 20 22 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 ....."Relationships).Relationshi
65720 70 4d 61 6e 61 67 65 72 2e 49 6e 69 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 52 65 66 65 72 65 pManager.InitializeRelatedRefere
65740 6e 63 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 nce(Of.")...............Me.Write
65760 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
65780 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 ulture(MultiSchemaEscape(navProp
657a0 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 erty.ToEndMember.GetEntityType()
657c0 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ,.code)))...............Me.Write
657e0 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 (")(""")...............Me.Write(
65800 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
65820 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 lture(navProperty.RelationshipTy
65840 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 pe.FullName))...............Me.W
65860 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e rite(""",.""")...............Me.
65880 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
658a0 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d WithCulture(navProperty.ToEndMem
658c0 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 ber.Name))...............Me.Writ
658e0 65 28 22 22 22 2c 20 76 61 6c 75 65 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e e(""",.value)"&Global.Microsoft.
65900 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
65920 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
65940 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ........End.If"&Global.Microsoft
65960 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
65980 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
659a0 20 20 20 20 20 45 6e 64 20 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .....End.Set"&Global.Microsoft.V
659c0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
659e0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 soft.VisualBasic.ChrW(10)&"....E
65a00 6e 64 20 50 72 6f 70 65 72 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 nd.Property"&Global.Microsoft.Vi
65a20 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
65a40 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 oft.VisualBasic.ChrW(10)).......
65a60 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a ..........End.If..........Next..
65a80 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ........region.End()............
65aa0 20 20 20 4d 65 2e 57 72 69 74 65 28 22 45 6e 64 20 43 6c 61 73 73 22 26 47 6c 6f 62 61 6c 2e 4d ...Me.Write("End.Class"&Global.M
65ac0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
65ae0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
65b00 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 10)).............VerifyCaseInsen
65b20 73 69 74 69 76 65 4d 65 6d 62 65 72 55 6e 69 71 75 65 6e 65 73 73 28 47 65 74 41 6c 6c 44 65 63 sitiveMemberUniqueness(GetAllDec
65b40 6c 61 72 65 64 4d 65 6d 62 65 72 73 28 65 6e 74 69 74 79 29 29 0d 0a 20 20 20 20 4e 65 78 74 0d laredMembers(entity))......Next.
65b60 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 .....region.End()........'''''''
65b80 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a '......''''''''.......''''''''..
65ba0 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 ....region.Begin(GetResourceStri
65bc0 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 6c 65 78 54 79 70 65 73 22 ng("Template_RegionComplexTypes"
65be0 29 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 20 6c 6f 6f 70 43 6f 6d 70 6c 65 78 20 41 73 ))......For.Each..loopComplex.As
65c00 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 .ComplexType.in.GetSourceSchemaT
65c20 79 70 65 73 28 4f 66 20 43 6f 6d 70 6c 65 78 54 79 70 65 29 28 29 2e 4f 72 64 65 72 42 79 28 46 ypes(Of.ComplexType)().OrderBy(F
65c40 75 6e 63 74 69 6f 6e 28 65 29 20 65 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 unction(e).e.Name)..........Dim.
65c60 63 6f 6d 70 6c 65 78 20 41 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 3d 20 6c 6f 6f 70 43 6f 6d complex.As.ComplexType.=.loopCom
65c80 70 6c 65 78 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 plex...............Me.Write(""&G
65ca0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
65cc0 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
65ce0 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 c.ChrW(10)&"'''.<summary>"&Globa
65d00 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
65d20 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
65d40 72 57 28 31 30 29 26 22 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e rW(10)&"'''.")...............Me.
65d60 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
65d80 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6d 70 6c WithCulture(SummaryComment(compl
65da0 65 78 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 ex)))...............Me.Write(""&
65dc0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
65de0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
65e00 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a ic.ChrW(10)&"'''.</summary>")...
65e20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
65e40 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 Helper.ToStringWithCulture(LongD
65e60 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 escriptionCommentElement(complex
65e80 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a ,.region.CurrentIndentLevel)))..
65ea0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e .............Me.Write(""&Global.
65ec0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
65ee0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
65f00 28 31 30 29 26 22 3c 45 64 6d 43 6f 6d 70 6c 65 78 54 79 70 65 41 74 74 72 69 62 75 74 65 28 4e (10)&"<EdmComplexTypeAttribute(N
65f20 61 6d 65 73 70 61 63 65 4e 61 6d 65 3a 3d 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 amespaceName:=""")..............
65f40 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
65f60 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 2e 4e 61 6d 65 73 70 61 63 ringWithCulture(complex.Namespac
65f80 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 eName))...............Me.Write("
65fa0 22 22 2c 20 4e 61 6d 65 3a 3d 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e "",.Name:=""")...............Me.
65fc0 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
65fe0 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 WithCulture(complex.Name))......
66000 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e .........Me.Write(""")>"&Global.
66020 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
66040 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
66060 28 31 30 29 26 22 3c 44 61 74 61 43 6f 6e 74 72 61 63 74 41 74 74 72 69 62 75 74 65 28 49 73 52 (10)&"<DataContractAttribute(IsR
66080 65 66 65 72 65 6e 63 65 3a 3d 54 72 75 65 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f eference:=True)>"&Global.Microso
660a0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
660c0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c icrosoft.VisualBasic.ChrW(10)&"<
660e0 53 65 72 69 61 6c 69 7a 61 62 6c 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 Serializable()>"&Global.Microsof
66100 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
66120 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a crosoft.VisualBasic.ChrW(10))...
66140 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
66160 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 Helper.ToStringWithCulture(Acces
66180 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 63 6f 6d 70 6c 65 78 29 29 29 0d 0a 0a 20 20 sibility.ForType(complex))).....
661a0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 50 61 72 74 69 61 6c 20 43 6c 61 ..........Me.Write(".Partial.Cla
661c0 73 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e ss.")...............Me.Write(Me.
661e0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
66200 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 29 29 29 0d 0a 0a 20 20 20 20 re(code.Escape(complex))).......
66220 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f ........Me.Write(""&Global.Micro
66240 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
66260 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
66280 22 20 20 20 20 49 6e 68 65 72 69 74 73 20 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 22 26 47 6c 6f "....Inherits.ComplexObject"&Glo
662a0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
662c0 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
662e0 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 46 61 63 74 6f ChrW(10)).............WriteFacto
66300 72 79 4d 65 74 68 6f 64 28 63 6f 6d 70 6c 65 78 2c 20 63 6f 64 65 29 0d 0a 0d 0a 20 20 20 20 20 ryMethod(complex,.code).........
66320 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e ...region.Begin(GetResourceStrin
66340 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 50 72 69 6d 69 74 69 76 65 50 72 6f 70 65 g("Template_RegionPrimitivePrope
66360 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 50 72 rties"))..........For.Each.edmPr
66380 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 6e 20 63 6f 6d 70 6c 65 78 operty.As.EdmProperty.in.complex
663a0 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e .Properties.Where(Function(p).p.
663c0 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 63 6f 6d 70 6c 65 78 20 41 6e 64 41 6c 73 6f DeclaringType.Is.complex.AndAlso
663e0 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 50 .TypeOf.p.TypeUsage.EdmType.Is.P
66400 72 69 6d 69 74 69 76 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 rimitiveType)..............Verif
66420 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d yGetterAndSetterAccessibilityCom
66440 70 61 74 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 patability(edmProperty).........
66460 20 20 20 20 20 57 72 69 74 65 50 72 69 6d 69 74 69 76 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 .....WritePrimitiveTypeProperty(
66480 65 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 edmProperty,.code)..........Next
664a0 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 20 20 ..........region.End()..........
664c0 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 ..region.Begin(GetResourceString
664e0 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 ("Template_RegionComplexProperti
66500 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 50 72 6f 70 65 es"))..........For.Each.edmPrope
66520 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 6e 20 63 6f 6d 70 6c 65 78 2e 50 72 rty.As.EdmProperty.in.complex.Pr
66540 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 44 65 63 operties.Where(Function(p).p.Dec
66560 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 63 6f 6d 70 6c 65 78 20 41 6e 64 41 6c 73 6f 20 54 79 laringType.Is.complex.AndAlso.Ty
66580 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6d 70 peOf.p.TypeUsage.EdmType.Is.Comp
665a0 6c 65 78 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 lexType)..............VerifyGett
665c0 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 erAndSetterAccessibilityCompatab
665e0 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ility(edmProperty)..............
66600 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 WriteComplexTypeProperty(edmProp
66620 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 erty,.code)..........Next.......
66640 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 ...region.End()...............Me
66660 2e 57 72 69 74 65 28 22 45 6e 64 20 43 6c 61 73 73 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 .Write("End.Class"&Global.Micros
66680 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
666a0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d Microsoft.VisualBasic.ChrW(10)).
666c0 0a 0a 0d 0a 20 20 20 20 20 20 20 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 ............VerifyCaseInsensitiv
666e0 65 4d 65 6d 62 65 72 55 6e 69 71 75 65 6e 65 73 73 28 47 65 74 41 6c 6c 44 65 63 6c 61 72 65 64 eMemberUniqueness(GetAllDeclared
66700 4d 65 6d 62 65 72 73 28 63 6f 6d 70 6c 65 78 29 29 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 Members(complex))......Next.....
66720 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 .region.End()...............Me.W
66740 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 rite(""&Global.Microsoft.VisualB
66760 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
66780 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 49 66 20 isualBasic.ChrW(10)).........If.
667a0 28 4e 6f 74 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 (Not.String.IsNullOrEmpty(namesp
667c0 61 63 65 4e 61 6d 65 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 50 6f 70 49 6e 64 65 6e 74 28 29 0d aceName)).Then......PopIndent().
667e0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 45 6e 64 20 4e 61 6d 65 ..............Me.Write("End.Name
66800 73 70 61 63 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 space"&Global.Microsoft.VisualBa
66820 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
66840 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 45 6e 64 20 sualBasic.ChrW(10)).........End.
66860 49 66 0d 0a 20 20 20 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 If......VerifyCaseInsensitiveTyp
66880 65 55 6e 69 71 75 65 6e 65 73 73 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 eUniqueness()...............Retu
668a0 72 6e 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 rn.Me.GenerationEnvironment.ToSt
668c0 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0a 0d 0a 0d ring..........End.Function......
668e0 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 .....''''''''......''''''''.....
66900 20 20 27 27 27 27 27 27 27 27 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 ..''''''''........''''''''......
66920 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 0d 0a 20 20 20 20 50 ''''''''.......''''''''........P
66940 72 69 76 61 74 65 20 53 75 62 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 73 74 rivate.Sub.WriteFactoryMethod(st
66960 72 75 63 74 75 72 61 6c 54 79 70 65 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 2c 20 ructuralType.As.StructuralType,.
66980 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 0d 0a 20 20 code.As.CodeGenerationTools)....
669a0 20 20 20 20 20 20 44 69 6d 20 72 65 67 69 6f 6e 20 41 73 20 43 6f 64 65 52 65 67 69 6f 6e 20 3d ......Dim.region.As.CodeRegion.=
669c0 20 4e 65 77 20 43 6f 64 65 52 65 67 69 6f 6e 28 4d 65 2c 20 31 29 0d 0a 0d 0a 20 20 20 20 20 20 .New.CodeRegion(Me,.1)..........
669e0 20 20 44 69 6d 20 6d 65 74 68 6f 64 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 43 72 ..Dim.methodName.As.String.=."Cr
66a00 65 61 74 65 22 20 2b 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 0d 0a 20 20 20 eate".+.structuralType.Name.....
66a20 20 20 20 20 20 44 69 6d 20 75 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 20 41 73 20 55 6e 69 .....Dim.uniqueIdentifier.As.Uni
66a40 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 20 3d 20 4e 65 77 20 55 6e 69 71 75 queIdentifierService.=.New.Uniqu
66a60 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 44 69 eIdentifierService()..........Di
66a80 6d 20 69 6e 73 74 61 6e 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e m.instanceName.As.String.=.code.
66aa0 45 73 63 61 70 65 28 75 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 2e 41 64 6a 75 73 74 49 64 Escape(uniqueIdentifier.AdjustId
66ac0 65 6e 74 69 66 69 65 72 28 28 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 73 74 72 75 63 74 75 entifier((code.CamelCase(structu
66ae0 72 61 6c 54 79 70 65 2e 4e 61 6d 65 29 29 29 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 ralType.Name))))..........Dim.pa
66b00 72 61 6d 65 74 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 61 63 74 6f rameters.As.IEnumerable(Of.Facto
66b20 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 29 20 3d 20 46 61 63 74 6f 72 79 4d 65 74 68 ryMethodParameter).=.FactoryMeth
66b40 6f 64 50 61 72 61 6d 65 74 65 72 2e 43 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 73 28 73 74 72 odParameter.CreateParameters(str
66b60 75 63 74 75 72 61 6c 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 4f 66 54 79 70 65 28 4f 66 20 45 64 ucturalType.Members.OfType(Of.Ed
66b80 6d 50 72 6f 70 65 72 74 79 29 28 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 49 mProperty)().Where(Function(p).I
66ba0 6e 63 6c 75 64 65 50 72 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 73 74 ncludePropertyInFactoryMethod(st
66bc0 72 75 63 74 75 72 61 6c 54 79 70 65 2c 20 70 29 29 2c 20 75 6e 69 71 75 65 49 64 65 6e 74 69 66 ructuralType,.p)),.uniqueIdentif
66be0 69 65 72 2c 20 46 75 6e 63 74 69 6f 6e 28 74 2c 20 63 29 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 ier,.Function(t,.c).MultiSchemaE
66c00 73 63 61 70 65 28 74 2c 20 63 29 2c 20 63 6f 64 65 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 scape(t,.c),.code)............If
66c20 20 28 70 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 28 29 20 3d 20 30 29 20 54 68 65 6e 0d 0a .(parameters.Count().=.0).Then..
66c40 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 ............Return..........End.
66c60 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e If............If(structuralType.
66c80 4d 65 6d 62 65 72 73 2e 41 6e 79 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 20 3d Members.Any(Function(m).m.Name.=
66ca0 20 6d 65 74 68 6f 64 4e 61 6d 65 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .methodName)).Then..............
66cc0 27 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 '...............Errors.Add(New.S
66ce0 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 ystem.CodeDom.Compiler.CompilerE
66d00 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 rror(SourceCsdlPath,.-1,.-1,."60
66d20 32 39 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 29",..................String.For
66d40 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 mat(CultureInfo.CurrentCulture,.
66d60 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 _.....................GetResourc
66d80 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 4e eString("Template_FactoryMethodN
66da0 61 6d 65 43 6f 6e 66 6c 69 63 74 22 29 2c 20 6d 65 74 68 6f 64 4e 61 6d 65 2c 20 73 74 72 75 63 ameConflict"),.methodName,.struc
66dc0 74 75 72 61 6c 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 29 0d 0a 20 20 20 20 20 20 20 20 45 turalType.FullName)))..........E
66de0 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 47 65 nd.If............region.Begin(Ge
66e00 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e tResourceString("Template_Region
66e20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 22 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 FactoryMethod"))....Me.Write(""&
66e40 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
66e60 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
66e80 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 ic.ChrW(10)&"....'''.<summary>"&
66ea0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
66ec0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
66ee0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 ic.ChrW(10)&"....'''.")....Me.Wr
66f00 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
66f20 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 thCulture(String.Format(CultureI
66f40 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 nfo.CurrentCulture,.GetResourceS
66f60 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 43 6f 6d tring("Template_FactoryMethodCom
66f80 6d 65 6e 74 22 29 2c 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 29 29 29 0d 0a ment"),.structuralType.Name)))..
66fa0 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ..Me.Write(""&Global.Microsoft.V
66fc0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
66fe0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 soft.VisualBasic.ChrW(10)&"....'
67000 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 ''.</summary>")....Me.Write(Me.T
67020 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
67040 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 e(ParameterComments(parameters.S
67060 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 4e 65 77 20 54 75 70 6c 65 28 4f 66 20 53 elect(Function(p).New.Tuple(Of.S
67080 74 72 69 6e 67 2c 20 53 74 72 69 6e 67 29 28 70 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d tring,.String)(p.RawParameterNam
670a0 65 2c 20 70 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 29 29 2c 20 72 65 67 69 6f 6e 2e e,.p.ParameterComment)),.region.
670c0 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 CurrentIndentLevel)))....Me.Writ
670e0 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 e(""&Global.Microsoft.VisualBasi
67100 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
67120 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 alBasic.ChrW(10)&"....Public.Sha
67140 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 red.Function.")....Me.Write(Me.T
67160 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
67180 65 28 6d 65 74 68 6f 64 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 22 29 0d e(methodName))....Me.Write("(").
671a0 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
671c0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c StringWithCulture(String.Join(",
671e0 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 .",.parameters.Select(Function(p
67200 29 20 70 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 26 20 22 20 41 73 20 22 20 26 20 70 2e 50 ).p.ParameterName.&.".As.".&.p.P
67220 61 72 61 6d 65 74 65 72 54 79 70 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 0d 0a 0a 0a 4d 65 arameterType).ToArray())))....Me
67240 2e 57 72 69 74 65 28 22 29 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 .Write(").As.")....Me.Write(Me.T
67260 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
67280 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 0d e(code.Escape(structuralType))).
672a0 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
672c0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
672e0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
67300 20 20 20 20 44 69 6d 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ....Dim.")....Me.Write(Me.ToStri
67320 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 ngHelper.ToStringWithCulture(ins
67340 74 61 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 61 73 20 22 29 0d tanceName))....Me.Write(".as.").
67360 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
67380 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 StringWithCulture(code.Escape(st
673a0 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 ructuralType)))....Me.Write(".=.
673c0 4e 65 77 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 New.")....Me.Write(Me.ToStringHe
673e0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 lper.ToStringWithCulture(code.Es
67400 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 cape(structuralType)))....Me.Wri
67420 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 te(""&Global.Microsoft.VisualBas
67440 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
67460 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 0d 0a 20 20 20 20 20 20 ualBasic.ChrW(10))..............
67480 20 20 46 6f 72 20 45 61 63 68 20 70 61 72 61 6d 65 74 65 72 20 41 73 20 46 61 63 74 6f 72 79 4d ..For.Each.parameter.As.FactoryM
674a0 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 20 69 6e 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 ethodParameter.in.parameters....
674c0 20 20 20 20 20 20 20 20 20 20 49 66 28 70 61 72 61 6d 65 74 65 72 2e 49 73 43 6f 6d 70 6c 65 78 ..........If(parameter.IsComplex
674e0 54 79 70 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 0d 0a Type).Then..................'...
67500 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 ..Me.Write("........")....Me.Wri
67520 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
67540 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 hCulture(instanceName))....Me.Wr
67560 69 74 65 28 22 2e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ite(".")....Me.Write(Me.ToString
67580 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e Helper.ToStringWithCulture(code.
675a0 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 29 29 29 0d 0a 0a 0a 4d 65 Escape(parameter.Source)))....Me
675c0 2e 57 72 69 74 65 28 22 20 3d 20 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 56 65 72 69 .Write(".=.StructuralObject.Veri
675e0 66 79 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 49 73 4e 6f 74 4e 75 6c 6c 28 22 29 0d 0a 0a 0a 4d fyComplexObjectIsNotNull(")....M
67600 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
67620 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 ngWithCulture(parameter.Paramete
67640 72 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 2c 20 22 22 22 29 0d 0a 0a 0a 4d rName))....Me.Write(",.""")....M
67660 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
67680 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 2e 4e ngWithCulture(parameter.Source.N
676a0 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d ame))....Me.Write(""")"&Global.M
676c0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
676e0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
67700 31 30 29 29 0d 0a 0a 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 10))....................Else....
67720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 ..............'.....Me.Write("..
67740 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ......")....Me.Write(Me.ToString
67760 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 Helper.ToStringWithCulture(insta
67780 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 2e 22 29 0d 0a 0a 0a 4d 65 nceName))....Me.Write(".")....Me
677a0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
677c0 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 gWithCulture(code.Escape(paramet
677e0 65 72 2e 53 6f 75 72 63 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 22 29 0d er.Source)))....Me.Write(".=.").
67800 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
67820 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 StringWithCulture(parameter.Para
67840 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 meterName))....Me.Write(""&Globa
67860 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
67880 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
678a0 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d rW(10))..................End.If.
678c0 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 .........Next....Me.Write(".....
678e0 20 20 20 52 65 74 75 72 6e 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 ...Return.")....Me.Write(Me.ToSt
67900 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 ringHelper.ToStringWithCulture(i
67920 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f nstanceName))....Me.Write(""&Glo
67940 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
67960 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
67980 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 22 26 47 6c 6f 62 ChrW(10)&"....End.Function"&Glob
679a0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
679c0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
679e0 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 hrW(10))..............region.End
67a00 28 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 ()......End.Sub..........'''''''
67a20 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a '......''''''''.......''''''''..
67a40 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 57 72 69 74 65 50 72 69 6d 69 74 69 76 65 54 79 ....Private.Sub.WritePrimitiveTy
67a60 70 65 50 72 6f 70 65 72 74 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 20 41 73 20 peProperty(primitiveProperty.As.
67a80 45 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 EdmProperty,.code.As.CodeGenerat
67aa0 69 6f 6e 54 6f 6f 6c 73 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 66 20 41 73 20 4d 65 74 ionTools)..........Dim.ef.As.Met
67ac0 61 64 61 74 61 54 6f 6f 6c 73 20 3d 20 4e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 4d adataTools.=.New.MetadataTools(M
67ae0 65 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f e)....Me.Write(""&Global.Microso
67b00 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
67b20 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
67b40 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ...'''.<summary>"&Global.Microso
67b60 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
67b80 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
67ba0 20 20 20 27 27 27 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e ...'''.")....Me.Write(Me.ToStrin
67bc0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d gHelper.ToStringWithCulture(Summ
67be0 61 72 79 43 6f 6d 6d 65 6e 74 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d aryComment(primitiveProperty))).
67c00 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
67c20 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
67c40 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
67c60 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e '''.</summary>")....Me.Write(Me.
67c80 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
67ca0 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 re(LongDescriptionCommentElement
67cc0 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2c 20 31 29 29 29 0d 0a 0a 0a 4d 65 2e 57 (primitiveProperty,.1)))....Me.W
67ce0 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 rite(""&Global.Microsoft.VisualB
67d00 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
67d20 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 45 64 6d 53 63 61 isualBasic.ChrW(10)&"....<EdmSca
67d40 6c 61 72 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 45 6e 74 69 74 79 4b 65 79 50 72 larPropertyAttribute(EntityKeyPr
67d60 6f 70 65 72 74 79 3a 3d 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 operty:=")....Me.Write(Me.ToStri
67d80 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
67da0 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 65 66 2e 49 73 4b 65 79 28 70 72 69 6d 69 74 69 e.CreateLiteral(ef.IsKey(primiti
67dc0 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 2c 20 49 73 veProperty))))....Me.Write(",.Is
67de0 4e 75 6c 6c 61 62 6c 65 3a 3d 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 Nullable:=")....Me.Write(Me.ToSt
67e00 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
67e20 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 ode.CreateLiteral(ef.IsNullable(
67e40 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 primitiveProperty))))....Me.Writ
67e60 65 28 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 e(")>"&Global.Microsoft.VisualBa
67e80 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
67ea0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 61 74 61 4d 65 6d sualBasic.ChrW(10)&"....<DataMem
67ec0 62 65 72 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 berAttribute()>"&Global.Microsof
67ee0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
67f00 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
67f20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ..")....Me.Write(Me.ToStringHelp
67f40 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 er.ToStringWithCulture(code.Spac
67f60 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 eAfter(NewModifier(primitiveProp
67f80 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 erty))))....Me.Write(Me.ToString
67fa0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 Helper.ToStringWithCulture(Acces
67fc0 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 70 72 69 6d 69 74 69 76 65 50 72 sibility.ForProperty(primitivePr
67fe0 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 operty)))....Me.Write(".Property
68000 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .")....Me.Write(Me.ToStringHelpe
68020 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 r.ToStringWithCulture(code.Escap
68040 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 e(primitiveProperty)))....Me.Wri
68060 74 65 28 22 28 29 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 te("().As.")....Me.Write(Me.ToSt
68080 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
680a0 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 54 79 70 ode.Escape(primitiveProperty.Typ
680c0 65 55 73 61 67 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e eUsage)))....Me.Write(""&Global.
680e0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
68100 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
68120 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e (10)&"........")....Me.Write(Me.
68140 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
68160 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 re(code.SpaceAfter(Accessibility
68180 2e 46 6f 72 47 65 74 74 65 72 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 .ForGetter(primitiveProperty))))
681a0 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 ....Me.Write("Get"&Global.Micros
681c0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
681e0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d Microsoft.VisualBasic.ChrW(10)).
68200 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 28 65 66 2e 43 6c 72 54 79 70 65 28 70 72 ................If(ef.ClrType(pr
68220 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 20 3d 20 47 65 74 imitiveProperty.TypeUsage).=.Get
68240 54 79 70 65 28 62 79 74 65 28 29 29 29 20 54 68 65 6e 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 Type(byte())).Then....Me.Write("
68260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 75 63 74 75 72 61 ................Return.Structura
68280 6c 4f 62 6a 65 63 74 2e 47 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 0d 0a 0a 0a 4d 65 2e 57 lObject.GetValidValue(")....Me.W
682a0 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
682c0 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 74 ithCulture(code.FieldName(primit
682e0 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 iveProperty)))....Me.Write(")"&G
68300 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
68320 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
68340 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 c.ChrW(10)).................Else
68360 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ....Me.Write("............Return
68380 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .")....Me.Write(Me.ToStringHelpe
683a0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 r.ToStringWithCulture(code.Field
683c0 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e Name(primitiveProperty)))....Me.
683e0 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
68400 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
68420 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 VisualBasic.ChrW(10))...........
68440 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 ...........End.If....Me.Write(".
68460 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 .......End.Get"&Global.Microsoft
68480 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
684a0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
684c0 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 .....")....Me.Write(Me.ToStringH
684e0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 elper.ToStringWithCulture(code.S
68500 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 paceAfter(Accessibility.ForSette
68520 72 28 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 29 29 0d 0a 0a 0a 4d 65 2e r((primitiveProperty)))))....Me.
68540 57 72 69 74 65 28 22 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Write("Set"&Global.Microsoft.Vis
68560 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
68580 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 20 20 20 20 ft.VisualBasic.ChrW(10))........
685a0 20 20 20 20 20 49 66 28 65 66 2e 49 73 4b 65 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 .....If(ef.IsKey(primitiveProper
685c0 74 79 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 28 65 66 ty)).Then..................If(ef
685e0 2e 43 6c 72 54 79 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 .ClrType(primitiveProperty.TypeU
68600 73 61 67 65 29 20 3d 20 47 65 74 54 79 70 65 28 62 79 74 65 28 29 29 29 20 54 68 65 6e 0d 0a 0a sage).=.GetType(byte())).Then...
68620 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 53 .Me.Write("............If.(Not.S
68640 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 42 69 6e 61 72 79 45 71 75 61 6c 73 28 22 29 0d tructuralObject.BinaryEquals(").
68660 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
68680 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 StringWithCulture(code.FieldName
686a0 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 (primitiveProperty)))....Me.Writ
686c0 65 28 22 2c 20 56 61 6c 75 65 29 29 20 54 68 65 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 e(",.Value)).Then"&Global.Micros
686e0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
68700 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d Microsoft.VisualBasic.ChrW(10)).
68720 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 0a 0a 4d 65 2e .....................Else....Me.
68740 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 22 29 0d 0a 0a 0a 4d 65 2e Write("............If.(")....Me.
68760 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
68780 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 WithCulture(code.FieldName(primi
687a0 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3c 3e tiveProperty)))....Me.Write(".<>
687c0 20 56 61 6c 75 65 29 20 54 68 65 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .Value).Then"&Global.Microsoft.V
687e0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
68800 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a soft.VisualBasic.ChrW(10))......
68820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 ................End.If..........
68840 20 20 20 20 20 20 20 20 50 75 73 68 49 6e 64 65 6e 74 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 ........PushIndent(CodeRegion.Ge
68860 74 49 6e 64 65 6e 74 28 31 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d tIndent(1))..............End.If.
68880 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d ...Me.Write("............")....M
688a0 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
688c0 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 ngWithCulture(ChangingMethodName
688e0 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 (primitiveProperty)))....Me.Writ
68900 65 28 22 28 76 61 6c 75 65 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 e("(value)"&Global.Microsoft.Vis
68920 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
68940 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
68960 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 69 6e 67 28 22 22 22 29 .....ReportPropertyChanging(""")
68980 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
689a0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 oStringWithCulture(primitiveProp
689c0 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c erty.Name))....Me.Write(""")"&Gl
689e0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
68a00 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
68a20 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e .ChrW(10)&"............")....Me.
68a40 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
68a60 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 WithCulture(code.FieldName(primi
68a80 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 tiveProperty)))....Me.Write(".=.
68aa0 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 76 StructuralObject.SetValidValue(v
68ac0 61 6c 75 65 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 alue")....Me.Write(Me.ToStringHe
68ae0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4f 70 74 69 6f 6e 61 lper.ToStringWithCulture(Optiona
68b00 6c 4e 75 6c 6c 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 53 65 74 56 61 6c 69 64 56 61 6c lNullableParameterForSetValidVal
68b20 75 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a ue(primitiveProperty,.code)))...
68b40 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .Me.Write(")"&Global.Microsoft.V
68b60 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
68b80 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 soft.VisualBasic.ChrW(10)&".....
68ba0 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 65 64 28 22 22 22 .......ReportPropertyChanged("""
68bc0 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e )....Me.Write(Me.ToStringHelper.
68be0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f ToStringWithCulture(primitivePro
68c00 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 perty.Name))....Me.Write(""")"&G
68c20 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
68c40 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
68c60 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 c.ChrW(10)&"............")....Me
68c80 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
68ca0 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 70 gWithCulture(ChangedMethodName(p
68cc0 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 rimitiveProperty)))....Me.Write(
68ce0 22 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 "()"&Global.Microsoft.VisualBasi
68d00 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
68d20 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 49 66 alBasic.ChrW(10)).............If
68d40 28 65 66 2e 49 73 4b 65 79 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 20 54 68 (ef.IsKey(primitiveProperty)).Th
68d60 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 6f 70 49 6e 64 65 6e 74 28 29 0d en..................PopIndent().
68d80 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 22 ...Me.Write("............End.If"
68da0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
68dc0 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
68de0 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 sic.ChrW(10))..................E
68e00 6e 64 20 49 66 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 45 6e 64 20 53 nd.If....Me.Write("........End.S
68e20 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 et"&Global.Microsoft.VisualBasic
68e40 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
68e60 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 lBasic.ChrW(10)&"....End.Propert
68e80 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e y"&Global.Microsoft.VisualBasic.
68ea0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
68ec0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(10)&Global.Microsoft.
68ee0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
68f00 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
68f20 50 72 69 76 61 74 65 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 Private.")....Me.Write(Me.ToStri
68f40 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
68f60 65 2e 46 69 65 6c 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 e.FieldName(primitiveProperty)))
68f80 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 ....Me.Write(".As.")....Me.Write
68fa0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
68fc0 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 ulture(code.Escape(primitiveProp
68fe0 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 erty.TypeUsage)))....Me.Write(Me
69000 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
69020 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 20 3d 20 22 2c 20 63 6f 64 ure(code.StringBefore(".=.",.cod
69040 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 e.CreateLiteral(primitivePropert
69060 79 2e 44 65 66 61 75 6c 74 56 61 6c 75 65 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 y.DefaultValue))))....Me.Write("
69080 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
690a0 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
690c0 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 20 50 61 72 74 69 asic.ChrW(10)&"....Private.Parti
690e0 61 6c 20 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e al.Sub.")....Me.Write(Me.ToStrin
69100 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e gHelper.ToStringWithCulture(Chan
69120 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 70 72 69 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 gingMethodName(primitiveProperty
69140 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 76 61 6c 75 65 20 41 73 20 22 29 0d 0a 0a )))....Me.Write("(value.As.")...
69160 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
69180 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 72 69 6d ringWithCulture(code.Escape(prim
691a0 69 74 69 76 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 29 29 0d 0a 0a 0a 4d 65 itiveProperty.TypeUsage)))....Me
691c0 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 .Write(")"&Global.Microsoft.Visu
691e0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
69200 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 t.VisualBasic.ChrW(10)&"....End.
69220 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 Sub"&Global.Microsoft.VisualBasi
69240 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
69260 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(10)&Global.Microsof
69280 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
692a0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
692c0 20 20 50 72 69 76 61 74 65 20 50 61 72 74 69 61 6c 20 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 ..Private.Partial.Sub.")....Me.W
692e0 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
69300 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 70 72 69 ithCulture(ChangedMethodName(pri
69320 6d 69 74 69 76 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 mitiveProperty)))....Me.Write("(
69340 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e )"&Global.Microsoft.VisualBasic.
69360 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
69380 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f Basic.ChrW(10)&"....End.Sub"&Glo
693a0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
693c0 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
693e0 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 0d 0a ChrW(10))..........End.Sub......
69400 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 ....''''''''......''''''''......
69420 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 57 72 69 74 65 .''''''''......Private.Sub.Write
69440 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 79 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 ComplexTypeProperty(complexPrope
69460 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 rty.As.EdmProperty,.code.As.Code
69480 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 GenerationTools)....Me.Write(""&
694a0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
694c0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
694e0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 ic.ChrW(10)&"....'''.<summary>"&
69500 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
69520 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
69540 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 ic.ChrW(10)&"....'''.")....Me.Wr
69560 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
69580 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 thCulture(SummaryComment(complex
695a0 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 Property)))....Me.Write(""&Globa
695c0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
695e0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
69600 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 0a rW(10)&"....'''.</summary>")....
69620 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
69640 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f ingWithCulture(LongDescriptionCo
69660 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 31 29 mmentElement(complexProperty,.1)
69680 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ))....Me.Write(""&Global.Microso
696a0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
696c0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
696e0 20 20 20 3c 45 64 6d 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 ...<EdmComplexPropertyAttribute(
69700 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 )>"&Global.Microsoft.VisualBasic
69720 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
69740 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 65 73 69 67 6e 65 72 53 65 lBasic.ChrW(10)&"....<DesignerSe
69760 72 69 61 6c 69 7a 61 74 69 6f 6e 56 69 73 69 62 69 6c 69 74 79 28 44 65 73 69 67 22 26 20 5f 20 rializationVisibility(Desig"&._.
69780 0d 0a 20 20 20 20 20 20 20 20 22 6e 65 72 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 56 69 73 69 62 .........."nerSerializationVisib
697a0 69 6c 69 74 79 2e 43 6f 6e 74 65 6e 74 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 ility.Content)>"&Global.Microsof
697c0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
697e0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
69800 20 20 3c 58 6d 6c 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c 6c 61 62 6c 65 3a 3d 54 72 75 65 29 3e ..<XmlElement(IsNullable:=True)>
69820 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
69840 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
69860 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 53 22 26 20 5f 20 0d 0a 20 20 20 20 asic.ChrW(10)&"....<S"&._.......
69880 20 20 20 20 22 6f 61 70 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c 6c 61 62 6c 65 3a 3d 54 72 75 65 ...."oapElement(IsNullable:=True
698a0 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 )>"&Global.Microsoft.VisualBasic
698c0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
698e0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 61 74 61 4d 65 6d 62 65 72 lBasic.ChrW(10)&"....<DataMember
69900 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 Attribute()>"&Global.Microsoft.V
69920 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
69940 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 soft.VisualBasic.ChrW(10)&"...."
69960 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e )....Me.Write(Me.ToStringHelper.
69980 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 ToStringWithCulture(code.SpaceAf
699a0 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 ter(NewModifier(complexProperty)
699c0 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 )))....Me.Write(Me.ToStringHelpe
699e0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c r.ToStringWithCulture(Accessibil
69a00 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 ity.ForProperty(complexProperty)
69a20 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 0a ))....Me.Write(".Property.")....
69a40 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
69a60 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6d 70 6c ingWithCulture(code.Escape(compl
69a80 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 29 20 41 73 exProperty)))....Me.Write("().As
69aa0 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .")....Me.Write(Me.ToStringHelpe
69ac0 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d r.ToStringWithCulture(MultiSchem
69ae0 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 aEscape(complexProperty.TypeUsag
69b00 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c e,.code)))....Me.Write(""&Global
69b20 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
69b40 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
69b60 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 W(10)&"........")....Me.Write(Me
69b80 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
69ba0 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 ure(code.SpaceAfter(Accessibilit
69bc0 79 2e 46 6f 72 47 65 74 74 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 29 0d y.ForGetter(complexProperty)))).
69be0 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ...Me.Write("Get"&Global.Microso
69c00 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
69c20 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
69c40 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ...........")....Me.Write(Me.ToS
69c60 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
69c80 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 code.FieldName(complexProperty))
69ca0 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 47 65 74 56 61 6c 69 64 56 61 6c 75 65 28 )....Me.Write(".=.GetValidValue(
69cc0 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ")....Me.Write(Me.ToStringHelper
69ce0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e .ToStringWithCulture(code.FieldN
69d00 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 ame(complexProperty)))....Me.Wri
69d20 74 65 28 22 2c 20 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 te(",.""")....Me.Write(Me.ToStri
69d40 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d ngHelper.ToStringWithCulture(com
69d60 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 plexProperty.Name))....Me.Write(
69d80 22 22 22 2c 20 46 61 6c 73 65 2c 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f """,.False,.")....Me.Write(Me.To
69da0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
69dc0 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 (InitializedTrackingField(comple
69de0 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 xProperty,.code)))....Me.Write("
69e00 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e )"&Global.Microsoft.VisualBasic.
69e20 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
69e40 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a Basic.ChrW(10)&"............")..
69e60 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
69e80 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 tringWithCulture(InitializedTrac
69ea0 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 kingField(complexProperty,.code)
69ec0 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 54 72 75 65 22 26 47 6c 6f 62 61 6c 2e ))....Me.Write(".=.True"&Global.
69ee0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
69f00 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
69f20 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 29 0d 0a 0a 0a 4d (10)&"............Return.")....M
69f40 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
69f60 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d ngWithCulture(code.FieldName(com
69f80 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 plexProperty)))....Me.Write(""&G
69fa0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
69fc0 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
69fe0 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 6c 6f c.ChrW(10)&"........End.Get"&Glo
6a000 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
6a020 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
6a040 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 ChrW(10)&"........")....Me.Write
6a060 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
6a080 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 ulture(code.SpaceAfter(Accessibi
6a0a0 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 lity.ForSetter(complexProperty))
6a0c0 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 ))....Me.Write("Set"&Global.Micr
6a0e0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
6a100 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
6a120 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e &"............")....Me.Write(Me.
6a140 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
6a160 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f re(ChangingMethodName(complexPro
6a180 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 76 61 6c 75 65 29 22 26 47 perty)))....Me.Write("(value)"&G
6a1a0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
6a1c0 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
6a1e0 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 c.ChrW(10)&"............ReportPr
6a200 6f 70 65 72 74 79 43 68 61 6e 67 69 6e 67 28 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 opertyChanging(""")....Me.Write(
6a220 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
6a240 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a lture(complexProperty.Name))....
6a260 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Me.Write(""")"&Global.Microsoft.
6a280 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
6a2a0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
6a2c0 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ........")....Me.Write(Me.ToStri
6a2e0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
6a300 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a e.FieldName(complexProperty)))..
6a320 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 0d ..Me.Write(".=.SetValidValue(").
6a340 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
6a360 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 StringWithCulture(code.FieldName
6a380 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 (complexProperty)))....Me.Write(
6a3a0 22 2c 20 76 61 6c 75 65 2c 20 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f ",.value,.""")....Me.Write(Me.To
6a3c0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
6a3e0 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 (complexProperty.Name))....Me.Wr
6a400 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 ite(""")"&Global.Microsoft.Visua
6a420 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
6a440 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 .VisualBasic.ChrW(10)&".........
6a460 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c ...")....Me.Write(Me.ToStringHel
6a480 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 per.ToStringWithCulture(Initiali
6a4a0 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 zedTrackingField(complexProperty
6a4c0 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 54 72 75 65 22 26 ,.code)))....Me.Write(".=.True"&
6a4e0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
6a500 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
6a520 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 ic.ChrW(10)&"............ReportP
6a540 72 6f 70 65 72 74 79 43 68 61 6e 67 65 64 28 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 ropertyChanged(""")....Me.Write(
6a560 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
6a580 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a lture(complexProperty.Name))....
6a5a0 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Me.Write(""")"&Global.Microsoft.
6a5c0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
6a5e0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
6a600 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ........")....Me.Write(Me.ToStri
6a620 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 ngHelper.ToStringWithCulture(Cha
6a640 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 ngedMethodName(complexProperty))
6a660 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 )....Me.Write("()"&Global.Micros
6a680 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
6a6a0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
6a6c0 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 ........End.Set"&Global.Microsof
6a6e0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
6a700 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
6a720 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ..End.Property"&Global.Microsoft
6a740 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
6a760 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(10)&Glob
6a780 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
6a7a0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
6a7c0 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 hrW(10)&"....Private.")....Me.Wr
6a7e0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
6a800 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 thCulture(code.FieldName(complex
6a820 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 22 29 0d Property)))....Me.Write(".As.").
6a840 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
6a860 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 StringWithCulture(MultiSchemaEsc
6a880 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 ape(complexProperty.TypeUsage,.c
6a8a0 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ode)))....Me.Write(""&Global.Mic
6a8c0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
6a8e0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
6a900 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
6a920 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
6a940 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 20 22 29 0d 0a 0a asic.ChrW(10)&"....Private.")...
6a960 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
6a980 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b ringWithCulture(InitializedTrack
6a9a0 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 ingField(complexProperty,.code))
6a9c0 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 42 6f 6f 6c 65 61 6e 22 26 47 6c 6f 62 )....Me.Write(".As.Boolean"&Glob
6a9e0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
6aa00 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
6aa20 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(10)&Global.Microsoft.VisualB
6aa40 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
6aa60 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 isualBasic.ChrW(10)&"....Private
6aa80 20 50 61 72 74 69 61 6c 20 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 .Partial.Sub.")....Me.Write(Me.T
6aaa0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
6aac0 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 e(ChangingMethodName(complexProp
6aae0 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 76 61 6c 75 65 20 41 73 20 22 erty)))....Me.Write("(value.As."
6ab00 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e )....Me.Write(Me.ToStringHelper.
6ab20 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 ToStringWithCulture(MultiSchemaE
6ab40 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c scape(complexProperty.TypeUsage,
6ab60 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e .code)))....Me.Write(")"&Global.
6ab80 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
6aba0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
6abc0 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 (10)&"....End.Sub"&Global.Micros
6abe0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
6ac00 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 Microsoft.VisualBasic.ChrW(10)&G
6ac20 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
6ac40 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
6ac60 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 20 50 61 72 74 69 61 6c 20 c.ChrW(10)&"....Private.Partial.
6ac80 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 Sub.")....Me.Write(Me.ToStringHe
6aca0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 lper.ToStringWithCulture(Changed
6acc0 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a MethodName(complexProperty)))...
6ace0 0a 4d 65 2e 57 72 69 74 65 28 22 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e .Me.Write("()"&Global.Microsoft.
6ad00 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
6ad20 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
6ad40 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c End.Sub"&Global.Microsoft.Visual
6ad60 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
6ad80 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 45 VisualBasic.ChrW(10))..........E
6ada0 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 57 72 69 74 65 4c nd.Sub........Private.Sub.WriteL
6adc0 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 42 79 56 61 6c 20 63 6f 6e 74 61 69 6e 65 azyLoadingEnabled(ByVal.containe
6ade0 72 20 41 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 0d 0a 20 20 20 20 20 20 20 20 44 r.As.EntityContainer)..........D
6ae00 69 6d 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 20 41 73 20 im.lazyLoadingAttributeValue.As.
6ae20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6c 61 String.=.Nothing..........Dim.la
6ae40 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 zyLoadingAttributeName.As.String
6ae60 20 3d 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 45 44 4d 5f 41 4e 4e 4f 54 41 54 .=.MetadataConstants.EDM_ANNOTAT
6ae80 49 4f 4e 5f 30 39 5f 30 32 20 26 20 22 3a 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 ION_09_02.&.":LazyLoadingEnabled
6aea0 22 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 2e 54 72 79 47 "..........If.MetadataTools.TryG
6aec0 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 28 etStringMetadataPropertySetting(
6aee0 63 6f 6e 74 61 69 6e 65 72 2c 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 4e container,.lazyLoadingAttributeN
6af00 61 6d 65 2c 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 29 20 ame,.lazyLoadingAttributeValue).
6af20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 69 73 4c 61 7a 79 4c 6f 61 64 Then..............Dim.isLazyLoad
6af40 69 6e 67 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 ing.As.Boolean.=.False..........
6af60 20 20 20 20 49 66 20 42 6f 6f 6c 65 61 6e 2e 54 72 79 50 61 72 73 65 28 6c 61 7a 79 4c 6f 61 64 ....If.Boolean.TryParse(lazyLoad
6af80 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 2c 20 69 73 4c 61 7a 79 4c 6f 61 64 69 6e 67 ingAttributeValue,.isLazyLoading
6afa0 29 20 54 68 65 6e 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4d 79 42 61 ).Then....Me.Write("........MyBa
6afc0 73 65 2e 43 6f 6e 74 65 78 74 4f 70 74 69 6f 6e 73 2e 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 se.ContextOptions.LazyLoadingEna
6afe0 62 6c 65 64 20 3d 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e bled.=.")....Me.Write(Me.ToStrin
6b000 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 73 4c 61 gHelper.ToStringWithCulture(isLa
6b020 7a 79 4c 6f 61 64 69 6e 67 2e 54 6f 53 74 72 69 6e 67 28 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 zyLoading.ToString().ToLowerInva
6b040 72 69 61 6e 74 28 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e riant()))....Me.Write(""&Global.
6b060 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
6b080 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
6b0a0 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 (10))..................End.If...
6b0c0 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 .......End.If......End.Sub......
6b0e0 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 ..''''''''......''''''''.......'
6b100 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 53 6f 75 '''''''......Public.Property.Sou
6b120 72 63 65 43 73 64 6c 50 61 74 68 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 rceCsdlPath().As.String......Pub
6b140 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 29 20 41 73 lic.Property.ModelNamespace().As
6b160 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 49 74 65 .String......Public.Property.Ite
6b180 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 mCollection().As.EdmItemCollecti
6b1a0 6f 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 52 65 66 65 72 65 6e 63 on......Public.Property.Referenc
6b1c0 65 43 73 64 6c 50 61 74 68 73 28 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 eCsdlPaths().As.IEnumerable(Of.S
6b1e0 74 72 69 6e 67 29 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6c 6c tring)......Public.Property.Full
6b200 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 28 29 20 41 73 20 4e 75 6c 6c 61 62 6c yQualifySystemTypes().As.Nullabl
6b220 65 28 4f 66 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 e(Of.Boolean)......Public.Proper
6b240 74 79 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 20 41 73 20 ty.CreateContextAddToMethods.As.
6b260 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 50 75 62 6c 69 63 Nullable(Of.Boolean)......Public
6b280 20 50 72 6f 70 65 72 74 79 20 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 .Property.EdmToObjectNamespaceMa
6b2a0 70 28 29 20 41 73 20 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 p().As.Dictionary(Of.string,.str
6b2c0 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 ing)..........Get..............R
6b2e0 65 74 75 72 6e 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 0d 0a eturn._edmToObjectNamespaceMap..
6b300 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 0d 0a 20 20 ........End.Get..........Set....
6b320 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d .........._edmToObjectNamespaceM
6b340 61 70 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 0d 0a 20 ap.=.Value..........End.Set.....
6b360 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 44 69 6d 20 5f 65 64 6d 54 6f 4f ...End.Property......Dim._edmToO
6b380 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 20 41 73 20 44 69 63 74 69 6f 6e 61 72 79 28 bjectNamespaceMap.As.Dictionary(
6b3a0 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 20 3d 20 4e 65 77 20 44 69 63 74 69 6f 6e Of.string,.string).=.New.Diction
6b3c0 61 72 79 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 0d 0a 0d 0a 20 20 20 20 50 75 ary(Of.string,.string)........Pu
6b3e0 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 53 6f 75 72 63 65 45 64 6d blic.ReadOnly.Property.SourceEdm
6b400 56 65 72 73 69 6f 6e 20 41 73 20 44 6f 75 62 6c 65 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a Version.As.Double..........Get..
6b420 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 ............If.(Not.ItemCollecti
6b440 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 on.Is.Nothing).Then.............
6b460 20 20 20 20 20 52 65 74 75 72 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 45 64 6d 56 65 .....Return.ItemCollection.EdmVe
6b480 72 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 rsion..............End.If.......
6b4a0 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 30 2e 30 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 .......Return.0.0..........End.G
6b4c0 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 27 et......End.Property........''''
6b4e0 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 ''''......''''''''.......'''''''
6b500 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 52 65 61 64 4f 6e 6c 79 20 50 '......Private.Shared.ReadOnly.P
6b520 72 6f 70 65 72 74 79 20 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 41 73 20 53 79 73 74 65 roperty.ResourceManager.As.Syste
6b540 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 m.Resources.ResourceManager.....
6b560 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 28 5f 72 65 73 6f 75 72 .....Get..............If(_resour
6b580 63 65 4d 61 6e 61 67 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 ceManager.Is.Nothing)...........
6b5a0 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6d 61 6e 61 67 65 72 20 41 73 20 53 79 73 74 65 6d ...........Dim.manager.As.System
6b5c0 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 3d 20 4e 65 77 .Resources.ResourceManager.=.New
6b5e0 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 .System.Resources.ResourceManage
6b600 72 28 22 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 22 2c 20 47 r("System.Data.Entity.Design",.G
6b620 65 74 54 79 70 65 28 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e etType(System.Data.Entity.Design
6b640 2e 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 29 2e .MetadataItemCollectionFactory).
6b660 41 73 73 65 6d 62 6c 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 Assembly)......................S
6b680 79 73 74 65 6d 2e 54 68 72 65 61 64 69 6e 67 2e 49 6e 74 65 72 6c 6f 63 6b 65 64 2e 43 6f 6d 70 ystem.Threading.Interlocked.Comp
6b6a0 61 72 65 45 78 63 68 61 6e 67 65 28 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2c 20 6d 61 areExchange(_resourceManager,.ma
6b6c0 6e 61 67 65 72 2c 20 4e 6f 74 68 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 nager,.Nothing)..............End
6b6e0 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 72 65 73 6f 75 72 63 .If..............Return._resourc
6b700 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 eManager..........End.Get......E
6b720 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 44 69 6d 20 53 68 61 72 65 64 20 5f 72 65 73 nd.Property......Dim.Shared._res
6b740 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 41 73 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 ourceManager.As.System.Resources
6b760 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 0d 0a 0a 0a 0d 0a 0d 0a 20 20 20 20 50 72 69 76 .ResourceManager............Priv
6b780 61 74 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 52 65 73 6f 75 72 63 65 53 ate.Shared.Function.GetResourceS
6b7a0 74 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 tring(resourceName.As.String).As
6b7c0 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 52 65 73 6f 75 72 63 65 .String..........Return.Resource
6b7e0 4d 61 6e 61 67 65 72 2e 47 65 74 53 74 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d 65 2c 20 Manager.GetString(resourceName,.
6b800 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 6f 74 68 69 6e 67 29 20 27 20 0d 0a 20 20 20 _...............Nothing).'......
6b820 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 .End.Function........Private.Sub
6b840 20 41 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 75 73 65 72 53 65 74 74 69 6e 67 73 20 .ApplyUserSettings(userSettings.
6b860 61 73 20 55 73 65 72 53 65 74 74 69 6e 67 73 29 0d 0a 20 20 20 20 20 20 20 20 49 66 28 53 6f 75 as.UserSettings)..........If(Sou
6b880 72 63 65 43 73 64 6c 50 61 74 68 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 23 49 rceCsdlPath.Is.Nothing).Then..#I
6b8a0 66 20 4e 4f 54 20 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 20 f.NOT.PREPROCESSED_TEMPLATE.....
6b8c0 20 20 20 20 20 20 20 20 20 49 66 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 .........If.userSettings.SourceC
6b8e0 73 64 6c 50 61 74 68 20 3d 20 28 22 24 22 20 26 20 22 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 22 sdlPath.=.("$".&."edmxInputFile"
6b900 20 26 20 22 24 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e .&."$")..................Errors.
6b920 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e Add(New.System.CodeDom.Compiler.
6b940 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 2c CompilerError(Host.TemplateFile,
6b960 20 2d 31 2c 20 2d 31 2c 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 .-1,.-1,.String.Empty,..........
6b980 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 ............GetResourceString("T
6b9a0 65 6d 70 6c 61 74 65 5f 52 65 70 6c 61 63 65 56 73 49 74 65 6d 54 65 6d 70 6c 61 74 65 54 6f 6b emplate_ReplaceVsItemTemplateTok
6b9c0 65 6e 22 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 0d 0a en")))..................Return..
6b9e0 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ............End.If..............
6ba00 20 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 ..SourceCsdlPath.=.Host.ResolveP
6ba20 61 74 68 28 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 ath(userSettings.SourceCsdlPath)
6ba40 0d 0a 23 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 73 64 6c 50 ..#Else..............SourceCsdlP
6ba60 61 74 68 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c 50 61 74 ath.=.userSettings.SourceCsdlPat
6ba80 68 0d 0a 23 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 h..#End.If..........End.If......
6baa0 20 20 20 20 20 20 27 20 6e 6f 72 6d 61 6c 69 7a 65 20 74 68 65 20 70 61 74 68 2c 20 72 65 6d 6f ......'.normalize.the.path,.remo
6bac0 76 65 20 2e 2e 5c 20 66 72 6f 6d 20 69 74 0d 0a 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 73 ve...\.from.it..........SourceCs
6bae0 64 6c 50 61 74 68 20 3d 20 50 61 74 68 2e 47 65 74 46 75 6c 6c 50 61 74 68 28 53 6f 75 72 63 65 dlPath.=.Path.GetFullPath(Source
6bb00 43 73 64 6c 50 61 74 68 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 52 65 66 65 72 65 6e 63 CsdlPath)............If(Referenc
6bb20 65 43 73 64 6c 50 61 74 68 73 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 eCsdlPaths.Is.Nothing).Then.....
6bb40 20 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 3d 20 75 73 .........ReferenceCsdlPaths.=.us
6bb60 65 72 53 65 74 74 69 6e 67 73 2e 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 0d 0a 20 erSettings.ReferenceCsdlPaths...
6bb80 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 .......End.If............If(Not.
6bba0 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 2e 48 61 73 56 61 6c 75 65 FullyQualifySystemTypes.HasValue
6bbc0 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 ).Then..............FullyQualify
6bbe0 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 46 75 6c 6c 79 SystemTypes.=.userSettings.Fully
6bc00 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 QualifySystemTypes..........End.
6bc20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 43 72 65 61 74 65 43 6f 6e 74 65 If............If(Not.CreateConte
6bc40 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 2e 48 61 73 56 61 6c 75 65 29 20 54 68 65 6e 0d 0a 20 xtAddToMethods.HasValue).Then...
6bc60 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 ...........CreateContextAddToMet
6bc80 68 6f 64 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 72 65 61 74 65 43 6f 6e 74 65 78 hods.=.userSettings.CreateContex
6bca0 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d tAddToMethods..........End.If...
6bcc0 0a 20 20 20 20 20 20 20 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 20 3d .........DefaultSummaryComment.=
6bce0 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6d .GetResourceString("Template_Com
6bd00 6d 65 6e 74 4e 6f 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 45 6e 64 20 53 mentNoDocumentation")......End.S
6bd20 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 ub........''''''''......''''''''
6bd40 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 .......''''''''......Private.Cla
6bd60 73 73 20 55 73 65 72 53 65 74 74 69 6e 67 73 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 ss.UserSettings..........Public.
6bd80 50 72 6f 70 65 72 74 79 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 28 29 20 41 73 20 53 74 72 Property.SourceCsdlPath().As.Str
6bda0 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 52 65 66 ing..........Public.Property.Ref
6bdc0 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 28 29 20 41 73 20 53 74 72 69 6e 67 20 28 29 0d 0a erenceCsdlPaths().As.String.()..
6bde0 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6c 6c 79 51 75 61 ........Public.Property.FullyQua
6be00 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 lifySystemTypes().As.Boolean....
6be20 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 43 72 65 61 74 65 43 6f 6e 74 ......Public.Property.CreateCont
6be40 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 extAddToMethods().As.Boolean....
6be60 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 43 61 6d 65 6c 43 61 73 65 46 ......Public.Property.CamelCaseF
6be80 69 65 6c 64 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 ields().As.Boolean......End.Clas
6bea0 73 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d s........Private.Function.GetNam
6bec0 65 73 70 61 63 65 4e 61 6d 65 28 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f espaceName(code.As.CodeGeneratio
6bee0 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6e nTools).As.String..........Dim.n
6bf00 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e 56 73 amespaceName.As.String.=.code.Vs
6bf20 4e 61 6d 65 73 70 61 63 65 53 75 67 67 65 73 74 69 6f 6e 28 29 0d 0a 0d 0a 23 49 66 20 50 52 45 NamespaceSuggestion()....#If.PRE
6bf40 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 PROCESSED_TEMPLATE.Then.........
6bf60 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 .If.String.IsNullOrEmpty(namespa
6bf80 63 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 ceName).Then..............namesp
6bfa0 61 63 65 4e 61 6d 65 20 3d 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 4d 6f 64 aceName.=.GetObjectNamespace(Mod
6bfc0 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 23 45 elNamespace)..........End.If..#E
6bfe0 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e nd.If..........Return.namespaceN
6c000 61 6d 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 ame......End.Function....Private
6c020 20 46 75 6e 63 74 69 6f 6e 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 42 79 56 61 .Function.MultiSchemaEscape(ByVa
6c040 6c 20 75 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 l.usage.As.TypeUsage,.ByVal.code
6c060 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 .As.CodeGenerationTools).As.Stri
6c080 6e 67 0d 0a 20 20 20 20 44 69 6d 20 73 74 72 75 63 74 75 72 61 6c 20 41 73 20 53 74 72 75 63 74 ng......Dim.structural.As.Struct
6c0a0 75 72 61 6c 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 75 73 61 67 65 2e 45 64 6d 54 79 70 65 uralType.=.TryCast(usage.EdmType
6c0c0 2c 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 0d 0a 20 20 20 20 49 66 20 73 74 72 75 63 74 ,.StructuralType)......If.struct
6c0e0 75 72 61 6c 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 ural.IsNot.Nothing.Then.........
6c100 20 52 65 74 75 72 6e 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 74 72 75 63 74 .Return.MultiSchemaEscape(struct
6c120 75 72 61 6c 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 ural,.code)......End.If......Ret
6c140 75 72 6e 20 63 6f 64 65 2e 45 73 63 61 70 65 28 75 73 61 67 65 29 0d 0a 45 6e 64 20 46 75 6e 63 urn.code.Escape(usage)..End.Func
6c160 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4d 75 6c 74 69 53 63 tion....Private.Function.MultiSc
6c180 68 65 6d 61 45 73 63 61 70 65 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 53 74 72 75 63 74 75 hemaEscape(ByVal.type.As.Structu
6c1a0 72 61 6c 54 79 70 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 ralType,.ByVal.code.As.CodeGener
6c1c0 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 74 79 ationTools).As.String......If.ty
6c1e0 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3c 3e 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 pe.NamespaceName.<>.ModelNamespa
6c200 63 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 ce.Then..........Return.code.Cre
6c220 61 74 65 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 ateFullName(code.EscapeNamespace
6c240 28 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 74 79 70 65 2e 4e 61 6d 65 73 70 61 (GetObjectNamespace(type.Namespa
6c260 63 65 4e 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 29 29 0d 0a 20 20 ceName)),.code.Escape(type))....
6c280 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 63 6f 64 65 2e 45 73 63 61 ..End.If........Return.code.Esca
6c2a0 70 65 28 74 79 70 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 pe(type)..End.Function....Privat
6c2c0 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 6c 20 6e 61 76 e.Function.NewModifier(ByVal.nav
6c2e0 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f igationProperty.As.NavigationPro
6c300 70 65 72 74 79 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 61 73 65 54 79 perty).As.String......Dim.baseTy
6c320 70 65 20 41 73 20 54 79 70 65 20 3d 20 47 65 74 54 79 70 65 28 45 6e 74 69 74 79 4f 62 6a 65 63 pe.As.Type.=.GetType(EntityObjec
6c340 74 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 t)......Return.NewModifier(baseT
6c360 79 70 65 2c 20 6e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 0d 0a 45 ype,.navigationProperty.Name)..E
6c380 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 nd.Function....Private.Function.
6c3a0 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 6c 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 NewModifier(ByVal.edmFunction.As
6c3c0 20 45 64 6d 46 75 6e 63 74 69 6f 6e 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d .EdmFunction).As.String......Dim
6c3e0 20 62 61 73 65 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 47 65 74 54 79 70 65 28 4f 62 6a 65 .baseType.As.Type.=.GetType(Obje
6c400 63 74 43 6f 6e 74 65 78 74 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 ctContext)......Return.NewModifi
6c420 65 72 28 62 61 73 65 54 79 70 65 2c 20 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 0d 0a er(baseType,.edmFunction.Name)..
6c440 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e End.Function....Private.Function
6c460 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 6c 20 65 6e 74 69 74 79 53 65 74 20 41 73 20 .NewModifier(ByVal.entitySet.As.
6c480 45 6e 74 69 74 79 53 65 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 61 EntitySet).As.String......Dim.ba
6c4a0 73 65 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 47 65 74 54 79 70 65 28 4f 62 6a 65 63 74 43 seType.As.Type.=.GetType(ObjectC
6c4c0 6f 6e 74 65 78 74 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 ontext)......Return.NewModifier(
6c4e0 62 61 73 65 54 79 70 65 2c 20 65 6e 74 69 74 79 53 65 74 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 baseType,.entitySet.Name)..End.F
6c500 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d unction....Private.Function.NewM
6c520 6f 64 69 66 69 65 72 28 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d odifier(ByVal.edmProperty.As.Edm
6c540 50 72 6f 70 65 72 74 79 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 61 73 Property).As.String......Dim.bas
6c560 65 54 79 70 65 20 41 73 20 54 79 70 65 0d 0a 20 20 20 20 49 66 20 65 64 6d 50 72 6f 70 65 72 74 eType.As.Type......If.edmPropert
6c580 79 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 y.DeclaringType.BuiltInTypeKind.
6c5a0 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 20 54 68 65 =.BuiltInTypeKind.EntityType.The
6c5c0 6e 0d 0a 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 47 65 74 54 79 70 65 28 45 6e n..........baseType.=.GetType(En
6c5e0 74 69 74 79 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 62 tityObject)......Else..........b
6c600 61 73 65 54 79 70 65 20 3d 20 47 65 74 54 79 70 65 28 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 29 aseType.=.GetType(ComplexObject)
6c620 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 ......End.If......Return.NewModi
6c640 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 65 64 6d 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 fier(baseType,.edmProperty.Name)
6c660 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 ..End.Function....Private.Functi
6c680 6f 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 54 79 70 on.NewModifier(ByVal.type.As.Typ
6c6a0 65 2c 20 42 79 56 61 6c 20 6d 65 6d 62 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 e,.ByVal.memberName.As.String).A
6c6c0 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 48 61 73 42 61 73 65 4d 65 6d 62 65 72 57 69 s.String......If.HasBaseMemberWi
6c6e0 74 68 4d 61 74 63 68 69 6e 67 4e 61 6d 65 28 74 79 70 65 2c 20 6d 65 6d 62 65 72 4e 61 6d 65 29 thMatchingName(type,.memberName)
6c700 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 53 68 61 64 6f 77 73 22 0d .Then..........Return."Shadows".
6c720 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 .....End.If......Return.String.E
6c740 6d 70 74 79 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 mpty..End.Function....Private.Fu
6c760 6e 63 74 69 6f 6e 20 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 42 79 56 61 6c 20 nction.ChangingMethodName(ByVal.
6c780 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a member.As.EdmMember).As.String..
6c7a0 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 ....Return.String.Format(Culture
6c7c0 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4f 6e 7b 30 7d 43 68 61 Info.InvariantCulture,."On{0}Cha
6c7e0 6e 67 69 6e 67 22 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 nging",.member.Name)..End.Functi
6c800 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 43 68 61 6e 67 65 64 4d 65 on....Private.Function.ChangedMe
6c820 74 68 6f 64 4e 61 6d 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 thodName(ByVal.member.As.EdmMemb
6c840 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 er).As.String......Return.String
6c860 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c .Format(CultureInfo.InvariantCul
6c880 74 75 72 65 2c 20 22 4f 6e 7b 30 7d 43 68 61 6e 67 65 64 22 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d ture,."On{0}Changed",.member.Nam
6c8a0 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 e)..End.Function....Private.Func
6c8c0 74 69 6f 6e 20 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 42 79 tion.InitializedTrackingField(By
6c8e0 56 61 6c 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 2c 20 Val.edmProperty.As.EdmProperty,.
6c900 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c ByVal.code.As.CodeGenerationTool
6c920 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 6e 61 6d 65 50 61 72 74 20 41 s).As.String......Dim.namePart.A
6c940 73 20 53 74 72 69 6e 67 20 3d 20 65 64 6d 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 20 26 20 22 49 s.String.=.edmProperty.Name.&."I
6c960 6e 69 74 69 61 6c 69 7a 65 64 22 0d 0a 20 20 20 20 49 66 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 nitialized"......If.code.CamelCa
6c980 73 65 46 69 65 6c 64 73 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 6e 61 6d 65 50 61 72 74 20 seFields.Then..........namePart.
6c9a0 3d 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 6e 61 6d 65 50 61 72 74 29 0d 0a 20 20 20 20 =.code.CamelCase(namePart)......
6c9c0 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 22 5f 22 20 26 20 6e 61 6d 65 50 61 72 End.If......Return."_".&.namePar
6c9e0 74 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 t..End.Function....Private.Funct
6ca00 69 6f 6e 20 4f 70 74 69 6f 6e 61 6c 4e 75 6c 6c 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 ion.OptionalNullableParameterFor
6ca20 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 SetValidValue(ByVal.member.As.Ed
6ca40 6d 4d 65 6d 62 65 72 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 mMember,.ByVal.code.As.CodeGener
6ca60 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 65 ationTools).As.String......Dim.e
6ca80 66 20 41 73 20 4e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 4d 65 29 0d 0a 20 20 20 20 f.As.New.MetadataTools(Me)......
6caa0 44 69 6d 20 6c 69 73 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 Dim.list.As.String.=.String.Empt
6cac0 79 0d 0a 20 20 20 20 49 66 20 44 69 72 65 63 74 43 61 73 74 28 6d 65 6d 62 65 72 2e 54 79 70 65 y......If.DirectCast(member.Type
6cae0 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 29 2e 43 6c Usage.EdmType,.PrimitiveType).Cl
6cb00 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2e 49 73 43 6c 61 73 73 20 54 68 65 6e 0d 0a 20 20 rEquivalentType.IsClass.Then....
6cb20 20 20 20 20 20 20 44 69 6d 20 73 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 ......Dim.storeGeneratedPatternP
6cb40 72 6f 70 65 72 74 79 20 41 73 20 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 20 3d 20 4e 6f roperty.As.MetadataProperty.=.No
6cb60 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 73 4e 75 6c 6c 61 62 6c 65 20 41 73 thing..........Dim.isNullable.As
6cb80 20 42 6f 6f 6c 65 61 6e 20 3d 20 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 6d 65 6d 62 65 72 2e .Boolean.=.ef.IsNullable(member.
6cba0 54 79 70 65 55 73 61 67 65 29 20 4f 72 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 TypeUsage).OrElse..............(
6cbc0 6d 65 6d 62 65 72 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 54 72 79 47 65 74 member.MetadataProperties.TryGet
6cbe0 56 61 6c 75 65 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 45 44 4d 5f 41 4e 4e 4f Value(MetadataConstants.EDM_ANNO
6cc00 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 26 20 22 3a 53 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 TATION_09_02.&.":StoreGeneratedP
6cc20 61 74 74 65 72 6e 22 2c 20 46 61 6c 73 65 2c 20 73 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 attern",.False,.storeGeneratedPa
6cc40 74 74 65 72 6e 50 72 6f 70 65 72 74 79 29 20 41 6e 64 41 6c 73 6f 0d 0a 20 20 20 20 20 20 20 20 tternProperty).AndAlso..........
6cc60 20 20 20 20 20 4f 62 6a 65 63 74 2e 45 71 75 61 6c 73 28 73 74 6f 72 65 47 65 6e 65 72 61 74 65 .....Object.Equals(storeGenerate
6cc80 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 2e 56 61 6c 75 65 2c 20 22 43 6f 6d 70 75 74 65 dPatternProperty.Value,."Compute
6cca0 64 22 29 29 0d 0a 20 20 20 20 20 20 20 20 6c 69 73 74 20 2b 3d 20 22 2c 20 22 20 26 20 63 6f 64 d"))..........list.+=.",.".&.cod
6ccc0 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 69 73 4e 75 6c 6c 61 62 6c 65 29 0d 0a 20 20 20 e.CreateLiteral(isNullable).....
6cce0 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 6c 69 73 74 0d 0a 45 6e 64 20 46 75 .End.If......Return.list..End.Fu
6cd00 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f nction....Private.Shared.Functio
6cd20 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 49 6e n.IsVisibleMember(ByVal.memberIn
6cd40 66 6f 20 41 73 20 4d 65 6d 62 65 72 49 6e 66 6f 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 fo.As.MemberInfo).As.Boolean....
6cd60 20 20 49 66 20 54 79 70 65 4f 66 20 6d 65 6d 62 65 72 49 6e 66 6f 20 49 73 20 45 76 65 6e 74 49 ..If.TypeOf.memberInfo.Is.EventI
6cd80 6e 66 6f 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 69 20 41 73 20 45 76 65 6e nfo.Then..........Dim.ei.As.Even
6cda0 74 49 6e 66 6f 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 45 tInfo.=.DirectCast(memberInfo,.E
6cdc0 76 65 6e 74 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 61 64 64 20 41 73 20 4d 65 ventInfo)..........Dim.add.As.Me
6cde0 74 68 6f 64 49 6e 66 6f 20 3d 20 65 69 2e 47 65 74 41 64 64 4d 65 74 68 6f 64 28 29 0d 0a 20 20 thodInfo.=.ei.GetAddMethod()....
6ce00 20 20 20 20 20 20 44 69 6d 20 72 65 6d 6f 76 65 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 20 3d ......Dim.remove.As.MethodInfo.=
6ce20 20 65 69 2e 47 65 74 52 65 6d 6f 76 65 4d 65 74 68 6f 64 28 29 0d 0a 20 20 20 20 20 20 20 20 52 .ei.GetRemoveMethod()..........R
6ce40 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 61 64 64 29 20 4f 72 45 6c 73 eturn.IsVisibleMethod(add).OrEls
6ce60 65 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 72 65 6d 6f 76 65 29 0d 0a 20 20 20 20 45 e.IsVisibleMethod(remove)......E
6ce80 6c 73 65 49 66 20 54 79 70 65 4f 66 20 6d 65 6d 62 65 72 49 6e 66 6f 20 49 73 20 46 69 65 6c 64 lseIf.TypeOf.memberInfo.Is.Field
6cea0 49 6e 66 6f 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 66 69 20 41 73 20 46 69 65 Info.Then..........Dim.fi.As.Fie
6cec0 6c 64 49 6e 66 6f 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 ldInfo.=.DirectCast(memberInfo,.
6cee0 46 69 65 6c 64 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 20 66 FieldInfo)..........Return.Not.f
6cf00 69 2e 49 73 50 72 69 76 61 74 65 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 66 69 2e 49 73 41 73 73 i.IsPrivate.AndAlso.Not.fi.IsAss
6cf20 65 6d 62 6c 79 0d 0a 20 20 20 20 45 6c 73 65 49 66 20 54 79 70 65 4f 66 20 6d 65 6d 62 65 72 49 embly......ElseIf.TypeOf.memberI
6cf40 6e 66 6f 20 49 73 20 4d 65 74 68 6f 64 42 61 73 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 nfo.Is.MethodBase.Then..........
6cf60 44 69 6d 20 6d 62 20 41 73 20 4d 65 74 68 6f 64 42 61 73 65 20 3d 20 44 69 72 65 63 74 43 61 73 Dim.mb.As.MethodBase.=.DirectCas
6cf80 74 28 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 4d 65 74 68 6f 64 42 61 73 65 29 0d 0a 20 20 20 20 20 t(memberInfo,.MethodBase).......
6cfa0 20 20 20 49 66 20 6d 62 2e 49 73 53 70 65 63 69 61 6c 4e 61 6d 65 20 54 68 65 6e 0d 0a 20 20 20 ...If.mb.IsSpecialName.Then.....
6cfc0 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 .........Return.False..........E
6cfe0 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d nd.If..........Return.IsVisibleM
6d000 65 74 68 6f 64 28 6d 62 29 0d 0a 20 20 20 20 45 6c 73 65 49 66 20 54 79 70 65 4f 66 20 6d 65 6d ethod(mb)......ElseIf.TypeOf.mem
6d020 62 65 72 49 6e 66 6f 20 49 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 54 68 65 6e 0d 0a 20 20 berInfo.Is.PropertyInfo.Then....
6d040 20 20 20 20 20 20 44 69 6d 20 70 69 20 41 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 20 3d 20 44 ......Dim.pi.As.PropertyInfo.=.D
6d060 69 72 65 63 74 43 61 73 74 28 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 50 72 6f 70 65 72 74 79 49 6e irectCast(memberInfo,.PropertyIn
6d080 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 4d 65 74 68 6f 64 20 41 73 20 4d 65 fo)..........Dim.getMethod.As.Me
6d0a0 74 68 6f 64 49 6e 66 6f 20 3d 20 70 69 2e 47 65 74 47 65 74 4d 65 74 68 6f 64 28 29 0d 0a 20 20 thodInfo.=.pi.GetGetMethod()....
6d0c0 20 20 20 20 20 20 44 69 6d 20 65 6e 74 69 74 79 53 65 74 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 ......Dim.entitySet.As.MethodInf
6d0e0 6f 20 3d 20 70 69 2e 47 65 74 53 65 74 4d 65 74 68 6f 64 28 29 0d 0a 20 20 20 20 20 20 20 20 52 o.=.pi.GetSetMethod()..........R
6d100 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 67 65 74 4d 65 74 68 6f 64 29 eturn.IsVisibleMethod(getMethod)
6d120 20 4f 72 45 6c 73 65 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 65 6e 74 69 74 79 53 65 .OrElse.IsVisibleMethod(entitySe
6d140 74 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c t)......End.If........Return.Fal
6d160 73 65 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 68 61 72 se..End.Function....Private.Shar
6d180 65 64 20 46 75 6e 63 74 69 6f 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 42 79 56 61 ed.Function.IsVisibleMethod(ByVa
6d1a0 6c 20 6d 65 74 68 6f 64 42 61 73 65 20 41 73 20 4d 65 74 68 6f 64 42 61 73 65 29 20 41 73 20 42 l.methodBase.As.MethodBase).As.B
6d1c0 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 49 66 20 6d 65 74 68 6f 64 42 61 73 65 20 49 73 20 4e 6f 74 oolean......If.methodBase.Is.Not
6d1e0 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d hing.Then..........Return.False.
6d200 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 20 6d 65 .....End.If........Return.Not.me
6d220 74 68 6f 64 42 61 73 65 2e 49 73 50 72 69 76 61 74 65 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 6d thodBase.IsPrivate.AndAlso.Not.m
6d240 65 74 68 6f 64 42 61 73 65 2e 49 73 41 73 73 65 6d 62 6c 79 0d 0a 45 6e 64 20 46 75 6e 63 74 69 ethodBase.IsAssembly..End.Functi
6d260 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 48 61 on....Private.Shared.Function.Ha
6d280 73 42 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d 61 74 63 68 69 6e 67 4e 61 6d 65 28 42 79 56 61 sBaseMemberWithMatchingName(ByVa
6d2a0 6c 20 74 79 70 65 20 41 73 20 54 79 70 65 2c 20 42 79 56 61 6c 20 6d 65 6d 62 65 72 4e 61 6d 65 l.type.As.Type,.ByVal.memberName
6d2c0 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 44 69 6d 20 .As.String).As.Boolean......Dim.
6d2e0 62 69 6e 64 69 6e 67 73 20 41 73 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 20 3d 20 42 69 6e 64 69 bindings.As.BindingFlags.=.Bindi
6d300 6e 67 46 6c 61 67 73 2e 46 6c 61 74 74 65 6e 48 69 65 72 61 72 63 68 79 20 4f 72 20 42 69 6e 64 ngFlags.FlattenHierarchy.Or.Bind
6d320 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 62 6c 69 63 20 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 ingFlags.NonPublic.Or.BindingFla
6d340 67 73 2e 50 75 62 6c 69 63 20 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 49 6e 73 74 61 6e gs.Public.Or.BindingFlags.Instan
6d360 63 65 20 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 53 74 61 74 69 63 0d 0a 20 20 20 20 52 ce.Or.BindingFlags.Static......R
6d380 65 74 75 72 6e 20 74 79 70 65 2e 47 65 74 4d 65 6d 62 65 72 73 28 62 69 6e 64 69 6e 67 73 29 2e eturn.type.GetMembers(bindings).
6d3a0 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 49 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 Where(Function(m).IsVisibleMembe
6d3c0 72 28 6d 29 29 2e 41 6e 79 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 2e 45 71 75 r(m)).Any(Function(m).m.Name.Equ
6d3e0 61 6c 73 28 6d 65 6d 62 65 72 4e 61 6d 65 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e als(memberName,.StringComparison
6d400 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 .OrdinalIgnoreCase))..End.Functi
6d420 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 53 6f 75 72 63 65 on....Private.Function.GetSource
6d440 53 63 68 65 6d 61 54 79 70 65 73 28 4f 66 20 54 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 28 SchemaTypes(Of.T.As.GlobalItem)(
6d460 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 54 29 0d 0a 20 20 20 20 49 66 20 50 ).As.IEnumerable(Of.T)......If.P
6d480 61 74 68 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 ath.GetExtension(SourceCsdlPath)
6d4a0 20 3c 3e 20 22 2e 65 64 6d 78 22 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e .<>.".edmx".Then..........Return
6d4c0 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 54 29 28 29 .ItemCollection.GetItems(Of.T)()
6d4e0 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 65 29 20 65 2e 4d 65 74 61 64 61 74 61 50 72 6f .Where(Function(e).e.MetadataPro
6d500 70 65 72 74 69 65 73 2e 41 6e 79 28 46 75 6e 63 74 69 6f 6e 28 6d 70 29 20 6d 70 2e 4e 61 6d 65 perties.Any(Function(mp).mp.Name
6d520 20 3d 20 22 53 63 68 65 6d 61 53 6f 75 72 63 65 22 20 41 6e 64 41 6c 73 6f 20 44 69 72 65 63 74 .=."SchemaSource".AndAlso.Direct
6d540 43 61 73 74 28 6d 70 2e 56 61 6c 75 65 2c 20 53 74 72 69 6e 67 29 20 3d 20 53 6f 75 72 63 65 43 Cast(mp.Value,.String).=.SourceC
6d560 73 64 6c 50 61 74 68 29 29 0d 0a 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 sdlPath))......Else..........Ret
6d580 75 72 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 54 urn.ItemCollection.GetItems(Of.T
6d5a0 29 28 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d )()......End.If..End.Function...
6d5c0 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 6e 64 4e 61 6d 65 28 42 79 56 61 6c 20 .Private.Function.EndName(ByVal.
6d5e0 61 73 73 6f 63 69 61 74 69 6f 6e 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 2c 20 association.As.AssociationType,.
6d600 42 79 56 61 6c 20 69 6e 64 65 78 20 41 73 20 49 6e 74 65 67 65 72 29 20 41 73 20 53 74 72 69 6e ByVal.index.As.Integer).As.Strin
6d620 67 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 g......Return.association.Associ
6d640 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 69 6e 64 65 78 29 2e 4e 61 6d 65 0d 0a 45 6e 64 ationEndMembers(index).Name..End
6d660 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 6e .Function....Private.Function.En
6d680 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 28 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 dMultiplicity(ByVal.association.
6d6a0 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 2c 20 42 79 56 61 6c 20 69 6e 64 65 78 20 As.AssociationType,.ByVal.index.
6d6c0 41 73 20 49 6e 74 65 67 65 72 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 As.Integer,.ByVal.code.As.CodeGe
6d6e0 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 nerationTools).As.String......Re
6d700 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 61 73 73 6f 63 69 61 74 turn.code.CreateLiteral(associat
6d720 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 69 6e 64 65 78 29 ion.AssociationEndMembers(index)
6d740 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 29 0d 0a 45 6e 64 20 .RelationshipMultiplicity)..End.
6d760 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 Function....Private.Function.Esc
6d780 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e apeEndTypeName(ByVal.association
6d7a0 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 2c 20 42 79 56 61 6c 20 69 6e 64 65 78 .As.AssociationType,.ByVal.index
6d7c0 20 41 73 20 49 6e 74 65 67 65 72 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 .As.Integer,.ByVal.code.As.CodeG
6d7e0 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 enerationTools).As.String......D
6d800 69 6d 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 61 73 73 6f 63 69 im.entity.As.EntityType.=.associ
6d820 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 69 6e 64 65 ation.AssociationEndMembers(inde
6d840 78 29 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 63 x).GetEntityType()......Return.c
6d860 6f 64 65 2e 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e 45 73 63 61 70 65 4e 61 ode.CreateFullName(code.EscapeNa
6d880 6d 65 73 70 61 63 65 28 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 65 6e 74 69 74 mespace(GetObjectNamespace(entit
6d8a0 79 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 65 y.NamespaceName)),.code.Escape(e
6d8c0 6e 74 69 74 79 29 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 ntity))..End.Function....Private
6d8e0 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 42 79 56 .Function.GetObjectNamespace(ByV
6d900 61 6c 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 al.csdlNamespaceName.As.String).
6d920 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 As.String......Dim.objectNamespa
6d940 63 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 49 66 20 45 ce.As.String.=.Nothing......If.E
6d960 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 54 72 79 47 65 74 56 61 6c dmToObjectNamespaceMap.TryGetVal
6d980 75 65 28 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2c 20 6f 62 6a 65 63 74 4e 61 6d 65 ue(csdlNamespaceName,.objectName
6d9a0 73 70 61 63 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6f 62 6a 65 space).Then..........Return.obje
6d9c0 63 74 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 ctNamespace......End.If........R
6d9e0 65 74 75 72 6e 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d 0a 45 6e 64 20 46 75 6e eturn.csdlNamespaceName..End.Fun
6da00 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 75 62 20 55 70 64 61 74 65 4f 62 6a 65 63 ction....Private.Sub.UpdateObjec
6da20 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 28 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 20 41 73 tNamespaceMap(objectNamespace.As
6da40 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 49 66 20 4e 6f 74 20 6f 62 6a 65 63 74 4e 61 6d 65 73 .String)......If.Not.objectNames
6da60 70 61 63 65 20 3d 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 41 6e 64 41 6c 73 6f 20 4e 6f pace.=.ModelNamespace.AndAlso.No
6da80 74 20 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 43 6f 6e 74 61 69 t.EdmToObjectNamespaceMap.Contai
6daa0 6e 73 4b 65 79 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 20 20 20 20 45 nsKey(ModelNamespace)..........E
6dac0 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 41 64 64 28 4d 6f 64 65 6c dmToObjectNamespaceMap.Add(Model
6dae0 4e 61 6d 65 73 70 61 63 65 2c 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 Namespace,.objectNamespace).....
6db00 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 68 .End.If..End.Sub......Private.Sh
6db20 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 42 ared.Function.FixParameterName(B
6db40 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 yVal.name.As.String,.ByVal.code.
6db60 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e As.CodeGenerationTools).As.Strin
6db80 67 0d 0a 20 20 20 20 27 20 0d 0a 20 20 20 20 27 20 0d 0a 20 20 20 20 49 66 20 53 74 72 69 6e 67 g......'.......'.......If.String
6dba0 43 6f 6d 70 61 72 65 72 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 2e 45 71 75 61 6c Comparer.OrdinalIgnoreCase.Equal
6dbc0 73 28 6e 61 6d 65 2c 20 22 69 64 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 27 20 0d 0a s(name,."id").Then..........'...
6dbe0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 69 64 22 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d ........Return."id"......End.If.
6dc00 0a 20 20 20 20 52 65 74 75 72 6e 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 6e 61 6d 65 29 .....Return.code.CamelCase(name)
6dc20 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 ..End.Function....Private.Functi
6dc40 6f 6e 20 42 61 73 65 54 79 70 65 4e 61 6d 65 28 42 79 56 61 6c 20 65 6e 74 69 74 79 20 41 73 20 on.BaseTypeName(ByVal.entity.As.
6dc60 45 6e 74 69 74 79 54 79 70 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 EntityType,.ByVal.code.As.CodeGe
6dc80 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 nerationTools).As.String......Re
6dca0 74 75 72 6e 20 49 66 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 20 49 73 20 4e 6f 74 68 69 turn.If(entity.BaseType.Is.Nothi
6dcc0 6e 67 2c 20 22 45 6e 74 69 74 79 4f 62 6a 65 63 74 22 2c 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 ng,."EntityObject",.MultiSchemaE
6dce0 73 63 61 70 65 28 44 69 72 65 63 74 43 61 73 74 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 scape(DirectCast(entity.BaseType
6dd00 2c 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 2c 20 63 6f 64 65 29 29 0d 0a 45 6e 64 20 46 ,.StructuralType),.code))..End.F
6dd20 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 49 6e 63 6c unction....Private.Function.Incl
6dd40 75 64 65 50 72 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 42 79 56 61 6c udePropertyInFactoryMethod(ByVal
6dd60 20 66 61 63 74 6f 72 79 54 79 70 65 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 2c 20 .factoryType.As.StructuralType,.
6dd80 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 ByVal.edmProperty.As.EdmProperty
6dda0 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 49 66 20 65 64 6d 50 72 6f 70 65 72 74 79 ).As.Boolean......If.edmProperty
6ddc0 2e 4e 75 6c 6c 61 62 6c 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 .Nullable.Then..........Return.F
6dde0 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 49 66 20 65 64 6d 50 72 alse......End.If........If.edmPr
6de00 6f 70 65 72 74 79 2e 44 65 66 61 75 6c 74 56 61 6c 75 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e operty.DefaultValue.IsNot.Nothin
6de20 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 g.Then..........Return.False....
6de40 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 49 66 20 28 41 63 63 65 73 73 69 62 69 6c 69 74 ..End.If........If.(Accessibilit
6de60 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 y.ForReadOnlyProperty(edmPropert
6de80 79 29 20 3c 3e 20 22 50 75 62 6c 69 63 22 20 41 6e 64 41 6c 73 6f 20 41 63 63 65 73 73 69 62 69 y).<>."Public".AndAlso.Accessibi
6dea0 6c 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f lity.ForWriteOnlyProperty(edmPro
6dec0 70 65 72 74 79 29 20 3c 3e 20 22 50 75 62 6c 69 63 22 29 20 4f 72 45 6c 73 65 20 28 66 61 63 74 perty).<>."Public").OrElse.(fact
6dee0 6f 72 79 54 79 70 65 20 49 73 4e 6f 74 20 65 64 6d 50 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 72 oryType.IsNot.edmProperty.Declar
6df00 69 6e 67 54 79 70 65 20 41 6e 64 41 6c 73 6f 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f ingType.AndAlso.Accessibility.Fo
6df20 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 20 rWriteOnlyProperty(edmProperty).
6df40 3d 20 22 50 72 69 76 61 74 65 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 27 20 0d 0a 20 =."Private").Then..........'....
6df60 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d .......Return.False......End.If.
6df80 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e .......Return.True..End.Function
6dfa0 0d 0a 0d 0a 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 ....Private.Class.FactoryMethodP
6dfc0 61 72 61 6d 65 74 65 72 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 6f 75 72 63 65 20 41 73 20 45 arameter......Public.Source.As.E
6dfe0 64 6d 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 61 77 50 61 72 61 6d 65 dmProperty......Public.RawParame
6e000 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 61 terName.As.String......Public.Pa
6e020 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 rameterName.As.String......Publi
6e040 63 20 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 c.ParameterType.As.String......P
6e060 75 62 6c 69 63 20 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 20 41 73 20 53 74 72 69 6e 67 ublic.ParameterComment.As.String
6e080 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 20 41 73 20 42 6f ......Public.IsComplexType.As.Bo
6e0a0 6f 6c 65 61 6e 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 olean........Public.Shared.Funct
6e0c0 69 6f 6e 20 43 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 73 28 42 79 56 61 6c 20 70 72 6f 70 65 ion.CreateParameters(ByVal.prope
6e0e0 72 74 69 65 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 64 6d 50 72 6f 70 65 rties.As.IEnumerable(Of.EdmPrope
6e100 72 74 79 29 2c 20 42 79 56 61 6c 20 75 6e 69 71 75 65 20 41 73 20 55 6e 69 71 75 65 49 64 65 6e rty),.ByVal.unique.As.UniqueIden
6e120 74 69 66 69 65 72 53 65 72 76 69 63 65 2c 20 42 79 56 61 6c 20 6d 75 6c 74 69 53 63 68 65 6d 61 tifierService,.ByVal.multiSchema
6e140 45 73 63 61 70 65 20 41 73 20 46 75 6e 63 28 4f 66 20 54 79 70 65 55 73 61 67 65 2c 20 43 6f 64 Escape.As.Func(Of.TypeUsage,.Cod
6e160 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2c 20 53 74 72 69 6e 67 29 2c 20 42 79 56 61 6c eGenerationTools,.String),.ByVal
6e180 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 .code.As.CodeGenerationTools).As
6e1a0 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 .IEnumerable(Of.FactoryMethodPar
6e1c0 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d 65 74 65 72 73 20 ameter)..........Dim.parameters.
6e1e0 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 As.New.List(Of.FactoryMethodPara
6e200 6d 65 74 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 50 72 meter)()..........For.Each.edmPr
6e220 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 49 6e 20 70 72 6f 70 65 72 74 operty.As.EdmProperty.In.propert
6e240 69 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d 65 74 65 72 20 41 ies..............Dim.parameter.A
6e260 73 20 4e 65 77 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 28 29 0d 0a s.New.FactoryMethodParameter()..
6e280 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 20 3d 20 65 ............parameter.Source.=.e
6e2a0 64 6d 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 dmProperty..............paramete
6e2c0 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 20 3d 20 54 79 70 65 4f 66 20 65 64 6d 50 72 6f 70 r.IsComplexType.=.TypeOf.edmProp
6e2e0 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6d 70 6c 65 erty.TypeUsage.EdmType.Is.Comple
6e300 78 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 52 61 77 xType..............parameter.Raw
6e320 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 65 ParameterName.=.unique.AdjustIde
6e340 6e 74 69 66 69 65 72 28 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 65 64 6d 50 72 6f 70 ntifier(FixParameterName(edmProp
6e360 65 72 74 79 2e 4e 61 6d 65 2c 20 63 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 erty.Name,.code))..............p
6e380 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 arameter.ParameterName.=.code.Es
6e3a0 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 cape(parameter.RawParameterName)
6e3c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 ..............parameter.Paramete
6e3e0 72 54 79 70 65 20 3d 20 6d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 65 64 6d 50 72 6f rType.=.multiSchemaEscape(edmPro
6e400 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 perty.TypeUsage,.code)..........
6e420 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 20 3d ....parameter.ParameterComment.=
6e440 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 .String.Format(CultureInfo.Curre
6e460 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ntCulture,.GetResourceString("Te
6e480 6d 70 6c 61 74 65 5f 43 6f 6d 6d 65 6e 74 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d mplate_CommentFactoryMethodParam
6e4a0 22 29 2c 20 65 64 6d 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 "),.edmProperty.Name)...........
6e4c0 20 20 20 70 61 72 61 6d 65 74 65 72 73 2e 41 64 64 28 70 61 72 61 6d 65 74 65 72 29 0d 0a 20 20 ...parameters.Add(parameter)....
6e4e0 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 61 72 ......Next............Return.par
6e500 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 ameters......End.Function..End.C
6e520 6c 61 73 73 0d 0a 0d 0a 50 72 69 76 61 74 65 20 50 72 6f 70 65 72 74 79 20 44 65 66 61 75 6c 74 lass....Private.Property.Default
6e540 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 50 72 SummaryComment().As.String....Pr
6e560 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 42 79 ivate.Function.SummaryComment(By
6e580 56 61 6c 20 69 74 65 6d 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 29 20 41 73 20 53 74 72 Val.item.As.MetadataItem).As.Str
6e5a0 69 6e 67 0d 0a 20 20 20 20 49 66 20 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 49 ing......If.item.Documentation.I
6e5c0 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 69 74 65 6d 2e 44 6f 63 75 6d 65 sNot.Nothing.AndAlso.item.Docume
6e5e0 6e 74 61 74 69 6f 6e 2e 53 75 6d 6d 61 72 79 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 ntation.Summary.IsNot.Nothing.Th
6e600 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 en..........Return.PrefixLinesOf
6e620 4d 75 6c 74 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 MultilineComment(XMLCOMMENT_STAR
6e640 54 20 26 20 22 20 22 2c 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 69 74 65 6d 2e 44 6f 63 75 6d T.&.".",.XmlEntityize(item.Docum
6e660 65 6e 74 61 74 69 6f 6e 2e 53 75 6d 6d 61 72 79 29 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a entation.Summary))......End.If..
6e680 0d 0a 20 20 20 20 49 66 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 20 49 ......If.DefaultSummaryComment.I
6e6a0 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 sNot.Nothing.Then..........Retur
6e6c0 6e 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 0d 0a 20 20 20 20 45 6e 64 n.DefaultSummaryComment......End
6e6e0 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a .If........Return.String.Empty..
6e700 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e End.Function....Private.Function
6e720 20 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 42 .LongDescriptionCommentElement(B
6e740 79 56 61 6c 20 69 74 65 6d 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 2c 20 42 79 56 61 6c yVal.item.As.MetadataItem,.ByVal
6e760 20 69 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 29 20 41 73 20 53 74 72 69 .indentLevel.As.Integer).As.Stri
6e780 6e 67 0d 0a 20 20 20 20 49 66 20 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 49 73 ng......If.item.Documentation.Is
6e7a0 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 53 74 72 69 6e 67 2e 49 Not.Nothing.AndAlso.Not.String.I
6e7c0 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e sNullOrEmpty(item.Documentation.
6e7e0 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 LongDescription).Then..........D
6e800 69 6d 20 63 6f 6d 6d 65 6e 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 45 6e 76 69 72 6f 6e 6d 65 im.comment.As.String.=.Environme
6e820 6e 74 2e 4e 65 77 4c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6c 69 6e 65 53 74 61 72 nt.NewLine..........Dim.lineStar
6e840 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 t.As.String.=.CodeRegion.GetInde
6e860 6e 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 29 20 2b 20 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 nt(indentLevel).+.XMLCOMMENT_STA
6e880 52 54 20 26 20 22 20 22 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 28 6c 69 RT.&."."..........comment.+=.(li
6e8a0 6e 65 53 74 61 72 74 20 26 20 22 3c 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 3e 22 29 20 2b neStart.&."<LongDescription>").+
6e8c0 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 63 6f .Environment.NewLine..........co
6e8e0 6d 6d 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 2b 20 50 72 65 66 69 78 4c 69 6e 65 73 mment.+=.lineStart.+.PrefixLines
6e900 4f 66 4d 75 6c 74 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 6c 69 6e 65 53 74 61 72 74 2c 20 58 6d OfMultilineComment(lineStart,.Xm
6e920 6c 45 6e 74 69 74 79 69 7a 65 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 4c 6f lEntityize(item.Documentation.Lo
6e940 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 29 29 20 2b 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 ngDescription)).+.Environment.Ne
6e960 77 4c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 wLine..........comment.+=.lineSt
6e980 61 72 74 20 26 20 22 3c 2f 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 3e 22 0d 0a 20 20 20 20 art.&."</LongDescription>"......
6e9a0 20 20 20 20 52 65 74 75 72 6e 20 63 6f 6d 6d 65 6e 74 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a ....Return.comment......End.If..
6e9c0 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 45 6e 64 20 46 75 6e ....Return.String.Empty..End.Fun
6e9e0 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 50 72 65 66 69 78 ction....Private.Function.Prefix
6ea00 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 42 79 56 61 6c 20 70 72 LinesOfMultilineComment(ByVal.pr
6ea20 65 66 69 78 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 6f 6d 6d 65 6e 74 20 41 73 efix.As.String,.ByVal.comment.As
6ea40 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 63 .String).As.String......Return.c
6ea60 6f 6d 6d 65 6e 74 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 omment.Replace(Environment.NewLi
6ea80 6e 65 2c 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 20 2b 20 70 72 65 66 69 78 ne,.Environment.NewLine.+.prefix
6eaa0 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 )..End.Function....Private.Funct
6eac0 69 6f 6e 20 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 42 79 56 61 6c 20 70 61 72 61 ion.ParameterComments(ByVal.para
6eae0 6d 65 74 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 54 75 70 6c 65 28 4f meters.As.IEnumerable(Of.Tuple(O
6eb00 66 20 53 74 72 69 6e 67 2c 20 53 74 72 69 6e 67 29 29 2c 20 42 79 56 61 6c 20 69 6e 64 65 6e 74 f.String,.String)),.ByVal.indent
6eb20 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 Level.As.Integer).As.String.....
6eb40 20 44 69 6d 20 62 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 53 79 73 74 65 6d 2e 54 65 78 74 2e .Dim.builder.As.New.System.Text.
6eb60 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 StringBuilder()......For.Each.pa
6eb80 72 61 6d 65 74 65 72 20 41 73 20 54 75 70 6c 65 28 4f 66 20 53 74 72 69 6e 67 2c 20 53 74 72 69 rameter.As.Tuple(Of.String,.Stri
6eba0 6e 67 29 20 49 6e 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 ng).In.parameters..........build
6ebc0 65 72 2e 41 70 70 65 6e 64 4c 69 6e 65 28 29 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 er.AppendLine()..........builder
6ebe0 2e 41 70 70 65 6e 64 28 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 .Append(CodeRegion.GetIndent(ind
6ec00 65 6e 74 4c 65 76 65 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 entLevel))..........builder.Appe
6ec20 6e 64 28 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 29 0d 0a 20 20 20 20 20 20 20 20 62 75 nd(XMLCOMMENT_START)..........bu
6ec40 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 ilder.Append(String.Format(Cultu
6ec60 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 20 3c 70 61 72 61 reInfo.InvariantCulture,.".<para
6ec80 6d 20 6e 61 6d 65 3d 22 22 7b 30 7d 22 22 3e 7b 31 7d 3c 2f 70 61 72 61 6d 3e 22 2c 20 70 61 72 m.name=""{0}"">{1}</param>",.par
6eca0 61 6d 65 74 65 72 2e 49 74 65 6d 31 2c 20 70 61 72 61 6d 65 74 65 72 2e 49 74 65 6d 32 29 29 0d ameter.Item1,.parameter.Item2)).
6ecc0 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 6f .....Next......Return.builder.To
6ece0 53 74 72 69 6e 67 28 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 String()..End.Function....Privat
6ed00 65 20 46 75 6e 63 74 69 6f 6e 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 42 79 56 61 6c 20 74 65 e.Function.XmlEntityize(ByVal.te
6ed20 78 74 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 xt.As.String).As.String......If.
6ed40 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 65 78 74 29 20 54 68 65 6e 0d String.IsNullOrEmpty(text).Then.
6ed60 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 .........Return.String.Empty....
6ed80 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c ..End.If........text.=.text.Repl
6eda0 61 63 65 28 22 26 22 2c 20 22 26 61 6d 70 3b 22 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 ace("&",."&amp;")......text.=.te
6edc0 78 74 2e 52 65 70 6c 61 63 65 28 22 3c 22 2c 20 22 26 6c 74 3b 22 29 2e 52 65 70 6c 61 63 65 28 xt.Replace("<",."&lt;").Replace(
6ede0 22 3e 22 2c 20 22 26 67 74 3b 22 29 0d 0a 20 20 20 20 44 69 6d 20 69 64 20 41 73 20 53 74 72 69 ">",."&gt;")......Dim.id.As.Stri
6ee00 6e 67 20 3d 20 47 75 69 64 2e 4e 65 77 47 75 69 64 28 29 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a ng.=.Guid.NewGuid().ToString()..
6ee20 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d ....text.=.text.Replace(Environm
6ee40 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 69 64 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 ent.NewLine,.id)......text.=.tex
6ee60 74 2e 52 65 70 6c 61 63 65 28 76 62 43 72 2c 20 22 26 23 78 44 3b 22 29 2e 52 65 70 6c 61 63 65 t.Replace(vbCr,."&#xD;").Replace
6ee80 28 76 62 4c 66 2c 20 22 26 23 78 41 3b 22 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 (vbLf,."&#xA;")......text.=.text
6eea0 2e 52 65 70 6c 61 63 65 28 69 64 2c 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 .Replace(id,.Environment.NewLine
6eec0 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 27 22 2c 20 )......Return.text.Replace("'",.
6eee0 22 26 61 70 6f 73 3b 22 29 2e 52 65 70 6c 61 63 65 28 22 22 22 22 2c 20 22 26 71 75 6f 74 3b 22 "&apos;").Replace("""",."&quot;"
6ef00 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 43 6f 6e 73 74 20 58 4d 4c 43 4f 4d 4d )..End.Function....Const.XMLCOMM
6ef20 45 4e 54 5f 53 54 41 52 54 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 27 27 27 22 0d 0a 50 72 69 ENT_START.As.String.=."'''"..Pri
6ef40 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 50 72 6f 70 65 72 74 69 65 73 28 42 79 56 61 vate.Function.GetProperties(ByVa
6ef60 6c 20 74 79 70 65 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 20 41 73 20 49 45 6e l.type.As.StructuralType).As.IEn
6ef80 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 49 66 umerable(Of.EdmProperty)......If
6efa0 20 74 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 20 42 75 69 6c 74 49 6e 54 .type.BuiltInTypeKind.=.BuiltInT
6efc0 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 ypeKind.EntityType.Then.........
6efe0 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 74 79 70 65 2c 20 45 6e 74 69 74 79 54 .Return.DirectCast(type,.EntityT
6f000 79 70 65 29 2e 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 ype).Properties......Else.......
6f020 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 74 79 70 65 2c 20 43 6f 6d 70 6c ...Return.DirectCast(type,.Compl
6f040 65 78 54 79 70 65 29 2e 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a exType).Properties......End.If..
6f060 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 End.Function........''''''''....
6f080 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 50 72 69 76 61 ..''''''''.......''''''''..Priva
6f0a0 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 28 69 74 te.Function.GetGlobalItemName(it
6f0c0 65 6d 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 em.As.GlobalItem).As.String.....
6f0e0 20 49 66 20 54 79 70 65 4f 66 20 69 74 65 6d 20 49 73 20 45 64 6d 54 79 70 65 20 54 68 65 6e 0d .If.TypeOf.item.Is.EdmType.Then.
6f100 0a 20 20 20 20 20 20 20 20 27 20 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 .........'...........Return.CTyp
6f120 65 28 69 74 65 6d 2c 20 45 64 6d 54 79 70 65 29 2e 4e 61 6d 65 0d 0a 20 20 20 20 45 6c 73 65 0d e(item,.EdmType).Name......Else.
6f140 0a 20 20 20 20 20 20 20 20 27 20 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 .........'...........Return.CTyp
6f160 65 28 69 74 65 6d 2c 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 2e 4e 61 6d 65 0d 0a 20 e(item,.EntityContainer).Name...
6f180 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 6f 74 65 ...End.If..End.Function....Prote
6f1a0 63 74 65 64 20 53 75 62 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 cted.Sub.VerifyGetterAndSetterAc
6f1c0 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 42 79 56 61 6c 20 6d cessibilityCompatability(ByVal.m
6f1e0 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 0d 0a 20 20 20 20 44 69 6d 20 72 61 77 ember.As.EdmMember)......Dim.raw
6f200 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 20 3d 20 GetterAccessibility.As.String.=.
6f220 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 Accessibility.ForReadOnlyPropert
6f240 79 28 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 44 69 6d 20 72 61 77 53 65 74 74 65 72 41 63 63 65 y(member)......Dim.rawSetterAcce
6f260 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 20 3d 20 41 63 63 65 73 73 69 62 69 6c ssibility.As.String.=.Accessibil
6f280 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 6d 65 6d 62 65 72 29 ity.ForWriteOnlyProperty(member)
6f2a0 0d 0a 0d 0a 20 20 20 20 49 66 20 28 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 ........If.(rawGetterAccessibili
6f2c0 74 79 20 3d 20 22 46 72 69 65 6e 64 22 20 41 6e 64 41 6c 73 6f 20 72 61 77 53 65 74 74 65 72 41 ty.=."Friend".AndAlso.rawSetterA
6f2e0 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 22 50 72 6f 74 65 63 74 65 64 22 29 20 4f 72 45 6c ccessibility.=."Protected").OrEl
6f300 73 65 20 28 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 22 50 72 se.(rawGetterAccessibility.=."Pr
6f320 6f 74 65 63 74 65 64 22 20 41 6e 64 41 6c 73 6f 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 otected".AndAlso.rawSetterAccess
6f340 69 62 69 6c 69 74 79 20 3d 20 22 46 72 69 65 6e 64 22 29 20 54 68 65 6e 0d 0a 0d 0a 20 20 20 20 ibility.=."Friend").Then........
6f360 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f ....Errors.Add(New.System.CodeDo
6f380 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 m.Compiler.CompilerError(SourceC
6f3a0 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 33 33 22 2c 20 53 74 72 69 6e 67 2e sdlPath,.-1,.-1,."6033",.String.
6f3c0 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 Format(CultureInfo.CurrentCultur
6f3e0 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 47 65 6e 65 72 61 74 65 64 50 e,.GetResourceString("GeneratedP
6f400 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e 66 6c 69 63 74 22 29 2c 20 ropertyAccessibilityConflict"),.
6f420 6d 65 6d 62 65 72 2e 4e 61 6d 65 2c 20 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c member.Name,.rawGetterAccessibil
6f440 69 74 79 2c 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 29 29 0d 0a ity,.rawSetterAccessibility)))..
6f460 20 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 ....End.If..End.Sub....Private.S
6f480 75 62 20 56 65 72 69 66 79 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 ub.VerifyEntityTypeAndSetAccessi
6f4a0 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 42 79 56 61 6c 20 65 6e 74 69 74 79 bilityCompatability(ByVal.entity
6f4c0 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 29 0d 0a 20 20 20 20 44 69 6d 20 74 79 70 65 41 Set.As.EntitySet)......Dim.typeA
6f4e0 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e ccess.As.String.=.Accessibility.
6f500 46 6f 72 54 79 70 65 28 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 29 0d 0a ForType(entitySet.ElementType)..
6f520 20 20 20 20 44 69 6d 20 73 65 74 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 41 63 ....Dim.setAccess.As.String.=.Ac
6f540 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 cessibility.ForReadOnlyProperty(
6f560 65 6e 74 69 74 79 53 65 74 29 0d 0a 0d 0a 20 20 20 20 49 66 20 74 79 70 65 41 63 63 65 73 73 20 entitySet)........If.typeAccess.
6f580 3d 20 22 46 72 69 65 6e 64 22 20 41 6e 64 41 6c 73 6f 20 28 73 65 74 41 63 63 65 73 73 20 3d 20 =."Friend".AndAlso.(setAccess.=.
6f5a0 22 50 75 62 6c 69 63 22 20 4f 72 45 6c 73 65 20 73 65 74 41 63 63 65 73 73 20 3d 20 22 50 72 6f "Public".OrElse.setAccess.=."Pro
6f5c0 74 65 63 74 65 64 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 tected").Then..........Errors.Ad
6f5e0 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f d(New.System.CodeDom.Compiler.Co
6f600 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 mpilerError(SourceCsdlPath,.-1,.
6f620 2d 31 2c 20 22 36 30 33 36 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 -1,."6036",.String.Format(Cultur
6f640 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 eInfo.CurrentCulture,.GetResourc
6f660 65 53 74 72 69 6e 67 28 22 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 eString("EntityTypeAndSetAccessi
6f680 62 69 6c 69 74 79 43 6f 6e 66 6c 69 63 74 22 29 2c 20 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d bilityConflict"),.entitySet.Elem
6f6a0 65 6e 74 54 79 70 65 2e 4e 61 6d 65 2c 20 74 79 70 65 41 63 63 65 73 73 2c 20 65 6e 74 69 74 79 entType.Name,.typeAccess,.entity
6f6c0 53 65 74 2e 4e 61 6d 65 2c 20 73 65 74 41 63 63 65 73 73 29 29 29 0d 0a 20 20 20 20 45 6e 64 20 Set.Name,.setAccess)))......End.
6f6e0 49 66 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 75 62 20 56 65 72 If..End.Sub......Private.Sub.Ver
6f700 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 ifyCaseInsensitiveTypeUniqueness
6f720 28 29 0d 0a 20 20 20 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 ()......VerifyCaseInsensitiveUni
6f740 71 75 65 6e 65 73 73 28 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 28 4f 66 20 queness(GetSourceSchemaTypes(Of.
6f760 47 6c 6f 62 61 6c 49 74 65 6d 29 28 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 69 29 20 GlobalItem)().Where(Function(i).
6f780 54 79 70 65 4f 66 20 69 20 69 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 4f 72 45 6c 73 TypeOf.i.is.StructuralType.OrEls
6f7a0 65 20 54 79 70 65 4f 66 20 69 20 69 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 2c 20 e.TypeOf.i.is.EntityContainer),.
6f7c0 5f 0d 0a 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 28 67 29 20 47 65 74 47 6c 6f 62 61 6c _..........Function(g).GetGlobal
6f7e0 49 74 65 6d 4e 61 6d 65 28 67 29 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e ItemName(g),._..........Function
6f800 28 67 29 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 (g).String.Format(CultureInfo.Cu
6f820 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 rrentCulture,._..............Get
6f840 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 ResourceString("Template_CaseIns
6f860 65 6e 73 69 74 69 76 65 54 79 70 65 43 6f 6e 66 6c 69 63 74 22 29 2c 20 47 65 74 47 6c 6f 62 61 ensitiveTypeConflict"),.GetGloba
6f880 6c 49 74 65 6d 4e 61 6d 65 28 67 29 29 29 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 50 72 69 76 61 lItemName(g)))..End.Sub....Priva
6f8a0 74 65 20 53 75 62 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 45 6e 74 69 te.Sub.VerifyCaseInsensitiveEnti
6f8c0 74 79 53 65 74 55 6e 69 71 75 65 6e 65 73 73 28 65 6e 74 69 74 79 53 65 74 73 20 41 73 20 49 45 tySetUniqueness(entitySets.As.IE
6f8e0 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 29 0d 0a 20 20 20 20 56 65 numerable(Of.EntitySet))......Ve
6f900 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 65 6e rifyCaseInsensitiveUniqueness(en
6f920 74 69 74 79 53 65 74 73 2c 20 46 75 6e 63 74 69 6f 6e 28 65 29 20 65 2e 4e 61 6d 65 2c 20 5f 0d titySets,.Function(e).e.Name,._.
6f940 0a 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 28 65 29 20 53 74 72 69 6e 67 2e 46 6f 72 6d .........Function(e).String.Form
6f960 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 5f at(CultureInfo.CurrentCulture,._
6f980 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 ..............GetResourceString(
6f9a0 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 45 6e 74 69 74 79 53 "Template_CaseInsensitiveEntityS
6f9c0 65 74 43 6f 6e 66 6c 69 63 74 22 29 2c 20 65 2e 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 2e etConflict"),.e.EntityContainer.
6f9e0 4e 61 6d 65 2c 20 65 2e 4e 61 6d 65 29 29 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 50 72 69 76 61 Name,.e.Name))..End.Sub....Priva
6fa00 74 65 20 53 75 62 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 4d 65 6d 62 te.Sub.VerifyCaseInsensitiveMemb
6fa20 65 72 55 6e 69 71 75 65 6e 65 73 73 28 6d 65 6d 62 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 erUniqueness(members.As.IEnumera
6fa40 62 6c 65 28 4f 66 20 45 64 6d 4d 65 6d 62 65 72 29 29 0d 0a 20 20 20 20 56 65 72 69 66 79 43 61 ble(Of.EdmMember))......VerifyCa
6fa60 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 6d 65 6d 62 65 72 73 2c seInsensitiveUniqueness(members,
6fa80 20 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 .Function(m).m.Name,._..........
6faa0 46 75 6e 63 74 69 6f 6e 28 6d 29 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 Function(m).String.Format(Cultur
6fac0 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 eInfo.CurrentCulture,._.........
6fae0 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 .....GetResourceString("Template
6fb00 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 4d 65 6d 62 65 72 43 6f 6e 66 6c 69 63 74 22 29 _CaseInsensitiveMemberConflict")
6fb20 2c 20 6d 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 2c 20 6d 2e 4e 61 ,.m.DeclaringType.FullName,.m.Na
6fb40 6d 65 29 29 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 75 62 20 56 65 72 me))..End.Sub....Private.Sub.Ver
6fb60 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 4f 66 20 ifyCaseInsensitiveUniqueness(Of.
6fb80 54 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 29 28 69 74 65 6d 73 20 41 73 20 49 45 6e 75 T.As.MetadataItem)(items.As.IEnu
6fba0 6d 65 72 61 62 6c 65 28 4f 66 20 54 29 2c 20 67 65 74 49 64 65 6e 74 69 74 79 20 41 73 20 46 75 merable(Of.T),.getIdentity.As.Fu
6fbc0 6e 63 28 4f 66 20 54 2c 20 53 74 72 69 6e 67 29 2c 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 20 nc(Of.T,.String),.formatMessage.
6fbe0 41 73 20 46 75 6e 63 28 4f 66 20 54 2c 20 53 74 72 69 6e 67 29 20 29 0d 0a 20 20 20 20 44 69 6d As.Func(Of.T,.String).)......Dim
6fc00 20 68 61 73 68 20 41 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 20 3d 20 4e 65 .hash.As.HashSet(Of.String).=.Ne
6fc20 77 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 28 53 74 72 69 6e 67 43 6f 6d 70 61 w.HashSet(Of.String)(StringCompa
6fc40 72 65 72 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 0d rer.InvariantCultureIgnoreCase).
6fc60 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 69 74 65 6d 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 .....For.Each.item.As.MetadataIt
6fc80 65 6d 20 69 6e 20 69 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 68 61 73 68 em.in.items..........If.Not.hash
6fca0 2e 41 64 64 28 67 65 74 49 64 65 6e 74 69 74 79 28 69 74 65 6d 29 29 20 54 68 65 6e 0d 0a 20 20 .Add(getIdentity(item)).Then....
6fcc0 20 20 20 20 20 20 20 20 20 20 27 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 ..........'...............Errors
6fce0 2e 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 .Add(New.System.CodeDom.Compiler
6fd00 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d .CompilerError(SourceCsdlPath,.-
6fd20 31 2c 20 2d 31 2c 20 36 30 32 33 2c 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 28 69 74 65 6d 29 1,.-1,.6023,.formatMessage(item)
6fd40 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 45 6e ))..........End.If......Next..En
6fd60 64 20 53 75 62 0d 0a 0d 0a 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 41 6c 6c 44 d.Sub....Public.Function.GetAllD
6fd80 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 28 73 74 72 75 63 74 75 72 61 6c 20 41 73 20 53 74 72 eclaredMembers(structural.As.Str
6fda0 75 63 74 75 72 61 6c 54 79 70 65 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 ucturalType).As.IEnumerable(Of.E
6fdc0 64 6d 4d 65 6d 62 65 72 29 0d 0a 20 20 20 20 49 66 28 54 79 70 65 4f 66 20 73 74 72 75 63 74 75 dmMember)......If(TypeOf.structu
6fde0 72 61 6c 20 49 73 20 45 6e 74 69 74 79 54 79 70 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 ral.Is.EntityType).Then.........
6fe00 20 44 69 6d 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 43 54 79 70 .Dim.entity.As.EntityType.=.CTyp
6fe20 65 28 73 74 72 75 63 74 75 72 61 6c 2c 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 e(structural,.EntityType).......
6fe40 20 20 20 44 69 6d 20 64 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 20 41 73 20 49 45 6e 75 6d 65 ...Dim.declaredMembers.As.IEnume
6fe60 72 61 62 6c 65 28 4f 66 20 45 64 6d 4d 65 6d 62 65 72 29 20 3d 20 65 6e 74 69 74 79 2e 4d 65 6d rable(Of.EdmMember).=.entity.Mem
6fe80 62 65 72 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 44 65 63 6c 61 72 69 bers.Where(Function(m).m.Declari
6fea0 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 64 ngType.Is.entity)..........Dim.d
6fec0 65 63 61 6c 72 65 64 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 49 ecalredNavigationProperties.As.I
6fee0 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 Enumerable(Of.NavigationProperty
6ff00 29 20 3d 20 65 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e ).=.entity.NavigationProperties.
6ff20 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6e 29 20 6e 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 Where(Function(n).n.DeclaringTyp
6ff40 65 20 49 73 20 65 6e 74 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 64 e.Is.entity)............Return.d
6ff60 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 2e 55 6e 69 6f 6e 28 64 65 63 61 6c 72 65 64 4e 61 76 eclaredMembers.Union(decalredNav
6ff80 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 43 61 73 74 28 4f 66 20 45 64 6d 4d 65 6d igationProperties.Cast(Of.EdmMem
6ffa0 62 65 72 29 28 29 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 ber)())......End.If........Retur
6ffc0 6e 20 73 74 72 75 63 74 75 72 61 6c 2e 4d 65 6d 62 65 72 73 2e 57 68 65 72 65 28 46 75 6e 63 74 n.structural.Members.Where(Funct
6ffe0 69 6f 6e 28 6d 29 20 6d 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 73 74 72 75 63 74 ion(m).m.DeclaringType.Is.struct
70000 75 72 61 6c 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 ural)..End.Function....Private.S
70020 75 62 20 44 65 66 69 6e 65 4d 65 74 61 64 61 74 61 28 29 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 ub.DefineMetadata()......Templat
70040 65 4d 65 74 61 64 61 74 61 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 eMetadata(MetadataConstants.TT_T
70060 45 4d 50 4c 41 54 45 5f 4e 41 4d 45 29 20 3d 20 22 56 42 43 6f 64 65 47 65 6e 22 0d 0a 20 20 20 EMPLATE_NAME).=."VBCodeGen".....
70080 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 .TemplateMetadata(MetadataConsta
700a0 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 29 20 3d 20 22 34 2e 30 22 nts.TT_TEMPLATE_VERSION).=."4.0"
700c0 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 28 4d 65 74 61 64 61 74 61 43 ......TemplateMetadata(MetadataC
700e0 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 4d 49 4e 49 4d 55 4d 5f 45 4e 54 49 54 59 5f 46 52 41 4d 45 onstants.TT_MINIMUM_ENTITY_FRAME
70100 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 29 20 3d 20 22 34 2e 30 22 0d 0a 45 6e 64 20 53 75 62 0d 0a WORK_VERSION).=."4.0"..End.Sub..
70120 0d 0a 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 61 62 6c 65 20 43 6c 61 73 73 20 55 ..Private.NotInheritable.Class.U
70140 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 0d 0a 20 20 20 20 50 72 69 76 niqueIdentifierService......Priv
70160 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 41 ate.ReadOnly._knownIdentifiers.A
70180 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 20 3d 20 4e 65 77 20 48 61 73 68 53 s.HashSet(Of.String).=.New.HashS
701a0 65 74 28 4f 66 20 73 74 72 69 6e 67 29 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 4f 72 64 et(Of.string)(StringComparer.Ord
701c0 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d inalIgnoreCase)........'''.<summ
701e0 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 0d 0a 20 20 20 20 27 27 27 20 0d 0a 20 20 20 20 27 27 ary>......'''.......'''.......''
70200 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f '.</summary>......Public.Functio
70220 6e 20 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 69 64 65 6e 74 69 66 69 65 72 20 41 73 n.AdjustIdentifier(identifier.As
70240 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 27 20 0d 0a .String).As.String..........'...
70260 20 20 20 20 20 20 20 20 44 69 6d 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 41 73 ........Dim.numberOfConflicts.As
70280 20 49 6e 74 33 32 20 3d 20 30 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 61 64 6a 75 73 74 65 64 .Int32.=.0..........Dim.adjusted
702a0 49 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 20 3d 20 69 64 65 6e 74 69 66 69 65 Identifier.As.String.=.identifie
702c0 72 0d 0a 20 20 20 20 20 20 20 20 57 68 69 6c 65 20 4e 6f 74 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 r..........While.Not._knownIdent
702e0 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 29 0d 0a ifiers.Add(adjustedIdentifier)..
70300 20 20 20 20 20 20 20 20 20 20 20 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 2b 3d ............numberOfConflicts.+=
70320 20 31 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 .1..............adjustedIdentifi
70340 65 72 20 3d 20 69 64 65 6e 74 69 66 69 65 72 20 2b 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 er.=.identifier.+.numberOfConfli
70360 63 74 73 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 cts.ToString(CultureInfo.Invaria
70380 6e 74 43 75 6c 74 75 72 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 57 68 69 6c 65 0d 0a 0d ntCulture)..........End.While...
703a0 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 .........Return.adjustedIdentifi
703c0 65 72 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 73 73 0d er......End.Function..End.Class.
703e0 0a 0a 0a 0d 0a 27 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 4d 69 63 72 6f 73 6f 66 74 20 43 .....'.Copyright.(c).Microsoft.C
70400 6f 72 70 6f 72 61 74 69 6f 6e 2e 20 20 41 6c 6c 20 72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 orporation...All.rights.reserved
70420 2e 0d 0a 0d 0a 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 .....Public.Shared.TemplateMetad
70440 61 74 61 20 41 73 20 4e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c ata.As.New.Dictionary(Of.String,
70460 20 53 74 72 69 6e 67 29 28 29 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 .String)()....'''.<summary>..'''
70480 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 68 65 6c 70 69 6e 67 20 74 6f 20 63 72 65 61 .Responsible.for.helping.to.crea
704a0 74 65 20 73 6f 75 72 63 65 20 63 6f 64 65 20 74 68 61 74 20 69 73 0d 0a 27 27 27 20 63 6f 72 72 te.source.code.that.is..'''.corr
704c0 65 63 74 6c 79 20 66 6f 72 6d 61 74 65 64 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e 61 6c 0d 0a 27 ectly.formated.and.functional..'
704e0 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 43 6f 64 65 ''.</summary>..Public.Class.Code
70500 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 GenerationTools......Private.Rea
70520 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e dOnly._textTransformation.As.Dyn
70540 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 50 72 69 76 amicTextTransformation......Priv
70560 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 63 6f 64 65 20 41 73 20 56 42 43 6f 64 65 50 72 6f 76 ate.ReadOnly._code.As.VBCodeProv
70580 69 64 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 65 66 20 41 ider......Private.ReadOnly._ef.A
705a0 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d s.MetadataTools........'''.<summ
705c0 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 20 6e 65 77 20 ary>......'''.Initializes.a.new.
705e0 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 6f 62 6a 65 63 74 20 77 69 74 68 20 CodeGenerationTools.object.with.
70600 74 68 65 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 the.TextTransformation.(T4.gener
70620 61 74 65 64 20 63 6c 61 73 73 29 0d 0a 20 20 20 20 27 27 27 20 74 68 61 74 20 69 73 20 63 75 72 ated.class)......'''.that.is.cur
70640 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 rently.running.......'''.</summa
70660 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 ry>......Public.Sub.New(ByVal.te
70680 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 xtTransformation.As.Object).....
706a0 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 20 4e 6f .....If.textTransformation.Is.No
706c0 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 thing.Then..............Throw.Ne
706e0 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 w.ArgumentNullException("textTra
70700 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d nsformation")..........End.If...
70720 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 ........._textTransformation.=.D
70740 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 ynamicTextTransformation.Create(
70760 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 5f 63 6f textTransformation).........._co
70780 64 65 20 3d 20 4e 65 77 20 56 42 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 20 de.=.New.VBCodeProvider().......
707a0 20 20 20 5f 65 66 20 3d 20 4e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 5f 74 65 78 74 ..._ef.=.New.MetadataTools(_text
707c0 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 46 75 6c 6c 79 51 75 Transformation)..........FullyQu
707e0 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 alifySystemTypes.=.False........
70800 20 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 54 72 75 65 0d 0a 20 20 20 20 45 6e ..CamelCaseFields.=.True......En
70820 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 d.Sub........'''.<summary>......
70840 27 27 27 20 57 68 65 6e 20 74 72 75 65 2c 20 61 6c 6c 20 74 79 70 65 73 20 74 68 61 74 20 61 72 '''.When.true,.all.types.that.ar
70860 65 20 6e 6f 74 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 0d 0a 20 20 20 20 27 27 27 20 61 e.not.being.generated......'''.a
70880 72 65 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 74 6f 20 6b 65 65 70 20 74 68 65 6d 20 re.fully.qualified.to.keep.them.
708a0 66 72 6f 6d 20 63 6f 6e 66 6c 69 63 74 69 6e 67 20 77 69 74 68 0d 0a 20 20 20 20 27 27 27 20 74 from.conflicting.with......'''.t
708c0 79 70 65 73 20 74 68 61 74 20 61 72 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 2e 20 55 ypes.that.are.being.generated..U
708e0 73 65 66 75 6c 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 0d 0a 20 20 20 20 27 27 27 20 73 6f 6d seful.when.you.have......'''.som
70900 65 74 68 69 6e 67 20 6c 69 6b 65 20 61 20 74 79 70 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 ething.like.a.type.being.generat
70920 65 64 20 6e 61 6d 65 64 20 53 79 73 74 65 6d 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 ed.named.System.......'''......'
70940 27 27 20 44 65 66 61 75 6c 74 20 69 73 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f ''.Default.is.false.......'''.</
70960 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 46 75 6c 6c 79 51 75 61 6c summary>......Private._FullyQual
70980 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 50 ifySystemTypes.As.Boolean......P
709a0 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 ublic.Property.FullyQualifySyste
709c0 6d 54 79 70 65 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 74 mTypes().As.Boolean..........Get
709e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 46 75 6c 6c 79 51 75 61 6c 69 ..............Return._FullyQuali
70a00 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a fySystemTypes..........End.Get..
70a20 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 42 6f 6f 6c 65 ........Set(ByVal.value.As.Boole
70a40 61 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 an).............._FullyQualifySy
70a60 73 74 65 6d 54 79 70 65 73 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 stemTypes.=.value..........End.S
70a80 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 et......End.Property........'''.
70aa0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 57 68 65 6e 20 74 72 75 65 2c 20 74 68 <summary>......'''.When.true,.th
70ac0 65 20 66 69 65 6c 64 20 6e 61 6d 65 73 20 61 72 65 20 43 61 6d 65 6c 20 43 61 73 65 64 2c 0d 0a e.field.names.are.Camel.Cased,..
70ae0 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 74 68 65 79 20 77 69 6c 6c 20 70 72 65 73 ....'''.otherwise.they.will.pres
70b00 65 72 76 65 20 74 68 65 20 63 61 73 65 20 74 68 65 79 0d 0a 20 20 20 20 27 27 27 20 73 74 61 72 erve.the.case.they......'''.star
70b20 74 20 77 69 74 68 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 44 65 66 61 75 6c t.with.......'''......'''.Defaul
70b40 74 20 69 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a t.is.true.......'''.</summary>..
70b60 20 20 20 20 50 72 69 76 61 74 65 20 5f 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 41 73 20 ....Private._CamelCaseFields.As.
70b80 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 43 61 6d Boolean......Public.Property.Cam
70ba0 65 6c 43 61 73 65 46 69 65 6c 64 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 elCaseFields().As.Boolean.......
70bc0 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 43 61 6d 65 ...Get..............Return._Came
70be0 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 lCaseFields..........End.Get....
70c00 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 42 6f 6f 6c 65 61 6e ......Set(ByVal.value.As.Boolean
70c20 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 ).............._CamelCaseFields.
70c40 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e =.value..........End.Set......En
70c60 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d d.Property........'''.<summary>.
70c80 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 4e 61 6d 65 73 70 61 63 65 4e 61 .....'''.Returns.the.NamespaceNa
70ca0 6d 65 20 73 75 67 67 65 73 74 65 64 20 62 79 20 56 53 20 69 66 20 72 75 6e 6e 69 6e 67 20 69 6e me.suggested.by.VS.if.running.in
70cc0 73 69 64 65 20 56 53 2e 20 4f 74 68 65 72 77 69 73 65 2c 20 72 65 74 75 72 6e 73 0d 0a 20 20 20 side.VS..Otherwise,.returns.....
70ce0 20 27 27 27 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a .'''.null.......'''.</summary>..
70d00 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 56 73 4e 61 6d 65 73 70 61 63 65 53 ....Public.Function.VsNamespaceS
70d20 75 67 67 65 73 74 69 6f 6e 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 uggestion().As.String..........D
70d40 69 6d 20 73 75 67 67 65 73 74 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 5f 74 65 78 74 54 im.suggestion.As.String.=._textT
70d60 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 ransformation.Host.ResolveParame
70d80 74 65 72 56 61 6c 75 65 28 22 64 69 72 65 63 74 69 76 65 49 64 22 2c 20 22 6e 61 6d 65 73 70 61 terValue("directiveId",."namespa
70da0 63 65 44 69 72 65 63 74 69 76 65 50 72 6f 63 65 73 73 6f 72 22 2c 20 22 6e 61 6d 65 73 70 61 63 ceDirectiveProcessor",."namespac
70dc0 65 48 69 6e 74 22 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c eHint")..........If.String.IsNul
70de0 6c 4f 72 45 6d 70 74 79 28 73 75 67 67 65 73 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 lOrEmpty(suggestion).Then.......
70e00 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 .......Return.Nothing..........E
70e20 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 73 75 67 67 65 73 74 69 nd.If............Return.suggesti
70e40 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 on......End.Function........'''.
70e60 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 61 20 73 74 72 <summary>......'''.Returns.a.str
70e80 69 6e 67 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 20 75 73 65 20 61 73 20 61 6e 20 69 ing.that.is.safe.for.use.as.an.i
70ea0 64 65 6e 74 69 66 69 65 72 20 69 6e 20 43 23 2e 0d 0a 20 20 20 20 27 27 27 20 4b 65 79 77 6f 72 dentifier.in.C#.......'''.Keywor
70ec0 64 73 20 61 72 65 20 65 73 63 61 70 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 ds.are.escaped.......'''.</summa
70ee0 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 ry>......Public.Function.Escape(
70f00 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d ByVal.name.As.String).As.String.
70f20 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 6d 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e .........If.name.Is.Nothing.Then
70f40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 ..............Return.Nothing....
70f60 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f ......End.If............Return._
70f80 63 6f 64 65 2e 43 72 65 61 74 65 45 73 63 61 70 65 64 49 64 65 6e 74 69 66 69 65 72 28 6e 61 6d code.CreateEscapedIdentifier(nam
70fa0 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 e)......End.Function........'''.
70fc0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e <summary>......'''.Returns.the.n
70fe0 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 27 73 20 45 64 6d 54 79 70 65 20 74 ame.of.the.TypeUsage's.EdmType.t
71000 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 hat.is.safe.for......'''.use.as.
71020 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 an.identifier.......'''.</summar
71040 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 y>......Public.Function.Escape(B
71060 79 56 61 6c 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 20 yVal.typeUsage.As.TypeUsage).As.
71080 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 55 73 61 67 65 20 49 73 20 String..........If.typeUsage.Is.
710a0 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e Nothing.Then..............Return
710c0 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 .Nothing..........End.If........
710e0 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 ....If.TypeOf.typeUsage.EdmType.
71100 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 4f 72 45 6c 73 65 20 54 79 70 65 4f 66 20 74 79 70 Is.ComplexType.OrElse.TypeOf.typ
71120 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 45 6e 74 69 74 79 54 79 70 65 20 54 68 65 eUsage.EdmType.Is.EntityType.The
71140 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 n..............Return.Escape(typ
71160 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6c eUsage.EdmType.Name)..........El
71180 73 65 49 66 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 seIf.TypeOf.typeUsage.EdmType.Is
711a0 20 53 69 6d 70 6c 65 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 .SimpleType.Then..............Di
711c0 6d 20 63 6c 72 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 5f 65 66 2e 55 6e 64 65 72 6c 79 69 m.clrType.As.Type.=._ef.Underlyi
711e0 6e 67 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 0d 0a 20 20 ngClrType(typeUsage.EdmType)....
71200 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 ..........Dim.typeName.As.String
71220 20 3d 20 49 66 28 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 .=.If(TypeOf.typeUsage.EdmType.I
71240 73 20 45 6e 75 6d 54 79 70 65 2c 20 45 73 63 61 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d s.EnumType,.Escape(typeUsage.Edm
71260 54 79 70 65 2e 4e 61 6d 65 29 2c 20 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 29 0d 0a 20 20 Type.Name),.Escape(clrType))....
71280 20 20 20 20 20 20 20 20 20 20 49 66 20 63 6c 72 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 ..........If.clrType.IsValueType
712a0 20 41 6e 64 41 6c 73 6f 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 .AndAlso._ef.IsNullable(typeUsag
712c0 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 e).Then..................Return.
712e0 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 String.Format(CultureInfo.Invari
71300 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 7b 30 7d 29 22 2c 20 antCulture,."Nullable(Of.{0})",.
71320 74 79 70 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d typeName)..............End.If...
71340 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 .............Return.typeName....
71360 20 20 20 20 20 20 45 6c 73 65 49 66 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 ......ElseIf.TypeOf.typeUsage.Ed
71380 6d 54 79 70 65 20 49 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 mType.Is.CollectionType.Then....
713a0 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 ..........Return.String.Format(C
713c0 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 49 43 ultureInfo.InvariantCulture,."IC
713e0 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 7b 30 7d 29 22 2c 20 45 73 63 61 70 65 28 44 69 72 65 63 ollection(Of.{0})",.Escape(Direc
71400 74 43 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 43 6f 6c 6c 65 63 74 tCast(typeUsage.EdmType,.Collect
71420 69 6f 6e 54 79 70 65 29 2e 54 79 70 65 55 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e ionType).TypeUsage))..........En
71440 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 d.If............Throw.New.Argume
71460 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 74 79 70 65 55 73 61 67 65 22 29 0d 0a 20 20 20 20 45 6e ntException("typeUsage")......En
71480 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d d.Function........'''.<summary>.
714a0 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 .....'''.Returns.the.name.of.the
714c0 20 45 64 6d 4d 65 6d 62 65 72 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 .EdmMember.that.is.safe.for.....
714e0 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 .'''.use.as.an.identifier.......
71500 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 '''.</summary>......Public.Funct
71520 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 ion.Escape(ByVal.member.As.EdmMe
71540 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 mber).As.String..........If.memb
71560 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 er.Is.Nothing.Then..............
71580 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a Return.Nothing..........End.If..
715a0 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 6d 65 6d 62 65 72 2e 4e ..........Return.Escape(member.N
715c0 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 ame)......End.Function........''
715e0 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 '.<summary>......'''.Returns.the
71600 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 54 79 70 65 20 74 68 61 74 20 69 73 20 73 61 66 .name.of.the.EdmType.that.is.saf
71620 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 e.for......'''.use.as.an.identif
71640 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 ier.......'''.</summary>......Pu
71660 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 74 79 70 65 20 blic.Function.Escape(ByVal.type.
71680 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 As.EdmType).As.String..........I
716a0 66 20 74 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 f.type.Is.Nothing.Then..........
716c0 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 ....Return.Nothing..........End.
716e0 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 If............Return.Escape(type
71700 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 .Name)......End.Function........
71720 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 '''.<summary>......'''.Returns.t
71740 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 46 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 he.name.of.the.EdmFunction.that.
71760 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 is.safe.for......'''.use.as.an.i
71780 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a dentifier.......'''.</summary>..
717a0 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c ....Public.Function.Escape(ByVal
717c0 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 20 45 64 6d 46 75 6e 63 74 69 6f 6e 29 20 41 73 20 .edmFunction.As.EdmFunction).As.
717e0 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 49 String..........If.edmFunction.I
71800 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 s.Nothing.Then..............Retu
71820 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 rn.Nothing..........End.If......
71840 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e ......Return.Escape(edmFunction.
71860 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 Name)......End.Function........'
71880 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 ''.<summary>......'''.Returns.th
718a0 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 75 6d 4d 65 6d 62 65 72 20 74 68 61 74 20 69 73 e.name.of.the.EnumMember.that.is
718c0 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 .safe.for......'''.use.as.an.ide
718e0 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ntifier.......'''.</summary>....
71900 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 6d ..Public.Function.Escape(ByVal.m
71920 65 6d 62 65 72 20 41 73 20 45 6e 75 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a ember.As.EnumMember).As.String..
71940 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 ........If.member.Is.Nothing.The
71960 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 n..............Return.Nothing...
71980 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 .......End.If............Return.
719a0 45 73 63 61 70 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e Escape(member.Name)......End.Fun
719c0 63 74 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ction..........'''.<summary>....
719e0 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e ..'''.Returns.the.name.of.the.En
71a00 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a tityContainer.that.is.safe.for..
71a20 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 ....'''.use.as.an.identifier....
71a40 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 ...'''.</summary>......Public.Fu
71a60 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 63 6f 6e 74 61 69 6e 65 72 20 41 73 nction.Escape(ByVal.container.As
71a80 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 .EntityContainer).As.String.....
71aa0 20 20 20 20 20 49 66 20 63 6f 6e 74 61 69 6e 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 .....If.container.Is.Nothing.The
71ac0 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 n..............Return.Nothing...
71ae0 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 .......End.If............Return.
71b00 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 Escape(container.Name)......End.
71b20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 Function........'''.<summary>...
71b40 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 ...'''.Returns.the.name.of.the.E
71b60 6e 74 69 74 79 53 65 74 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 ntitySet.that.is.safe.for......'
71b80 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 ''.use.as.an.identifier.......''
71ba0 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f '.</summary>......Public.Functio
71bc0 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 65 64 6d 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 n.Escape(ByVal.edmSet.As.EntityS
71be0 65 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 53 65 74 et).As.String..........If.edmSet
71c00 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 .Is.Nothing.Then..............Re
71c20 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a turn.Nothing..........End.If....
71c40 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 65 64 6d 53 65 74 2e 4e 61 6d ........Return.Escape(edmSet.Nam
71c60 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 e)......End.Function........'''.
71c80 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e <summary>......'''.Returns.the.n
71ca0 61 6d 65 20 6f 66 20 74 68 65 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 74 68 61 74 20 69 ame.of.the.StructuralType.that.i
71cc0 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 s.safe.for......'''.use.as.an.id
71ce0 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 entifier.......'''.</summary>...
71d00 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 ...Public.Function.Escape(ByVal.
71d20 74 79 70 65 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 20 41 73 20 53 74 72 69 6e type.As.StructuralType).As.Strin
71d40 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 g..........If.type.Is.Nothing.Th
71d60 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a en..............Return.Nothing..
71d80 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ........End.If............Return
71da0 20 45 73 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 .Escape(type.Name)......End.Func
71dc0 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 tion........'''.<summary>......'
71de0 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 77 69 74 ''.Returns.the.NamespaceName.wit
71e00 68 20 65 61 63 68 20 73 65 67 6d 65 6e 74 20 73 61 66 65 20 74 6f 0d 0a 20 20 20 20 27 27 27 20 h.each.segment.safe.to......'''.
71e20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c use.as.an.identifier.......'''.<
71e40 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 /summary>......Public.Function.E
71e60 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c 20 6e 61 6d 65 73 70 61 63 65 4e 61 scapeNamespace(ByVal.namespaceNa
71e80 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 me.As.String).As.String.........
71ea0 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 .If.String.IsNullOrEmpty(namespa
71ec0 63 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ceName).Then..............Return
71ee0 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a .namespaceName..........End.If..
71f00 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 74 73 20 41 73 20 53 74 72 69 6e 67 28 29 20 ..........Dim.parts.As.String().
71f20 3d 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2e 53 70 6c 69 74 28 22 2e 22 63 29 0d 0a 20 20 20 =.namespaceName.Split("."c).....
71f40 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 .....namespaceName.=.String.Empt
71f60 79 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 72 74 20 41 73 20 53 74 72 69 y..........For.Each.part.As.Stri
71f80 6e 67 20 49 6e 20 70 61 72 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 6e 61 6d 65 ng.In.parts..............If.name
71fa0 73 70 61 63 65 4e 61 6d 65 20 3c 3e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 20 54 68 65 6e 0d 0a spaceName.<>.String.Empty.Then..
71fc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 2b 3d ................namespaceName.+=
71fe0 20 22 2e 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 ."."..............End.If........
72000 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 2b 3d 20 45 73 63 61 70 65 28 ........namespaceName.+=.Escape(
72020 70 61 72 74 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 part)..........Next............R
72040 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e eturn.namespaceName......End.Fun
72060 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ction........'''.<summary>......
72080 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 4d '''.Returns.the.name.of.the.EdmM
720a0 65 6d 62 65 72 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 ember.formatted.for......'''.use
720c0 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 .as.a.field.identifier.......'''
720e0 0d 0a 20 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 ......'''.This.method.changes.be
72100 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 43 61 6d 65 6c 43 61 73 65 46 69 65 havior.based.on.the.CamelCaseFie
72120 6c 64 73 0d 0a 20 20 20 20 27 27 27 20 73 65 74 74 69 6e 67 2e 0d 0a 20 20 20 20 27 27 27 20 3c lds......'''.setting.......'''.<
72140 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 46 /summary>......Public.Function.F
72160 69 65 6c 64 4e 61 6d 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 ieldName(ByVal.member.As.EdmMemb
72180 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 er).As.String..........If.member
721a0 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 .Is.Nothing.Then..............Re
721c0 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a turn.Nothing..........End.If....
721e0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 69 65 6c 64 4e 61 6d 65 28 6d 65 6d 62 65 72 2e ........Return.FieldName(member.
72200 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 Name)......End.Function........'
72220 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 ''.<summary>......'''.Returns.th
72240 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 53 65 74 20 66 6f 72 6d 61 74 74 65 e.name.of.the.EntitySet.formatte
72260 64 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 d.for......'''.use.as.a.field.id
72280 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 54 68 69 73 entifier.......'''......'''.This
722a0 20 6d 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f .method.changes.behavior.based.o
722c0 6e 20 74 68 65 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 27 27 27 20 73 n.the.CamelCaseFields......'''.s
722e0 65 74 74 69 6e 67 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 etting.......'''.</summary>.....
72300 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 46 69 65 6c 64 4e 61 6d 65 28 42 79 56 61 6c .Public.Function.FieldName(ByVal
72320 20 65 64 6d 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 29 20 41 73 20 53 74 72 69 6e 67 0d .edmSet.As.EntitySet).As.String.
72340 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 53 65 74 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 .........If.edmSet.Is.Nothing.Th
72360 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a en..............Return.Nothing..
72380 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 ........End.If..............Retu
723a0 72 6e 20 46 69 65 6c 64 4e 61 6d 65 28 65 64 6d 53 65 74 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 rn.FieldName(edmSet.Name)......E
723c0 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 nd.Function........Private.Funct
723e0 69 6f 6e 20 46 69 65 6c 64 4e 61 6d 65 28 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 ion.FieldName(ByVal.name.As.Stri
72400 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 43 61 6d 65 6c 43 ng).As.String..........If.CamelC
72420 61 73 65 46 69 65 6c 64 73 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 aseFields.Then..............Retu
72440 72 6e 20 22 5f 22 20 26 20 43 61 6d 65 6c 43 61 73 65 28 6e 61 6d 65 29 0d 0a 20 20 20 20 20 20 rn."_".&.CamelCase(name)........
72460 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 5f 22 20 26 ..Else..............Return."_".&
72480 20 6e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 46 .name..........End.If......End.F
724a0 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 unction........'''.<summary>....
724c0 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 54 79 ..'''.Returns.the.name.of.the.Ty
724e0 70 65 20 6f 62 6a 65 63 74 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 pe.object.formatted.for......'''
72500 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 63 6f 64 65 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 .use.in.source.code.......'''...
72520 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 68 61 76 ...'''.This.method.changes.behav
72540 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 ior.based.on.the.FullyQualifySys
72560 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 27 27 27 20 73 65 74 74 69 6e 67 2e 0d 0a 20 20 20 20 temTypes......'''.setting.......
72580 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 '''.</summary>......Public.Funct
725a0 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 63 6c 72 54 79 70 65 20 41 73 20 54 79 70 65 ion.Escape(ByVal.clrType.As.Type
725c0 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 ).As.String..........Return.Esca
725e0 70 65 28 63 6c 72 54 79 70 65 2c 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 pe(clrType,.FullyQualifySystemTy
72600 70 65 73 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 pes)......End.Function........''
72620 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 '.<summary>......'''.Returns.the
72640 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 20 6f 62 6a 65 63 74 20 66 6f 72 6d 61 74 74 .name.of.the.Type.object.formatt
72660 65 64 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 63 6f ed.for......'''.use.in.source.co
72680 64 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 de.......'''.</summary>......Pub
726a0 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 63 6c 72 54 79 70 lic.Function.Escape(ByVal.clrTyp
726c0 65 20 41 73 20 54 79 70 65 2c 20 42 79 56 61 6c 20 66 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 e.As.Type,.ByVal.fullyQualifySys
726e0 74 65 6d 54 79 70 65 73 20 41 73 20 42 6f 6f 6c 65 61 6e 29 20 41 73 20 53 74 72 69 6e 67 0d 0a temTypes.As.Boolean).As.String..
72700 20 20 20 20 20 20 20 20 49 66 20 63 6c 72 54 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 ........If.clrType.Is.Nothing.Th
72720 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a en..............Return.Nothing..
72740 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 ........End.If............Dim.ty
72760 70 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 66 75 6c peName.As.String..........If.ful
72780 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 54 68 65 6e 0d 0a 20 20 20 20 20 lyQualifySystemTypes.Then.......
727a0 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 63 6c 72 54 79 70 65 2e 49 73 41 72 72 61 79 29 20 54 .......If(Not.clrType.IsArray).T
727c0 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 hen..................typeName.=.
727e0 63 6c 72 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6c clrType.FullName..............El
72800 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 63 se..................typeName.=.c
72820 6c 72 54 79 70 65 2e 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 29 2e 46 75 6c 6c 4e 61 6d 65 lrType.GetElementType().FullName
72840 20 26 20 22 28 29 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 .&."()"..............End.If.....
72860 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 22 47 6c 6f 62 61 6c 2e 22 20 ...........typeName.=."Global.".
72880 26 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 &.typeName..........Else........
728a0 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 5f 63 6f 64 65 2e 47 65 74 54 79 70 65 4f 75 ......typeName.=._code.GetTypeOu
728c0 74 70 75 74 28 4e 65 77 20 43 6f 64 65 54 79 70 65 52 65 66 65 72 65 6e 63 65 28 63 6c 72 54 79 tput(New.CodeTypeReference(clrTy
728e0 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 pe))..........End.If..........Re
72900 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d turn.typeName......End.Function.
72920 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 .......'''.<summary>......'''.Re
72940 74 75 72 6e 73 20 74 68 65 20 61 62 73 74 72 61 63 74 20 6f 70 74 69 6f 6e 20 69 66 20 74 68 65 turns.the.abstract.option.if.the
72960 20 65 6e 74 69 74 79 20 69 73 20 41 62 73 74 72 61 63 74 2c 20 6f 74 68 65 72 77 69 73 65 20 72 .entity.is.Abstract,.otherwise.r
72980 65 74 75 72 6e 73 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 eturns.String.Empty......'''.</s
729a0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 4d 75 73 ummary>......Public.Function.Mus
729c0 74 49 6e 68 65 72 69 74 4f 70 74 69 6f 6e 28 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 tInheritOption(entity.As.EntityT
729e0 79 70 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 6e 74 69 74 ype).As.String..........If.entit
72a00 79 2e 41 62 73 74 72 61 63 74 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 y.Abstract.Then..............Ret
72a20 75 72 6e 20 22 4d 75 73 74 49 6e 68 65 72 69 74 22 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 urn."MustInherit"..........End.I
72a40 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 f............Return.String.Empty
72a60 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 ......End.Function........'''.<s
72a80 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 70 61 73 ummary>......'''.Returns.the.pas
72aa0 73 65 64 20 69 6e 20 69 64 65 6e 74 69 66 69 65 72 20 77 69 74 68 20 74 68 65 20 66 69 72 73 74 sed.in.identifier.with.the.first
72ac0 20 6c 65 74 74 65 72 20 63 68 61 6e 67 65 64 20 74 6f 20 6c 6f 77 65 72 63 61 73 65 0d 0a 20 20 .letter.changed.to.lowercase....
72ae0 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e ..'''.</summary>......Public.Fun
72b00 63 74 69 6f 6e 20 43 61 6d 65 6c 43 61 73 65 28 42 79 56 61 6c 20 69 64 65 6e 74 69 66 69 65 72 ction.CamelCase(ByVal.identifier
72b20 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 .As.String).As.String..........I
72b40 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 69 64 65 6e 74 69 66 69 65 f.String.IsNullOrEmpty(identifie
72b60 72 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 64 65 6e r).Then..............Return.iden
72b80 74 69 66 69 65 72 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 tifier..........End.If..........
72ba0 20 20 49 66 20 69 64 65 6e 74 69 66 69 65 72 2e 4c 65 6e 67 74 68 20 3d 20 31 20 54 68 65 6e 0d ..If.identifier.Length.=.1.Then.
72bc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 28 30 .............Return.identifier(0
72be0 29 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 ).ToString(CultureInfo.Invariant
72c00 43 75 6c 74 75 72 65 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 0d 0a 20 20 20 Culture).ToLowerInvariant().....
72c20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 64 .....End.If............Return.id
72c40 65 6e 74 69 66 69 65 72 28 30 29 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f entifier(0).ToString(CultureInfo
72c60 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 72 69 .InvariantCulture).ToLowerInvari
72c80 61 6e 74 28 29 20 2b 20 69 64 65 6e 74 69 66 69 65 72 2e 53 75 62 73 74 72 69 6e 67 28 31 29 0d ant().+.identifier.Substring(1).
72ca0 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
72cc0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 mmary>......'''.If.the.value.par
72ce0 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 ameter.is.null.or.empty.an.empty
72d00 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 .string.is.returned,......'''.ot
72d20 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 61 20 73 herwise.it.retuns.value.with.a.s
72d40 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 ingle.space.concatenated.on.the.
72d60 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 end.......'''.</summary>......Pu
72d80 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 70 61 63 65 41 66 74 65 72 28 42 79 56 61 6c 20 76 blic.Function.SpaceAfter(ByVal.v
72da0 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 alue.As.String).As.String.......
72dc0 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 41 66 74 65 72 28 76 61 6c 75 65 2c 20 22 20 22 ...Return.StringAfter(value,."."
72de0 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c )......End.Function........'''.<
72e00 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 summary>......'''.If.the.value.p
72e20 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 arameter.is.null.or.empty.an.emp
72e40 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 27 27 27 20 ty.string.is.returned,......'''.
72e60 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 61 otherwise.it.retuns.value.with.a
72e80 20 73 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 .single.space.concatenated.on.th
72ea0 65 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 e.end.......'''.</summary>......
72ec0 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 70 61 63 65 42 65 66 6f 72 65 28 42 79 56 61 Public.Function.SpaceBefore(ByVa
72ee0 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 l.value.As.String).As.String....
72f00 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 20 22 2c 20 76 ......Return.StringBefore(".",.v
72f20 61 6c 75 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 alue)......End.Function........'
72f40 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 20 74 68 65 20 76 61 6c ''.<summary>......'''.If.the.val
72f60 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e ue.parameter.is.null.or.empty.an
72f80 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 .empty.string.is.returned,......
72fa0 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 '''.otherwise.it.retuns.value.wi
72fc0 74 68 20 61 70 70 65 6e 64 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e th.append.concatenated.on.the.en
72fe0 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c d.......'''.</summary>......Publ
73000 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 74 72 69 6e 67 41 66 74 65 72 28 42 79 56 61 6c 20 76 61 ic.Function.StringAfter(ByVal.va
73020 6c 75 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 61 70 70 65 6e 64 20 41 73 20 53 lue.As.String,.ByVal.append.As.S
73040 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 tring).As.String..........If.Str
73060 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 76 61 6c 75 65 29 20 54 68 65 6e 0d 0a 20 ing.IsNullOrEmpty(value).Then...
73080 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a ...........Return.String.Empty..
730a0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ........End.If............Return
730c0 20 76 61 6c 75 65 20 2b 20 61 70 70 65 6e 64 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f .value.+.append......End.Functio
730e0 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 n........'''.<summary>......'''.
73100 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f If.the.value.parameter.is.null.o
73120 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 r.empty.an.empty.string.is.retur
73140 6e 65 64 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e ned,......'''.otherwise.it.retun
73160 73 20 76 61 6c 75 65 20 77 69 74 68 20 70 72 65 70 65 6e 64 20 63 6f 6e 63 61 74 65 6e 61 74 65 s.value.with.prepend.concatenate
73180 64 20 6f 6e 20 74 68 65 20 66 72 6f 6e 74 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 d.on.the.front.......'''.</summa
731a0 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 74 72 69 6e 67 42 ry>......Public.Function.StringB
731c0 65 66 6f 72 65 28 42 79 56 61 6c 20 70 72 65 70 65 6e 64 20 41 73 20 53 74 72 69 6e 67 2c 20 42 efore(ByVal.prepend.As.String,.B
731e0 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d yVal.value.As.String).As.String.
73200 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 .........If.String.IsNullOrEmpty
73220 28 76 61 6c 75 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e (value).Then..............Return
73240 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d .String.Empty..........End.If...
73260 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 72 65 70 65 6e 64 20 2b 20 76 61 6c 75 65 0d .........Return.prepend.+.value.
73280 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
732a0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e mmary>......'''.Returns.false.an
732c0 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 d.shows.an.error.if.the.supplied
732e0 20 74 79 70 65 20 6e 61 6d 65 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 .type.names.aren't.case-insensit
73300 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 ively.unique,......'''.otherwise
73320 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 .returns.true.......'''.</summar
73340 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 56 65 72 69 66 79 43 61 y>......Public.Function.VerifyCa
73360 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 28 74 79 70 65 seInsensitiveTypeUniqueness(type
73380 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 2c 20 42 79 56 s.As.IEnumerable(Of.String),.ByV
733a0 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c al.sourceFile.As.String).As.Bool
733c0 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e ean..........Return.VerifyCaseIn
733e0 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 74 79 70 65 73 2c 20 5f 0d 0a 20 20 sensitiveUniqueness(types,._....
73400 20 20 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 28 74 29 20 53 74 72 69 6e 67 2e 46 6f 72 ..........Function(t).String.For
73420 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 mat(CultureInfo.CurrentCulture,.
73440 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 GetResourceString("Template_Case
73460 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 43 6f 6e 66 6c 69 63 74 22 29 2c 20 74 29 2c 20 73 InsensitiveTypeConflict"),.t),.s
73480 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a ourceFile)......End.Function....
734a0 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 ....'''.<summary>......'''.Retur
734c0 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 ns.false.and.shows.an.error.if.t
734e0 68 65 20 73 75 70 70 6c 69 65 64 20 65 6e 74 69 74 79 20 73 65 74 20 6e 61 6d 65 73 20 61 72 65 he.supplied.entity.set.names.are
73500 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a n't.case-insensitively.unique,..
73520 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d ....'''.otherwise.returns.true..
73540 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
73560 46 75 6e 63 74 69 6f 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 45 6e Function.VerifyCaseInsensitiveEn
73580 74 69 74 79 53 65 74 55 6e 69 71 75 65 6e 65 73 73 28 65 6e 74 69 74 79 53 65 74 73 20 41 73 20 titySetUniqueness(entitySets.As.
735a0 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 2c 20 42 79 56 61 6c 20 65 6e IEnumerable(Of.String),.ByVal.en
735c0 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 tityContainerName.As.String,.ByV
735e0 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c al.sourceFile.As.String).As.Bool
73600 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e ean..........Return.VerifyCaseIn
73620 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 65 6e 74 69 74 79 53 65 74 73 2c 20 sensitiveUniqueness(entitySets,.
73640 46 75 6e 63 74 69 6f 6e 28 65 29 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 Function(e).String.Format(Cultur
73660 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 eInfo.CurrentCulture,._.........
73680 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 .........GetResourceString("Temp
736a0 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 45 6e 74 69 74 79 53 65 74 43 6f 6e late_CaseInsensitiveEntitySetCon
736c0 66 6c 69 63 74 22 29 2c 20 65 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 4e 61 6d 65 2c 20 65 29 flict"),.entityContainerName,.e)
736e0 2c 20 73 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d ,.sourceFile)......End.Function.
73700 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 .......'''.<summary>......'''.Re
73720 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 turns.false.and.shows.an.error.i
73740 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 74 79 70 65 20 6d 65 6d 62 65 72 73 20 6e 61 6d 65 f.the.supplied.type.members.name
73760 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 s.aren't.case-insensitively.uniq
73780 75 65 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 ue,......'''.otherwise.returns.t
737a0 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 rue.......'''.</summary>......Pu
737c0 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 blic.Function.VerifyCaseInsensit
737e0 69 76 65 4d 65 6d 62 65 72 55 6e 69 71 75 65 6e 65 73 73 28 6d 65 6d 62 65 72 73 20 41 73 20 49 iveMemberUniqueness(members.As.I
73800 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 2c 20 42 79 56 61 6c 20 64 65 63 Enumerable(Of.String),.ByVal.dec
73820 6c 61 72 69 6e 67 54 79 70 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 73 6f 75 72 laringType.As.String,.ByVal.sour
73840 63 65 46 69 6c 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 ceFile.As.String).As.Boolean....
73860 20 20 20 20 20 20 52 65 74 75 72 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 ......Return.VerifyCaseInsensiti
73880 76 65 55 6e 69 71 75 65 6e 65 73 73 28 6d 65 6d 62 65 72 73 2c 20 5f 0d 0a 20 20 20 20 20 20 20 veUniqueness(members,._.........
738a0 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 28 6d 29 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 .....Function(m).String.Format(C
738c0 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 5f 0d 0a 20 20 ultureInfo.CurrentCulture,._....
738e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 ..............GetResourceString(
73900 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 4d 65 6d 62 65 72 43 "Template_CaseInsensitiveMemberC
73920 6f 6e 66 6c 69 63 74 22 29 2c 20 64 65 63 6c 61 72 69 6e 67 54 79 70 65 2c 20 6d 29 2c 20 73 6f onflict"),.declaringType,.m),.so
73940 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 urceFile)......End.Function.....
73960 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e ...'''.<summary>......'''.Return
73980 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 68 s.false.and.shows.an.error.if.th
739a0 65 20 73 75 70 70 6c 69 65 64 20 73 74 72 69 6e 67 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 e.supplied.strings.aren't.case-i
739c0 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 nsensitively.unique,......'''.ot
739e0 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c herwise.returns.true.......'''.<
73a00 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 /summary>......Private.Function.
73a20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 VerifyCaseInsensitiveUniqueness(
73a40 69 74 65 6d 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 2c items.As.IEnumerable(Of.String),
73a60 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 20 41 73 20 46 75 6e 63 28 4f 66 20 53 74 72 69 6e 67 .formatMessage.As.Func(Of.String
73a80 2c 20 53 74 72 69 6e 67 29 2c 20 42 79 56 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 20 41 73 20 53 ,.String),.ByVal.sourceFile.As.S
73aa0 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 68 tring).As.Boolean..........Dim.h
73ac0 61 73 68 20 41 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 20 3d 20 4e 65 77 20 ash.As.HashSet(Of.String).=.New.
73ae0 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 HashSet(Of.String)(StringCompare
73b00 72 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 0d 0a 20 r.InvariantCultureIgnoreCase)...
73b20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 69 74 65 6d 20 41 73 20 53 74 72 69 6e 67 20 69 .......For.Each.item.As.String.i
73b40 6e 20 69 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 68 61 73 68 n.items..............If.Not.hash
73b60 2e 41 64 64 28 69 74 65 6d 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Add(item).Then.................
73b80 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 ._textTransformation.Errors.Add(
73ba0 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 New.System.CodeDom.Compiler.Comp
73bc0 69 6c 65 72 45 72 72 6f 72 28 73 6f 75 72 63 65 46 69 6c 65 2c 20 2d 31 2c 20 2d 31 2c 20 36 30 ilerError(sourceFile,.-1,.-1,.60
73be0 32 33 2c 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 28 69 74 65 6d 29 29 29 0d 0a 20 20 20 20 20 23,.formatMessage(item))).......
73c00 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 ...........Return.False.........
73c20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 .....End.If..........Next.......
73c40 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e ...Return.True......End.Function
73c60 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 ........'''.<summary>......'''.R
73c80 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 74 68 65 20 69 74 65 6d 73 20 69 6e eturns.the.names.of.the.items.in
73ca0 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 68 61 74 20 63 6f .the.supplied.collection.that.co
73cc0 72 72 65 73 70 6f 6e 64 20 74 6f 20 4f 2d 53 70 61 63 65 20 74 79 70 65 73 2e 0d 0a 20 20 20 20 rrespond.to.O-Space.types.......
73ce0 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 '''.</summary>......Public.Funct
73d00 69 6f 6e 20 47 65 74 41 6c 6c 47 6c 6f 62 61 6c 49 74 65 6d 73 28 42 79 56 61 6c 20 69 74 65 6d ion.GetAllGlobalItems(ByVal.item
73d20 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 Collection.As.EdmItemCollection)
73d40 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 .As.IEnumerable(Of.String)......
73d60 20 20 20 20 52 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 ....Return.itemCollection.GetIte
73d80 6d 73 28 4f 66 20 47 6c 6f 62 61 6c 49 74 65 6d 29 28 29 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 ms(Of.GlobalItem)()._...........
73da0 20 20 20 20 20 20 20 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 69 29 20 54 79 70 65 4f 66 ........Where(Function(i).TypeOf
73dc0 20 69 20 49 73 20 45 6e 74 69 74 79 54 79 70 65 20 4f 72 45 6c 73 65 20 54 79 70 65 4f 66 20 69 .i.Is.EntityType.OrElse.TypeOf.i
73de0 20 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 4f 72 45 6c 73 65 20 54 79 70 65 4f 66 20 69 20 .Is.ComplexType.OrElse.TypeOf.i.
73e00 49 73 20 45 6e 75 6d 54 79 70 65 20 4f 72 45 6c 73 65 20 54 79 70 65 4f 66 20 69 20 69 73 20 45 Is.EnumType.OrElse.TypeOf.i.is.E
73e20 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ntityContainer)._...............
73e40 20 20 20 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 67 29 20 47 65 74 47 6c 6f 62 61 6c ....Select(Function(g).GetGlobal
73e60 49 74 65 6d 4e 61 6d 65 28 67 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a ItemName(g))......End.Function..
73e80 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 ......'''.<summary>......'''.Ret
73ea0 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 47 6c urns.the.name.of.the.supplied.Gl
73ec0 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 obalItem.......'''.</summary>...
73ee0 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 47 6c 6f 62 61 6c 49 74 65 ...Private.Function.GetGlobalIte
73f00 6d 4e 61 6d 65 28 69 74 65 6d 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 20 41 73 20 53 74 72 mName(item.As.GlobalItem).As.Str
73f20 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 69 74 65 6d 20 49 73 20 45 ing..........If.TypeOf.item.Is.E
73f40 64 6d 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 dmType.Then..............Return.
73f60 43 54 79 70 65 28 69 74 65 6d 2c 20 45 64 6d 54 79 70 65 29 2e 4e 61 6d 65 0d 0a 20 20 20 20 20 CType(item,.EdmType).Name.......
73f80 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 ...Else..............Return.CTyp
73fa0 65 28 69 74 65 6d 2c 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 2e 4e 61 6d 65 0d 0a 20 e(item,.EntityContainer).Name...
73fc0 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d .......End.If......End.Function.
73fe0 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 .......'''.<summary>......'''.Re
74000 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 74 68 65 20 6d 65 6d 62 65 72 73 20 6f turns.the.names.of.the.members.o
74020 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 45 64 6d 54 79 70 65 2e 0d 0a 20 20 20 20 27 27 27 f.the.supplied.EdmType.......'''
74040 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e .</summary>......Public.Function
74060 20 47 65 74 41 6c 6c 44 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 28 65 64 6d 54 79 70 65 20 41 .GetAllDeclaredMembers(edmType.A
74080 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 s.EdmType).As.IEnumerable(Of.Str
740a0 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 ing)..........Dim.entity.As.Enti
740c0 74 79 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 45 6e 74 69 74 79 tyType.=.TryCast(edmType,.Entity
740e0 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 65 6e 74 69 74 79 20 49 73 20 Type)..........If.Not.entity.Is.
74100 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 64 65 Nothing.Then..............Dim.de
74120 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 claredMembers.As.IEnumerable(Of.
74140 45 64 6d 4d 65 6d 62 65 72 29 20 3d 20 65 6e 74 69 74 79 2e 4d 65 6d 62 65 72 73 2e 57 68 65 72 EdmMember).=.entity.Members.Wher
74160 65 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 e(Function(m).m.DeclaringType.Is
74180 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 64 65 63 61 6c 72 .entity)..............Dim.decalr
741a0 65 64 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 49 45 6e 75 6d 65 edNavigationProperties.As.IEnume
741c0 72 61 62 6c 65 28 4f 66 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 3d 20 65 rable(Of.NavigationProperty).=.e
741e0 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 ntity.NavigationProperties.Where
74200 28 46 75 6e 63 74 69 6f 6e 28 6e 29 20 6e 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 (Function(n).n.DeclaringType.Is.
74220 65 6e 74 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 64 65 entity)................Return.de
74240 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 2e 55 6e 69 6f 6e 28 64 65 63 61 6c 72 65 64 4e 61 76 69 claredMembers.Union(decalredNavi
74260 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 43 61 73 74 28 4f 66 20 45 64 6d 4d 65 6d 62 gationProperties.Cast(Of.EdmMemb
74280 65 72 29 28 29 29 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 er)()).Select(Function(m).m.Name
742a0 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d )..........End.If............Dim
742c0 20 73 74 72 75 63 74 75 72 61 6c 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 3d 20 .structural.As.StructuralType.=.
742e0 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 TryCast(edmType,.StructuralType)
74300 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 73 74 72 75 63 74 75 72 61 6c 20 49 73 20 4e ..........If.Not.structural.Is.N
74320 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 othing.Then..............Return.
74340 73 74 72 75 63 74 75 72 61 6c 2e 4d 65 6d 62 65 72 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f structural.Members.Where(Functio
74360 6e 28 6d 29 20 6d 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 73 74 72 75 63 74 75 72 n(m).m.DeclaringType.Is.structur
74380 61 6c 29 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 29 0d 0a al).Select(Function(m).m.Name)..
743a0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e ........End.If............Dim.en
743c0 75 6d 54 79 70 65 20 41 73 20 45 6e 75 6d 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d umType.As.EnumType.=.TryCast(edm
743e0 54 79 70 65 2c 20 45 6e 75 6d 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 Type,.EnumType)..........If.Not.
74400 65 6e 75 6d 54 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 enumType.Is.Nothing.Then........
74420 20 20 20 20 20 20 52 65 74 75 72 6e 20 65 6e 75 6d 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 53 65 ......Return.enumType.Members.Se
74440 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 lect(Function(m).m.Name)........
74460 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 6e 75 6d 65 ..End.If............Return.Enume
74480 72 61 62 6c 65 2e 45 6d 70 74 79 28 4f 66 20 53 74 72 69 6e 67 29 28 29 0d 0a 20 20 20 20 45 6e rable.Empty(Of.String)()......En
744a0 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d d.Function........'''.<summary>.
744c0 0a 20 20 20 20 27 27 27 20 52 65 74 75 6e 73 20 61 73 20 66 75 6c 6c 20 6f 66 20 61 20 6e 61 6d .....'''.Retuns.as.full.of.a.nam
744e0 65 20 61 73 20 70 6f 73 73 69 62 6c 65 2c 20 69 66 20 61 20 6e 61 6d 65 73 70 61 63 65 20 69 73 e.as.possible,.if.a.namespace.is
74500 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 27 27 27 20 74 68 65 20 6e 61 6d 65 73 70 61 63 65 .provided......'''.the.namespace
74520 20 61 6e 64 20 6e 61 6d 65 20 61 72 65 20 63 6f 6d 62 69 6e 65 64 20 77 69 74 68 20 61 20 70 65 .and.name.are.combined.with.a.pe
74540 72 69 6f 64 2c 20 6f 74 68 65 72 77 69 73 65 20 6a 75 73 74 0d 0a 20 20 20 20 27 27 27 20 74 68 riod,.otherwise.just......'''.th
74560 65 20 6e 61 6d 65 20 69 73 20 72 65 74 75 72 6e 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 e.name.is.returned.......'''.</s
74580 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 ummary>......Public.Function.Cre
745a0 61 74 65 46 75 6c 6c 4e 61 6d 65 28 42 79 56 61 6c 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 ateFullName(ByVal.namespaceName.
745c0 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 As.String,.ByVal.name.As.String)
745e0 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 .As.String..........If.String.Is
74600 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 20 54 68 65 6e 0d NullOrEmpty(namespaceName).Then.
74620 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6e 61 6d 65 0d 0a 20 20 20 20 20 20 .............Return.name........
74640 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 28 6e 61 6d 65 ..End.If............Return.(name
74660 73 70 61 63 65 4e 61 6d 65 20 26 20 22 2e 22 29 20 2b 20 6e 61 6d 65 0d 0a 20 20 20 20 45 6e 64 spaceName.&.".").+.name......End
74680 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
746a0 20 20 20 20 27 27 27 20 52 65 74 75 6e 73 20 61 20 6c 69 74 65 72 61 6c 20 72 65 70 72 65 73 65 ....'''.Retuns.a.literal.represe
746c0 6e 74 69 6e 67 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 76 61 6c 75 65 2e 0d 0a 20 20 20 20 27 nting.the.supplied.value.......'
746e0 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 ''.</summary>......Public.Functi
74700 6f 6e 20 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 on.CreateLiteral(ByVal.value.As.
74720 4f 62 6a 65 63 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 76 61 Object).As.String..........If.va
74740 6c 75 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 lue.Is.Nothing.Then.............
74760 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e .Return.String.Empty..........En
74780 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 54 79 70 65 d.If............Dim.type.As.Type
747a0 20 3d 20 76 61 6c 75 65 2e 47 65 74 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 .=.value.GetType()..........If.t
747c0 79 70 65 2e 49 73 45 6e 75 6d 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 ype.IsEnum.Then..............Ret
747e0 75 72 6e 20 28 74 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 20 26 20 22 2e 22 29 20 2b 20 76 61 6c 75 urn.(type.FullName.&.".").+.valu
74800 65 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 e.ToString()..........End.If....
74820 20 20 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 47 75 69 64 29 20 54 ......If.type.Is.GetType(Guid).T
74840 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 hen..............Return.String.F
74860 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 ormat(CultureInfo.InvariantCultu
74880 72 65 2c 20 22 4e 65 77 20 47 75 69 64 28 22 22 7b 30 7d 22 22 29 22 2c 20 44 69 72 65 63 74 43 re,."New.Guid(""{0}"")",.DirectC
748a0 61 73 74 28 76 61 6c 75 65 2c 20 47 75 69 64 29 2e 54 6f 53 74 72 69 6e 67 28 22 44 22 2c 20 43 ast(value,.Guid).ToString("D",.C
748c0 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 0d 0a 20 ultureInfo.InvariantCulture))...
748e0 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 44 61 .......ElseIf.type.Is.GetType(Da
74900 74 65 54 69 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e teTime).Then..............Return
74920 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 .String.Format(CultureInfo.Invar
74940 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 44 61 74 65 54 69 6d 65 28 7b 30 7d 2c 20 iantCulture,."New.DateTime({0},.
74960 44 61 74 65 54 69 6d 65 4b 69 6e 64 2e 55 6e 73 70 65 63 69 66 69 65 64 29 22 2c 20 44 69 72 65 DateTimeKind.Unspecified)",.Dire
74980 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 44 61 74 65 54 69 6d 65 29 2e 54 69 63 6b 73 29 0d 0a ctCast(value,.DateTime).Ticks)..
749a0 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 42 ........ElseIf.type.Is.GetType(B
749c0 79 74 65 28 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 61 72 72 yte()).Then..............Dim.arr
749e0 61 79 49 6e 69 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 53 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 ayInit.As.String.=.String.Join("
74a00 2c 20 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 42 79 74 65 28 29 29 2e 53 ,.",.DirectCast(value,.Byte()).S
74a20 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 62 29 20 62 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c elect(Function(b).b.ToString(Cul
74a40 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 2e 54 6f 41 72 tureInfo.InvariantCulture)).ToAr
74a60 72 61 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e ray())..............Return.Strin
74a80 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 g.Format(CultureInfo.InvariantCu
74aa0 6c 74 75 72 65 2c 20 22 4e 65 77 20 42 79 74 65 28 29 20 7b 7b 7b 30 7d 7d 7d 22 2c 20 61 72 72 lture,."New.Byte().{{{0}}}",.arr
74ac0 61 79 49 6e 69 74 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 20 49 73 20 ayInit)..........ElseIf.type.Is.
74ae0 47 65 74 54 79 70 65 28 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 29 20 54 68 65 6e 0d 0a 20 20 GetType(DateTimeOffset).Then....
74b00 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 64 74 6f 20 41 73 20 44 61 74 65 54 69 6d 65 4f 66 66 ..........Dim.dto.As.DateTimeOff
74b20 73 65 74 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 44 61 74 65 54 69 6d 65 set.=.DirectCast(value,.DateTime
74b40 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 Offset)..............Return.Stri
74b60 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 ng.Format(CultureInfo.InvariantC
74b80 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 28 7b 30 7d 2c ulture,."New.DateTimeOffset({0},
74ba0 20 4e 65 77 20 54 69 6d 65 53 70 61 6e 28 7b 31 7d 29 29 22 2c 20 64 74 6f 2e 54 69 63 6b 73 2c .New.TimeSpan({1}))",.dto.Ticks,
74bc0 20 64 74 6f 2e 4f 66 66 73 65 74 2e 54 69 63 6b 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 .dto.Offset.Ticks)..........Else
74be0 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 44 65 63 69 6d 61 6c 29 20 54 68 65 6e If.type.Is.GetType(Decimal).Then
74c00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d ..............Return.String.Form
74c20 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c at(CultureInfo.InvariantCulture,
74c40 20 22 7b 30 7d 44 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 44 65 63 69 6d ."{0}D",.DirectCast(value,.Decim
74c60 61 6c 29 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 al).ToString(CultureInfo.Invaria
74c80 6e 74 43 75 6c 74 75 72 65 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 ntCulture))..........ElseIf.type
74ca0 20 49 73 20 47 65 74 54 79 70 65 28 54 69 6d 65 53 70 61 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 .Is.GetType(TimeSpan).Then......
74cc0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c ........Return.String.Format(Cul
74ce0 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 tureInfo.InvariantCulture,."New.
74d00 54 69 6d 65 53 70 61 6e 28 7b 30 7d 29 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 65 TimeSpan({0})",.DirectCast(value
74d20 2c 20 54 69 6d 65 53 70 61 6e 29 2e 54 69 63 6b 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 ,.TimeSpan).Ticks)..........End.
74d40 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 78 70 72 65 73 73 69 6f 6e 20 41 73 20 If............Dim.expression.As.
74d60 43 6f 64 65 50 72 69 6d 69 74 69 76 65 45 78 70 72 65 73 73 69 6f 6e 20 3d 20 4e 65 77 20 43 6f CodePrimitiveExpression.=.New.Co
74d80 64 65 50 72 69 6d 69 74 69 76 65 45 78 70 72 65 73 73 69 6f 6e 28 76 61 6c 75 65 29 0d 0a 20 20 dePrimitiveExpression(value)....
74da0 20 20 20 20 20 20 44 69 6d 20 77 72 69 74 65 72 20 41 73 20 53 74 72 69 6e 67 57 72 69 74 65 72 ......Dim.writer.As.StringWriter
74dc0 20 3d 20 4e 65 77 20 53 74 72 69 6e 67 57 72 69 74 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 44 .=.New.StringWriter()..........D
74de0 69 6d 20 63 6f 64 65 20 41 73 20 56 42 43 6f 64 65 50 72 6f 76 69 64 65 72 20 3d 20 4e 65 77 20 im.code.As.VBCodeProvider.=.New.
74e00 56 42 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 63 6f 64 65 2e 47 VBCodeProvider()..........code.G
74e20 65 6e 65 72 61 74 65 43 6f 64 65 46 72 6f 6d 45 78 70 72 65 73 73 69 6f 6e 28 65 78 70 72 65 73 enerateCodeFromExpression(expres
74e40 73 69 6f 6e 2c 20 77 72 69 74 65 72 2c 20 4e 65 77 20 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 4f sion,.writer,.New.CodeGeneratorO
74e60 70 74 69 6f 6e 73 28 29 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 77 72 69 74 65 72 ptions())..........Return.writer
74e80 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d .ToString()......End.Function...
74ea0 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 .....'''.<summary>......'''.Retu
74ec0 72 6e 73 20 61 20 72 65 73 6f 75 72 63 65 20 73 74 72 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 53 rns.a.resource.string.from.the.S
74ee0 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 20 61 73 73 65 6d 62 6c ystem.Data.Entity.Design.assembl
74f00 79 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c y.......'''.</summary>......Publ
74f20 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 ic.Shared.Function.GetResourceSt
74f40 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 4f 70 74 ring(resourceName.As.String,.Opt
74f60 69 6f 6e 61 6c 20 63 75 6c 74 75 72 65 20 41 73 20 43 75 6c 74 75 72 65 49 6e 66 6f 20 3d 20 4e ional.culture.As.CultureInfo.=.N
74f80 6f 74 68 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 5f 72 othing).As.String..........If._r
74fa0 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a esourceManager.Is.Nothing.Then..
74fc0 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 3d 20 4e ............_resourceManager.=.N
74fe0 65 77 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 ew.System.Resources.ResourceMana
75000 67 65 72 28 22 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 22 2c ger("System.Data.Entity.Design",
75020 20 47 65 74 54 79 70 65 28 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 73 69 .GetType(System.Data.Entity.Desi
75040 67 6e 2e 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 gn.MetadataItemCollectionFactory
75060 29 2e 41 73 73 65 6d 62 6c 79 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 ).Assembly)..........End.If.....
75080 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 47 .......Return._resourceManager.G
750a0 65 74 53 74 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d 65 2c 20 63 75 6c 74 75 72 65 29 0d etString(resourceName,.culture).
750c0 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 53 68 61 72 65 64 20 50 72 .....End.Function......Shared.Pr
750e0 69 76 61 74 65 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 41 73 20 53 79 73 74 65 6d ivate._resourceManager.As.System
75100 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 0d 0a 0d 0a 20 20 .Resources.ResourceManager......
75120 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 ..Private.Const.ExternalTypeName
75140 41 74 74 72 69 62 75 74 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a AttributeName.As.String.=."http:
75160 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 //schemas.microsoft.com/ado/2006
75180 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 45 78 74 65 72 6e 61 6c 54 79 70 65 4e /04/codegeneration:ExternalTypeN
751a0 61 6d 65 22 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 ame"........'''.<summary>......'
751c0 27 27 20 47 65 74 73 20 74 68 65 20 65 6e 74 69 74 79 2c 20 63 6f 6d 70 6c 65 78 2c 20 6f 72 20 ''.Gets.the.entity,.complex,.or.
751e0 65 6e 75 6d 20 74 79 70 65 73 20 66 6f 72 20 77 68 69 63 68 20 63 6f 64 65 20 73 68 6f 75 6c 64 enum.types.for.which.code.should
75200 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 67 69 76 65 6e 20 69 74 65 .be.generated.from.the.given.ite
75220 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 27 27 27 20 41 6e 79 20 74 79 70 65 73 m.collection.......'''.Any.types
75240 20 66 6f 72 20 77 68 69 63 68 20 61 6e 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 .for.which.an.ExternalTypeName.a
75260 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 70 70 6c 69 65 64 20 69 6e 20 74 68 nnotation.has.been.applied.in.th
75280 65 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 0d 0a 20 20 20 20 27 27 27 20 6d 65 74 61 e.conceptual.model......'''.meta
752a0 64 61 74 61 20 28 43 53 44 4c 29 20 61 72 65 20 66 69 6c 74 65 72 65 64 20 6f 75 74 20 6f 66 20 data.(CSDL).are.filtered.out.of.
752c0 74 68 65 20 72 65 74 75 72 6e 65 64 20 6c 69 73 74 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 the.returned.list.......'''.</su
752e0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 74 79 70 65 70 61 72 61 6d 20 6e 61 6d 65 3d mmary>......'''.<typeparam.name=
75300 22 54 22 3e 54 68 65 20 74 79 70 65 20 6f 66 20 69 74 65 6d 20 74 6f 20 72 65 74 75 72 6e 2e 3c "T">The.type.of.item.to.return.<
75320 2f 74 79 70 65 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /typeparam>......'''.<param.name
75340 3d 22 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 3e 54 68 65 20 69 74 65 6d 20 63 6f 6c 6c 65 ="itemCollection">The.item.colle
75360 63 74 69 6f 6e 20 74 6f 20 6c 6f 6f 6b 20 69 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 ction.to.look.in.</param>......'
75380 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 69 74 65 6d 73 20 74 6f 20 67 65 6e 65 72 61 74 ''.<returns>The.items.to.generat
753a0 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f e.</returns>......Public.Functio
753c0 6e 20 47 65 74 49 74 65 6d 73 54 6f 47 65 6e 65 72 61 74 65 28 4f 66 20 54 20 41 73 20 47 6c 6f n.GetItemsToGenerate(Of.T.As.Glo
753e0 62 61 6c 49 74 65 6d 29 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 balItem)(itemCollection.As.ItemC
75400 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 54 29 0d ollection).As.IEnumerable(Of.T).
75420 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 .........Return.itemCollection.G
75440 65 74 49 74 65 6d 73 28 4f 66 20 54 29 28 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 69 etItems(Of.T)().Where(Function(i
75460 29 20 4e 6f 74 20 69 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 41 6e 79 28 46 ).Not.i.MetadataProperties.Any(F
75480 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 4e 61 6d 65 20 3d 20 45 78 74 65 72 6e 61 6c 54 79 70 65 unction(p).p.Name.=.ExternalType
754a0 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e NameAttributeName))......End.Fun
754c0 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ction........'''.<summary>......
754e0 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d '''.Returns.the.escaped.type.nam
75500 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 73 61 67 65 20 6f 66 20 e.to.use.for.the.given.usage.of.
75520 61 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a an.o-space.type..This.might.be..
75540 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 ....'''.an.external.type.name.if
75560 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e .the.ExternalTypeName.annotation
75580 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 .has.been.specified.in.the......
755a0 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 '''.conceptual.model.metadata.(C
755c0 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 SDL).......'''.</summary>......'
755e0 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 22 3e 54 68 65 20 6f ''.<param.name="typeUsage">The.o
75600 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 -space.type.usage.to.get.a.name.
75620 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 for.</param>......'''.<returns>T
75640 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a he.type.name.to.use.</returns>..
75660 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 ....Public.Function.GetTypeName(
75680 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 20 53 74 72 69 6e typeUsage.As.TypeUsage).As.Strin
756a0 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 66 28 74 79 70 65 55 73 61 67 65 20 49 g..........Return.If(typeUsage.I
756c0 73 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f 74 68 69 6e 67 2c 20 47 65 74 54 79 70 65 4e 61 6d 65 28 s.Nothing,.Nothing,.GetTypeName(
756e0 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c typeUsage.EdmType,._ef.IsNullabl
75700 65 28 74 79 70 65 55 73 61 67 65 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 3a 3d 20 e(typeUsage),.modelNamespace.:=.
75720 4e 6f 74 68 69 6e 67 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 Nothing))......End.Function.....
75740 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e ...'''.<summary>......'''.Return
75760 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 s.the.escaped.type.name.to.use.f
75780 6f 72 20 74 68 65 20 67 69 76 65 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 73 20 or.the.given.o-space.type..This.
757a0 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 might.be......'''.an.external.ty
757c0 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 pe.name.if.the.ExternalTypeName.
757e0 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e annotation.has.been.specified.in
75800 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d .the......'''.conceptual.model.m
75820 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 etadata.(CSDL).......'''.</summa
75840 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 ry>......'''.<param.name="edmTyp
75860 65 22 3e 54 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d e">The.o-space.type.to.get.a.nam
75880 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 75 72 6e 73 e.for.</param>......'''.<returns
758a0 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e >The.type.name.to.use.</returns>
758c0 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 54 79 70 65 4e 61 6d ......Public.Function.GetTypeNam
758e0 65 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 53 74 72 69 6e 67 0d e(edmType.As.EdmType).As.String.
75900 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 64 6d 54 .........Return.GetTypeName(edmT
75920 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3a 3d 20 4e 6f 74 68 69 6e 67 2c 20 6d 6f 64 65 ype,.isNullable.:=.Nothing,.mode
75940 6c 4e 61 6d 65 73 70 61 63 65 20 3a 3d 20 4e 6f 74 68 69 6e 67 29 0d 0a 20 20 20 20 45 6e 64 20 lNamespace.:=.Nothing)......End.
75960 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 Function........'''.<summary>...
75980 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 ...'''.Returns.the.escaped.type.
759a0 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 73 61 67 65 20 name.to.use.for.the.given.usage.
759c0 6f 66 20 61 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 of.an.o-space.type..This.might.b
759e0 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 e......'''.an.external.type.name
75a00 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 .if.the.ExternalTypeName.annotat
75a20 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 ion.has.been.specified.in.the...
75a40 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 ...'''.conceptual.model.metadata
75a60 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 .(CSDL).......'''.</summary>....
75a80 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 22 3e 54 68 ..'''.<param.name="typeUsage">Th
75aa0 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 20 74 6f 20 67 65 74 20 61 20 6e 61 e.o-space.type.usage.to.get.a.na
75ac0 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 me.for.</param>......'''.<param.
75ae0 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e 49 66 20 6e 6f 74 20 6e 75 6c name="modelNamespace">If.not.nul
75b00 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 70 61 63 65 20 64 6f 65 73 20 l.and.the.type's.namespace.does.
75b20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 63 65 2c 20 74 68 65 6e 20 61 not.match.this.namespace,.then.a
75b40 0d 0a 20 20 20 20 27 27 27 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 6e 61 6d 65 20 77 ......'''.fully.qualified.name.w
75b60 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 ill.be.returned.</param>......''
75b80 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e '.<returns>The.type.name.to.use.
75ba0 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </returns>......Public.Function.
75bc0 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 GetTypeName(typeUsage.As.TypeUsa
75be0 67 65 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 ge,.modelNamespace.As.String).As
75c00 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 66 28 74 79 70 65 55 .String..........Return.If(typeU
75c20 73 61 67 65 20 49 73 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f 74 68 69 6e 67 2c 20 47 65 74 54 79 70 sage.Is.Nothing,.Nothing,.GetTyp
75c40 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 5f 65 66 2e 49 73 4e eName(typeUsage.EdmType,._ef.IsN
75c60 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 65 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 ullable(typeUsage),.modelNamespa
75c80 63 65 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 ce))......End.Function........''
75ca0 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 '.<summary>......'''.Returns.the
75cc0 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 .escaped.type.name.to.use.for.th
75ce0 65 20 67 69 76 65 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 73 20 6d 69 67 68 74 e.given.o-space.type..This.might
75d00 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 .be......'''.an.external.type.na
75d20 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 me.if.the.ExternalTypeName.annot
75d40 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d ation.has.been.specified.in.the.
75d60 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 .....'''.conceptual.model.metada
75d80 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a ta.(CSDL).......'''.</summary>..
75da0 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 ....'''.<param.name="edmType">Th
75dc0 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 e.o-space.type.to.get.a.name.for
75de0 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 .</param>......'''.<param.name="
75e00 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 modelNamespace">If.not.null.and.
75e20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 the.type's.namespace.does.not.ma
75e40 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 tch.this.namespace,.then.a......
75e60 27 27 27 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 '''.fully.qualified.name.will.be
75e80 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 .returned.</param>......'''.<ret
75ea0 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 urns>The.type.name.to.use.</retu
75ec0 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 54 79 70 rns>......Public.Function.GetTyp
75ee0 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 2c 20 6d 6f 64 65 6c 4e eName(edmType.As.EdmType,.modelN
75f00 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 amespace.As.String).As.String...
75f20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 .......Return.GetTypeName(edmTyp
75f40 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3a 3d 20 4e 6f 74 68 69 6e 67 2c 20 6d 6f 64 65 6c 4e e,.isNullable.:=.Nothing,.modelN
75f60 61 6d 65 73 70 61 63 65 20 3a 3d 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 amespace.:=.modelNamespace).....
75f80 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 .End.Function........'''.<summar
75fa0 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 y>......'''.Returns.the.escaped.
75fc0 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 6f type.name.to.use.for.the.given.o
75fe0 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 -space.type..This.might.be......
76000 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 '''.an.external.type.name.if.the
76020 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 .ExternalTypeName.annotation.has
76040 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 .been.specified.in.the......'''.
76060 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 conceptual.model.metadata.(CSDL)
76080 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c .......'''.</summary>......'''.<
760a0 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 6f 2d 73 70 61 63 65 param.name="edmType">The.o-space
760c0 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e .type.to.get.a.name.for.</param>
760e0 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 69 73 4e 75 6c 6c 61 62 6c ......'''.<param.name="isNullabl
76100 65 22 3e 53 65 74 20 74 68 69 73 20 74 6f 20 74 72 75 65 20 66 6f 72 20 6e 75 6c 6c 61 62 6c 65 e">Set.this.to.true.for.nullable
76120 20 75 73 61 67 65 20 6f 66 20 74 68 69 73 20 74 79 70 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 .usage.of.this.type.</param>....
76140 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 ..'''.<param.name="modelNamespac
76160 65 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 e">If.not.null.and.the.type's.na
76180 6d 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 mespace.does.not.match.this.name
761a0 73 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 27 27 27 20 66 75 6c 6c 79 20 71 75 61 space,.then.a......'''.fully.qua
761c0 6c 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 lified.name.will.be.returned.</p
761e0 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 aram>......'''.<returns>The.type
76200 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 72 69 .name.to.use.</returns>......Pri
76220 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 vate.Function.GetTypeName(edmTyp
76240 65 20 41 73 20 45 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 20 41 73 20 53 79 73 74 e.As.EdmType,.isNullable.As.Syst
76260 65 6d 2e 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 42 6f 6f 6c 65 61 6e 29 2c 20 6d 6f 64 65 6c 4e 61 em.Nullable(Of.Boolean),.modelNa
76280 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 mespace.As.String).As.String....
762a0 20 20 20 20 20 20 49 66 20 65 64 6d 54 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e ......If.edmType.Is.Nothing.Then
762c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 ..............Return.Nothing....
762e0 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6c 6c ......End.If............Dim.coll
76300 65 63 74 69 6f 6e 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 43 6f ectionType.=.TryCast(edmType,.Co
76320 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 6c 6c 65 63 llectionType)..........If.collec
76340 74 69 6f 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 tionType.IsNot.Nothing.Then.....
76360 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 .........Return.String.Format(Cu
76380 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 49 43 6f ltureInfo.InvariantCulture,."ICo
763a0 6c 6c 65 63 74 69 6f 6e 28 20 4f 66 20 7b 30 7d 29 22 2c 20 47 65 74 54 79 70 65 4e 61 6d 65 28 llection(.Of.{0})",.GetTypeName(
763c0 63 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 2e 54 79 70 65 55 73 61 67 65 2c 20 6d 6f 64 65 6c 4e collectionType.TypeUsage,.modelN
763e0 61 6d 65 73 70 61 63 65 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 amespace))..........End.If......
76400 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 4e 61 6d 65 20 3d 20 49 66 28 45 73 63 61 70 65 28 65 ......Dim.typeName.=.If(Escape(e
76420 64 6d 54 79 70 65 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 dmType.MetadataProperties.Where(
76440 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 4e 61 6d 65 20 3d 20 45 78 74 65 72 6e 61 6c 54 79 70 Function(p).p.Name.=.ExternalTyp
76460 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 2e 5b 53 65 6c 65 63 74 5d 28 46 75 6e eNameAttributeName).[Select](Fun
76480 63 74 69 6f 6e 28 70 29 20 44 69 72 65 63 74 43 61 73 74 28 70 2e 56 61 6c 75 65 2c 20 53 74 72 ction(p).DirectCast(p.Value,.Str
764a0 69 6e 67 29 29 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 28 29 29 2c 20 28 49 66 28 6d 6f 64 ing)).FirstOrDefault()),.(If(mod
764c0 65 6c 4e 61 6d 65 73 70 61 63 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 elNamespace.IsNot.Nothing.AndAls
764e0 6f 20 65 64 6d 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3c 3e 20 6d 6f 64 65 6c o.edmType.NamespaceName.<>.model
76500 4e 61 6d 65 73 70 61 63 65 2c 20 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 45 73 63 61 70 65 Namespace,.CreateFullName(Escape
76520 4e 61 6d 65 73 70 61 63 65 28 65 64 6d 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 Namespace(edmType.NamespaceName)
76540 2c 20 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 29 29 2c 20 45 73 63 61 70 65 28 65 64 6d 54 79 ,.Escape(edmType)),.Escape(edmTy
76560 70 65 29 29 29 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 65 64 6d 54 pe))))............If.TypeOf.edmT
76580 79 70 65 20 49 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 ype.Is.StructuralType.Then......
765a0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 ........Return.typeName.........
765c0 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 65 64 6d .End.If............If.TypeOf.edm
765e0 54 79 70 65 20 49 73 20 53 69 6d 70 6c 65 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 Type.Is.SimpleType.Then.........
76600 20 20 20 20 20 44 69 6d 20 63 6c 72 54 79 70 65 20 3d 20 5f 65 66 2e 55 6e 64 65 72 6c 79 69 6e .....Dim.clrType.=._ef.Underlyin
76620 67 43 6c 72 54 79 70 65 28 65 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 gClrType(edmType)..............I
76640 66 20 4e 6f 74 20 28 54 79 70 65 4f 66 20 65 64 6d 54 79 70 65 20 49 73 20 45 6e 75 6d 54 79 70 f.Not.(TypeOf.edmType.Is.EnumTyp
76660 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d e).Then..................typeNam
76680 65 20 3d 20 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 e.=.Escape(clrType).............
766a0 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 66 .End.If................Return.If
766c0 28 63 6c 72 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 20 41 6e 64 41 6c 73 6f 20 69 73 4e (clrType.IsValueType.AndAlso.isN
766e0 75 6c 6c 61 62 6c 65 20 3d 20 54 72 75 65 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 ullable.=.True,.String.Format(Cu
76700 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 75 6c ltureInfo.InvariantCulture,."Nul
76720 6c 61 62 6c 65 28 4f 66 20 7b 30 7d 29 22 2c 20 74 79 70 65 4e 61 6d 65 29 2c 20 74 79 70 65 4e lable(Of.{0})",.typeName),.typeN
76740 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ame)..........End.If............
76760 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 74 79 70 Throw.New.ArgumentException("typ
76780 65 55 73 61 67 65 22 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 45 6e eUsage")......End.Function....En
767a0 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 d.Class....'''.<summary>..'''.Re
767c0 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6d 61 6b 69 6e 67 20 74 68 65 20 45 6e 74 69 74 79 20 sponsible.for.making.the.Entity.
767e0 46 72 61 6d 65 77 6f 72 6b 20 4d 65 74 61 64 61 74 61 20 6d 6f 72 65 0d 0a 27 27 27 20 61 63 63 Framework.Metadata.more..'''.acc
76800 65 73 73 69 62 6c 65 20 66 6f 72 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e 2e 0d 0a 27 27 essible.for.code.generation...''
76820 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 4d 65 74 61 64 '.</summary>..Public.Class.Metad
76840 61 74 61 54 6f 6f 6c 73 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f ataTools......Private.ReadOnly._
76860 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 textTransformation.As.DynamicTex
76880 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d tTransformation........'''.<summ
768a0 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 4d 65 74 ary>......'''.Initializes.an.Met
768c0 61 64 61 74 61 54 6f 6f 6c 73 20 49 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 adataTools.Instance.with.the....
768e0 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e ..'''.TextTransformation.(T4.gen
76900 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 erated.class).that.is.currently.
76920 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 running......'''.</summary>.....
76940 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 .Public.Sub.New(ByVal.textTransf
76960 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 ormation.As.Object)..........If.
76980 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 textTransformation.Is.Nothing.Th
769a0 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 en..............Throw.New.Argume
769c0 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 ntNullException("textTransformat
769e0 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 ion")..........End.If...........
76a00 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 ._textTransformation.=.DynamicTe
76a20 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e xtTransformation.Create(textTran
76a40 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 sformation)......End.Sub........
76a60 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 '''.<summary>......'''.This.meth
76a80 6f 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 43 4c 52 20 74 79 od.returns.the.underlying.CLR.ty
76aa0 70 65 20 6f 66 20 74 68 65 20 4f 2d 73 70 61 63 65 20 74 79 70 65 20 63 6f 72 72 65 73 70 6f 6e pe.of.the.O-space.type.correspon
76ac0 64 69 6e 67 20 74 6f 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 3c 70 61 72 61 6d 72 65 66 20 6e ding.to.the.supplied.<paramref.n
76ae0 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 22 2f 3e 0d 0a 20 20 20 20 27 27 27 20 4e 6f 74 65 20 ame="typeUsage"/>......'''.Note.
76b00 74 68 61 74 20 66 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d 65 61 6e 73 that.for.an.enum.type.this.means
76b20 20 74 68 61 74 20 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 6e 75 6d 20 .that.the.type.backing.the.enum.
76b40 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e 75 6d 20 74 will.be.returned,.not.the.enum.t
76b60 79 70 65 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d ype.itself.......'''.</summary>.
76b80 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 43 6c 72 54 79 70 65 28 74 79 70 .....Public.Function.ClrType(typ
76ba0 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 20 54 79 70 65 0d 0a 20 20 eUsage.As.TypeUsage).As.Type....
76bc0 20 20 20 20 20 20 52 65 74 75 72 6e 20 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 74 ......Return.UnderlyingClrType(t
76be0 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 ypeUsage.EdmType)......End.Funct
76c00 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
76c20 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 75 6e 64 65 72 6c '.This.method.returns.the.underl
76c40 79 69 6e 67 20 43 4c 52 20 74 79 70 65 20 6f 66 20 67 69 76 65 6e 20 74 68 65 20 4f 2d 73 70 61 ying.CLR.type.of.given.the.O-spa
76c60 63 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 27 27 27 20 4e 6f 74 65 20 74 68 61 74 20 66 6f 72 20 ce.type.......'''.Note.that.for.
76c80 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 an.enum.type.this.means.that.the
76ca0 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 6e 75 6d 20 77 69 6c 6c 20 62 65 20 72 .type.backing.the.enum.will.be.r
76cc0 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e 75 6d 20 74 79 70 65 20 69 74 73 65 6c eturned,.not.the.enum.type.itsel
76ce0 66 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c f.......'''.</summary>......Publ
76d00 69 63 20 46 75 6e 63 74 69 6f 6e 20 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 65 64 ic.Function.UnderlyingClrType(ed
76d20 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 54 79 70 65 0d 0a 20 20 20 20 20 mType.As.EdmType).As.Type.......
76d40 20 20 20 44 69 6d 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 ...Dim.primitiveType.=.TryCast(e
76d60 64 6d 54 79 70 65 2c 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 dmType,.PrimitiveType)..........
76d80 49 66 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 If.primitiveType.IsNot.Nothing.T
76da0 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 72 69 6d 69 74 69 76 hen..............Return.primitiv
76dc0 65 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 0d 0a 20 20 20 20 20 20 20 eType.ClrEquivalentType.........
76de0 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e 75 6d 54 79 70 65 20 .End.If............Dim.enumType.
76e00 3d 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 45 6e 75 6d 54 79 70 65 29 0d 0a 20 20 =.TryCast(edmType,.EnumType)....
76e20 20 20 20 20 20 20 49 66 20 65 6e 75 6d 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 ......If.enumType.IsNot.Nothing.
76e40 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 65 6e 75 6d 54 79 70 Then..............Return.enumTyp
76e60 65 2e 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 e.UnderlyingType.ClrEquivalentTy
76e80 70 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 pe..........End.If............Re
76ea0 74 75 72 6e 20 47 65 74 54 79 70 65 28 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 turn.GetType(Object)......End.Fu
76ec0 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 nction........'''.<summary>.....
76ee0 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 73 20 .'''.True.if.the.EdmProperty.is.
76f00 61 20 6b 65 79 20 6f 66 20 69 74 73 20 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2c 20 46 61 6c 73 a.key.of.its.DeclaringType,.Fals
76f20 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e e.otherwise.......'''.</summary>
76f40 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 4b 65 79 28 42 79 56 61 ......Public.Function.IsKey(ByVa
76f60 6c 20 65 64 6d 50 72 6f 70 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 41 73 20 42 6f 6f l.edmProp.As.EdmProperty).As.Boo
76f80 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 50 72 6f 70 20 49 73 4e 6f 74 20 4e lean..........If.edmProp.IsNot.N
76fa0 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 65 64 6d 50 72 6f 70 2e 44 65 63 6c 61 72 69 6e 67 othing.AndAlso.edmProp.Declaring
76fc0 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 20 42 75 69 6c 74 49 6e 54 79 Type.BuiltInTypeKind.=.BuiltInTy
76fe0 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 peKind.EntityType.Then..........
77000 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 65 64 6d 50 72 6f 70 2e 44 65 ....Return.DirectCast(edmProp.De
77020 63 6c 61 72 69 6e 67 54 79 70 65 2c 20 45 6e 74 69 74 79 54 79 70 65 29 2e 4b 65 79 4d 65 6d 62 claringType,.EntityType).KeyMemb
77040 65 72 73 2e 43 6f 6e 74 61 69 6e 73 28 65 64 6d 50 72 6f 70 29 0d 0a 20 20 20 20 20 20 20 20 45 ers.Contains(edmProp)..........E
77060 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 nd.If............Return.False...
77080 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ...End.Function........'''.<summ
770a0 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 6d 50 72 6f ary>......'''.True.if.the.EdmPro
770c0 70 65 72 74 79 20 54 79 70 65 55 73 61 67 65 20 69 73 20 4e 75 6c 6c 61 62 6c 65 2c 20 46 61 6c perty.TypeUsage.is.Nullable,.Fal
770e0 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 se.otherwise.......'''.</summary
77100 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 4e 75 6c 6c 61 62 6c >......Public.Function.IsNullabl
77120 65 28 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 e(ByVal.edmProp.As.EdmProperty).
77140 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 65 64 6d 50 72 As.Boolean..........Return.edmPr
77160 6f 70 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 49 73 4e 75 6c 6c 61 op.IsNot.Nothing.AndAlso.IsNulla
77180 62 6c 65 28 65 64 6d 50 72 6f 70 2e 54 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 45 6e 64 20 ble(edmProp.TypeUsage)......End.
771a0 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 Function........'''.<summary>...
771c0 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 20 69 73 20 ...'''.True.if.the.TypeUsage.is.
771e0 4e 75 6c 6c 61 62 6c 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 Nullable,.False.otherwise.......
77200 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 '''.</summary>......Public.Funct
77220 69 6f 6e 20 49 73 4e 75 6c 6c 61 62 6c 65 28 42 79 56 61 6c 20 74 79 70 65 55 73 61 67 65 20 41 ion.IsNullable(ByVal.typeUsage.A
77240 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 s.TypeUsage).As.Boolean.........
77260 20 44 69 6d 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 20 41 73 20 46 61 63 65 74 20 3d 20 4e 6f .Dim.nullableFacet.As.Facet.=.No
77280 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 55 73 61 67 65 20 49 73 4e 6f thing..........If.typeUsage.IsNo
772a0 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 74 79 70 65 55 73 61 67 65 2e 46 61 63 65 t.Nothing.AndAlso.typeUsage.Face
772c0 74 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 22 4e 75 6c 6c 61 62 6c 65 22 2c 20 54 72 75 65 2c ts.TryGetValue("Nullable",.True,
772e0 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 .nullableFacet).Then............
77300 20 20 52 65 74 75 72 6e 20 43 42 6f 6f 6c 28 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 2e 56 61 6c ..Return.CBool(nullableFacet.Val
77320 75 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 ue)..........End.If............R
77340 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d eturn.False......End.Function...
77360 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 20 74 .....'''.<summary>......'''.If.t
77380 68 65 20 70 61 73 73 65 64 20 69 6e 20 54 79 70 65 55 73 61 67 65 20 72 65 70 72 65 73 65 6e 74 he.passed.in.TypeUsage.represent
773a0 73 20 61 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 75 72 s.a.collection.this.method.retur
773c0 6e 73 20 66 69 6e 61 6c 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 27 27 27 20 74 79 70 65 20 6f ns.final.element......'''.type.o
773e0 66 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 f.the.collection,.otherwise.it.r
77400 65 74 75 72 6e 73 20 74 68 65 20 76 61 6c 75 65 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 eturns.the.value.passed.in......
77420 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 .'''.</summary>......Public.Func
77440 74 69 6f 6e 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 42 79 56 61 6c 20 74 79 70 65 55 73 tion.GetElementType(ByVal.typeUs
77460 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 20 54 79 70 65 55 73 61 67 65 0d 0a age.As.TypeUsage).As.TypeUsage..
77480 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 55 73 61 67 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 ........If.typeUsage.Is.Nothing.
774a0 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 Then..............Return.Nothing
774c0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 ..........End.If............If.T
774e0 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6c 6c 65 ypeOf.typeUsage.EdmType.Is.Colle
77500 63 74 69 6f 6e 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 ctionType.Then..............Retu
77520 72 6e 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 44 69 72 65 63 74 43 61 73 74 28 74 79 70 rn.GetElementType(DirectCast(typ
77540 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 2e eUsage.EdmType,.CollectionType).
77560 54 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 TypeUsage)..........Else........
77580 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 55 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 ......Return.typeUsage..........
775a0 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 End.If......End.Function........
775c0 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 '''.<summary>......'''.Returns.t
775e0 68 65 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 74 68 61 74 20 69 73 20 74 68 he.NavigationProperty.that.is.th
77600 65 20 6f 74 68 65 72 20 65 6e 64 20 6f 66 20 74 68 65 20 73 61 6d 65 20 61 73 73 6f 63 69 61 74 e.other.end.of.the.same.associat
77620 69 6f 6e 20 73 65 74 20 69 66 20 69 74 20 69 73 0d 0a 20 20 20 20 27 27 27 20 61 76 61 69 6c 61 ion.set.if.it.is......'''.availa
77640 62 6c 65 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d ble,.otherwise.it.returns.null..
77660 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
77680 46 75 6e 63 74 69 6f 6e 20 49 6e 76 65 72 73 65 28 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 Function.Inverse(ByVal.navProper
776a0 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 41 73 20 4e 61 76 ty.As.NavigationProperty).As.Nav
776c0 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 igationProperty..........If.navP
776e0 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 roperty.Is.Nothing.Then.........
77700 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 .....Return.Nothing..........End
77720 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 6f 45 6e 74 69 74 79 20 41 73 20 45 .If............Dim.toEntity.As.E
77740 6e 74 69 74 79 54 79 70 65 20 3d 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d ntityType.=.navProperty.ToEndMem
77760 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 ber.GetEntityType()..........Ret
77780 75 72 6e 20 74 6f 45 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 urn.toEntity.NavigationPropertie
777a0 73 2e 53 69 6e 67 6c 65 4f 72 44 65 66 61 75 6c 74 28 46 75 6e 63 74 69 6f 6e 28 6e 29 20 6e 2e s.SingleOrDefault(Function(n).n.
777c0 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 20 49 73 20 6e 61 76 50 72 6f 70 65 72 74 79 2e RelationshipType.Is.navProperty.
777e0 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 20 41 6e 64 41 6c 73 6f 20 6e 20 49 73 4e 6f 74 RelationshipType.AndAlso.n.IsNot
77800 20 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d .navProperty)......End.Function.
77820 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 69 .......'''.<summary>......'''.Gi
77840 76 65 6e 20 61 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 ven.a.property.on.the.dependent.
77860 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c end.of.a.referential.constraint,
77880 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 70 72 6f 70 65 .returns.the.corresponding.prope
778a0 72 74 79 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 2e 0d 0a 20 20 20 20 27 rty.on.the.principal.end.......'
778c0 27 27 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 ''.Requires:.The.association.has
778e0 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 61 6e 64 20 74 .a.referential.constraint,.and.t
77900 68 65 20 73 70 65 63 69 66 69 65 64 20 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 69 he.specified.dependentProperty.i
77920 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 70 72 6f 70 65 72 74 69 65 73 20 6f 6e 20 74 68 65 20 64 s.one.of.the.properties.on.the.d
77940 65 70 65 6e 64 65 6e 74 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 ependent.end.......'''.</summary
77960 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 43 6f 72 72 65 73 >......Public.Function.GetCorres
77980 70 6f 6e 64 69 6e 67 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 28 42 79 56 61 6c 20 6e pondingPrincipalProperty(ByVal.n
779a0 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 avProperty.As.NavigationProperty
779c0 2c 20 42 79 56 61 6c 20 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d ,.ByVal.dependentProperty.As.Edm
779e0 50 72 6f 70 65 72 74 79 29 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 Property).As.EdmProperty........
77a00 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e ..If.navProperty.Is.Nothing.Then
77a20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 ..............Throw.New.Argument
77a40 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 NullException("navProperty")....
77a60 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 64 65 70 65 6e ......End.If............If.depen
77a80 64 65 6e 74 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 dentProperty.Is.Nothing.Then....
77aa0 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c ..........Throw.New.ArgumentNull
77ac0 45 78 63 65 70 74 69 6f 6e 28 22 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 22 29 0d 0a Exception("dependentProperty")..
77ae0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 66 72 ........End.If............Dim.fr
77b00 6f 6d 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 omProperties.As.ReadOnlyMetadata
77b20 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 3d 20 47 65 74 Collection(Of.EdmProperty).=.Get
77b40 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 PrincipalProperties(navProperty)
77b60 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 6f 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 52 65 ..........Dim.toProperties.As.Re
77b80 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 adOnlyMetadataCollection(Of.EdmP
77ba0 72 6f 70 65 72 74 79 29 20 3d 20 47 65 74 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 roperty).=.GetDependentPropertie
77bc0 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 66 s(navProperty)..........Return.f
77be0 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 28 74 6f 50 72 6f 70 65 72 74 69 65 73 2e 49 6e 64 65 78 romProperties(toProperties.Index
77c00 4f 66 28 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 29 29 0d 0a 20 20 20 20 45 6e 64 20 Of(dependentProperty))......End.
77c20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 Function........'''.<summary>...
77c40 20 20 20 27 27 27 20 47 69 76 65 6e 20 61 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 70 ...'''.Given.a.property.on.the.p
77c60 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f rincipal.end.of.a.referential.co
77c80 6e 73 74 72 61 69 6e 74 2c 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 nstraint,.returns.the.correspond
77ca0 69 6e 67 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e ing.property.on.the.dependent.en
77cc0 64 2e 0d 0a 20 20 20 20 27 27 27 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 d.......'''.Requires:.The.associ
77ce0 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 ation.has.a.referential.constrai
77d00 6e 74 2c 20 61 6e 64 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 70 72 69 6e 63 69 70 61 6c 50 nt,.and.the.specified.principalP
77d20 72 6f 70 65 72 74 79 20 69 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 70 72 6f 70 65 72 74 69 65 73 roperty.is.one.of.the.properties
77d40 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 .on.the.principal.end.......'''.
77d60 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </summary>......Public.Function.
77d80 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 6e 67 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 GetCorrespondingDependentPropert
77da0 79 28 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f y(ByVal.navProperty.As.Navigatio
77dc0 6e 50 72 6f 70 65 72 74 79 2c 20 42 79 56 61 6c 20 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 nProperty,.ByVal.principalProper
77de0 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 ty.As.EdmProperty).As.EdmPropert
77e00 79 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 y..........If.navProperty.Is.Not
77e20 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 hing.Then..............Throw.New
77e40 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 .ArgumentNullException("navPrope
77e60 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 rty")..........End.If...........
77e80 20 49 66 20 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 .If.principalProperty.Is.Nothing
77ea0 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 .Then..............Throw.New.Arg
77ec0 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 70 72 69 6e 63 69 70 61 6c 50 72 6f umentNullException("principalPro
77ee0 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 perty")..........End.If.........
77f00 20 20 20 44 69 6d 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 52 65 61 64 4f 6e 6c ...Dim.fromProperties.As.ReadOnl
77f20 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 yMetadataCollection(Of.EdmProper
77f40 74 79 29 20 3d 20 47 65 74 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 ty).=.GetPrincipalProperties(nav
77f60 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 6f 50 72 6f 70 65 72 74 Property)..........Dim.toPropert
77f80 69 65 73 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f ies.As.ReadOnlyMetadataCollectio
77fa0 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 3d 20 47 65 74 44 65 70 65 6e 64 65 6e 74 n(Of.EdmProperty).=.GetDependent
77fc0 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 Properties(navProperty).........
77fe0 20 52 65 74 75 72 6e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 28 66 72 6f 6d 50 72 6f 70 65 72 74 .Return.toProperties(fromPropert
78000 69 65 73 2e 49 6e 64 65 78 4f 66 28 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 29 29 0d ies.IndexOf(principalProperty)).
78020 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
78040 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 63 6f 6c 6c 65 63 74 mmary>......'''.Gets.the.collect
78060 69 6f 6e 20 6f 66 20 70 72 6f 70 65 72 74 69 65 73 20 74 68 61 74 20 61 72 65 20 6f 6e 20 74 68 ion.of.properties.that.are.on.th
78080 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c e.principal.end.of.a.referential
780a0 20 63 6f 6e 73 74 72 61 69 6e 74 20 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 .constraint.for.the.specified.na
780c0 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 27 27 27 20 52 65 71 75 vigation.property.......'''.Requ
780e0 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 ires:.The.association.has.a.refe
78100 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 rential.constraint.......'''.</s
78120 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 ummary>......Public.Function.Get
78140 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 42 79 56 61 6c 20 6e 61 76 50 72 6f PrincipalProperties(ByVal.navPro
78160 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 41 73 20 perty.As.NavigationProperty).As.
78180 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 ReadOnlyMetadataCollection(Of.Ed
781a0 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 mProperty)..........If.navProper
781c0 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ty.Is.Nothing.Then..............
781e0 54 68 72 6f 77 20 4e 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(
78200 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a "navProperty")..........End.If..
78220 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 6e 61 76 50 ..........Return.DirectCast(navP
78240 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2c 20 41 73 73 6f 63 69 roperty.RelationshipType,.Associ
78260 61 74 69 6f 6e 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 ationType).ReferentialConstraint
78280 73 28 30 29 2e 46 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e s(0).FromProperties......End.Fun
782a0 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ction........'''.<summary>......
782c0 27 27 27 20 47 65 74 73 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 70 72 6f 70 65 '''.Gets.the.collection.of.prope
782e0 72 74 69 65 73 20 74 68 61 74 20 61 72 65 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 rties.that.are.on.the.dependent.
78300 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 end.of.a.referential.constraint.
78320 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 6f for.the.specified.navigation.pro
78340 70 65 72 74 79 2e 0d 0a 20 20 20 20 27 27 27 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 perty.......'''.Requires:.The.as
78360 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 sociation.has.a.referential.cons
78380 74 72 61 69 6e 74 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 traint.......'''.</summary>.....
783a0 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 44 65 70 65 6e 64 65 6e 74 50 72 6f .Public.Function.GetDependentPro
783c0 70 65 72 74 69 65 73 28 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 perties(ByVal.navProperty.As.Nav
783e0 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 igationProperty).As.ReadOnlyMeta
78400 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a dataCollection(Of.EdmProperty)..
78420 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e ........If.navProperty.Is.Nothin
78440 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 g.Then..............Throw.New.Ar
78460 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 gumentNullException("navProperty
78480 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 ")..........End.If............Re
784a0 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 turn.DirectCast(navProperty.Rela
784c0 74 69 6f 6e 73 68 69 70 54 79 70 65 2c 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 2e 52 tionshipType,.AssociationType).R
784e0 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 28 30 29 2e 54 6f 50 72 6f 70 65 eferentialConstraints(0).ToPrope
78500 72 74 69 65 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 rties......End.Function........'
78520 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 ''.<summary>......'''.True.if.th
78540 69 73 20 65 6e 74 69 74 79 20 74 79 70 65 20 72 65 71 75 69 72 65 73 20 74 68 65 20 48 61 6e 64 is.entity.type.requires.the.Hand
78560 6c 65 43 61 73 63 61 64 65 44 65 6c 65 74 65 20 6d 65 74 68 6f 64 20 64 65 66 69 6e 65 64 20 61 leCascadeDelete.method.defined.a
78580 6e 64 20 74 68 65 20 6d 65 74 68 6f 64 20 68 61 73 0d 0a 20 20 20 20 27 27 27 20 6e 6f 74 20 62 nd.the.method.has......'''.not.b
785a0 65 65 6e 20 64 65 66 69 6e 65 64 20 6f 6e 20 61 6e 79 20 62 61 73 65 20 74 79 70 65 0d 0a 20 20 een.defined.on.any.base.type....
785c0 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e ..'''.</summary>......Public.Fun
785e0 63 74 69 6f 6e 20 4e 65 65 64 73 48 61 6e 64 6c 65 43 61 73 63 61 64 65 44 65 6c 65 74 65 4d 65 ction.NeedsHandleCascadeDeleteMe
78600 74 68 6f 64 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 thod(itemCollection.As.ItemColle
78620 63 74 69 6f 6e 2c 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 29 20 41 73 20 ction,.entity.As.EntityType).As.
78640 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6e 65 65 64 73 4d 65 74 68 6f 64 Boolean..........Dim.needsMethod
78660 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c .As.Boolean.=.ContainsCascadeDel
78680 65 74 65 41 73 73 6f 63 69 61 74 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 65 eteAssociation(itemCollection,.e
786a0 6e 74 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 27 20 43 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 ntity)..........'.Check.to.make.
786c0 73 75 72 65 20 6e 6f 20 62 61 73 65 20 74 79 70 65 73 20 68 61 76 65 20 61 6c 72 65 61 64 79 20 sure.no.base.types.have.already.
786e0 64 65 63 6c 61 72 65 64 20 74 68 69 73 20 6d 65 74 68 6f 64 0d 0a 20 20 20 20 20 20 20 20 44 69 declared.this.method..........Di
78700 6d 20 62 61 73 65 54 79 70 65 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 54 72 79 43 61 m.baseType.As.EntityType.=.TryCa
78720 73 74 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 2c 20 45 6e 74 69 74 79 54 79 70 65 29 0d st(entity.BaseType,.EntityType).
78740 0a 20 20 20 20 20 20 20 20 57 68 69 6c 65 20 6e 65 65 64 73 4d 65 74 68 6f 64 20 41 6e 64 41 6c .........While.needsMethod.AndAl
78760 73 6f 20 62 61 73 65 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 so.baseType.IsNot.Nothing.......
78780 20 20 20 20 20 20 20 6e 65 65 64 73 4d 65 74 68 6f 64 20 3d 20 4e 6f 74 20 43 6f 6e 74 61 69 6e .......needsMethod.=.Not.Contain
787a0 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 61 74 69 6f 6e 28 69 74 65 6d 43 6f sCascadeDeleteAssociation(itemCo
787c0 6c 6c 65 63 74 69 6f 6e 2c 20 62 61 73 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 llection,.baseType).............
787e0 20 62 61 73 65 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 62 61 73 65 54 79 70 65 2e 42 61 73 .baseType.=.TryCast(baseType.Bas
78800 65 54 79 70 65 2c 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 eType,.EntityType)..........End.
78820 57 68 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6e 65 65 64 73 4d 65 74 68 6f While..........Return.needsMetho
78840 64 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c d......End.Function........'''.<
78860 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 69 73 20 65 summary>......'''.True.if.this.e
78880 6e 74 69 74 79 20 74 79 70 65 20 70 61 72 74 69 63 69 70 61 74 65 73 20 69 6e 20 61 6e 79 20 72 ntity.type.participates.in.any.r
788a0 65 6c 61 74 69 6f 6e 73 68 69 70 73 20 77 68 65 72 65 20 74 68 65 20 6f 74 68 65 72 20 65 6e 64 elationships.where.the.other.end
788c0 20 68 61 73 20 61 6e 20 4f 6e 44 65 6c 65 74 65 0d 0a 20 20 20 20 27 27 27 20 63 61 73 63 61 64 .has.an.OnDelete......'''.cascad
788e0 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2c 20 6f 72 20 69 66 20 69 74 20 69 73 20 74 68 e.delete.defined,.or.if.it.is.th
78900 65 20 64 65 70 65 6e 64 65 6e 74 20 69 6e 20 61 6e 79 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 e.dependent.in.any.identifying.r
78920 65 6c 61 74 69 6f 6e 73 68 69 70 73 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e elationships......'''.</summary>
78940 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 43 6f 6e 74 61 69 6e 73 43 ......Private.Function.ContainsC
78960 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 61 74 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c ascadeDeleteAssociation(itemColl
78980 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 65 6e 74 69 74 79 ection.As.ItemCollection,.entity
789a0 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 .As.EntityType).As.Boolean......
789c0 20 20 20 20 52 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 ....Return.itemCollection.GetIte
789e0 6d 73 28 4f 66 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 28 29 2e 57 68 65 72 65 28 46 ms(Of.AssociationType)().Where(F
78a00 75 6e 63 74 69 6f 6e 28 61 29 20 44 69 72 65 63 74 43 61 73 74 28 61 2e 41 73 73 6f 63 69 61 74 unction(a).DirectCast(a.Associat
78a20 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 30 29 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 ionEndMembers(0).TypeUsage.EdmTy
78a40 70 65 2c 20 52 65 66 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 65 20 49 73 20 65 6e 74 69 pe,.RefType).ElementType.Is.enti
78a60 74 79 20 41 6e 64 41 6c 73 6f 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 ty.AndAlso.IsCascadeDeletePrinci
78a80 70 61 6c 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 31 29 29 20 pal(a.AssociationEndMembers(1)).
78aa0 4f 72 45 6c 73 65 20 44 69 72 65 63 74 43 61 73 74 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 OrElse.DirectCast(a.AssociationE
78ac0 6e 64 4d 65 6d 62 65 72 73 28 31 29 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 ndMembers(1).TypeUsage.EdmType,.
78ae0 52 65 66 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 20 41 RefType).ElementType.Is.entity.A
78b00 6e 64 41 6c 73 6f 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 ndAlso.IsCascadeDeletePrincipal(
78b20 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 30 29 29 29 2e 41 6e 79 a.AssociationEndMembers(0))).Any
78b40 28 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 ()......End.Function........'''.
78b60 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 73 <summary>......'''.True.if.the.s
78b80 6f 75 72 63 65 20 65 6e 64 20 6f 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 ource.end.of.the.specified.navig
78ba0 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 ation.property.is.the.principal.
78bc0 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d in.an.identifying.relationship..
78be0 0a 20 20 20 20 27 27 27 20 6f 72 20 69 66 20 74 68 65 20 73 6f 75 72 63 65 20 65 6e 64 20 68 61 .....'''.or.if.the.source.end.ha
78c00 73 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2e 0d 0a 20 20 20 20 27 s.cascade.delete.defined.......'
78c20 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 ''.</summary>......Public.Functi
78c40 6f 6e 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 42 79 56 61 on.IsCascadeDeletePrincipal(ByVa
78c60 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 l.navProperty.As.NavigationPrope
78c80 72 74 79 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 rty).As.Boolean..........If.navP
78ca0 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 roperty.Is.Nothing.Then.........
78cc0 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 .....Throw.New.ArgumentNullExcep
78ce0 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 tion("navProperty")..........End
78d00 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 73 43 61 73 63 61 64 65 44 .If............Return.IsCascadeD
78d20 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 44 69 72 65 63 74 43 61 73 74 28 6e 61 76 50 72 6f eletePrincipal(DirectCast(navPro
78d40 70 65 72 74 79 2e 46 72 6f 6d 45 6e 64 4d 65 6d 62 65 72 2c 20 41 73 73 6f 63 69 61 74 69 6f 6e perty.FromEndMember,.Association
78d60 45 6e 64 4d 65 6d 62 65 72 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d EndMember))......End.Function...
78d80 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 .....'''.<summary>......'''.True
78da0 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e .if.the.specified.association.en
78dc0 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 d.is.the.principal.in.an.identif
78de0 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 27 27 27 20 6f 72 20 69 ying.relationship.......'''.or.i
78e00 66 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 68 61 73 20 63 61 73 63 61 64 f.the.association.end.has.cascad
78e20 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d e.delete.defined.......'''.</sum
78e40 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 43 61 73 mary>......Public.Function.IsCas
78e60 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 42 79 56 61 6c 20 61 73 73 6f 63 69 cadeDeletePrincipal(ByVal.associ
78e80 61 74 69 6f 6e 45 6e 64 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 ationEnd.As.AssociationEndMember
78ea0 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 61 73 73 6f 63 69 61 ).As.Boolean..........If.associa
78ec0 74 69 6f 6e 45 6e 64 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 tionEnd.Is.Nothing.Then.........
78ee0 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 .....Throw.New.ArgumentNullExcep
78f00 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 22 29 0d 0a 20 20 20 20 20 20 20 20 tion("associationEnd")..........
78f20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 61 73 73 6f 63 69 61 End.If............Return.associa
78f40 74 69 6f 6e 45 6e 64 2e 44 65 6c 65 74 65 42 65 68 61 76 69 6f 72 20 3d 20 4f 70 65 72 61 74 69 tionEnd.DeleteBehavior.=.Operati
78f60 6f 6e 41 63 74 69 6f 6e 2e 43 61 73 63 61 64 65 20 4f 72 45 6c 73 65 20 49 73 50 72 69 6e 63 69 onAction.Cascade.OrElse.IsPrinci
78f80 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 palEndOfIdentifyingRelationship(
78fa0 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f associationEnd)......End.Functio
78fc0 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 n........'''.<summary>......'''.
78fe0 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f True.if.the.specified.associatio
79000 6e 20 65 6e 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 69 6e 20 61 6e n.end.is.the.principal.end.in.an
79020 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 .identifying.relationship.......
79040 27 27 27 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e '''.In.order.to.be.an.identifyin
79060 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2c 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 g.relationship,.the.association.
79080 6d 75 73 74 20 68 61 76 65 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 must.have.a.referential.constrai
790a0 6e 74 20 77 68 65 72 65 20 61 6c 6c 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 70 72 nt.where.all.of.the.dependent.pr
790c0 6f 70 65 72 74 69 65 73 20 61 72 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 operties.are.part.of.the.depende
790e0 6e 74 20 74 79 70 65 27 73 20 70 72 69 6d 61 72 79 20 6b 65 79 2e 0d 0a 20 20 20 20 27 27 27 20 nt.type's.primary.key.......'''.
79100 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </summary>......Public.Function.
79120 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 IsPrincipalEndOfIdentifyingRelat
79140 69 6f 6e 73 68 69 70 28 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 20 41 73 20 ionship(ByVal.associationEnd.As.
79160 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 29 20 41 73 20 42 6f 6f 6c 65 61 6e AssociationEndMember).As.Boolean
79180 0d 0a 20 20 20 20 20 20 20 20 49 66 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 20 49 73 20 4e ..........If.associationEnd.Is.N
791a0 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e othing.Then..............Throw.N
791c0 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 69 ew.ArgumentNullException("associ
791e0 61 74 69 6f 6e 45 6e 64 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 ationEnd")..........End.If......
79200 20 20 20 20 20 20 44 69 6d 20 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 20 41 73 20 52 65 66 65 72 ......Dim.refConstraint.As.Refer
79220 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 61 73 entialConstraint.=.DirectCast(as
79240 73 6f 63 69 61 74 69 6f 6e 45 6e 64 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2c 20 41 73 73 6f sociationEnd.DeclaringType,.Asso
79260 63 69 61 74 69 6f 6e 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 ciationType).ReferentialConstrai
79280 6e 74 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 72 63 29 20 72 63 2e 46 72 6f 6d 52 6f nts.Where(Function(rc).rc.FromRo
792a0 6c 65 20 49 73 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 2e 53 69 6e 67 6c 65 4f 72 44 65 le.Is.associationEnd).SingleOrDe
792c0 66 61 75 6c 74 28 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 72 65 66 43 6f 6e 73 74 72 61 69 6e fault()..........If.refConstrain
792e0 74 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 t.IsNot.Nothing.Then............
79300 20 20 44 69 6d 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 72 65 66 ..Dim.entity.As.EntityType.=.ref
79320 43 6f 6e 73 74 72 61 69 6e 74 2e 54 6f 52 6f 6c 65 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 Constraint.ToRole.GetEntityType(
79340 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 20 72 65 66 43 6f 6e )..............Return.Not.refCon
79360 73 74 72 61 69 6e 74 2e 54 6f 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 straint.ToProperties.Where(Funct
79380 69 6f 6e 28 74 70 29 20 4e 6f 74 20 65 6e 74 69 74 79 2e 4b 65 79 4d 65 6d 62 65 72 73 2e 43 6f ion(tp).Not.entity.KeyMembers.Co
793a0 6e 74 61 69 6e 73 28 74 70 29 29 2e 41 6e 79 28 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 ntains(tp)).Any()..........End.I
793c0 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 f..........Return.False......End
793e0 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
79400 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 61 73 ....'''.True.if.the.specified.as
79420 73 6f 63 69 61 74 69 6f 6e 20 74 79 70 65 20 69 73 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 sociation.type.is.an.identifying
79440 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 27 27 27 20 49 6e 20 6f 72 64 65 72 .relationship.......'''.In.order
79460 20 74 6f 20 62 65 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 .to.be.an.identifying.relationsh
79480 69 70 2c 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 6d 75 73 74 20 68 61 76 65 20 61 20 ip,.the.association.must.have.a.
794a0 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 77 68 65 72 65 20 61 6c 6c referential.constraint.where.all
794c0 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 70 72 6f 70 65 72 74 69 65 73 20 61 72 65 .of.the.dependent.properties.are
794e0 20 70 61 72 74 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 74 79 70 65 27 73 20 70 72 .part.of.the.dependent.type's.pr
79500 69 6d 61 72 79 20 6b 65 79 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a imary.key.......'''.</summary>..
79520 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 49 64 65 6e 74 69 66 79 69 6e ....Public.Function.IsIdentifyin
79540 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 gRelationship(ByVal.association.
79560 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a As.AssociationType).As.Boolean..
79580 20 20 20 20 20 20 20 20 49 66 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e ........If.association.Is.Nothin
795a0 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 g.Then..............Throw.New.Ar
795c0 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e gumentNullException("association
795e0 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 ")..........End.If............Re
79600 74 75 72 6e 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 turn.IsPrincipalEndOfIdentifying
79620 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 Relationship(association.Associa
79640 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 30 29 29 20 4f 72 45 6c 73 65 20 49 73 50 72 69 6e tionEndMembers(0)).OrElse.IsPrin
79660 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 cipalEndOfIdentifyingRelationshi
79680 70 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 p(association.AssociationEndMemb
796a0 65 72 73 28 31 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 ers(1))......End.Function.......
796c0 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 72 65 71 75 69 72 65 73 .'''.<summary>......'''.requires
796e0 3a 20 66 69 72 73 74 54 79 70 65 20 69 73 20 6e 6f 74 20 6e 75 6c 6c 0d 0a 20 20 20 20 27 27 27 :.firstType.is.not.null......'''
79700 20 65 66 66 65 63 74 73 3a 20 69 66 20 73 65 63 6f 6e 64 54 79 70 65 20 69 73 20 61 6d 6f 6e 67 .effects:.if.secondType.is.among
79720 20 74 68 65 20 62 61 73 65 20 74 79 70 65 73 20 6f 66 20 74 68 65 20 66 69 72 73 74 54 79 70 65 .the.base.types.of.the.firstType
79740 2c 20 72 65 74 75 72 6e 20 74 72 75 65 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 ,.return.true,......'''.otherwis
79760 65 20 72 65 74 75 72 6e 73 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 27 27 27 20 77 68 65 6e 20 66 e.returns.false.......'''.when.f
79780 69 72 73 74 54 79 70 65 20 69 73 20 73 61 6d 65 20 61 73 20 74 68 65 20 73 65 63 6f 6e 64 54 79 irstType.is.same.as.the.secondTy
797a0 70 65 2c 20 72 65 74 75 72 6e 20 66 61 6c 73 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d pe,.return.false.......'''.</sum
797c0 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 53 75 62 mary>......Public.Function.IsSub
797e0 74 79 70 65 4f 66 28 42 79 56 61 6c 20 66 69 72 73 74 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 typeOf(ByVal.firstType.As.EdmTyp
79800 65 2c 20 42 79 56 61 6c 20 73 65 63 6f 6e 64 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 29 20 e,.ByVal.secondType.As.EdmType).
79820 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 73 65 63 6f 6e 64 54 79 70 As.Boolean..........If.secondTyp
79840 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 e.Is.Nothing.Then..............R
79860 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 eturn.False..........End.If.....
79880 20 20 20 20 20 20 20 27 20 77 61 6c 6b 20 75 70 20 66 69 72 73 74 54 79 70 65 20 68 69 65 72 61 .......'.walk.up.firstType.hiera
798a0 72 63 68 79 20 6c 69 73 74 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 20 41 73 20 45 64 6d 54 rchy.list..........Dim.t.As.EdmT
798c0 79 70 65 20 3d 20 66 69 72 73 74 54 79 70 65 2e 42 61 73 65 54 79 70 65 0d 0a 20 20 20 20 20 20 ype.=.firstType.BaseType........
798e0 20 20 57 68 69 6c 65 20 74 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 ..While.t.IsNot.Nothing.........
79900 20 20 20 20 20 49 66 20 74 2e 45 71 75 61 6c 73 28 73 65 63 6f 6e 64 54 79 70 65 29 20 54 68 65 .....If.t.Equals(secondType).The
79920 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a n..................Return.True..
79940 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ............End.If..............
79960 74 20 3d 20 74 2e 42 61 73 65 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 57 68 69 6c t.=.t.BaseType..........End.Whil
79980 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 e..........Return.False......End
799a0 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
799c0 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 73 75 62 74 79 70 65 20 6f 66 20 74 ....'''.Returns.the.subtype.of.t
799e0 68 65 20 45 6e 74 69 74 79 54 79 70 65 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 74 65 he.EntityType.in.the.current.ite
79a00 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d mCollection......'''.</summary>.
79a20 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 53 75 62 74 79 70 65 73 .....Public.Function.GetSubtypes
79a40 4f 66 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 2c 20 42 79 56 Of(ByVal.type.As.EntityType,.ByV
79a60 61 6c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 al.itemCollection.As.ItemCollect
79a80 69 6f 6e 2c 20 42 79 56 61 6c 20 69 6e 63 6c 75 64 65 41 62 73 74 72 61 63 74 54 79 70 65 73 20 ion,.ByVal.includeAbstractTypes.
79aa0 41 73 20 42 6f 6f 6c 65 61 6e 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 6e As.Boolean).As.IEnumerable(Of.En
79ac0 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 75 62 54 79 70 65 73 20 tityType)..........Dim.subTypes.
79ae0 41 73 20 4c 69 73 74 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 20 3d 20 4e 65 77 20 4c 69 73 As.List(Of.EntityType).=.New.Lis
79b00 74 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 t(Of.EntityType)..........If.typ
79b20 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 e.IsNot.Nothing.Then............
79b40 20 20 44 69 6d 20 74 79 70 65 73 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 45 6e 75 6d ..Dim.typesInCollection.As.IEnum
79b60 65 72 61 62 6c 65 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 20 3d 20 69 74 65 6d 43 6f 6c 6c erable(Of.EntityType).=.itemColl
79b80 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 28 29 ection.GetItems(Of.EntityType)()
79ba0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 74 79 70 65 49 6e 43 6f 6c ..............For.Each.typeInCol
79bc0 6c 65 63 74 69 6f 6e 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 49 6e 20 74 79 70 65 73 49 6e lection.As.EntityType.In.typesIn
79be0 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 74 Collection..................If.t
79c00 79 70 65 2e 45 71 75 61 6c 73 28 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 3d 20 46 ype.Equals(typeInCollection).=.F
79c20 61 6c 73 65 20 41 6e 64 41 6c 73 6f 20 4d 65 2e 49 73 53 75 62 74 79 70 65 4f 66 28 74 79 70 65 alse.AndAlso.Me.IsSubtypeOf(type
79c40 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 74 79 70 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 InCollection,.type).Then........
79c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 69 6e 63 6c 75 64 65 41 62 73 74 72 61 63 74 ..............If.includeAbstract
79c80 54 79 70 65 73 20 4f 72 45 6c 73 65 20 4e 6f 74 20 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f Types.OrElse.Not.typeInCollectio
79ca0 6e 2e 41 62 73 74 72 61 63 74 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 n.Abstract.Then.................
79cc0 20 20 20 20 20 20 20 20 20 73 75 62 54 79 70 65 73 2e 41 64 64 28 74 79 70 65 49 6e 43 6f 6c 6c .........subTypes.Add(typeInColl
79ce0 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 ection)......................End
79d00 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 .If..................End.If.....
79d20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 .........Next..........End.If...
79d40 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 73 75 62 54 79 70 65 73 0d 0a 20 20 20 20 45 6e 64 20 .......Return.subTypes......End.
79d60 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 Function........Public.Shared.Fu
79d80 6e 63 74 69 6f 6e 20 54 72 79 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 nction.TryGetStringMetadataPrope
79da0 72 74 79 53 65 74 74 69 6e 67 28 42 79 56 61 6c 20 69 74 65 6d 20 41 73 20 4d 65 74 61 64 61 74 rtySetting(ByVal.item.As.Metadat
79dc0 61 49 74 65 6d 2c 20 42 79 56 61 6c 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 20 41 73 20 53 74 72 aItem,.ByVal.propertyName.As.Str
79de0 69 6e 67 2c 20 42 79 52 65 66 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 ing,.ByRef.value.As.String).As.B
79e00 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 5b 70 72 6f 70 65 72 74 79 5d 20 41 oolean..........Dim.[property].A
79e20 73 20 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 20 3d 20 69 74 65 6d 2e 4d 65 74 61 64 61 s.MetadataProperty.=.item.Metada
79e40 74 61 50 72 6f 70 65 72 74 69 65 73 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 28 46 75 6e 63 taProperties.FirstOrDefault(Func
79e60 74 69 6f 6e 28 70 29 20 70 2e 4e 61 6d 65 20 3d 20 70 72 6f 70 65 72 74 79 4e 61 6d 65 29 0d 0a tion(p).p.Name.=.propertyName)..
79e80 20 20 20 20 20 20 20 20 49 66 20 5b 70 72 6f 70 65 72 74 79 5d 20 49 73 4e 6f 74 20 4e 6f 74 68 ........If.[property].IsNot.Noth
79ea0 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 20 3d 20 44 69 ing.Then..............value.=.Di
79ec0 72 65 63 74 43 61 73 74 28 5b 70 72 6f 70 65 72 74 79 5d 2e 56 61 6c 75 65 2c 20 53 74 72 69 6e rectCast([property].Value,.Strin
79ee0 67 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 g)..........End.If..........Retu
79f00 72 6e 20 76 61 6c 75 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 rn.value.IsNot.Nothing......End.
79f20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 Function....End.Class....'''.<su
79f40 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6c 6f 61 64 mmary>..'''.Responsible.for.load
79f60 69 6e 67 20 61 6e 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 61 20 ing.an.EdmItemCollection.from.a.
79f80 2e 65 64 6d 78 20 66 69 6c 65 20 6f 72 20 2e 63 73 64 6c 20 66 69 6c 65 73 0d 0a 27 27 27 20 3c .edmx.file.or..csdl.files..'''.<
79fa0 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 4d 65 74 61 64 61 74 61 /summary>..Public.Class.Metadata
79fc0 4c 6f 61 64 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 Loader......Private.ReadOnly._te
79fe0 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 xtTransformation.As.DynamicTextT
7a000 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 ransformation........'''.<summar
7a020 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 4d 65 74 61 64 y>......'''.Initializes.an.Metad
7a040 61 74 61 4c 6f 61 64 65 72 20 49 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 ataLoader.Instance.with.the.....
7a060 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 .'''.TextTransformation.(T4.gene
7a080 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 rated.class).that.is.currently.r
7a0a0 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 unning......'''.</summary>......
7a0c0 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f Public.Sub.New(ByVal.textTransfo
7a0e0 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 rmation.As.Object)..........If.t
7a100 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 extTransformation.Is.Nothing.The
7a120 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e n..............Throw.New.Argumen
7a140 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 tNullException("textTransformati
7a160 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 on")..........End.If............
7a180 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 _textTransformation.=.DynamicTex
7a1a0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 tTransformation.Create(textTrans
7a1c0 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 formation)......End.Sub........'
7a1e0 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 4c 6f 61 64 20 74 68 65 20 6d ''.<summary>......'''.Load.the.m
7a200 65 74 61 64 61 74 61 20 66 6f 72 20 45 64 6d 2c 20 53 74 6f 72 65 2c 20 61 6e 64 20 4d 61 70 70 etadata.for.Edm,.Store,.and.Mapp
7a220 69 6e 67 20 63 6f 6c 6c 65 63 74 69 6f 6e 73 20 61 6e 64 20 72 65 67 69 73 74 65 72 20 74 68 65 ing.collections.and.register.the
7a240 6d 0d 0a 20 20 20 20 27 27 27 20 77 69 74 68 20 61 20 6e 65 77 20 4d 65 74 61 64 61 74 61 57 6f m......'''.with.a.new.MetadataWo
7a260 72 6b 73 70 61 63 65 2c 20 72 65 74 75 72 6e 73 20 66 61 6c 73 65 20 69 66 20 61 6e 79 20 6f 66 rkspace,.returns.false.if.any.of
7a280 20 74 68 65 20 70 61 72 74 73 20 63 61 6e 27 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 63 72 65 .the.parts.can't.be......'''.cre
7a2a0 61 74 65 64 2c 20 73 6f 6d 65 20 6f 66 20 74 68 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ated,.some.of.the.ItemCollection
7a2c0 73 20 6d 61 79 20 62 65 20 72 65 67 69 73 74 65 72 65 64 20 61 6e 64 20 75 73 61 62 6c 65 20 65 s.may.be.registered.and.usable.e
7a2e0 76 65 6e 20 69 66 20 66 61 6c 73 65 20 69 73 0d 0a 20 20 20 20 27 27 27 20 72 65 74 75 72 6e 65 ven.if.false.is......'''.returne
7a300 64 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 d......'''.</summary>......Publi
7a320 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f 61 64 41 6c 6c 4d 65 74 61 64 61 74 61 28 42 79 c.Function.TryLoadAllMetadata(By
7a340 56 61 6c 20 69 6e 70 75 74 46 69 6c 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 6d Val.inputFile.As.String,.ByRef.m
7a360 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 20 41 73 20 4d 65 74 61 64 61 74 61 57 6f 72 6b etadataWorkspace.As.MetadataWork
7a380 73 70 61 63 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 6d 65 74 61 64 space).As.Boolean..........metad
7a3a0 61 74 61 57 6f 72 6b 73 70 61 63 65 20 3d 20 4e 65 77 20 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 ataWorkspace.=.New.MetadataWorks
7a3c0 70 61 63 65 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 64 6d 49 74 65 6d 43 6f 6c pace()............Dim.edmItemCol
7a3e0 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 lection.As.EdmItemCollection.=.C
7a400 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 reateEdmItemCollection(inputFile
7a420 29 0d 0a 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 )..........metadataWorkspace.Reg
7a440 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 isterItemCollection(edmItemColle
7a460 63 74 69 6f 6e 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 74 6f 72 65 49 74 65 6d 43 ction)............Dim.storeItemC
7a480 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ollection.As.StoreItemCollection
7a4a0 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 72 79 43 72 65 61 74 65 .=.Nothing..........If.TryCreate
7a4c0 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 2c 20 73 StoreItemCollection(inputFile,.s
7a4e0 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 toreItemCollection).Then........
7a500 20 20 20 20 20 20 44 69 6d 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c ......Dim.storageMappingItemColl
7a520 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c ection.As.StorageMappingItemColl
7a540 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 ection.=.Nothing..............If
7a560 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c .TryCreateStorageMappingItemColl
7a580 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 2c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 ection(inputFile,.edmItemCollect
7a5a0 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 61 67 ion,.storeItemCollection,.storag
7a5c0 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 eMappingItemCollection).Then....
7a5e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e ..............metadataWorkspace.
7a600 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 6f 72 65 49 74 65 6d RegisterItemCollection(storeItem
7a620 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 74 Collection)..................met
7a640 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 adataWorkspace.RegisterItemColle
7a660 63 74 69 6f 6e 28 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 ction(storageMappingItemCollecti
7a680 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 on)..................Return.True
7a6a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e ..............End.If..........En
7a6c0 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 d.If............Return.False....
7a6e0 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 ..End.Function........'''.<summa
7a700 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 65 61 74 65 20 61 6e 20 45 64 6d 49 74 65 6d 43 6f ry>......'''.Create.an.EdmItemCo
7a720 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 64 65 64 20 77 69 74 68 20 74 68 65 20 6d 65 74 61 64 61 74 llection.loaded.with.the.metadat
7a740 61 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a a.provided......'''.</summary>..
7a760 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 45 64 6d 49 74 65 ....Public.Function.CreateEdmIte
7a780 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 mCollection(ByVal.sourcePath.As.
7a7a0 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 50 61 72 61 6d 41 72 72 61 79 20 72 65 66 65 72 65 6e String,.ByVal.ParamArray.referen
7a7c0 63 65 53 63 68 65 6d 61 73 20 41 73 20 53 74 72 69 6e 67 28 29 29 20 41 73 20 45 64 6d 49 74 65 ceSchemas.As.String()).As.EdmIte
7a7e0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 64 6d 49 74 65 6d mCollection..........Dim.edmItem
7a800 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 Collection.As.EdmItemCollection.
7a820 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 72 79 43 72 65 61 74 65 45 =.Nothing..........If.TryCreateE
7a840 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 72 65 66 dmItemCollection(sourcePath,.ref
7a860 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e erenceSchemas,.edmItemCollection
7a880 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 65 64 6d 49 74 ).Then..............Return.edmIt
7a8a0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a emCollection..........End.If....
7a8c0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 ........Return.New.EdmItemCollec
7a8e0 74 69 6f 6e 28 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 tion()......End.Function........
7a900 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 74 74 65 6d 70 74 73 20 '''.<summary>......'''.Attempts.
7a920 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 to.create.a.EdmItemCollection.fr
7a940 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a om.the.specified.metadata.file..
7a960 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 ....'''.</summary>......Public.F
7a980 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 unction.TryCreateEdmItemCollecti
7a9a0 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 on(ByVal.sourcePath.As.String,.B
7a9c0 79 52 65 66 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 yRef.edmItemCollection.As.EdmIte
7a9e0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 mCollection).As.Boolean.........
7aa00 20 52 65 74 75 72 6e 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 .Return.TryCreateEdmItemCollecti
7aa20 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 4e 6f 74 68 69 6e 67 2c 20 65 64 6d 49 74 65 6d 43 on(sourcePath,.Nothing,.edmItemC
7aa40 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a ollection)......End.Function....
7aa60 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 74 74 65 6d ....'''.<summary>......'''.Attem
7aa80 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f pts.to.create.a.EdmItemCollectio
7aaa0 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 n.from.the.specified.metadata.fi
7aac0 6c 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c le......'''.</summary>......Publ
7aae0 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c ic.Function.TryCreateEdmItemColl
7ab00 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e ection(ByVal.sourcePath.As.Strin
7ab20 67 2c 20 42 79 56 61 6c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 41 73 20 53 74 72 g,.ByVal.referenceSchemas.As.Str
7ab40 69 6e 67 28 29 2c 20 42 79 52 65 66 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 ing(),.ByRef.edmItemCollection.A
7ab60 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d s.EdmItemCollection).As.Boolean.
7ab80 0a 20 20 20 20 20 20 20 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 .........edmItemCollection.=.Not
7aba0 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 hing............If.Not.ValidateI
7abc0 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 nputPath(sourcePath,._textTransf
7abe0 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 ormation).Then..............Retu
7ac00 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 rn.False..........End.If........
7ac20 20 20 20 20 49 66 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 49 73 20 4e 6f 74 68 69 ....If.referenceSchemas.Is.Nothi
7ac40 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 66 65 72 65 6e 63 65 53 63 ng.Then..............referenceSc
7ac60 68 65 6d 61 73 20 3d 20 4e 65 77 20 53 74 72 69 6e 67 28 2d 31 29 20 7b 7d 0d 0a 20 20 20 20 20 hemas.=.New.String(-1).{}.......
7ac80 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 74 65 6d 43 6f 6c ...End.If............Dim.itemCol
7aca0 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 lection.As.ItemCollection.=.Noth
7acc0 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 73 6f 75 72 63 65 50 61 74 68 20 3d 20 5f 74 65 78 74 54 ing..........sourcePath.=._textT
7ace0 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 ransformation.Host.ResolvePath(s
7ad00 6f 75 72 63 65 50 61 74 68 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6c 6c 65 63 74 69 ourcePath)..........Dim.collecti
7ad20 6f 6e 42 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 onBuilder.As.New.EdmItemCollecti
7ad40 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 72 onBuilder(_textTransformation,.r
7ad60 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 eferenceSchemas.Select(Function(
7ad80 73 29 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f s)._textTransformation.Host.Reso
7ada0 6c 76 65 50 61 74 68 28 73 29 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 73 29 20 73 20 lvePath(s)).Where(Function(s).s.
7adc0 3c 3e 20 73 6f 75 72 63 65 50 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 6c 6c <>.sourcePath))..........If.coll
7ade0 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 ectionBuilder.TryCreateItemColle
7ae00 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e ction(sourcePath,.itemCollection
7ae20 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 ).Then..............edmItemColle
7ae40 63 74 69 6f 6e 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ction.=.DirectCast(itemCollectio
7ae60 6e 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 45 n,.EdmItemCollection)..........E
7ae80 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 65 64 6d 49 74 65 6d 43 nd.If............Return.edmItemC
7aea0 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 ollection.IsNot.Nothing......End
7aec0 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
7aee0 20 20 20 20 27 27 27 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 53 74 6f ....'''.Attempts.to.create.a.Sto
7af00 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 reItemCollection.from.the.specif
7af20 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d ied.metadata.file......'''.</sum
7af40 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 mary>......Public.Function.TryCr
7af60 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f eateStoreItemCollection(ByVal.so
7af80 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 73 74 6f 72 65 49 urcePath.As.String,.ByRef.storeI
7afa0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 temCollection.As.StoreItemCollec
7afc0 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 73 74 6f 72 65 49 tion).As.Boolean..........storeI
7afe0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 temCollection.=.Nothing.........
7b000 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 ...If.Not.ValidateInputPath(sour
7b020 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 cePath,._textTransformation).The
7b040 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 n..............Return.False.....
7b060 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 74 65 6d 43 .....End.If............Dim.itemC
7b080 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f ollection.As.ItemCollection.=.No
7b0a0 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 thing..........Dim.collectionBui
7b0c0 6c 64 65 72 20 41 73 20 4e 65 77 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 lder.As.New.StoreItemCollectionB
7b0e0 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 uilder(_textTransformation).....
7b100 20 20 20 20 20 49 66 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 .....If.collectionBuilder.TryCre
7b120 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d ateItemCollection(_textTransform
7b140 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 ation.Host.ResolvePath(sourcePat
7b160 68 29 2c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 h),.itemCollection).Then........
7b180 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 44 69 72 65 ......storeItemCollection.=.Dire
7b1a0 63 74 43 61 73 74 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 53 74 6f 72 65 49 74 65 6d ctCast(itemCollection,.StoreItem
7b1c0 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 Collection)..........End.If.....
7b1e0 20 20 20 20 20 52 65 74 75 72 6e 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 .....Return.storeItemCollection.
7b200 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d IsNot.Nothing......End.Function.
7b220 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 74 .......'''.<summary>......'''.At
7b240 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e tempts.to.create.a.StorageMappin
7b260 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 gItemCollection.from.the.specifi
7b280 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 ed.metadata.file,.EdmItemCollect
7b2a0 69 6f 6e 2c 20 61 6e 64 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 ion,.and.StoreItemCollection....
7b2c0 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e ..'''.</summary>......Public.Fun
7b2e0 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 ction.TryCreateStorageMappingIte
7b300 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 mCollection(ByVal.sourcePath.As.
7b320 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 String,.ByVal.edmItemCollection.
7b340 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 42 79 56 61 6c 20 73 74 6f 72 As.EdmItemCollection,.ByVal.stor
7b360 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c eItemCollection.As.StoreItemColl
7b380 65 63 74 69 6f 6e 2c 20 42 79 52 65 66 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d ection,.ByRef.storageMappingItem
7b3a0 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d Collection.As.StorageMappingItem
7b3c0 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 Collection).As.Boolean..........
7b3e0 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e storageMappingItemCollection.=.N
7b400 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 othing............If.Not.Validat
7b420 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e eInputPath(sourcePath,._textTran
7b440 73 66 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 sformation).Then..............Re
7b460 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 turn.False..........End.If......
7b480 20 20 20 20 20 20 49 66 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 20 4e 6f ......If.edmItemCollection.Is.No
7b4a0 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 thing.Then..............Throw.Ne
7b4c0 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 65 64 6d 49 74 65 6d w.ArgumentNullException("edmItem
7b4e0 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a Collection")..........End.If....
7b500 20 20 20 20 20 20 20 20 49 66 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 ........If.storeItemCollection.I
7b520 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f s.Nothing.Then..............Thro
7b540 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 73 74 6f w.New.ArgumentNullException("sto
7b560 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 reItemCollection")..........End.
7b580 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e If............Dim.itemCollection
7b5a0 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 .As.ItemCollection.=.Nothing....
7b5c0 20 20 20 20 20 20 44 69 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 41 73 20 4e ......Dim.collectionBuilder.As.N
7b5e0 65 77 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 ew.StorageMappingItemCollectionB
7b600 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 65 64 6d 49 uilder(_textTransformation,.edmI
7b620 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 temCollection,.storeItemCollecti
7b640 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 on)..........If.collectionBuilde
7b660 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 65 78 74 54 r.TryCreateItemCollection(_textT
7b680 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 ransformation.Host.ResolvePath(s
7b6a0 6f 75 72 63 65 50 61 74 68 29 2c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 54 68 65 6e ourcePath),.itemCollection).Then
7b6c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d ..............storageMappingItem
7b6e0 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 69 74 65 6d 43 6f 6c 6c Collection.=.DirectCast(itemColl
7b700 65 63 74 69 6f 6e 2c 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 ection,.StorageMappingItemCollec
7b720 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 tion)..........End.If..........R
7b740 65 74 75 72 6e 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 eturn.storageMappingItemCollecti
7b760 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 on.IsNot.Nothing......End.Functi
7b780 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 on........'''.<summary>......'''
7b7a0 20 47 65 74 73 20 74 68 65 20 4d 6f 64 65 6c 20 4e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 .Gets.the.Model.Namespace.from.t
7b7c0 68 65 20 70 72 6f 76 69 64 65 64 20 73 63 68 65 6d 61 20 66 69 6c 65 2e 0d 0a 20 20 20 20 27 27 he.provided.schema.file.......''
7b7e0 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f '.</summary>......Public.Functio
7b800 6e 20 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c 20 73 6f 75 72 63 65 n.GetModelNamespace(ByVal.source
7b820 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 Path.As.String).As.String.......
7b840 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 ...If.Not.ValidateInputPath(sour
7b860 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 cePath,._textTransformation).The
7b880 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 n..............Return.String.Emp
7b8a0 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 ty..........End.If............Di
7b8c0 6d 20 62 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 m.builder.As.New.EdmItemCollecti
7b8e0 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a onBuilder(_textTransformation)..
7b900 20 20 20 20 20 20 20 20 44 69 6d 20 6d 6f 64 65 6c 20 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 ........Dim.model.As.XElement.=.
7b920 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 62 75 69 6c 64 65 72 2e 54 72 79 4c Nothing..........If.builder.TryL
7b940 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 oadRootElement(_textTransformati
7b960 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 2c on.Host.ResolvePath(sourcePath),
7b980 20 6d 6f 64 65 6c 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 61 74 .model).Then..............Dim.at
7b9a0 74 72 69 62 75 74 65 20 41 73 20 58 41 74 74 72 69 62 75 74 65 20 3d 20 6d 6f 64 65 6c 2e 41 74 tribute.As.XAttribute.=.model.At
7b9c0 74 72 69 62 75 74 65 28 22 4e 61 6d 65 73 70 61 63 65 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 tribute("Namespace")............
7b9e0 20 20 49 66 20 61 74 74 72 69 62 75 74 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 ..If.attribute.IsNot.Nothing.The
7ba00 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 61 74 74 72 69 62 n..................Return.attrib
7ba20 75 74 65 2e 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 ute.Value..............End.If...
7ba40 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 .......End.If............Return.
7ba60 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a String.Empty......End.Function..
7ba80 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 ......'''.<summary>......'''.Ret
7baa0 75 72 6e 73 20 74 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 66 69 6c 65 20 urns.true.if.the.specified.file.
7bac0 70 61 74 68 20 69 73 20 76 61 6c 69 64 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 path.is.valid......'''.</summary
7bae0 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 56 >......Private.Shared.Function.V
7bb00 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 alidateInputPath(sourcePath.As.S
7bb20 74 72 69 6e 67 2c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e tring,.textTransformation.As.Dyn
7bb40 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 amicTextTransformation).As.Boole
7bb60 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d an..........If.String.IsNullOrEm
7bb80 70 74 79 28 73 6f 75 72 63 65 50 61 74 68 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 pty(sourcePath).Then............
7bba0 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 73 ..Throw.New.ArgumentException("s
7bbc0 6f 75 72 63 65 50 61 74 68 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 ourcePath")..........End.If.....
7bbe0 20 20 20 20 20 20 20 49 66 20 73 6f 75 72 63 65 50 61 74 68 20 3d 20 22 24 65 64 6d 78 49 6e 70 .......If.sourcePath.=."$edmxInp
7bc00 75 74 46 69 6c 65 24 22 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 54 utFile$".Then..............textT
7bc20 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 43 6f 6d ransformation.Errors.Add(New.Com
7bc40 70 69 6c 65 72 45 72 72 6f 72 28 49 66 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e pilerError(If(textTransformation
7bc60 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 .Host.TemplateFile,.CodeGenerati
7bc80 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c onTools.GetResourceString("Templ
7bca0 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e 6e 69 6e 67 54 65 6d 70 6c 61 74 65 22 29 29 2c ate_CurrentlyRunningTemplate")),
7bcc0 20 2d 31 2c 20 2d 31 2c 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 2c 20 5f 0d 0a 20 20 20 20 20 20 .-1,.-1,.String.Empty,._........
7bce0 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 ..........CodeGenerationTools.Ge
7bd00 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 70 6c 61 63 tResourceString("Template_Replac
7bd20 65 56 73 49 74 65 6d 54 65 6d 70 6c 61 74 65 54 6f 6b 65 6e 22 29 29 29 0d 0a 20 20 20 20 20 20 eVsItemTemplateToken")))........
7bd40 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 ......Return.False..........End.
7bd60 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 45 If............Return.True......E
7bd80 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
7bda0 0d 0a 20 20 20 20 27 27 27 20 62 61 73 65 20 63 6c 61 73 73 20 66 6f 72 20 49 74 65 6d 43 6f 6c ......'''.base.class.for.ItemCol
7bdc0 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6c 61 73 73 65 73 20 74 68 61 74 0d 0a 20 20 20 lectionBuilder.classes.that.....
7bde0 20 27 27 27 20 6c 6f 61 64 20 74 68 65 20 73 70 65 63 69 66 69 63 20 74 79 70 65 73 20 6f 66 20 .'''.load.the.specific.types.of.
7be00 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 metadata......'''.</summary>....
7be20 20 20 50 72 69 76 61 74 65 20 4d 75 73 74 49 6e 68 65 72 69 74 20 43 6c 61 73 73 20 49 74 65 6d ..Private.MustInherit.Class.Item
7be40 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 CollectionBuilder..........Priva
7be60 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 te.ReadOnly._textTransformation.
7be80 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 As.DynamicTextTransformation....
7bea0 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 66 69 6c 65 45 78 74 65 ......Private.ReadOnly._fileExte
7bec0 6e 73 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 nsion.As.String..........Private
7bee0 20 52 65 61 64 4f 6e 6c 79 20 5f 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 20 41 73 20 53 74 .ReadOnly._edmxSectionName.As.St
7bf00 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f ring..........Private.ReadOnly._
7bf20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 rootElementName.As.String.......
7bf40 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 .....'''.<summary>..........'''.
7bf60 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 69 6e 64 69 76 69 64 75 61 6c 20 28 6e 6f FileExtension.for.individual.(no
7bf80 6e 2d 65 64 6d 78 29 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 66 6f 72 20 74 68 69 73 0d 0a n-edmx).metadata.file.for.this..
7bfa0 20 20 20 20 20 20 20 20 27 27 27 20 73 70 65 63 69 66 69 63 20 49 74 65 6d 43 6f 6c 6c 65 63 74 ........'''.specific.ItemCollect
7bfc0 69 6f 6e 20 74 79 70 65 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e ion.type..........'''.</summary>
7bfe0 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 ..........Public.ReadOnly.Proper
7c000 74 79 20 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 ty.FileExtension().As.String....
7c020 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 ..........Get..................R
7c040 65 74 75 72 6e 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 eturn._fileExtension............
7c060 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d ..End.Get..........End.Property.
7c080 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ...........'''.<summary>........
7c0a0 20 20 27 27 27 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 58 6d 6c 45 6c 65 6d 65 6e 74 ..'''.The.name.of.the.XmlElement
7c0c0 20 69 6e 20 74 68 65 20 2e 65 64 6d 78 20 3c 52 75 6e 74 69 6d 65 3e 20 65 6c 65 6d 65 6e 74 0d .in.the..edmx.<Runtime>.element.
7c0e0 0a 20 20 20 20 20 20 20 20 27 27 27 20 74 6f 20 66 69 6e 64 20 74 68 69 73 20 49 74 65 6d 43 6f .........'''.to.find.this.ItemCo
7c100 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 20 20 20 20 27 27 27 llection's.metadata..........'''
7c120 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 .</summary>..........Public.Read
7c140 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 28 29 20 Only.Property.EdmxSectionName().
7c160 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 As.String..............Get......
7c180 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 65 64 6d 78 53 65 63 74 69 6f 6e 4e ............Return._edmxSectionN
7c1a0 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 ame..............End.Get........
7c1c0 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 ..End.Property............'''.<s
7c1e0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 68 65 20 6e 61 6d 65 20 6f 66 ummary>..........'''.The.name.of
7c200 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 6f 66 20 74 68 69 73 20 49 74 65 6d 43 6f .the.root.element.of.this.ItemCo
7c220 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 20 20 20 20 27 27 27 llection's.metadata..........'''
7c240 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 .</summary>..........Public.Read
7c260 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 28 29 20 Only.Property.RootElementName().
7c280 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 As.String..............Get......
7c2a0 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e ............Return._rootElementN
7c2c0 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 ame..............End.Get........
7c2e0 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 ..End.Property............'''.<s
7c300 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 4d 65 74 68 6f 64 20 74 6f 20 62 ummary>..........'''.Method.to.b
7c320 75 69 6c 64 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 uild.the.appropriate.ItemCollect
7c340 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ion..........'''.</summary>.....
7c360 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4d 75 73 74 4f 76 65 72 72 69 64 65 20 46 75 6e 63 .....Protected.MustOverride.Func
7c380 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 tion.CreateItemCollection(ByVal.
7c3a0 72 65 61 64 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 58 6d 6c 52 65 61 readers.As.IEnumerable(Of.XmlRea
7c3c0 64 65 72 29 2c 20 42 79 52 65 66 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f 66 20 45 der),.ByRef.errors.As.IList(Of.E
7c3e0 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 29 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f dmSchemaError)).As.ItemCollectio
7c400 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 n............'''.<summary>......
7c420 20 20 20 20 27 27 27 20 43 74 6f 72 20 74 6f 20 73 65 74 75 70 20 74 68 65 20 49 74 65 6d 43 6f ....'''.Ctor.to.setup.the.ItemCo
7c440 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 6d 65 6d 62 65 72 73 0d 0a 20 20 20 20 20 20 20 llectionBuilder.members.........
7c460 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 .'''.</summary>..........Protect
7c480 65 64 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 ed.Sub.New(ByVal.textTransformat
7c4a0 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e ion.As.DynamicTextTransformation
7c4c0 2c 20 42 79 56 61 6c 20 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 2c ,.ByVal.fileExtension.As.String,
7c4e0 20 42 79 56 61 6c 20 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 .ByVal.edmxSectionName.As.String
7c500 2c 20 42 79 56 61 6c 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 41 73 20 53 74 72 69 6e ,.ByVal.rootElementName.As.Strin
7c520 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 g).............._textTransformat
7c540 69 6f 6e 20 3d 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 ion.=.textTransformation........
7c560 20 20 20 20 20 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 3d 20 66 69 6c 65 45 78 74 65 6e ......_fileExtension.=.fileExten
7c580 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 sion.............._edmxSectionNa
7c5a0 6d 65 20 3d 20 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 me.=.edmxSectionName............
7c5c0 20 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 3d 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 .._rootElementName.=.rootElement
7c5e0 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 Name..........End.Sub...........
7c600 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 53 65 6c 65 .'''.<summary>..........'''.Sele
7c620 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 cts.a.namespace.from.the.supplie
7c640 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d d.constants...........'''.</summ
7c660 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4d 75 73 74 4f 76 65 72 ary>..........Protected.MustOver
7c680 72 69 64 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c ride.Function.GetNamespace(ByVal
7c6a0 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 20 41 .constants.As.SchemaConstants).A
7c6c0 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 s.String............'''.<summary
7c6e0 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 72 79 20 74 6f 20 63 72 65 61 74 65 20 61 6e 20 >..........'''.Try.to.create.an.
7c700 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 64 65 64 20 77 69 74 68 20 74 68 65 20 6d ItemCollection.loaded.with.the.m
7c720 65 74 61 64 61 74 61 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f etadata.provided..........'''.</
7c740 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f summary>..........Public.Functio
7c760 6e 20 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 n.TryCreateItemCollection(ByVal.
7c780 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 69 74 65 6d sourcePath.As.String,.ByRef.item
7c7a0 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 Collection.As.ItemCollection).As
7c7c0 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 74 65 6d 43 6f 6c 6c 65 63 .Boolean..............itemCollec
7c7e0 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 tion.=.Nothing................If
7c800 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 .Not.ValidateInputPath(sourcePat
7c820 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 h,._textTransformation).Then....
7c840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 ..............Return.False......
7c860 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 ........End.If................Di
7c880 6d 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f m.schemaElement.As.XElement.=.No
7c8a0 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 54 72 79 4c 6f 61 64 52 6f 6f thing..............If.TryLoadRoo
7c8c0 74 45 6c 65 6d 65 6e 74 28 73 6f 75 72 63 65 50 61 74 68 2c 20 73 63 68 65 6d 61 45 6c 65 6d 65 tElement(sourcePath,.schemaEleme
7c8e0 6e 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 nt).Then..................Dim.re
7c900 61 64 65 72 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 28 aders.As.New.List(Of.XmlReader)(
7c920 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 72 79 0d 0a 20 20 20 20 20 20 20 20 )..................Try..........
7c940 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61 64 65 72 73 2e 41 64 64 28 73 63 68 65 6d 61 45 6c ............readers.Add(schemaEl
7c960 65 6d 65 6e 74 2e 43 72 65 61 74 65 52 65 61 64 65 72 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 ement.CreateReader())...........
7c980 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f ...........Dim.errors.As.IList(O
7c9a0 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 f.EdmSchemaError).=.Nothing.....
7c9c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 65 6d 70 49 74 65 6d 43 ...................Dim.tempItemC
7c9e0 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 72 ollection.As.ItemCollection.=.Cr
7ca00 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 72 65 61 64 65 72 73 2c 20 65 72 72 6f eateItemCollection(readers,.erro
7ca20 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 50 72 6f 63 rs)......................If.Proc
7ca40 65 73 73 45 72 72 6f 72 73 28 65 72 72 6f 72 73 2c 20 73 6f 75 72 63 65 50 61 74 68 29 20 54 68 essErrors(errors,.sourcePath).Th
7ca60 65 6e 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 52 65 74 75 en..........................Retu
7ca80 72 6e 20 46 61 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 45 6e rn.False......................En
7caa0 64 20 49 66 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 74 65 6d d.If........................item
7cac0 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 74 65 6d 70 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d Collection.=.tempItemCollection.
7cae0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 .....................Return.True
7cb00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6e 61 6c 6c 79 0d 0a 20 20 20 20 20 ..................Finally.......
7cb20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 72 65 61 64 65 72 20 41 ...............For.Each.reader.A
7cb40 73 20 58 6d 6c 52 65 61 64 65 72 20 49 6e 20 72 65 61 64 65 72 73 0d 0a 20 20 20 20 20 20 20 20 s.XmlReader.In.readers..........
7cb60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 72 65 63 74 43 61 73 74 28 72 65 61 64 65 ................DirectCast(reade
7cb80 72 2c 20 49 44 69 73 70 6f 73 61 62 6c 65 29 2e 44 69 73 70 6f 73 65 28 29 0d 0a 20 20 20 20 20 r,.IDisposable).Dispose().......
7cba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ...............Next.............
7cbc0 20 20 20 20 20 45 6e 64 20 54 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 .....End.Try..............End.If
7cbe0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 ................Return.False....
7cc00 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 ......End.Function............''
7cc20 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 72 69 65 73 20 74 '.<summary>..........'''.Tries.t
7cc40 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 65 o.load.the.root.element.from.the
7cc60 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 20 20 20 .metadata.file.provided.........
7cc80 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 .'''.</summary>..........Public.
7cca0 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 42 79 56 61 Function.TryLoadRootElement(ByVa
7ccc0 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 73 63 l.sourcePath.As.String,.ByRef.sc
7cce0 68 65 6d 61 45 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 29 20 41 73 20 42 6f 6f 6c hemaElement.As.XElement).As.Bool
7cd00 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d ean..............schemaElement.=
7cd20 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 78 74 65 6e 73 .Nothing..............Dim.extens
7cd40 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 50 61 74 68 2e 47 65 74 45 78 74 65 6e 73 69 6f ion.As.String.=.Path.GetExtensio
7cd60 6e 28 73 6f 75 72 63 65 50 61 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 65 78 n(sourcePath)..............If.ex
7cd80 74 65 6e 73 69 6f 6e 2e 45 71 75 61 6c 73 28 22 2e 65 64 6d 78 22 2c 20 53 74 72 69 6e 67 43 6f tension.Equals(".edmx",.StringCo
7cda0 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 72 65 43 mparison.InvariantCultureIgnoreC
7cdc0 61 73 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 ase).Then..................Retur
7cde0 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 73 6f 75 n.TryLoadRootElementFromEdmx(sou
7ce00 72 63 65 50 61 74 68 2c 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 rcePath,.schemaElement).........
7ce20 20 20 20 20 20 45 6c 73 65 49 66 20 65 78 74 65 6e 73 69 6f 6e 2e 45 71 75 61 6c 73 28 46 69 6c .....ElseIf.extension.Equals(Fil
7ce40 65 45 78 74 65 6e 73 69 6f 6e 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 eExtension,.StringComparison.Inv
7ce60 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 20 54 68 65 6e 0d 0a 20 ariantCultureIgnoreCase).Then...
7ce80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 6c 6f 61 64 20 66 72 6f 6d 20 73 69 6e 67 6c ...............'.load.from.singl
7cea0 65 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 28 2e 63 73 64 6c 2c 20 2e 73 73 64 6c 2c 20 6f e.metadata.file.(.csdl,..ssdl,.o
7cec0 72 20 2e 6d 73 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 63 68 65 6d 61 45 r..msl)..................schemaE
7cee0 6c 65 6d 65 6e 74 20 3d 20 58 45 6c 65 6d 65 6e 74 2e 4c 6f 61 64 28 73 6f 75 72 63 65 50 61 74 lement.=.XElement.Load(sourcePat
7cf00 68 2c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 42 61 73 65 55 72 69 20 4f 72 20 4c 6f 61 h,.LoadOptions.SetBaseUri.Or.Loa
7cf20 64 4f 70 74 69 6f 6e 73 2e 53 65 74 4c 69 6e 65 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 20 dOptions.SetLineInfo)...........
7cf40 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .......Return.True..............
7cf60 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c End.If................Return.Fal
7cf80 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 se..........End.Function........
7cfa0 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 ....'''.<summary>..........'''.T
7cfc0 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 ries.to.load.the.root.element.fr
7cfe0 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 65 64 6d 78 44 6f 63 75 6d 65 6e 74 0d 0a 20 20 om.the.provided.edmxDocument....
7d000 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 ......'''.</summary>..........Pr
7d020 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e ivate.Function.TryLoadRootElemen
7d040 74 46 72 6f 6d 45 64 6d 78 28 42 79 56 61 6c 20 65 64 6d 78 44 6f 63 75 6d 65 6e 74 20 41 73 20 tFromEdmx(ByVal.edmxDocument.As.
7d060 58 45 6c 65 6d 65 6e 74 2c 20 42 79 56 61 6c 20 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 20 XElement,.ByVal.schemaConstants.
7d080 41 73 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2c 20 42 79 56 61 6c 20 73 65 63 74 69 6f As.SchemaConstants,.ByVal.sectio
7d0a0 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 72 6f 6f 74 45 6c 65 6d 65 nName.As.String,.ByVal.rootEleme
7d0c0 6e 74 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 72 6f 6f 74 45 6c 65 6d ntName.As.String,.ByRef.rootElem
7d0e0 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 ent.As.XElement).As.Boolean.....
7d100 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a .........rootElement.=.Nothing..
7d120 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 64 6d 78 4e 73 20 41 73 20 58 4e 61 6d ..............Dim.edmxNs.As.XNam
7d140 65 73 70 61 63 65 20 3d 20 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2e 45 64 6d 78 4e 61 6d espace.=.schemaConstants.EdmxNam
7d160 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 63 74 69 6f 6e 4e espace..............Dim.sectionN
7d180 73 20 41 73 20 58 4e 61 6d 65 73 70 61 63 65 20 3d 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 73 s.As.XNamespace.=.GetNamespace(s
7d1a0 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 chemaConstants)................D
7d1c0 69 6d 20 72 75 6e 74 69 6d 65 20 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 65 64 6d 78 44 6f 63 im.runtime.As.XElement.=.edmxDoc
7d1e0 75 6d 65 6e 74 2e 45 6c 65 6d 65 6e 74 28 65 64 6d 78 4e 73 20 2b 20 22 52 75 6e 74 69 6d 65 22 ument.Element(edmxNs.+."Runtime"
7d200 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 72 75 6e 74 69 6d 65 20 49 73 20 4e 6f 74 )..............If.runtime.Is.Not
7d220 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 hing.Then..................Retur
7d240 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 n.False..............End.If.....
7d260 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 63 74 69 6f 6e 20 41 73 20 58 45 6c 65 6d 65 ...........Dim.section.As.XEleme
7d280 6e 74 20 3d 20 72 75 6e 74 69 6d 65 2e 45 6c 65 6d 65 6e 74 28 65 64 6d 78 4e 73 20 2b 20 73 65 nt.=.runtime.Element(edmxNs.+.se
7d2a0 63 74 69 6f 6e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 73 65 63 74 69 ctionName)..............If.secti
7d2c0 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 on.Is.Nothing.Then..............
7d2e0 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e ....Return.False..............En
7d300 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 65 6d 70 6c 61 74 65 d.If................Dim.template
7d320 56 65 72 73 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 Version.As.String.=.Nothing.....
7d340 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 ...........If.Not.TemplateMetada
7d360 74 61 2e 54 72 79 47 65 74 56 61 6c 75 65 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 ta.TryGetValue(MetadataConstants
7d380 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 2c 20 74 65 6d 70 6c 61 74 65 56 65 .TT_TEMPLATE_VERSION,.templateVe
7d3a0 72 73 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 6d rsion).Then..................tem
7d3c0 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 plateVersion.=.MetadataConstants
7d3e0 2e 44 45 46 41 55 4c 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 0d 0a 20 20 20 20 20 .DEFAULT_TEMPLATE_VERSION.......
7d400 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 .......End.If................If.
7d420 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 schemaConstants.MinimumTemplateV
7d440 65 72 73 69 6f 6e 20 3e 20 4e 65 77 20 56 65 72 73 69 6f 6e 28 74 65 6d 70 6c 61 74 65 56 65 72 ersion.>.New.Version(templateVer
7d460 73 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 sion).Then.................._tex
7d480 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 43 tTransformation.Errors.Add(New.C
7d4a0 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 49 66 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 ompilerError(If(_textTransformat
7d4c0 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 2c 20 43 6f 64 65 47 65 6e 65 72 ion.Host.TemplateFile,.CodeGener
7d4e0 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ationTools.GetResourceString("Te
7d500 6d 70 6c 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e 6e 69 6e 67 54 65 6d 70 6c 61 74 65 22 mplate_CurrentlyRunningTemplate"
7d520 29 29 2c 20 2d 31 2c 20 2d 31 2c 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 2c 20 5f 0d 0a 20 20 20 )),.-1,.-1,.String.Empty,._.....
7d540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 .................CodeGenerationT
7d560 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 ools.GetResourceString("Template
7d580 5f 55 6e 73 75 70 70 6f 72 74 65 64 53 63 68 65 6d 61 22 29 29 20 57 69 74 68 20 7b 20 5f 0d 0a _UnsupportedSchema")).With.{._..
7d5a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 49 73 57 61 72 6e 69 .........................IsWarni
7d5c0 6e 67 20 3d 20 54 72 75 65 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ng.=.True._.....................
7d5e0 20 7d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 .})..............End.If.........
7d600 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 73 65 63 74 69 6f 6e 2e 45 6c 65 .......rootElement.=.section.Ele
7d620 6d 65 6e 74 28 73 65 63 74 69 6f 6e 4e 73 20 2b 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 ment(sectionNs.+.rootElementName
7d640 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 72 6f 6f 74 45 6c 65 6d 65 6e )..............Return.rootElemen
7d660 74 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e t.IsNot.Nothing..........End.Fun
7d680 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a ction............'''.<summary>..
7d6a0 20 20 20 20 20 20 20 20 27 27 27 20 54 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f ........'''.Tries.to.load.the.ro
7d6c0 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 2e 65 64 ot.element.from.the.provided..ed
7d6e0 6d 78 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f mx.metadata.file..........'''.</
7d700 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 summary>..........Private.Functi
7d720 6f 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 42 79 on.TryLoadRootElementFromEdmx(By
7d740 56 61 6c 20 65 64 6d 78 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 72 6f Val.edmxPath.As.String,.ByRef.ro
7d760 6f 74 45 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 29 20 41 73 20 42 6f 6f 6c 65 61 otElement.As.XElement).As.Boolea
7d780 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 n..............rootElement.=.Not
7d7a0 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 6c 65 6d 65 6e 74 20 hing................Dim.element.
7d7c0 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 58 45 6c 65 6d 65 6e 74 2e 4c 6f 61 64 28 65 64 6d 78 As.XElement.=.XElement.Load(edmx
7d7e0 50 61 74 68 2c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 42 61 73 65 55 72 69 20 4f 72 20 Path,.LoadOptions.SetBaseUri.Or.
7d800 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 4c 69 6e 65 49 6e 66 6f 29 0d 0a 0d 0a 20 20 20 20 LoadOptions.SetLineInfo)........
7d820 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e ........Return.TryLoadRootElemen
7d840 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 tFromEdmx(element,.MetadataConst
7d860 61 6e 74 73 2e 56 33 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 ants.V3_SCHEMA_CONSTANTS,.EdmxSe
7d880 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 72 6f 6f 74 ctionName,.RootElementName,.root
7d8a0 45 6c 65 6d 65 6e 74 29 20 4f 72 45 6c 73 65 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 Element).OrElse.TryLoadRootEleme
7d8c0 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 ntFromEdmx(element,.MetadataCons
7d8e0 74 61 6e 74 73 2e 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 tants.V2_SCHEMA_CONSTANTS,.EdmxS
7d900 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 72 6f 6f ectionName,.RootElementName,.roo
7d920 74 45 6c 65 6d 65 6e 74 29 20 4f 72 45 6c 73 65 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d tElement).OrElse.TryLoadRootElem
7d940 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e entFromEdmx(element,.MetadataCon
7d960 73 74 61 6e 74 73 2e 56 31 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 2c 20 45 64 6d 78 stants.V1_SCHEMA_CONSTANTS,.Edmx
7d980 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 2c 20 72 6f SectionName,.RootElementName,.ro
7d9a0 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e otElement)..........End.Function
7d9c0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 ............'''.<summary>.......
7d9e0 20 20 20 27 27 27 20 54 61 6b 65 73 20 61 6e 20 45 6e 75 6d 65 72 61 62 6c 65 20 6f 66 20 45 64 ...'''.Takes.an.Enumerable.of.Ed
7da00 6d 53 63 68 65 6d 61 45 72 72 6f 72 73 2c 20 61 6e 64 20 61 64 64 73 20 74 68 65 6d 0d 0a 20 20 mSchemaErrors,.and.adds.them....
7da20 20 20 20 20 20 20 27 27 27 20 74 6f 20 74 68 65 20 65 72 72 6f 72 73 20 63 6f 6c 6c 65 63 74 69 ......'''.to.the.errors.collecti
7da40 6f 6e 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 73 73 0d 0a 20 20 20 20 20 20 on.of.the.template.class........
7da60 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 ..'''.</summary>..........Privat
7da80 65 20 46 75 6e 63 74 69 6f 6e 20 50 72 6f 63 65 73 73 45 72 72 6f 72 73 28 42 79 56 61 6c 20 65 e.Function.ProcessErrors(ByVal.e
7daa0 72 72 6f 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 64 6d 53 63 68 65 6d rrors.As.IEnumerable(Of.EdmSchem
7dac0 61 45 72 72 6f 72 29 2c 20 42 79 56 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 50 61 74 68 20 41 73 aError),.ByVal.sourceFilePath.As
7dae0 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .String).As.Boolean.............
7db00 20 44 69 6d 20 66 6f 75 6e 64 45 72 72 6f 72 73 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 46 61 .Dim.foundErrors.As.Boolean.=.Fa
7db20 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 73 63 68 65 6d 61 lse..............For.Each.schema
7db40 45 72 72 6f 72 20 41 73 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 20 49 6e 20 65 72 72 6f 72 Error.As.EdmSchemaError.In.error
7db60 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6e 65 77 45 72 72 6f 72 20 s..................Dim.newError.
7db80 41 73 20 4e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 73 63 68 65 6d 61 45 72 72 6f 72 As.New.CompilerError(schemaError
7dba0 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 6f 6e 2c 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 4c 69 6e .SchemaLocation,.schemaError.Lin
7dbc0 65 2c 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 43 6f 6c 75 6d 6e 2c 20 73 63 68 65 6d 61 45 72 72 e,.schemaError.Column,.schemaErr
7dbe0 6f 72 2e 45 72 72 6f 72 43 6f 64 65 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 or.ErrorCode.ToString(CultureInf
7dc00 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2c 20 73 63 68 65 6d 61 45 72 72 6f 72 o.InvariantCulture),.schemaError
7dc20 2e 4d 65 73 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 45 72 .Message)..................newEr
7dc40 72 6f 72 2e 49 73 57 61 72 6e 69 6e 67 20 3d 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 53 65 76 65 ror.IsWarning.=.schemaError.Seve
7dc60 72 69 74 79 20 3d 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 53 65 76 65 72 69 74 79 2e 57 61 rity.=.EdmSchemaErrorSeverity.Wa
7dc80 72 6e 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 75 6e 64 45 72 72 6f rning..................foundErro
7dca0 72 73 20 3d 20 66 6f 75 6e 64 45 72 72 6f 72 73 20 4f 72 20 73 63 68 65 6d 61 45 72 72 6f 72 2e rs.=.foundErrors.Or.schemaError.
7dcc0 53 65 76 65 72 69 74 79 20 3d 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 53 65 76 65 72 69 74 Severity.=.EdmSchemaErrorSeverit
7dce0 79 2e 45 72 72 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 73 63 68 65 y.Error..................If.sche
7dd00 6d 61 45 72 72 6f 72 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e maError.SchemaLocation.Is.Nothin
7dd20 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 45 g.Then......................newE
7dd40 72 72 6f 72 2e 46 69 6c 65 4e 61 6d 65 20 3d 20 73 6f 75 72 63 65 46 69 6c 65 50 61 74 68 0d 0a rror.FileName.=.sourceFilePath..
7dd60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 ................End.If..........
7dd80 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f ........_textTransformation.Erro
7dda0 72 73 2e 41 64 64 28 6e 65 77 45 72 72 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 rs.Add(newError)..............Ne
7ddc0 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 66 6f 75 6e 64 45 72 xt................Return.foundEr
7dde0 72 6f 72 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 rors..........End.Function......
7de00 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a End.Class........'''.<summary>..
7de20 20 20 20 20 27 27 27 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 69 ....'''.Builder.class.for.creati
7de40 6e 67 20 61 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ng.a.StorageMappingItemCollectio
7de60 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 n......'''.</summary>......Priva
7de80 74 65 20 43 6c 61 73 73 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 te.Class.StorageMappingItemColle
7dea0 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 49 6e 68 65 72 69 74 73 20 49 ctionBuilder..........Inherits.I
7dec0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 50 72 temCollectionBuilder..........Pr
7dee0 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ivate.ReadOnly._edmItemCollectio
7df00 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 n.As.EdmItemCollection..........
7df20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 Private.ReadOnly._storeItemColle
7df40 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 0d 0a ction.As.StoreItemCollection....
7df60 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 ........Public.Sub.New(ByVal.tex
7df80 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 tTransformation.As.DynamicTextTr
7dfa0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 42 79 56 61 6c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 ansformation,.ByVal.edmItemColle
7dfc0 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 42 79 56 61 ction.As.EdmItemCollection,.ByVa
7dfe0 6c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 l.storeItemCollection.As.StoreIt
7e000 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 79 42 61 73 emCollection)..............MyBas
7e020 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 64 61 e.New(textTransformation,.Metada
7e040 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 74 61 64 taConstants.MSL_EXTENSION,.Metad
7e060 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 ataConstants.MSL_EDMX_SECTION_NA
7e080 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 52 4f 4f 54 5f 45 ME,.MetadataConstants.MSL_ROOT_E
7e0a0 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d 49 74 LEMENT_NAME).............._edmIt
7e0c0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e emCollection.=.edmItemCollection
7e0e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 .............._storeItemCollecti
7e100 6f 6e 20 3d 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 on.=.storeItemCollection........
7e120 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f ..End.Sub............Protected.O
7e140 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 verloads.Overrides.Function.Crea
7e160 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 72 65 61 64 65 72 73 20 41 teItemCollection(ByVal.readers.A
7e180 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 2c 20 42 79 52 s.IEnumerable(Of.XmlReader),.ByR
7e1a0 65 66 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 ef.errors.As.IList(Of.EdmSchemaE
7e1c0 72 72 6f 72 29 29 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 rror)).As.ItemCollection........
7e1e0 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 ......Return.MetadataItemCollect
7e200 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 ionFactory.CreateStorageMappingI
7e220 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e temCollection(_edmItemCollection
7e240 2c 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 72 65 61 64 65 72 73 2c ,._storeItemCollection,.readers,
7e260 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a .errors)..........End.Function..
7e280 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 ..........'''.<summary>.........
7e2a0 20 27 27 27 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 .'''.Selects.a.namespace.from.th
7e2c0 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 27 e.supplied.constants...........'
7e2e0 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 ''.</summary>..........Protected
7e300 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d 65 73 70 61 63 65 .Overrides.Function.GetNamespace
7e320 28 42 79 56 61 6c 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 (ByVal.constants.As.SchemaConsta
7e340 6e 74 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 nts).As.String..............Retu
7e360 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 4d 73 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 rn.constants.MslNamespace.......
7e380 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a ...End.Function......End.Class..
7e3a0 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 42 75 69 ......'''.<summary>......'''.Bui
7e3c0 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 53 74 6f 72 65 49 lder.class.for.creating.a.StoreI
7e3e0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 temCollection......'''.</summary
7e400 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 53 74 6f 72 65 49 74 65 6d 43 6f >......Private.Class.StoreItemCo
7e420 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 49 6e 68 65 72 69 74 llectionBuilder..........Inherit
7e440 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 s.ItemCollectionBuilder.........
7e460 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 .Public.Sub.New(ByVal.textTransf
7e480 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d ormation.As.DynamicTextTransform
7e4a0 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 79 42 61 73 65 2e 4e 65 77 28 74 ation)..............MyBase.New(t
7e4c0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 extTransformation,.MetadataConst
7e4e0 61 6e 74 73 2e 53 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e ants.SSDL_EXTENSION,.MetadataCon
7e500 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d stants.SSDL_EDMX_SECTION_NAME,.M
7e520 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 etadataConstants.SSDL_ROOT_ELEME
7e540 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 NT_NAME)..........End.Sub.......
7e560 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 .....Protected.Overloads.Overrid
7e580 65 73 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e es.Function.CreateItemCollection
7e5a0 28 42 79 56 61 6c 20 72 65 61 64 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 (ByVal.readers.As.IEnumerable(Of
7e5c0 20 58 6d 6c 52 65 61 64 65 72 29 2c 20 42 79 52 65 66 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 .XmlReader),.ByRef.errors.As.ILi
7e5e0 73 74 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 29 20 41 73 20 49 74 65 6d 43 6f st(Of.EdmSchemaError)).As.ItemCo
7e600 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 74 llection..............Return.Met
7e620 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 adataItemCollectionFactory.Creat
7e640 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 72 65 61 64 65 72 73 2c 20 65 72 eStoreItemCollection(readers,.er
7e660 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 rors)..........End.Function.....
7e680 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 .......'''.<summary>..........''
7e6a0 27 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 '.Selects.a.namespace.from.the.s
7e6c0 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 upplied.constants...........'''.
7e6e0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 </summary>..........Protected.Ov
7e700 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 42 79 errides.Function.GetNamespace(By
7e720 56 61 6c 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 Val.constants.As.SchemaConstants
7e740 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ).As.String..............Return.
7e760 63 6f 6e 73 74 61 6e 74 73 2e 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 constants.SsdlNamespace.........
7e780 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a .End.Function........End.Class..
7e7a0 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 42 75 69 ......'''.<summary>......'''.Bui
7e7c0 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 45 64 6d 49 74 65 lder.class.for.creating.a.EdmIte
7e7e0 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d mCollection......'''.</summary>.
7e800 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 .....Private.Class.EdmItemCollec
7e820 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 49 6e 68 65 72 69 74 73 20 49 74 tionBuilder..........Inherits.It
7e840 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 50 72 69 emCollectionBuilder..........Pri
7e860 76 61 74 65 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 41 73 20 4e 65 77 20 4c 69 vate._referenceSchemas.As.New.Li
7e880 73 74 28 4f 66 20 53 74 72 69 6e 67 29 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 st(Of.String)()............Publi
7e8a0 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 c.Sub.New(ByVal.textTransformati
7e8c0 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 on.As.DynamicTextTransformation)
7e8e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 79 42 61 73 65 2e 4e 65 77 28 74 65 78 74 54 72 61 ..............MyBase.New(textTra
7e900 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 nsformation,.MetadataConstants.C
7e920 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 SDL_EXTENSION,.MetadataConstants
7e940 2e 43 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 .CSDL_EDMX_SECTION_NAME,.Metadat
7e960 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d aConstants.CSDL_ROOT_ELEMENT_NAM
7e980 45 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 E)..........End.Sub............P
7e9a0 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 ublic.Sub.New(ByVal.textTransfor
7e9c0 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 mation.As.DynamicTextTransformat
7e9e0 69 6f 6e 2c 20 42 79 56 61 6c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 41 73 20 49 ion,.ByVal.referenceSchemas.As.I
7ea00 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 Enumerable(Of.String))..........
7ea20 20 20 20 20 4d 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a ....Me.New(textTransformation)..
7ea40 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 41 64 ............_referenceSchemas.Ad
7ea60 64 52 61 6e 67 65 28 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 29 0d 0a 20 20 20 20 20 20 dRange(referenceSchemas)........
7ea80 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f ..End.Sub............Protected.O
7eaa0 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 verloads.Overrides.Function.Crea
7eac0 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 72 65 61 64 65 72 73 20 41 teItemCollection(ByVal.readers.A
7eae0 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 2c 20 42 79 52 s.IEnumerable(Of.XmlReader),.ByR
7eb00 65 66 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 ef.errors.As.IList(Of.EdmSchemaE
7eb20 72 72 6f 72 29 29 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 rror)).As.ItemCollection........
7eb40 20 20 20 20 20 20 44 69 6d 20 6f 77 6e 65 64 52 65 61 64 65 72 73 20 41 73 20 4e 65 77 20 4c 69 ......Dim.ownedReaders.As.New.Li
7eb60 73 74 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 st(Of.XmlReader)()..............
7eb80 44 69 6d 20 61 6c 6c 52 65 61 64 65 72 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 58 6d Dim.allReaders.As.New.List(Of.Xm
7eba0 6c 52 65 61 64 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 72 79 0d 0a 20 20 20 lReader)()..............Try.....
7ebc0 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 6c 52 65 61 64 65 72 73 2e 41 64 64 52 61 6e 67 65 .............allReaders.AddRange
7ebe0 28 72 65 61 64 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 (readers)..................For.E
7ec00 61 63 68 20 70 61 74 68 20 41 73 20 53 74 72 69 6e 67 20 49 6e 20 5f 72 65 66 65 72 65 6e 63 65 ach.path.As.String.In._reference
7ec20 53 63 68 65 6d 61 73 2e 44 69 73 74 69 6e 63 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Schemas.Distinct()..............
7ec40 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 66 65 72 65 6e 63 65 20 41 73 20 58 45 6c 65 6d 65 6e ........Dim.reference.As.XElemen
7ec60 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.=.Nothing.....................
7ec80 20 49 66 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 70 61 74 68 2c 20 72 65 66 .If.TryLoadRootElement(path,.ref
7eca0 65 72 65 6e 63 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erence).Then....................
7ecc0 20 20 20 20 20 20 44 69 6d 20 72 65 61 64 65 72 20 41 73 20 58 6d 6c 52 65 61 64 65 72 20 3d 20 ......Dim.reader.As.XmlReader.=.
7ece0 72 65 66 65 72 65 6e 63 65 2e 43 72 65 61 74 65 52 65 61 64 65 72 28 29 0d 0a 20 20 20 20 20 20 reference.CreateReader()........
7ed00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 6c 52 65 61 64 65 72 73 2e 41 64 64 ..................allReaders.Add
7ed20 28 72 65 61 64 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 (reader)........................
7ed40 20 20 6f 77 6e 65 64 52 65 61 64 65 72 73 2e 41 64 64 28 72 65 61 64 65 72 29 0d 0a 20 20 20 20 ..ownedReaders.Add(reader)......
7ed60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 ................End.If..........
7ed80 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........Next....................
7eda0 52 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 Return.MetadataItemCollectionFac
7edc0 74 6f 72 79 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 61 6c 6c tory.CreateEdmItemCollection(all
7ede0 52 65 61 64 65 72 73 2c 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 69 Readers,.errors)..............Fi
7ee00 6e 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 nally..................For.Each.
7ee20 72 65 61 64 65 72 20 41 73 20 58 6d 6c 52 65 61 64 65 72 20 49 6e 20 6f 77 6e 65 64 52 65 61 64 reader.As.XmlReader.In.ownedRead
7ee40 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 72 65 63 74 43 ers......................DirectC
7ee60 61 73 74 28 72 65 61 64 65 72 2c 20 49 44 69 73 70 6f 73 61 62 6c 65 29 2e 44 69 73 70 6f 73 65 ast(reader,.IDisposable).Dispose
7ee80 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 ()..................Next........
7eea0 20 20 20 20 20 20 45 6e 64 20 54 72 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 ......End.Try..........End.Funct
7eec0 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ion............'''.<summary>....
7eee0 20 20 20 20 20 20 27 27 27 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 ......'''.Selects.a.namespace.fr
7ef00 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 om.the.supplied.constants.......
7ef20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 ....'''.</summary>..........Prot
7ef40 65 63 74 65 64 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d 65 ected.Overrides.Function.GetName
7ef60 73 70 61 63 65 28 42 79 56 61 6c 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 65 6d 61 43 space(ByVal.constants.As.SchemaC
7ef80 6f 6e 73 74 61 6e 74 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 onstants).As.String.............
7efa0 20 52 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 0d .Return.constants.CsdlNamespace.
7efc0 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 43 .........End.Function......End.C
7efe0 6c 61 73 73 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e lass..End.Class....'''.<summary>
7f000 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 ..'''.Responsible.for.encapsulat
7f020 69 6e 67 20 74 68 65 20 72 65 74 72 69 65 76 61 6c 20 61 6e 64 20 74 72 61 6e 73 6c 61 74 69 6f ing.the.retrieval.and.translatio
7f040 6e 20 6f 66 20 74 68 65 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 0d 0a 27 27 27 20 61 6e 6e n.of.the.CodeGeneration..'''.ann
7f060 6f 74 61 74 69 6f 6e 73 20 69 6e 20 74 68 65 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 20 otations.in.the.EntityFramework.
7f080 4d 65 74 61 64 61 74 61 20 74 6f 20 61 20 66 6f 72 6d 20 74 68 61 74 20 69 73 20 75 73 65 66 75 Metadata.to.a.form.that.is.usefu
7f0a0 6c 20 69 6e 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d l.in.code.generation...'''.</sum
7f0c0 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 41 63 63 65 73 73 69 62 69 6c 69 74 mary>..Public.Class.Accessibilit
7f0e0 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 4e 65 77 28 29 0d 0a 20 20 20 20 45 6e y......Private.Sub.New()......En
7f100 64 20 53 75 62 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 47 45 54 54 45 52 5f d.Sub......Private.Const.GETTER_
7f120 41 43 43 45 53 53 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d ACCESS.As.String.=."http://schem
7f140 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 as.microsoft.com/ado/2006/04/cod
7f160 65 67 65 6e 65 72 61 74 69 6f 6e 3a 47 65 74 74 65 72 41 63 63 65 73 73 22 0d 0a 20 20 20 20 50 egeneration:GetterAccess"......P
7f180 72 69 76 61 74 65 20 43 6f 6e 73 74 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 20 41 73 20 53 74 rivate.Const.SETTER_ACCESS.As.St
7f1a0 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 ring.=."http://schemas.microsoft
7f1c0 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a .com/ado/2006/04/codegeneration:
7f1e0 53 65 74 74 65 72 41 63 63 65 73 73 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 SetterAccess"......Private.Const
7f200 20 54 59 50 45 5f 41 43 43 45 53 53 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f .TYPE_ACCESS.As.String.=."http:/
7f220 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f /schemas.microsoft.com/ado/2006/
7f240 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 54 79 70 65 41 63 63 65 73 73 22 0d 0a 20 04/codegeneration:TypeAccess"...
7f260 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 4d 45 54 48 4f 44 5f 41 43 43 45 53 53 20 41 ...Private.Const.METHOD_ACCESS.A
7f280 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f s.String.=."http://schemas.micro
7f2a0 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 soft.com/ado/2006/04/codegenerat
7f2c0 69 6f 6e 3a 4d 65 74 68 6f 64 41 63 63 65 73 73 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 ion:MethodAccess"......Private.C
7f2e0 6f 6e 73 74 20 41 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 44 20 41 73 20 53 74 72 69 6e 67 20 onst.ACCESS_PROTECTED.As.String.
7f300 3d 20 22 50 72 6f 74 65 63 74 65 64 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 =."Protected"......Private.Const
7f320 20 41 43 43 45 53 53 5f 49 4e 54 45 52 4e 41 4c 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 49 6e .ACCESS_INTERNAL.As.String.=."In
7f340 74 65 72 6e 61 6c 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 41 43 43 45 53 ternal"......Private.Const.ACCES
7f360 53 5f 50 52 49 56 41 54 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 50 72 69 76 61 74 65 22 0d S_PRIVATE.As.String.=."Private".
7f380 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 52 65 61 64 4f 6e 6c 79 20 41 63 63 .....Private.Shared.ReadOnly.Acc
7f3a0 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 20 41 73 20 4e 65 77 20 44 69 essibilityRankIdLookup.As.New.Di
7f3c0 63 74 69 6f 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 49 6e 74 65 67 65 72 29 28 29 20 46 ctionary(Of.String,.Integer)().F
7f3e0 72 6f 6d 20 5f 0d 0a 20 20 20 20 20 20 20 20 7b 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 rom._..........{._..............
7f400 7b 20 22 50 72 69 76 61 74 65 22 2c 20 31 7d 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 {."Private",.1},._..............
7f420 7b 20 22 46 72 69 65 6e 64 22 2c 20 32 7d 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b {."Friend",.2},._..............{
7f440 20 22 50 72 6f 74 65 63 74 65 64 22 2c 20 33 7d 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ."Protected",.3},._.............
7f460 20 7b 20 22 50 75 62 6c 69 63 22 2c 20 34 7d 20 5f 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a .{."Public",.4}._..........}....
7f480 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 ....'''.<summary>......'''.Gets.
7f4a0 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 the.accessibility.that.should.be
7f4c0 20 61 70 70 6c 69 65 64 20 74 6f 20 61 20 74 79 70 65 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 .applied.to.a.type.being.generat
7f4e0 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 47 6c 6f 62 61 6c 49 74 65 6d 2e ed.from.the.provided.GlobalItem.
7f500 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 ......'''......'''.defaults.to.p
7f520 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e ublic.if.no.annotation.is.found.
7f540 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 ......'''.</summary>......Public
7f560 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 54 79 70 65 28 42 79 56 61 6c 20 69 .Shared.Function.ForType(ByVal.i
7f580 74 65 6d 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 tem.As.GlobalItem).As.String....
7f5a0 20 20 20 20 20 20 49 66 20 69 74 65 6d 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 ......If.item.Is.Nothing.Then...
7f5c0 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 ...........Return.Nothing.......
7f5e0 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 ...End.If............Return.GetA
7f600 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 54 59 50 45 5f 41 43 43 45 53 53 29 0d ccessibility(item,.TYPE_ACCESS).
7f620 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
7f640 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 mmary>......'''.Gets.the.accessi
7f660 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 bility.that.should.be.applied.at
7f680 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 .the.property.level.for.a.proper
7f6a0 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d ty.being......'''.generated.from
7f6c0 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 27 27 .the.provided.EdmMember.......''
7f6e0 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 '......'''.defaults.to.public.if
7f700 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 27 27 .no.annotation.is.found.......''
7f720 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 '.</summary>......Public.Shared.
7f740 46 75 6e 63 74 69 6f 6e 20 46 6f 72 50 72 6f 70 65 72 74 79 28 42 79 56 61 6c 20 6d 65 6d 62 65 Function.ForProperty(ByVal.membe
7f760 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 r.As.EdmMember).As.String.......
7f780 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 ...If.member.Is.Nothing.Then....
7f7a0 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 ..........Return.Nothing........
7f7c0 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 74 65 72 41 63 ..End.If............Dim.getterAc
7f7e0 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 cess.As.String.=.Nothing........
7f800 20 20 44 69 6d 20 73 65 74 74 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e ..Dim.setterAccess.As.String.=.N
7f820 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 70 65 72 74 79 41 63 63 65 othing..........Dim.propertyAcce
7f840 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 ss.As.String.=.Nothing..........
7f860 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d CalculatePropertyAccessibility(m
7f880 65 6d 62 65 72 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 67 65 74 74 65 72 41 63 63 ember,.propertyAccess,.getterAcc
7f8a0 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 73 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 ess,.setterAccess)..........Retu
7f8c0 72 6e 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 rn.propertyAccess......End.Funct
7f8e0 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
7f900 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 '.Gets.the.accessibility.that.sh
7f920 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 ould.be.applied.at.the.property.
7f940 6c 65 76 65 6c 20 66 6f 72 20 61 20 52 65 61 64 2d 4f 6e 6c 79 20 70 72 6f 70 65 72 74 79 20 62 level.for.a.Read-Only.property.b
7f960 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 eing......'''.generated.from.the
7f980 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 .provided.EdmMember.......'''...
7f9a0 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 ...'''.defaults.to.public.if.no.
7f9c0 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f annotation.is.found.......'''.</
7f9e0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 summary>......Public.Shared.Func
7fa00 74 69 6f 6e 20 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 42 79 56 61 6c 20 6d tion.ForReadOnlyProperty(ByVal.m
7fa20 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 ember.As.EdmMember).As.String...
7fa40 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e .......If.member.Is.Nothing.Then
7fa60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 ..............Return.Nothing....
7fa80 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 ......End.If............Return.G
7faa0 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 47 45 54 54 45 52 5f 41 etAccessibility(member,.GETTER_A
7fac0 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 CCESS)......End.Function........
7fae0 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 '''.<summary>......'''.Gets.the.
7fb00 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 accessibility.that.should.be.app
7fb20 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 lied.at.the.property.level.for.a
7fb40 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 74 .property.being......'''.generat
7fb60 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 6e 74 69 74 79 53 65 74 2e 0d ed.from.the.provided.EntitySet..
7fb80 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 .....'''......'''.defaults.to.pu
7fba0 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d blic.if.no.annotation.is.found..
7fbc0 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
7fbe0 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 Shared.Function.ForReadOnlyPrope
7fc00 72 74 79 28 42 79 56 61 6c 20 65 64 6d 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 29 20 41 rty(ByVal.edmSet.As.EntitySet).A
7fc20 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 53 65 74 20 49 73 20 4e s.String..........If.edmSet.Is.N
7fc40 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 othing.Then..............Return.
7fc60 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 Nothing..........End.If.........
7fc80 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 65 64 6d 53 65 ...Return.GetAccessibility(edmSe
7fca0 74 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 t,.GETTER_ACCESS)......End.Funct
7fcc0 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
7fce0 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 '.Gets.the.accessibility.that.sh
7fd00 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 ould.be.applied.at.the.property.
7fd20 6c 65 76 65 6c 20 66 6f 72 20 61 20 57 72 69 74 65 2d 4f 6e 6c 79 20 70 72 6f 70 65 72 74 79 20 level.for.a.Write-Only.property.
7fd40 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 being......'''.generated.from.th
7fd60 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a e.provided.EdmMember.......'''..
7fd80 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f ....'''.defaults.to.public.if.no
7fda0 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c .annotation.is.found.......'''.<
7fdc0 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e /summary>......Public.Shared.Fun
7fde0 63 74 69 6f 6e 20 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 42 79 56 61 6c ction.ForWriteOnlyProperty(ByVal
7fe00 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d .member.As.EdmMember).As.String.
7fe20 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 .........If.member.Is.Nothing.Th
7fe40 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a en..............Return.Nothing..
7fe60 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ........End.If............Return
7fe80 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 53 45 54 54 45 52 .GetAccessibility(member,.SETTER
7fea0 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 _ACCESS)......End.Function......
7fec0 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 ..'''.<summary>......'''.Gets.th
7fee0 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 e.accessibility.that.should.be.a
7ff00 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 67 65 74 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 pplied.at.the.get.level.for.a.pr
7ff20 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 74 65 64 20 operty.being......'''.generated.
7ff40 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 from.the.provided.EdmMember.....
7ff60 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 65 6d 70 74 79 ..'''......'''.defaults.to.empty
7ff80 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 20 6f 72 20 74 68 .if.no.annotation.is.found.or.th
7ffa0 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 e.accessibility.is.the.same.as.t
7ffc0 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 he.property.level.......'''.</su
7ffe0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 mmary>......Public.Shared.Functi
80000 6f 6e 20 46 6f 72 47 65 74 74 65 72 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d on.ForGetter(ByVal.member.As.Edm
80020 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 Member).As.String..........If.me
80040 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 mber.Is.Nothing.Then............
80060 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 ..Return.Nothing..........End.If
80080 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 74 65 72 41 63 63 65 73 73 20 41 73 20 ............Dim.getterAccess.As.
800a0 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 String.=.Nothing..........Dim.se
800c0 74 74 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a tterAccess.As.String.=.Nothing..
800e0 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 20 41 73 20 53 74 ........Dim.propertyAccess.As.St
80100 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 75 6c 61 74 ring.=.Nothing..........Calculat
80120 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 70 ePropertyAccessibility(member,.p
80140 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 ropertyAccess,.getterAccess,.set
80160 74 65 72 41 63 63 65 73 73 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 67 65 74 74 65 terAccess)..........Return.gette
80180 72 41 63 63 65 73 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 rAccess......End.Function.......
801a0 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 .'''.<summary>......'''.Gets.the
801c0 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 .accessibility.that.should.be.ap
801e0 70 6c 69 65 64 20 61 74 20 74 68 65 20 73 65 74 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 6f plied.at.the.set.level.for.a.pro
80200 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 74 65 64 20 66 perty.being......'''.generated.f
80220 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 rom.the.provided.EdmMember......
80240 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 65 6d 70 74 79 20 .'''......'''.defaults.to.empty.
80260 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 20 6f 72 20 74 68 65 if.no.annotation.is.found.or.the
80280 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 .accessibility.is.the.same.as.th
802a0 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d e.property.level.......'''.</sum
802c0 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f mary>......Public.Shared.Functio
802e0 6e 20 46 6f 72 53 65 74 74 65 72 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d n.ForSetter(ByVal.member.As.EdmM
80300 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d ember).As.String..........If.mem
80320 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ber.Is.Nothing.Then.............
80340 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d .Return.Nothing..........End.If.
80360 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 74 65 72 41 63 63 65 73 73 20 41 73 20 53 ...........Dim.getterAccess.As.S
80380 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 74 tring.=.Nothing..........Dim.set
803a0 74 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 terAccess.As.String.=.Nothing...
803c0 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 20 41 73 20 53 74 72 .......Dim.propertyAccess.As.Str
803e0 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 75 6c 61 74 65 ing.=.Nothing..........Calculate
80400 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 70 72 PropertyAccessibility(member,.pr
80420 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 opertyAccess,.getterAccess,.sett
80440 65 72 41 63 63 65 73 73 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 73 65 74 74 65 72 erAccess)..........Return.setter
80460 41 63 63 65 73 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 Access......End.Function........
80480 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 '''.<summary>......'''.Gets.the.
804a0 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 accessibility.that.should.be.app
804c0 6c 69 65 64 20 74 6f 20 61 20 6d 65 74 68 6f 64 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 lied.to.a.method.being.generated
804e0 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 46 75 6e 63 74 69 6f 6e 2e 0d .from.the.provided.EdmFunction..
80500 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 75 .....'''......'''.defaults.to.pu
80520 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d blic.if.no.annotation.is.found..
80540 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
80560 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 4d 65 74 68 6f 64 28 42 79 56 61 6c 20 Shared.Function.ForMethod(ByVal.
80580 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 20 45 64 6d 46 75 6e 63 74 69 6f 6e 29 20 41 73 20 53 edmFunction.As.EdmFunction).As.S
805a0 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 49 73 tring..........If.edmFunction.Is
805c0 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 .Nothing.Then..............Retur
805e0 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 n.Nothing..........End.If.......
80600 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 65 64 6d .....Return.GetAccessibility(edm
80620 46 75 6e 63 74 69 6f 6e 2c 20 4d 45 54 48 4f 44 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e Function,.METHOD_ACCESS)......En
80640 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 d.Function........Private.Shared
80660 20 53 75 62 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c .Sub.CalculatePropertyAccessibil
80680 69 74 79 28 42 79 56 61 6c 20 69 74 65 6d 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 2c 20 ity(ByVal.item.As.MetadataItem,.
806a0 42 79 52 65 66 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 ByRef.propertyAccessibility.As.S
806c0 74 72 69 6e 67 2c 20 42 79 52 65 66 20 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 tring,.ByRef.getterAccessibility
806e0 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 .As.String,.ByRef.setterAccessib
80700 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 67 65 74 74 65 72 ility.As.String)..........getter
80720 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 Accessibility.=.GetAccessibility
80740 28 69 74 65 6d 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 20 20 20 20 44 (item,.GETTER_ACCESS)..........D
80760 69 6d 20 67 65 74 74 65 72 52 61 6e 6b 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 41 63 63 65 73 im.getterRank.As.Integer.=.Acces
80780 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 28 67 65 74 74 65 72 41 63 63 65 73 sibilityRankIdLookup(getterAcces
807a0 73 69 62 69 6c 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 65 74 74 65 72 41 63 63 65 73 sibility)............setterAcces
807c0 73 69 62 69 6c 69 74 79 20 3d 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d sibility.=.GetAccessibility(item
807e0 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 ,.SETTER_ACCESS)..........Dim.se
80800 74 74 65 72 52 61 6e 6b 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 41 63 63 65 73 73 69 62 69 6c tterRank.As.Integer.=.Accessibil
80820 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 28 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c ityRankIdLookup(setterAccessibil
80840 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 70 65 72 74 79 52 61 6e 6b ity)............Dim.propertyRank
80860 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 4d 61 74 68 2e 4d 61 78 28 67 65 74 74 65 72 52 61 6e .As.Integer.=.Math.Max(getterRan
80880 6b 2c 20 73 65 74 74 65 72 52 61 6e 6b 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 73 65 74 74 65 k,.setterRank)..........If.sette
808a0 72 52 61 6e 6b 20 3d 20 70 72 6f 70 65 72 74 79 52 61 6e 6b 20 54 68 65 6e 0d 0a 20 20 20 20 20 rRank.=.propertyRank.Then.......
808c0 20 20 20 20 20 20 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 53 74 72 .......setterAccessibility.=.Str
808e0 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 ing.Empty..........End.If.......
80900 20 20 20 20 20 49 66 20 67 65 74 74 65 72 52 61 6e 6b 20 3d 20 70 72 6f 70 65 72 74 79 52 61 6e .....If.getterRank.=.propertyRan
80920 6b 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 74 65 72 41 63 63 65 73 73 k.Then..............getterAccess
80940 69 62 69 6c 69 74 79 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 ibility.=.String.Empty..........
80960 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 End.If............propertyAccess
80980 69 62 69 6c 69 74 79 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f ibility.=.AccessibilityRankIdLoo
809a0 6b 75 70 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 76 29 20 76 2e 56 61 6c 75 65 20 3d 20 kup.Where(Function(v).v.Value.=.
809c0 70 72 6f 70 65 72 74 79 52 61 6e 6b 29 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 76 29 propertyRank).Select(Function(v)
809e0 20 76 2e 4b 65 79 29 2e 53 69 6e 67 6c 65 28 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d .v.Key).Single()......End.Sub...
80a00 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 .....Private.Shared.Function.Get
80a20 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 42 79 56 61 6c 20 69 74 65 6d 20 41 73 20 4d 65 74 61 Accessibility(ByVal.item.As.Meta
80a40 64 61 74 61 49 74 65 6d 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 dataItem,.ByVal.name.As.String).
80a60 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 61 63 63 65 73 73 69 62 69 As.String..........Dim.accessibi
80a80 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 lity.As.String.=.Nothing........
80aa0 20 20 49 66 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 2e 54 72 79 47 65 74 53 74 72 69 6e 67 4d ..If.MetadataTools.TryGetStringM
80ac0 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 28 69 74 65 6d 2c 20 6e 61 6d etadataPropertySetting(item,.nam
80ae0 65 2c 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 e,.accessibility).Then..........
80b00 20 20 20 20 52 65 74 75 72 6e 20 54 72 61 6e 73 6c 61 74 65 55 73 65 72 41 63 63 65 73 73 69 62 ....Return.TranslateUserAccessib
80b20 69 6c 69 74 79 54 6f 43 53 68 61 72 70 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 61 63 63 65 73 ilityToCSharpAccessibility(acces
80b40 73 69 62 69 6c 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 sibility)..........End.If.......
80b60 20 20 20 20 20 52 65 74 75 72 6e 20 22 50 75 62 6c 69 63 22 0d 0a 20 20 20 20 45 6e 64 20 46 75 .....Return."Public"......End.Fu
80b80 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 46 75 6e nction........Private.Shared.Fun
80ba0 63 74 69 6f 6e 20 54 72 61 6e 73 6c 61 74 65 55 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 ction.TranslateUserAccessibility
80bc0 54 6f 43 53 68 61 72 70 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 42 79 56 61 6c 20 75 73 65 72 ToCSharpAccessibility(ByVal.user
80be0 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 Accessibility.As.String).As.Stri
80c00 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 ng..........If.userAccessibility
80c20 20 3d 20 41 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 44 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 .=.ACCESS_PROTECTED.Then........
80c40 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 50 72 6f 74 65 63 74 65 64 22 0d 0a 20 20 20 20 20 20 ......Return."Protected"........
80c60 20 20 45 6c 73 65 49 66 20 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 43 43 ..ElseIf.userAccessibility.=.ACC
80c80 45 53 53 5f 49 4e 54 45 52 4e 41 4c 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 ESS_INTERNAL.Then..............R
80ca0 65 74 75 72 6e 20 22 46 72 69 65 6e 64 22 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 75 eturn."Friend"..........ElseIf.u
80cc0 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 43 43 45 53 53 5f 50 52 49 56 41 54 serAccessibility.=.ACCESS_PRIVAT
80ce0 45 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 50 72 69 76 E.Then..............Return."Priv
80d00 61 74 65 22 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ate"..........Else..............
80d20 27 20 64 65 66 61 75 6c 74 20 74 6f 20 70 75 62 6c 69 63 0d 0a 20 20 20 20 20 20 20 20 20 20 20 '.default.to.public.............
80d40 20 52 65 74 75 72 6e 20 22 50 75 62 6c 69 63 22 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 .Return."Public"..........End.If
80d60 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 45 6e 64 20 43 6c 61 73 73 0d ......End.Function....End.Class.
80d80 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c ...'''.<summary>..'''.Responsibl
80da0 65 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 73 6f 75 72 63 65 20 63 6f 64 65 20 72 65 67 69 6f e.for.creating.source.code.regio
80dc0 6e 73 20 69 6e 20 63 6f 64 65 20 77 68 65 6e 20 74 68 65 20 6c 6f 6f 70 20 69 6e 73 69 64 65 0d ns.in.code.when.the.loop.inside.
80de0 0a 27 27 27 20 61 63 74 75 61 6c 6c 79 20 70 72 6f 64 75 63 65 73 20 73 6f 6d 65 74 68 69 6e 67 .'''.actually.produces.something
80e00 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 ...'''.</summary>..Public.Class.
80e20 43 6f 64 65 52 65 67 69 6f 6e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 53 54 CodeRegion......Private.Const.ST
80e40 41 4e 44 41 52 44 5f 49 4e 44 45 4e 54 5f 4c 45 4e 47 54 48 20 41 73 20 49 6e 74 65 67 65 72 20 ANDARD_INDENT_LENGTH.As.Integer.
80e60 3d 20 34 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 =.4........Private.ReadOnly._tex
80e80 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 tTransformation.As.DynamicTextTr
80ea0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 62 65 66 6f 72 ansformation......Private._befor
80ec0 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 41 73 20 49 6e 74 65 67 65 72 0d 0a 20 20 20 20 50 72 eRegionLength.As.Integer......Pr
80ee0 69 76 61 74 65 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 41 73 20 49 6e 74 65 ivate._emptyRegionLength.As.Inte
80f00 67 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 ger......Private._regionIndentLe
80f20 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 2d 31 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c vel.As.Integer.=.-1........'''.<
80f40 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e summary>......'''.Initializes.an
80f60 20 43 6f 64 65 52 65 67 69 6f 6e 20 69 6e 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 .CodeRegion.instance.with.the...
80f80 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 ...'''.TextTransformation.(T4.ge
80fa0 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 nerated.class).that.is.currently
80fc0 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 .running......'''.</summary>....
80fe0 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 ..Public.Sub.New(ByVal.textTrans
81000 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 49 66 formation.As.Object)..........If
81020 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 .textTransformation.Is.Nothing.T
81040 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d hen..............Throw.New.Argum
81060 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 entNullException("textTransforma
81080 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 tion")..........End.If..........
810a0 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 .._textTransformation.=.DynamicT
810c0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 extTransformation.Create(textTra
810e0 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 nsformation)......End.Sub.......
81100 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 .'''.<summary>......'''.Initiali
81120 7a 65 73 20 61 6e 20 43 6f 64 65 52 65 67 69 6f 6e 20 69 6e 73 74 61 6e 63 65 20 77 69 74 68 20 zes.an.CodeRegion.instance.with.
81140 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 the......'''.TextTransformation.
81160 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 (T4.generated.class).that.is.cur
81180 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 2c 0d 0a 20 20 20 20 27 27 27 20 61 6e 64 20 74 68 65 rently.running,......'''.and.the
811a0 20 69 6e 64 65 6e 74 20 6c 65 76 65 6c 20 74 6f 20 73 74 61 72 74 20 74 68 65 20 66 69 72 73 74 .indent.level.to.start.the.first
811c0 20 72 65 67 69 6f 6e 20 61 74 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d .region.at.......'''.</summary>.
811e0 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 .....Public.Sub.New(ByVal.textTr
81200 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 2c 20 42 79 56 61 6c 20 66 69 ansformation.As.Object,.ByVal.fi
81220 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 rstIndentLevel.As.Integer)......
81240 20 20 20 20 4d 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a ....Me.New(textTransformation)..
81260 20 20 20 20 20 20 20 20 49 66 20 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 3c 20 30 20 ........If.firstIndentLevel.<.0.
81280 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 Then..............Throw.New.Argu
812a0 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 22 mentException("firstIndentLevel"
812c0 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 )..........End.If............_re
812e0 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 3d 20 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 gionIndentLevel.=.firstIndentLev
81300 65 6c 20 2d 20 31 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c el.-.1......End.Sub........'''.<
81320 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 53 74 61 72 74 73 20 74 68 65 20 62 65 67 summary>......'''.Starts.the.beg
81340 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d ining.of.a.region......'''.</sum
81360 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 42 65 67 69 6e 28 42 79 56 61 mary>......Public.Sub.Begin(ByVa
81380 6c 20 72 65 67 69 6f 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 l.regionName.As.String).........
813a0 20 49 66 20 72 65 67 69 6f 6e 4e 61 6d 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a .If.regionName.Is.Nothing.Then..
813c0 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 ............Throw.New.ArgumentNu
813e0 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 72 65 67 69 6f 6e 4e 61 6d 65 22 29 0d 0a 20 20 20 20 20 llException("regionName").......
81400 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 42 65 67 69 6e 28 72 65 67 69 6f ...End.If............Begin(regio
81420 6e 4e 61 6d 65 2c 20 31 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 nName,.1)......End.Sub........''
81440 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 53 74 61 72 74 20 74 68 65 20 62 '.<summary>......'''.Start.the.b
81460 65 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 2c 20 69 6e 64 65 6e 74 65 64 0d 0a 20 egining.of.a.region,.indented...
81480 20 20 20 27 27 27 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f 66 20 6c 65 76 65 6c 73 20 73 70 65 ...'''.the.numbers.of.levels.spe
814a0 63 69 66 69 65 64 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 cified......'''.</summary>......
814c0 50 75 62 6c 69 63 20 53 75 62 20 42 65 67 69 6e 28 42 79 56 61 6c 20 72 65 67 69 6f 6e 4e 61 6d Public.Sub.Begin(ByVal.regionNam
814e0 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6c 65 76 65 6c 73 54 6f 49 6e 63 72 65 e.As.String,.ByVal.levelsToIncre
81500 61 73 65 49 6e 64 65 6e 74 20 41 73 20 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 49 aseIndent.As.Integer)..........I
81520 66 20 72 65 67 69 6f 6e 4e 61 6d 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 f.regionName.Is.Nothing.Then....
81540 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c ..........Throw.New.ArgumentNull
81560 45 78 63 65 70 74 69 6f 6e 28 22 72 65 67 69 6f 6e 4e 61 6d 65 22 29 0d 0a 20 20 20 20 20 20 20 Exception("regionName").........
81580 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e .End.If............_beforeRegion
815a0 4c 65 6e 67 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e Length.=._textTransformation.Gen
815c0 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 0d 0a 20 20 20 20 20 erationEnvironment.Length.......
815e0 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2b 3d 20 6c 65 76 65 6c 73 54 ..._regionIndentLevel.+=.levelsT
81600 6f 49 6e 63 72 65 61 73 65 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 oIncreaseIndent.........._textTr
81620 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 47 65 74 49 6e 64 65 6e 74 28 5f 72 65 ansformation.Write(GetIndent(_re
81640 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 gionIndentLevel)).........._text
81660 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 22 23 52 65 67 69 6f Transformation.WriteLine("#Regio
81680 6e 20 22 22 22 20 2b 20 72 65 67 69 6f 6e 4e 61 6d 65 20 2b 20 22 22 22 22 29 0d 0a 20 20 20 20 n.""".+.regionName.+."""")......
816a0 20 20 20 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 5f 74 65 78 74 54 72 ...._emptyRegionLength.=._textTr
816c0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 ansformation.GenerationEnvironme
816e0 6e 74 2e 4c 65 6e 67 74 68 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 nt.Length......End.Sub........''
81700 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 45 6e 64 73 20 61 20 72 65 67 69 '.<summary>......'''.Ends.a.regi
81720 6f 6e 2c 20 6f 72 20 74 6f 74 61 6c 79 20 72 65 6d 6f 76 65 73 20 69 74 20 69 66 20 6e 6f 74 68 on,.or.totaly.removes.it.if.noth
81740 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 77 61 73 20 67 65 6e 65 72 74 65 64 20 73 69 6e 63 65 20 ing......'''.was.generted.since.
81760 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 74 68 65 20 72 65 67 69 6f 6e 2e 0d 0a 20 20 20 the.begining.of.the.region......
81780 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 .'''.</summary>......Public.Sub.
817a0 5b 45 6e 64 5d 28 29 0d 0a 20 20 20 20 20 20 20 20 5b 45 6e 64 5d 28 31 29 0d 0a 20 20 20 20 45 [End]()..........[End](1)......E
817c0 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 nd.Sub........'''.<summary>.....
817e0 20 27 27 27 20 45 6e 64 73 20 61 20 72 65 67 69 6f 6e 2c 20 6f 72 20 74 6f 74 61 6c 79 20 72 65 .'''.Ends.a.region,.or.totaly.re
81800 6d 6f 76 65 73 20 69 74 20 69 66 20 6e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 77 61 73 moves.it.if.nothing......'''.was
81820 20 67 65 6e 65 72 74 65 64 20 73 69 6e 63 65 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 .generted.since.the.begining.of.
81840 74 68 65 20 72 65 67 69 6f 6e 2c 20 61 6c 73 6f 20 6f 75 74 64 65 6e 74 73 0d 0a 20 20 20 20 27 the.region,.also.outdents......'
81860 27 27 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 6c 65 76 65 6c 73 20 73 70 65 63 69 66 69 65 ''.the.number.of.levels.specifie
81880 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c d.......'''.</summary>......Publ
818a0 69 63 20 53 75 62 20 5b 45 6e 64 5d 28 42 79 56 61 6c 20 6c 65 76 65 6c 73 54 6f 44 65 63 72 65 ic.Sub.[End](ByVal.levelsToDecre
818c0 61 73 65 20 41 73 20 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 6e 64 ase.As.Integer)..........Dim.ind
818e0 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 5f 72 65 67 69 6f 6e 49 6e 64 entLevel.As.Integer.=._regionInd
81900 65 6e 74 4c 65 76 65 6c 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c entLevel.........._regionIndentL
81920 65 76 65 6c 20 2d 3d 20 6c 65 76 65 6c 73 54 6f 44 65 63 72 65 61 73 65 0d 0a 0d 0a 20 20 20 20 evel.-=.levelsToDecrease........
81940 20 20 20 20 49 66 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 5f 74 65 78 ....If._emptyRegionLength.=._tex
81960 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f tTransformation.GenerationEnviro
81980 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f nment.Length.Then.............._
819a0 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 textTransformation.GenerationEnv
819c0 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c ironment.Length.=._beforeRegionL
819e0 65 6e 67 74 68 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ength..........Else.............
81a00 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 53 ._textTransformation.WriteLine(S
81a20 74 72 69 6e 67 2e 45 6d 70 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 tring.Empty).............._textT
81a40 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 47 65 74 49 6e 64 65 6e 74 28 69 6e ransformation.Write(GetIndent(in
81a60 64 65 6e 74 4c 65 76 65 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 dentLevel)).............._textTr
81a80 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 22 23 45 6e 64 20 52 65 67 ansformation.WriteLine("#End.Reg
81aa0 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 ion").............._textTransfor
81ac0 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 53 74 72 69 6e 67 2e 45 6d 70 74 79 29 0d 0a mation.WriteLine(String.Empty)..
81ae0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 ........End.If......End.Sub.....
81b00 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 ...'''.<summary>......'''.Gets.t
81b20 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 6c 65 76 65 6c 20 74 68 61 74 20 74 68 65 he.current.indent.level.that.the
81b40 20 6e 65 78 74 20 65 6e 64 20 72 65 67 69 6f 6e 20 73 74 61 74 65 6d 65 6e 74 20 77 69 6c 6c 20 .next.end.region.statement.will.
81b60 62 65 20 77 72 69 74 74 65 6e 0d 0a 20 20 20 20 27 27 27 20 61 74 0d 0a 20 20 20 20 27 27 27 20 be.written......'''.at......'''.
81b80 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 </summary>......Public.ReadOnly.
81ba0 50 72 6f 70 65 72 74 79 20 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 28 29 20 41 73 Property.CurrentIndentLevel().As
81bc0 20 49 6e 74 65 67 65 72 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 .Integer..........Get...........
81be0 20 20 20 52 65 74 75 72 6e 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 0d 0a 20 20 ...Return._regionIndentLevel....
81c00 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d ......End.Get......End.Property.
81c20 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 .......'''.<summary>......'''.Ge
81c40 74 20 61 20 73 74 72 69 6e 67 20 6f 66 20 73 70 61 63 65 73 20 65 71 75 69 76 65 6c 65 6e 74 20 t.a.string.of.spaces.equivelent.
81c60 74 6f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 69 6e 64 65 6e 74 73 0d 0a 20 20 20 20 27 27 to.the.number.of.indents......''
81c80 27 20 64 65 73 69 72 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a '.desired.......'''.</summary>..
81ca0 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 49 6e ....Public.Shared.Function.GetIn
81cc0 64 65 6e 74 28 42 79 56 61 6c 20 69 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 dent(ByVal.indentLevel.As.Intege
81ce0 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 69 6e 64 65 6e 74 4c r).As.String..........If.indentL
81d00 65 76 65 6c 20 3c 20 30 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 evel.<.0.Then..............Throw
81d20 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 69 6e 64 65 6e 74 4c 65 .New.ArgumentException("indentLe
81d40 76 65 6c 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 vel")..........End.If...........
81d60 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 2e 50 61 64 4c 65 66 74 28 69 6e 64 .Return.String.Empty.PadLeft(ind
81d80 65 6e 74 4c 65 76 65 6c 20 2a 20 53 54 41 4e 44 41 52 44 5f 49 4e 44 45 4e 54 5f 4c 45 4e 47 54 entLevel.*.STANDARD_INDENT_LENGT
81da0 48 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 73 73 0d H)......End.Function..End.Class.
81dc0 0a 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 .....'''.<summary>..'''.Responsi
81de0 62 6c 65 20 66 6f 72 20 63 6f 6c 6c 65 63 74 69 6e 67 20 74 6f 67 65 74 68 65 72 20 74 68 65 20 ble.for.collecting.together.the.
81e00 61 63 74 75 61 6c 20 6d 65 74 68 6f 64 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 27 27 27 20 61 6e actual.method.parameters..'''.an
81e20 64 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 74 68 61 74 20 6e 65 65 64 20 74 6f 20 62 65 d.the.parameters.that.need.to.be
81e40 20 73 65 6e 74 20 74 6f 20 74 68 65 20 45 78 65 63 75 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 27 27 .sent.to.the.Execute.method...''
81e60 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 46 75 6e 63 74 '.</summary>..Public.Class.Funct
81e80 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 0d 0a 50 72 69 76 61 74 65 20 5f 53 6f 75 ionImportParameter..Private._Sou
81ea0 72 63 65 20 41 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 0d 0a 20 20 20 20 50 75 rce.As.FunctionParameter......Pu
81ec0 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 53 6f 75 72 63 65 28 29 20 41 73 20 46 75 6e 63 74 69 blic.Property.Source().As.Functi
81ee0 6f 6e 50 61 72 61 6d 65 74 65 72 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 onParameter..........Get........
81f00 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 53 6f 75 72 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e ......Return._Source..........En
81f20 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 d.Get..........Set(ByVal.value.A
81f40 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 s.FunctionParameter)............
81f60 20 20 5f 53 6f 75 72 63 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 .._Source.=.value..........End.S
81f80 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 52 et......End.Property..Private._R
81fa0 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e awFunctionParameterName.As.Strin
81fc0 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 52 61 77 46 75 6e 63 74 69 g......Public.Property.RawFuncti
81fe0 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 onParameterName().As.String.....
82000 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 52 61 .....Get..............Return._Ra
82020 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 wFunctionParameterName..........
82040 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 End.Get..........Set(ByVal.value
82060 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 52 61 77 46 75 6e .As.String).............._RawFun
82080 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 ctionParameterName.=.value......
820a0 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 ....End.Set......End.Property..P
820c0 72 69 76 61 74 65 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 rivate._FunctionParameterName.As
820e0 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6e .String......Public.Property.Fun
82100 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a ctionParameterName().As.String..
82120 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ........Get..............Return.
82140 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 _FunctionParameterName..........
82160 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 End.Get..........Set(ByVal.value
82180 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 46 75 6e 63 74 69 .As.String).............._Functi
821a0 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 onParameterName.=.value.........
821c0 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 .End.Set......End.Property..Priv
821e0 61 74 65 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 41 73 20 53 74 ate._FunctionParameterType.As.St
82200 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6e 63 74 69 ring......Public.Property.Functi
82220 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 onParameterType().As.String.....
82240 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 46 75 .....Get..............Return._Fu
82260 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 nctionParameterType..........End
82280 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 .Get..........Set(ByVal.value.As
822a0 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 46 75 6e 63 74 69 6f 6e 50 .String).............._FunctionP
822c0 61 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e arameterType.=.value..........En
822e0 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 d.Set......End.Property..Private
82300 20 5f 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 ._LocalVariableName.As.String...
82320 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 ...Public.Property.LocalVariable
82340 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 Name().As.String..........Get...
82360 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 ...........Return._LocalVariable
82380 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 Name..........End.Get..........S
823a0 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 et(ByVal.value.As.String).......
823c0 20 20 20 20 20 20 20 5f 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 20 3d 20 76 61 6c 75 ......._LocalVariableName.=.valu
823e0 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 e..........End.Set......End.Prop
82400 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 20 41 73 erty..Private._RawClrTypeName.As
82420 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 52 61 77 .String......Public.Property.Raw
82440 43 6c 72 54 79 70 65 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 ClrTypeName().As.String.........
82460 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 52 61 77 43 6c 72 .Get..............Return._RawClr
82480 54 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 TypeName..........End.Get.......
824a0 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 ...Set(ByVal.value.As.String)...
824c0 20 20 20 20 20 20 20 20 20 20 20 5f 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 20 3d 20 76 61 6c ..........._RawClrTypeName.=.val
824e0 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f ue..........End.Set......End.Pro
82500 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 perty..Private._ExecuteParameter
82520 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 Name.As.String......Public.Prope
82540 72 74 79 20 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 20 41 73 20 53 74 rty.ExecuteParameterName().As.St
82560 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 ring..........Get..............R
82580 65 74 75 72 6e 20 5f 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 0d 0a 20 20 20 eturn._ExecuteParameterName.....
825a0 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 .....End.Get..........Set(ByVal.
825c0 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 45 value.As.String).............._E
825e0 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 xecuteParameterName.=.value.....
82600 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a .....End.Set......End.Property..
82620 50 72 69 76 61 74 65 20 5f 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 Private._EsqlParameterName.As.St
82640 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 45 73 71 6c 50 61 ring......Public.Property.EsqlPa
82660 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 rameterName().As.String.........
82680 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 45 73 71 6c 50 61 .Get..............Return._EsqlPa
826a0 72 61 6d 65 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 rameterName..........End.Get....
826c0 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 ......Set(ByVal.value.As.String)
826e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 .............._EsqlParameterName
82700 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 .=.value..........End.Set......E
82720 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 4e 65 65 64 73 4c 6f 63 61 6c nd.Property..Private._NeedsLocal
82740 56 61 72 69 61 62 6c 65 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 Variable.As.Boolean......Public.
82760 50 72 6f 70 65 72 74 79 20 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 28 29 20 41 73 Property.NeedsLocalVariable().As
82780 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 .Boolean..........Get...........
827a0 20 20 20 52 65 74 75 72 6e 20 5f 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 0d 0a 20 ...Return._NeedsLocalVariable...
827c0 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 .......End.Get..........Set(ByVa
827e0 6c 20 76 61 6c 75 65 20 41 73 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 l.value.As.Boolean).............
82800 20 5f 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 ._NeedsLocalVariable.=.value....
82820 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d ......End.Set......End.Property.
82840 0a 50 72 69 76 61 74 65 20 5f 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 41 73 20 42 6f 6f 6c 65 .Private._IsNullableOfT.As.Boole
82860 61 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 49 73 4e 75 6c 6c 61 62 an......Public.Property.IsNullab
82880 6c 65 4f 66 54 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d leOfT().As.Boolean..........Get.
828a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 49 73 4e 75 6c 6c 61 62 6c 65 4f .............Return._IsNullableO
828c0 66 54 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 fT..........End.Get..........Set
828e0 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 20 20 (ByVal.value.As.Boolean)........
82900 20 20 20 20 20 20 5f 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 3d 20 76 61 6c 75 65 0d 0a 20 20 ......_IsNullableOfT.=.value....
82920 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d ......End.Set......End.Property.
82940 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 .........'''.<summary>......'''.
82960 43 72 65 61 74 65 73 20 61 20 73 65 74 20 6f 66 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 Creates.a.set.of.FunctionImportP
82980 61 72 61 6d 65 74 65 72 20 6f 62 6a 65 63 74 73 20 66 72 6f 6d 20 74 68 65 20 70 61 72 61 6d 65 arameter.objects.from.the.parame
829a0 74 65 72 73 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 ters.passed.in.......'''.</summa
829c0 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 ry>......Public.Shared.Function.
829e0 43 72 65 61 74 65 28 42 79 56 61 6c 20 70 61 72 61 6d 65 74 65 72 73 20 41 73 20 49 45 6e 75 6d Create(ByVal.parameters.As.IEnum
82a00 65 72 61 62 6c 65 28 4f 66 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 29 2c 20 42 79 erable(Of.FunctionParameter),.By
82a20 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2c Val.code.As.CodeGenerationTools,
82a40 20 42 79 56 61 6c 20 65 66 20 41 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 29 20 41 73 20 49 .ByVal.ef.As.MetadataTools).As.I
82a60 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 Enumerable(Of.FunctionImportPara
82a80 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 70 61 72 61 6d 65 74 65 72 73 20 49 73 meter)..........If.parameters.Is
82aa0 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 .Nothing.Then..............Throw
82ac0 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 70 61 72 61 .New.ArgumentNullException("para
82ae0 6d 65 74 65 72 73 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 meters")..........End.If........
82b00 20 20 20 20 49 66 20 63 6f 64 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 ....If.code.Is.Nothing.Then.....
82b20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 .........Throw.New.ArgumentNullE
82b40 78 63 65 70 74 69 6f 6e 28 22 63 6f 64 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 xception("code")..........End.If
82b60 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 66 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 ............If.ef.Is.Nothing.The
82b80 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e n..............Throw.New.Argumen
82ba0 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 65 66 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e tNullException("ef")..........En
82bc0 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 75 6e 69 71 75 65 20 41 73 20 4e 65 d.If............Dim.unique.As.Ne
82be0 77 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 28 29 0d 0a 20 20 20 w.UniqueIdentifierService().....
82c00 20 20 20 20 20 44 69 6d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 20 41 73 20 4e 65 77 .....Dim.importParameters.As.New
82c20 20 4c 69 73 74 28 4f 66 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 .List(Of.FunctionImportParameter
82c40 29 28 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 72 61 6d 65 74 65 72 20 )()..........For.Each.parameter.
82c60 41 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 20 49 6e 20 70 61 72 61 6d 65 74 65 As.FunctionParameter.In.paramete
82c80 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 rs..............Dim.importParame
82ca0 74 65 72 20 41 73 20 4e 65 77 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 ter.As.New.FunctionImportParamet
82cc0 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 er()..............importParamete
82ce0 72 2e 53 6f 75 72 63 65 20 3d 20 70 61 72 61 6d 65 74 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 r.Source.=.parameter............
82d00 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 ..importParameter.RawFunctionPar
82d20 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 ameterName.=.unique.AdjustIdenti
82d40 66 69 65 72 28 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 70 61 72 61 6d 65 74 65 72 2e 4e 61 fier(code.CamelCase(parameter.Na
82d60 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 me))..............importParamete
82d80 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 r.FunctionParameterName.=.code.E
82da0 73 63 61 70 65 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 6f scape(importParameter.RawFunctio
82dc0 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 nParameterName)..............If.
82de0 70 61 72 61 6d 65 74 65 72 2e 4d 6f 64 65 20 3d 20 50 61 72 61 6d 65 74 65 72 4d 6f 64 65 2e 49 parameter.Mode.=.ParameterMode.I
82e00 6e 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 n.Then..................Dim.type
82e20 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 20 3d 20 70 61 72 61 6d 65 74 65 72 2e 54 Usage.As.TypeUsage.=.parameter.T
82e40 79 70 65 55 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 ypeUsage..................import
82e60 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 3d 20 54 Parameter.NeedsLocalVariable.=.T
82e80 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d rue..................importParam
82ea0 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 63 6f 64 eter.FunctionParameterType.=.cod
82ec0 65 2e 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 20 20 e.GetTypeName(typeUsage)........
82ee0 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 ..........importParameter.EsqlPa
82f00 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 70 61 72 61 6d 65 74 65 72 2e 4e 61 6d 65 0d 0a 20 20 rameterName.=.parameter.Name....
82f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 63 6c 72 54 79 70 65 20 41 73 20 54 79 70 ..............Dim.clrType.As.Typ
82f40 65 20 3d 20 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 70 61 72 61 6d 65 74 e.=.ef.UnderlyingClrType(paramet
82f60 65 72 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 er.TypeUsage.EdmType)...........
82f80 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 43 6c 72 54 79 70 .......importParameter.RawClrTyp
82fa0 65 4e 61 6d 65 20 3d 20 49 66 28 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 eName.=.If(TypeOf.typeUsage.EdmT
82fc0 79 70 65 20 49 73 20 45 6e 75 6d 54 79 70 65 2c 20 63 6f 64 65 2e 47 65 74 54 79 70 65 4e 61 6d ype.Is.EnumType,.code.GetTypeNam
82fe0 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 2c 20 63 6f 64 65 2e 45 73 63 61 70 e(typeUsage.EdmType),.code.Escap
83000 65 28 63 6c 72 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 e(clrType))..................imp
83020 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 20 3d 20 63 6c 72 ortParameter.IsNullableOfT.=.clr
83040 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6c Type.IsValueType..............El
83060 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 se..................importParame
83080 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 3d 20 46 61 6c 73 65 0d 0a ter.NeedsLocalVariable.=.False..
830a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e ................importParameter.
830c0 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 22 4f 62 6a 65 63 74 50 FunctionParameterType.=."ObjectP
830e0 61 72 61 6d 65 74 65 72 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 arameter"..................impor
83100 74 50 61 72 61 6d 65 74 65 72 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 tParameter.ExecuteParameterName.
83120 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 =.importParameter.FunctionParame
83140 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 terName..............End.If.....
83160 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 2e 41 64 64 28 69 6d .........importParameters.Add(im
83180 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a portParameter)..........Next....
831a0 20 20 20 20 20 20 20 20 27 20 77 65 20 73 61 76 65 20 74 68 65 20 6c 6f 63 61 6c 20 70 61 72 61 ........'.we.save.the.local.para
831c0 6d 65 74 65 72 20 75 6e 69 71 75 69 66 69 63 61 74 69 6f 6e 20 66 6f 72 20 61 20 73 65 63 6f 6e meter.uniquification.for.a.secon
831e0 64 20 70 61 73 73 20 74 6f 20 6d 61 6b 65 20 74 68 65 20 76 69 73 69 62 6c 65 20 70 61 72 61 6d d.pass.to.make.the.visible.param
83200 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 27 20 61 73 20 70 72 65 74 74 79 20 61 6e 64 20 73 eters..........'.as.pretty.and.s
83220 65 6e 73 69 62 6c 65 20 61 73 20 70 6f 73 73 69 62 6c 65 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 ensible.as.possible..........For
83240 20 69 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 30 20 54 6f 20 69 6d 70 6f 72 74 50 61 72 61 6d .i.As.Integer.=.0.To.importParam
83260 65 74 65 72 73 2e 43 6f 75 6e 74 20 2d 20 31 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d eters.Count.-.1..............Dim
83280 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 41 73 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f .importParameter.As.FunctionImpo
832a0 72 74 50 61 72 61 6d 65 74 65 72 20 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 28 69 rtParameter.=.importParameters(i
832c0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 )..............If.importParamete
832e0 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 r.NeedsLocalVariable.Then.......
83300 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c ...........importParameter.Local
83320 56 61 72 69 61 62 6c 65 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 65 6e VariableName.=.unique.AdjustIden
83340 74 69 66 69 65 72 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 77 46 75 6e 63 74 69 tifier(importParameter.RawFuncti
83360 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 26 20 22 50 61 72 61 6d 65 74 65 72 22 29 0d 0a onParameterName.&."Parameter")..
83380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e ................importParameter.
833a0 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 69 6d 70 6f 72 74 50 61 72 ExecuteParameterName.=.importPar
833c0 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 ameter.LocalVariableName........
833e0 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 ......End.If..........Next......
83400 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 0d 0a 20 ......Return.importParameters...
83420 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 0d 0a 20 20 20 20 27 20 ...End.Function........'......'.
83440 43 6c 61 73 73 20 74 6f 20 63 72 65 61 74 65 20 75 6e 69 71 75 65 20 76 61 72 69 61 62 6c 65 73 Class.to.create.unique.variables
83460 20 77 69 74 68 69 6e 20 74 68 65 20 73 61 6d 65 20 73 63 6f 70 65 0d 0a 20 20 20 20 27 0d 0a 20 .within.the.same.scope......'...
83480 20 20 20 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 61 62 6c 65 20 43 6c 61 73 73 20 ...Private.NotInheritable.Class.
834a0 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 0d 0a 20 20 20 20 20 20 20 UniqueIdentifierService.........
834c0 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 .Private.ReadOnly._knownIdentifi
834e0 65 72 73 20 41 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 0d 0a 20 20 20 ers.As.HashSet(Of.String).......
83500 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 29 0d 0a 20 20 20 20 20 20 20 20 20 .....Public.Sub.New()...........
83520 20 20 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 3d 20 4e 65 77 20 48 61 73 68 53 ..._knownIdentifiers.=.New.HashS
83540 65 74 28 4f 66 20 53 74 72 69 6e 67 29 28 53 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 4f 72 64 et(Of.String)(StringComparer.Ord
83560 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 inalIgnoreCase)..........End.Sub
83580 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 ............'''.<summary>.......
835a0 20 20 20 27 27 27 20 47 69 76 65 6e 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2c 20 6d 61 6b 65 ...'''.Given.an.identifier,.make
835c0 73 20 69 74 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 74 68 65 20 73 63 6f 70 65 20 62 79 20 s.it.unique.within.the.scope.by.
835e0 61 64 64 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 61 20 73 75 66 66 69 78 20 28 31 2c adding..........'''.a.suffix.(1,
83600 20 32 2c 20 33 2c 20 2e 2e 2e 29 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 61 64 6a .2,.3,....),.and.returns.the.adj
83620 75 73 74 65 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c usted.identifier...........'''.<
83640 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 /summary>..........Public.Functi
83660 6f 6e 20 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 42 79 56 61 6c 20 69 64 65 6e 74 69 on.AdjustIdentifier(ByVal.identi
83680 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 fier.As.String).As.String.......
836a0 20 20 20 20 20 20 20 27 20 66 69 6e 64 20 61 20 75 6e 69 71 75 65 20 6e 61 6d 65 20 62 79 20 61 .......'.find.a.unique.name.by.a
836c0 64 64 69 6e 67 20 73 75 66 66 69 78 20 61 73 20 6e 65 63 65 73 73 61 72 79 0d 0a 20 20 20 20 20 dding.suffix.as.necessary.......
836e0 20 20 20 20 20 20 20 44 69 6d 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 41 73 20 .......Dim.numberOfConflicts.As.
83700 49 6e 74 65 67 65 72 20 3d 20 30 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 61 64 6a Integer.=.0..............Dim.adj
83720 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 20 3d 20 69 64 65 6e ustedIdentifier.As.String.=.iden
83740 74 69 66 69 65 72 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 68 69 6c 65 20 4e 6f 74 20 tifier................While.Not.
83760 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 64 _knownIdentifiers.Add(adjustedId
83780 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 75 6d 62 65 entifier)..................numbe
837a0 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 2b 3d 20 31 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rOfConflicts.+=.1...............
837c0 20 20 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 69 66 69 ...adjustedIdentifier.=.identifi
837e0 65 72 20 2b 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 2e 54 6f 53 74 72 69 6e 67 28 er.+.numberOfConflicts.ToString(
83800 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 0d 0a 20 CultureInfo.InvariantCulture)...
83820 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 57 68 69 6c 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ...........End.While............
83840 20 20 20 20 52 65 74 75 72 6e 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 0d 0a 20 ....Return.adjustedIdentifier...
83860 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 .......End.Function......End.Cla
83880 73 73 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a ss..End.Class....'''.<summary>..
838a0 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6d 61 72 6b 69 6e 67 20 74 68 65 20 '''.Responsible.for.marking.the.
838c0 76 61 72 69 6f 75 73 20 73 65 63 74 69 6f 6e 73 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 69 various.sections.of.the.generati
838e0 6f 6e 2c 0d 0a 27 27 27 20 73 6f 20 74 68 65 79 20 63 61 6e 20 62 65 20 73 70 6c 69 74 20 75 70 on,..'''.so.they.can.be.split.up
83900 20 69 6e 74 6f 20 73 65 70 61 72 61 74 65 20 66 69 6c 65 73 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d .into.separate.files..'''.</summ
83920 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f ary>..Public.Class.EntityFramewo
83940 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 27 27 27 20 3c rkTemplateFileManager......'''.<
83960 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 65 61 74 65 73 20 74 68 65 20 56 73 summary>......'''.Creates.the.Vs
83980 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 EntityFrameworkTemplateFileManag
839a0 65 72 20 69 66 20 56 53 20 69 73 20 64 65 74 65 63 74 65 64 2c 20 6f 74 68 65 72 77 69 73 65 0d er.if.VS.is.detected,.otherwise.
839c0 0a 20 20 20 20 27 27 27 20 63 72 65 61 74 65 73 20 74 68 65 20 66 69 6c 65 20 73 79 73 74 65 6d .....'''.creates.the.file.system
839e0 20 76 65 72 73 69 6f 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 .version.......'''.</summary>...
83a00 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 ...Public.Shared.Function.Create
83a20 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a (ByVal.textTransformation.As.Obj
83a40 65 63 74 29 20 41 73 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 ect).As.EntityFrameworkTemplateF
83a60 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 72 61 6e 73 66 6f 72 ileManager..........Dim.transfor
83a80 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 mation.As.DynamicTextTransformat
83aa0 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e ion.=.DynamicTextTransformation.
83ac0 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 Create(textTransformation)......
83ae0 20 20 20 20 44 69 6d 20 68 6f 73 74 20 41 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 3d 20 74 ....Dim.host.As.IDynamicHost.=.t
83b00 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 49 ransformation.Host............#I
83b20 66 20 4e 6f 74 20 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 20 54 68 65 6e f.Not.PREPROCESSED_TEMPLATE.Then
83b40 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 ..........Dim.hostServiceProvide
83b60 72 20 3d 20 68 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 r.=.host.AsIServiceProvider()...
83b80 20 20 20 20 20 20 20 49 66 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 49 73 .......If.hostServiceProvider.Is
83ba0 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 Not.Nothing.Then..............Di
83bc0 6d 20 64 74 65 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 68 6f 73 74 53 65 72 76 69 63 65 50 72 m.dte.=.DirectCast(hostServicePr
83be0 6f 76 69 64 65 72 2e 47 65 74 53 65 72 76 69 63 65 28 47 65 74 54 79 70 65 28 45 6e 76 44 54 45 ovider.GetService(GetType(EnvDTE
83c00 2e 44 54 45 29 29 2c 20 45 6e 76 44 54 45 2e 44 54 45 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .DTE)),.EnvDTE.DTE).............
83c20 20 49 66 20 64 74 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 .If.dte.IsNot.Nothing.Then......
83c40 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 20 56 73 45 6e 74 69 74 79 46 ............Return.New.VsEntityF
83c60 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 74 72 61 6e rameworkTemplateFileManager(tran
83c80 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d sformation)..............End.If.
83ca0 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 49 66 .........End.If..........#End.If
83cc0 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 20 45 6e 74 69 74 79 46 72 61 6d 65 ..........Return.New.EntityFrame
83ce0 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 28 74 72 61 6e 73 66 6f 72 workTemplateFileManager(transfor
83d00 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 mation)......End.Function.......
83d20 20 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 61 62 6c 65 20 43 6c 61 73 73 20 42 6c .Private.NotInheritable.Class.Bl
83d40 6f 63 6b 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4e 61 6d 65 20 41 73 20 53 74 72 69 ock..........Public.Name.As.Stri
83d60 6e 67 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 74 61 72 74 20 41 73 20 49 6e 74 65 ng..........Public.Start.As.Inte
83d80 67 65 72 2c 20 4c 65 6e 67 74 68 20 41 73 20 49 6e 74 65 67 65 72 0d 0a 20 20 20 20 45 6e 64 20 ger,.Length.As.Integer......End.
83da0 43 6c 61 73 73 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 66 69 Class........Private.ReadOnly.fi
83dc0 6c 65 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 42 6c 6f 63 6b 29 28 29 0d 0a 20 20 20 les.As.New.List(Of.Block)().....
83de0 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 66 6f 6f 74 65 72 20 41 73 20 4e 65 77 20 .Private.ReadOnly.footer.As.New.
83e00 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 68 65 Block()......Private.ReadOnly.he
83e20 61 64 65 72 20 41 73 20 4e 65 77 20 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 50 72 69 76 61 74 65 ader.As.New.Block()......Private
83e40 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 .ReadOnly._textTransformation.As
83e60 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 0d 0a 20 20 .DynamicTextTransformation......
83e80 20 20 27 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 47 65 6e 65 72 61 74 69 6f 6e 45 ..'.reference.to.the.GenerationE
83ea0 6e 76 69 72 6f 6e 6d 65 6e 74 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 20 6f 6e 20 74 68 65 0d nvironment.StringBuilder.on.the.
83ec0 0a 20 20 20 20 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6f 62 6a 65 63 74 .....'.TextTransformation.object
83ee0 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 67 65 6e 65 72 61 74 69 ......Private.ReadOnly._generati
83f00 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 41 73 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 0d 0a onEnvironment.As.StringBuilder..
83f20 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 41 73 20 ......Private.m_currentBlock.As.
83f40 42 6c 6f 63 6b 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 Block........'''.<summary>......
83f60 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f '''.Initializes.an.EntityFramewo
83f80 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 49 6e 73 74 61 6e 63 65 20 20 rkTemplateFileManager.Instance..
83fa0 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 with.the......'''.TextTransforma
83fc0 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 tion.(T4.generated.class).that.i
83fe0 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 s.currently.running......'''.</s
84000 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 4e 65 77 28 42 79 56 ummary>......Private.Sub.New(ByV
84020 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 al.textTransformation.As.Object)
84040 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 ..........If.textTransformation.
84060 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 Is.Nothing.Then..............Thr
84080 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 ow.New.ArgumentNullException("te
840a0 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 xtTransformation")..........End.
840c0 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f If............_textTransformatio
840e0 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 n.=.DynamicTextTransformation.Cr
84100 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 eate(textTransformation)........
84120 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 5f 74 65 78 74 .._generationEnvironment.=._text
84140 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e Transformation.GenerationEnviron
84160 6d 65 6e 74 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 ment......End.Sub........'''.<su
84180 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 4d 61 72 6b 73 20 74 68 65 20 65 6e 64 20 6f 66 mmary>......'''.Marks.the.end.of
841a0 20 74 68 65 20 6c 61 73 74 20 66 69 6c 65 20 69 66 20 74 68 65 72 65 20 77 61 73 20 6f 6e 65 2c .the.last.file.if.there.was.one,
841c0 20 61 6e 64 20 73 74 61 72 74 73 20 61 20 6e 65 77 0d 0a 20 20 20 20 27 27 27 20 61 6e 64 20 6d .and.starts.a.new......'''.and.m
841e0 61 72 6b 73 20 74 68 69 73 20 70 6f 69 6e 74 20 69 6e 20 67 65 6e 65 72 61 74 69 6f 6e 20 61 73 arks.this.point.in.generation.as
84200 20 61 20 6e 65 77 20 66 69 6c 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e .a.new.file.......'''.</summary>
84220 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 53 74 61 72 74 4e 65 77 46 69 6c 65 28 42 79 ......Public.Sub.StartNewFile(By
84240 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 Val.name.As.String)..........If.
84260 6e 61 6d 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 name.Is.Nothing.Then............
84280 20 20 54 68 72 6f 77 20 4e 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
842a0 6e 28 22 6e 61 6d 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 n("name")..........End.If.......
842c0 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 4e 65 77 20 42 6c 6f 63 6b 28 29 20 .....CurrentBlock.=.New.Block().
842e0 57 69 74 68 20 7b 20 2e 4e 61 6d 65 20 3d 20 6e 61 6d 65 20 7d 0d 0a 20 20 20 20 45 6e 64 20 53 With.{..Name.=.name.}......End.S
84300 75 62 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 53 74 61 72 74 46 6f 6f 74 65 72 ub........Public.Sub.StartFooter
84320 28 29 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 66 6f 6f 74 65 ()..........CurrentBlock.=.foote
84340 72 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 r......End.Sub........Public.Sub
84360 20 53 74 61 72 74 48 65 61 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 .StartHeader()..........CurrentB
84380 6c 6f 63 6b 20 3d 20 68 65 61 64 65 72 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 lock.=.header......End.Sub......
843a0 20 20 50 75 62 6c 69 63 20 53 75 62 20 45 6e 64 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 20 20 20 ..Public.Sub.EndBlock().........
843c0 20 49 66 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e .If.CurrentBlock.Is.Nothing.Then
843e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 78 69 74 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 ..............Exit.Sub..........
84400 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 2e 4c End.If............CurrentBlock.L
84420 65 6e 67 74 68 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c ength.=._generationEnvironment.L
84440 65 6e 67 74 68 20 2d 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 2e 53 74 61 72 74 0d 0a 0d 0a 20 20 ength.-.CurrentBlock.Start......
84460 20 20 20 20 20 20 49 66 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 49 73 4e 6f 74 20 68 65 61 64 ......If.CurrentBlock.IsNot.head
84480 65 72 20 41 6e 64 41 6c 73 6f 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 49 73 4e 6f 74 20 66 6f er.AndAlso.CurrentBlock.IsNot.fo
844a0 6f 74 65 72 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 73 2e 41 64 64 oter.Then..............files.Add
844c0 28 43 75 72 72 65 6e 74 42 6c 6f 63 6b 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a (CurrentBlock)..........End.If..
844e0 0d 0a 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 4e 6f 74 68 69 ..........m_currentBlock.=.Nothi
84500 6e 67 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ng......End.Sub........'''.<summ
84520 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 50 72 6f 64 75 63 65 20 74 68 65 20 74 65 6d 70 6c 61 ary>......'''.Produce.the.templa
84540 74 65 20 6f 75 74 70 75 74 20 66 69 6c 65 73 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d te.output.files.......'''.</summ
84560 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 72 69 64 61 62 6c 65 20 46 75 6e ary>......Public.Overridable.Fun
84580 63 74 69 6f 6e 20 50 72 6f 63 65 73 73 28 4f 70 74 69 6f 6e 61 6c 20 73 70 6c 69 74 20 41 73 20 ction.Process(Optional.split.As.
845a0 42 6f 6f 6c 65 61 6e 20 3d 20 54 72 75 65 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f Boolean.=.True).As.IEnumerable(O
845c0 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 6e 65 72 61 74 65 64 f.String)..........Dim.generated
845e0 46 69 6c 65 4e 61 6d 65 73 20 41 73 20 4c 69 73 74 28 4f 66 20 53 74 72 69 6e 67 29 20 3d 20 4e FileNames.As.List(Of.String).=.N
84600 65 77 20 4c 69 73 74 28 4f 66 20 53 74 72 69 6e 67 29 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ew.List(Of.String)()............
84620 49 66 20 73 70 6c 69 74 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 42 6c If.split.Then..............EndBl
84640 6f 63 6b 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 68 65 61 64 65 72 54 ock()................Dim.headerT
84660 65 78 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 ext.As.String.=._generationEnvir
84680 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 68 65 61 64 65 72 2e 53 74 61 72 74 2c 20 68 65 onment.ToString(header.Start,.he
846a0 61 64 65 72 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 66 6f ader.Length)..............Dim.fo
846c0 6f 74 65 72 54 65 78 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e oterText.As.String.=._generation
846e0 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 66 6f 6f 74 65 72 2e 53 74 61 72 Environment.ToString(footer.Star
84700 74 2c 20 66 6f 6f 74 65 72 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 t,.footer.Length)..............D
84720 69 6d 20 6f 75 74 70 75 74 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 20 3d 20 50 61 74 68 2e 47 im.outputPath.As.String.=.Path.G
84740 65 74 44 69 72 65 63 74 6f 72 79 4e 61 6d 65 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 etDirectoryName(_textTransformat
84760 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 29 0d 0a 0d 0a 20 20 20 20 20 20 ion.Host.TemplateFile)..........
84780 20 20 20 20 20 20 66 69 6c 65 73 2e 52 65 76 65 72 73 65 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 ......files.Reverse()...........
847a0 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 62 6c 6f 63 6b 20 41 73 20 42 6c 6f 63 6b 20 49 6e 20 .....For.Each.block.As.Block.In.
847c0 66 69 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 66 69 6c 65 4e files..................Dim.fileN
847e0 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 50 61 74 68 2e 43 6f 6d 62 69 6e 65 28 6f 75 74 ame.As.String.=.Path.Combine(out
84800 70 75 74 50 61 74 68 2c 20 62 6c 6f 63 6b 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 putPath,.block.Name)............
84820 20 20 20 20 20 20 44 69 6d 20 63 6f 6e 74 65 6e 74 20 3d 20 68 65 61 64 65 72 54 65 78 74 20 2b ......Dim.content.=.headerText.+
84840 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 ._generationEnvironment.ToString
84860 28 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 6e 67 74 68 29 20 2b 20 66 6f (block.Start,.block.Length).+.fo
84880 6f 74 65 72 54 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 65 6e 65 oterText....................gene
848a0 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 2e 41 64 64 28 66 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 ratedFileNames.Add(fileName)....
848c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 46 69 6c 65 28 66 69 6c 65 4e 61 6d ..............CreateFile(fileNam
848e0 65 2c 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 67 65 e,.content).................._ge
84900 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 52 65 6d 6f 76 65 28 62 6c 6f 63 6b nerationEnvironment.Remove(block
84920 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 20 .Start,.block.Length)...........
84940 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 ...Next..........End.If.........
84960 20 20 20 52 65 74 75 72 6e 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 0d 0a 20 20 ...Return.generatedFileNames....
84980 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 ..End.Function........Protected.
849a0 4f 76 65 72 72 69 64 61 62 6c 65 20 53 75 62 20 43 72 65 61 74 65 46 69 6c 65 28 42 79 56 61 6c Overridable.Sub.CreateFile(ByVal
849c0 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 6f 6e 74 65 .fileName.As.String,.ByVal.conte
849e0 6e 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 49 73 46 69 6c 65 nt.As.String)..........If.IsFile
84a00 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 ContentDifferent(fileName,.conte
84a20 6e 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 nt).Then..............File.Write
84a40 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 AllText(fileName,.content)......
84a60 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 ....End.If......End.Sub........P
84a80 72 6f 74 65 63 74 65 64 20 46 75 6e 63 74 69 6f 6e 20 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 rotected.Function.IsFileContentD
84aa0 69 66 66 65 72 65 6e 74 28 42 79 56 61 6c 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e ifferent(ByVal.fileName.As.Strin
84ac0 67 2c 20 42 79 56 61 6c 20 6e 65 77 43 6f 6e 74 65 6e 74 20 41 73 20 53 74 72 69 6e 67 29 20 41 g,.ByVal.newContent.As.String).A
84ae0 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 20 28 46 s.Boolean..........Return.Not.(F
84b00 69 6c 65 2e 45 78 69 73 74 73 28 66 69 6c 65 4e 61 6d 65 29 20 41 6e 64 41 6c 73 6f 20 46 69 6c ile.Exists(fileName).AndAlso.Fil
84b20 65 2e 52 65 61 64 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 29 20 3d 20 6e 65 77 43 6f 6e e.ReadAllText(fileName).=.newCon
84b40 74 65 6e 74 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 tent)......End.Function........P
84b60 72 69 76 61 74 65 20 50 72 6f 70 65 72 74 79 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 29 20 41 rivate.Property.CurrentBlock().A
84b80 73 20 42 6c 6f 63 6b 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 s.Block..........Get............
84ba0 20 20 52 65 74 75 72 6e 20 6d 5f 63 75 72 72 65 6e 74 42 6c 6f 63 6b 0d 0a 20 20 20 20 20 20 20 ..Return.m_currentBlock.........
84bc0 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 .End.Get..........Set(ByVal.valu
84be0 65 20 41 73 20 42 6c 6f 63 6b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 43 75 72 72 e.As.Block)..............If.Curr
84c00 65 6e 74 42 6c 6f 63 6b 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 entBlock.IsNot.Nothing.Then.....
84c20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 20 20 20 .............EndBlock().........
84c40 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 76 61 .....End.If................If.va
84c60 6c 75 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 lue.IsNot.Nothing.Then..........
84c80 20 20 20 20 20 20 20 20 76 61 6c 75 65 2e 53 74 61 72 74 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f ........value.Start.=._generatio
84ca0 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nEnvironment.Length.............
84cc0 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 .End.If................m_current
84ce0 42 6c 6f 63 6b 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a Block.=.value..........End.Set..
84d00 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 23 49 66 20 4e 6f 74 20 ....End.Property........#If.Not.
84d20 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 45 20 54 68 65 6e 0d 0a 20 20 20 20 PREPROCESSED_TEMPLATE.Then......
84d40 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 61 62 6c 65 20 43 6c 61 73 73 20 56 73 45 Private.NotInheritable.Class.VsE
84d60 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 ntityFrameworkTemplateFileManage
84d80 72 0d 0a 20 20 20 20 20 20 20 20 49 6e 68 65 72 69 74 73 20 45 6e 74 69 74 79 46 72 61 6d 65 77 r..........Inherits.EntityFramew
84da0 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 20 20 20 20 orkTemplateFileManager..........
84dc0 50 72 69 76 61 74 65 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 20 41 73 20 45 Private.templateProjectItem.As.E
84de0 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 nvDTE.ProjectItem..........Priva
84e00 74 65 20 64 74 65 20 41 73 20 45 6e 76 44 54 45 2e 44 54 45 0d 0a 20 20 20 20 20 20 20 20 50 72 te.dte.As.EnvDTE.DTE..........Pr
84e20 69 76 61 74 65 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 20 41 73 20 41 63 74 69 6f 6e 28 4f ivate.checkOutAction.As.Action(O
84e40 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 70 72 6f 6a 65 f.String)..........Private.proje
84e60 63 74 53 79 6e 63 41 63 74 69 6f 6e 20 41 73 20 41 63 74 69 6f 6e 28 4f 66 20 49 45 6e 75 6d 65 ctSyncAction.As.Action(Of.IEnume
84e80 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 rable(Of.String))............'''
84ea0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 43 72 65 61 74 65 73 20 .<summary>..........'''.Creates.
84ec0 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 an.instance.of.the.VsEntityFrame
84ee0 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 63 6c 61 73 73 20 77 69 workTemplateFileManager.class.wi
84f00 74 68 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 th.the.IDynamicHost.instance....
84f20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 ......'''.</summary>..........Pu
84f40 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 65 6d 70 6c 61 74 69 6e blic.Sub.New(ByVal.textTemplatin
84f60 67 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 79 42 61 73 65 g.As.Object)..............MyBase
84f80 2e 4e 65 77 28 74 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .New(textTemplating)............
84fa0 20 20 44 69 6d 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 3d 20 5f 74 65 78 ..Dim.hostServiceProvider.=._tex
84fc0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 tTransformation.Host.AsIServiceP
84fe0 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 68 6f 73 74 53 65 rovider()..............If.hostSe
85000 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 rviceProvider.Is.Nothing.Then...
85020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e ...............Throw.New.Argumen
85040 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 6f 62 74 61 69 6e tNullException("Could.not.obtain
85060 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 22 29 0d 0a 20 20 20 20 20 20 20 20 .hostServiceProvider")..........
85080 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 74 65 20 3d 20 ....End.If................dte.=.
850a0 44 69 72 65 63 74 43 61 73 74 28 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 2e 47 DirectCast(hostServiceProvider.G
850c0 65 74 53 65 72 76 69 63 65 28 47 65 74 54 79 70 65 28 45 6e 76 44 54 45 2e 44 54 45 29 29 2c 20 etService(GetType(EnvDTE.DTE)),.
850e0 45 6e 76 44 54 45 2e 44 54 45 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 64 74 65 20 EnvDTE.DTE)..............If.dte.
85100 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Is.Nothing.Then.................
85120 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e .Throw.New.ArgumentNullException
85140 28 22 43 6f 75 6c 64 20 6e 6f 74 20 6f 62 74 61 69 6e 20 44 54 45 20 66 72 6f 6d 20 68 6f 73 74 ("Could.not.obtain.DTE.from.host
85160 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 ")..............End.If..........
85180 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 20 3d 20 64 74 65 2e ......templateProjectItem.=.dte.
851a0 53 6f 6c 75 74 69 6f 6e 2e 46 69 6e 64 50 72 6f 6a 65 63 74 49 74 65 6d 28 5f 74 65 78 74 54 72 Solution.FindProjectItem(_textTr
851c0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 29 0d ansformation.Host.TemplateFile).
851e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 20 3d 20 ...............checkOutAction.=.
85200 46 75 6e 63 74 69 6f 6e 28 66 69 6c 65 4e 61 6d 65 29 20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e Function(fileName).dte.SourceCon
85220 74 72 6f 6c 2e 43 68 65 63 6b 4f 75 74 49 74 65 6d 28 66 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 trol.CheckOutItem(fileName).....
85240 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e 20 3d 20 53 75 62 .........projectSyncAction.=.Sub
85260 28 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 20 50 72 6f 6a 65 63 74 53 79 6e 63 28 74 65 6d 70 (keepFileNames).ProjectSync(temp
85280 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2c 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 0d lateProjectItem,.keepFileNames).
852a0 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c .........End.Sub............Publ
852c0 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 ic.Overloads.Overrides.Function.
852e0 50 72 6f 63 65 73 73 28 4f 70 74 69 6f 6e 61 6c 20 73 70 6c 69 74 20 41 73 20 42 6f 6f 6c 65 61 Process(Optional.split.As.Boolea
85300 6e 20 3d 20 54 72 75 65 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 n.=.True).As.IEnumerable(Of.Stri
85320 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a ng)..............If.templateProj
85340 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 20 49 73 20 4e 6f 74 68 69 6e 67 20 ectItem.ProjectItems.Is.Nothing.
85360 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 Then..................Return.New
85380 20 4c 69 73 74 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e .List(Of.String)..............En
853a0 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 6e 65 72 61 74 65 d.If................Dim.generate
853c0 64 46 69 6c 65 4e 61 6d 65 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 dFileNames.As.IEnumerable(Of.Str
853e0 69 6e 67 29 20 3d 20 4d 79 42 61 73 65 2e 50 72 6f 63 65 73 73 28 73 70 6c 69 74 29 0d 0a 0d 0a ing).=.MyBase.Process(split)....
85400 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e 2e 45 6e ............projectSyncAction.En
85420 64 49 6e 76 6f 6b 65 28 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e 2e 42 65 67 69 6e 49 dInvoke(projectSyncAction.BeginI
85440 6e 76 6f 6b 65 28 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 2c 20 4e 6f 74 68 69 6e nvoke(generatedFileNames,.Nothin
85460 67 2c 20 4e 6f 74 68 69 6e 67 29 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 g,.Nothing))................Retu
85480 72 6e 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 0d 0a 20 20 20 20 20 20 20 20 45 rn.generatedFileNames..........E
854a0 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 nd.Function............Protected
854c0 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 53 75 62 20 43 72 65 61 74 65 46 .Overloads.Overrides.Sub.CreateF
854e0 69 6c 65 28 42 79 56 61 6c 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 ile(ByVal.fileName.As.String,.By
85500 56 61 6c 20 63 6f 6e 74 65 6e 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 Val.content.As.String)..........
85520 20 20 20 20 49 66 20 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 66 69 ....If.IsFileContentDifferent(fi
85540 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 leName,.content).Then...........
85560 20 20 20 20 20 20 20 43 68 65 63 6b 6f 75 74 46 69 6c 65 49 66 52 65 71 75 69 72 65 64 28 66 69 .......CheckoutFileIfRequired(fi
85580 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 65 2e 57 72 leName)..................File.Wr
855a0 69 74 65 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 iteAllText(fileName,.content)...
855c0 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 ...........End.If..........End.S
855e0 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 53 75 62 ub............Private.Shared.Sub
85600 20 50 72 6f 6a 65 63 74 53 79 6e 63 28 42 79 56 61 6c 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 .ProjectSync(ByVal.templateProje
85620 63 74 49 74 65 6d 20 41 73 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 2c 20 42 79 ctItem.As.EnvDTE.ProjectItem,.By
85640 56 61 6c 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 Val.keepFileNames.As.IEnumerable
85660 28 4f 66 20 53 74 72 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6b 65 (Of.String))..............Dim.ke
85680 65 70 46 69 6c 65 4e 61 6d 65 53 65 74 20 3d 20 4e 65 77 20 48 61 73 68 53 65 74 28 4f 66 20 53 epFileNameSet.=.New.HashSet(Of.S
856a0 74 72 69 6e 67 29 28 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 tring)(keepFileNames)...........
856c0 20 20 20 44 69 6d 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 20 3d 20 4e 65 77 20 44 69 63 74 69 6f ...Dim.projectFiles.=.New.Dictio
856e0 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 nary(Of.String,.EnvDTE.ProjectIt
85700 65 6d 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6f 72 69 67 69 6e 61 6c 4f em)()..............Dim.originalO
85720 75 74 70 75 74 20 3d 20 50 61 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f 75 74 45 utput.=.Path.GetFileNameWithoutE
85740 78 74 65 6e 73 69 6f 6e 28 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 46 69 6c xtension(templateProjectItem.Fil
85760 65 4e 61 6d 65 73 28 30 29 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 eNames(0))................For.Ea
85780 63 68 20 70 72 6f 6a 65 63 74 49 74 65 6d 20 41 73 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 ch.projectItem.As.EnvDTE.Project
857a0 49 74 65 6d 20 49 6e 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a Item.In.templateProjectItem.Proj
857c0 65 63 74 49 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 ectItems..................projec
857e0 74 46 69 6c 65 73 2e 41 64 64 28 70 72 6f 6a 65 63 74 49 74 65 6d 2e 46 69 6c 65 4e 61 6d 65 73 tFiles.Add(projectItem.FileNames
85800 28 30 29 2c 20 70 72 6f 6a 65 63 74 49 74 65 6d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e (0),.projectItem)..............N
85820 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 20 52 65 6d 6f 76 65 20 75 6e 75 73 ext................'.Remove.unus
85840 65 64 20 69 74 65 6d 73 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 6a 65 63 74 0d 0a 20 20 20 20 20 ed.items.from.the.project.......
85860 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 69 72 20 41 73 20 4b 65 79 56 61 6c 75 65 .......For.Each.pair.As.KeyValue
85880 50 61 69 72 28 4f 66 20 53 74 72 69 6e 67 2c 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 Pair(Of.String,.EnvDTE.ProjectIt
858a0 65 6d 29 20 49 6e 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 em).In.projectFiles.............
858c0 20 20 20 20 20 49 66 20 4e 6f 74 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 2e 43 6f 6e 74 61 69 .....If.Not.keepFileNames.Contai
858e0 6e 73 28 70 61 69 72 2e 4b 65 79 29 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ns(pair.Key)._..................
85900 20 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 28 50 61 74 68 2e 47 65 74 46 69 6c 65 4e 61 6d 65 57 ..AndAlso.Not.(Path.GetFileNameW
85920 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 70 61 69 72 2e 4b 65 79 29 20 2b 20 22 2e 22 29 ithoutExtension(pair.Key).+.".")
85940 2e 53 74 61 72 74 73 57 69 74 68 28 6f 72 69 67 69 6e 61 6c 4f 75 74 70 75 74 20 2b 20 22 2e 22 .StartsWith(originalOutput.+."."
85960 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 69 72 ).Then......................pair
85980 2e 56 61 6c 75 65 2e 44 65 6c 65 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Value.Delete().................
859a0 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 .End.If..............Next.......
859c0 20 20 20 20 20 20 20 20 20 27 20 41 64 64 20 6d 69 73 73 69 6e 67 20 66 69 6c 65 73 20 74 6f 20 .........'.Add.missing.files.to.
859e0 74 68 65 20 70 72 6f 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 the.project..............For.Eac
85a00 68 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 49 6e 20 6b 65 65 70 46 69 6c 65 h.fileName.As.String.In.keepFile
85a20 4e 61 6d 65 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 NameSet..................If.Not.
85a40 70 72 6f 6a 65 63 74 46 69 6c 65 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 66 69 6c 65 4e 61 6d projectFiles.ContainsKey(fileNam
85a60 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 6d e).Then......................tem
85a80 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 2e 41 64 plateProjectItem.ProjectItems.Ad
85aa0 64 46 72 6f 6d 46 69 6c 65 28 66 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 dFromFile(fileName).............
85ac0 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 .....End.If..............Next...
85ae0 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 .......End.Sub............Privat
85b00 65 20 53 75 62 20 43 68 65 63 6b 6f 75 74 46 69 6c 65 49 66 52 65 71 75 69 72 65 64 28 42 79 56 e.Sub.CheckoutFileIfRequired(ByV
85b20 61 6c 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 al.fileName.As.String)..........
85b40 20 20 20 20 49 66 20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 20 49 73 20 4e 6f 74 68 ....If.dte.SourceControl.Is.Noth
85b60 69 6e 67 20 4f 72 45 6c 73 65 20 4e 6f 74 20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c ing.OrElse.Not.dte.SourceControl
85b80 2e 49 73 49 74 65 6d 55 6e 64 65 72 53 43 43 28 66 69 6c 65 4e 61 6d 65 29 20 4f 72 45 6c 73 65 .IsItemUnderSCC(fileName).OrElse
85ba0 20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 2e 49 73 49 74 65 6d 43 68 65 63 6b 65 64 .dte.SourceControl.IsItemChecked
85bc0 4f 75 74 28 66 69 6c 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Out(fileName).Then..............
85be0 20 20 20 20 45 78 69 74 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 ....Exit.Sub..............End.If
85c00 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 20 72 75 6e 20 6f 6e 20 77 6f 72 6b 65 72 20 ................'.run.on.worker.
85c20 74 68 72 65 61 64 20 74 6f 20 70 72 65 76 65 6e 74 20 54 34 20 63 61 6c 6c 69 6e 67 20 62 61 63 thread.to.prevent.T4.calling.bac
85c40 6b 20 69 6e 74 6f 20 56 53 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 65 63 6b 4f 75 74 41 k.into.VS..............checkOutA
85c60 63 74 69 6f 6e 2e 45 6e 64 49 6e 76 6f 6b 65 28 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 2e 42 ction.EndInvoke(checkOutAction.B
85c80 65 67 69 6e 49 6e 76 6f 6b 65 28 66 69 6c 65 4e 61 6d 65 2c 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f eginInvoke(fileName,.Nothing,.No
85ca0 74 68 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 45 6e thing))..........End.Sub......En
85cc0 64 20 43 6c 61 73 73 0d 0a 20 20 20 20 23 45 6e 64 20 49 66 0d 0a 45 6e 64 20 43 6c 61 73 73 0d d.Class......#End.If..End.Class.
85ce0 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c ...'''.<summary>..'''.Responsibl
85d00 65 20 63 72 65 61 74 69 6e 67 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 74 68 61 74 20 63 61 6e 20 e.creating.an.instance.that.can.
85d20 62 65 20 70 61 73 73 65 64 0d 0a 27 27 27 20 74 6f 20 68 65 6c 70 65 72 20 63 6c 61 73 73 65 73 be.passed..'''.to.helper.classes
85d40 20 74 68 61 74 20 6e 65 65 64 20 74 6f 20 61 63 63 65 73 73 20 74 68 65 20 54 65 78 74 54 72 61 .that.need.to.access.the.TextTra
85d60 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 27 27 27 20 6d 65 6d 62 65 72 73 2e 20 49 74 20 61 63 63 nsformation..'''.members..It.acc
85d80 65 73 73 65 73 20 6d 65 6d 62 65 72 20 62 79 20 6e 61 6d 65 20 61 6e 64 20 73 69 67 6e 61 74 75 esses.member.by.name.and.signatu
85da0 72 65 20 72 61 74 68 65 72 20 74 68 61 6e 0d 0a 27 27 27 20 62 79 20 74 79 70 65 2e 20 54 68 69 re.rather.than..'''.by.type..Thi
85dc0 73 20 69 73 20 6e 65 63 65 73 73 61 72 79 20 77 68 65 6e 20 74 68 65 0d 0a 27 27 27 20 74 65 6d s.is.necessary.when.the..'''.tem
85de0 70 6c 61 74 65 20 69 73 20 62 65 69 6e 67 20 75 73 65 64 20 69 6e 20 50 72 65 70 72 6f 63 65 73 plate.is.being.used.in.Preproces
85e00 73 65 64 20 6d 6f 64 65 0d 0a 27 27 27 20 61 6e 64 20 74 68 65 72 65 20 69 73 20 6e 6f 20 63 6f sed.mode..'''.and.there.is.no.co
85e20 6d 6d 6f 6e 20 6b 6e 6f 77 6e 20 74 79 70 65 20 74 68 61 74 20 63 61 6e 20 62 65 0d 0a 27 27 27 mmon.known.type.that.can.be..'''
85e40 20 70 61 73 73 65 64 20 69 6e 73 74 65 61 64 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d .passed.instead..'''.</summary>.
85e60 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f .Public.Class.DynamicTextTransfo
85e80 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 69 6e 73 74 61 6e 63 65 20 41 rmation......Private._instance.A
85ea0 73 20 4f 62 6a 65 63 74 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 64 79 6e 61 6d 69 63 48 6f s.Object......Private._dynamicHo
85ec0 73 74 20 41 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 st.As.IDynamicHost........Privat
85ee0 65 20 52 65 61 64 4f 6e 6c 79 20 5f 77 72 69 74 65 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 0d e.ReadOnly._write.As.MethodInfo.
85f00 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 77 72 69 74 65 4c 69 6e 65 .....Private.ReadOnly._writeLine
85f20 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 .As.MethodInfo......Private.Read
85f40 4f 6e 6c 79 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 41 73 20 50 Only._generationEnvironment.As.P
85f60 72 6f 70 65 72 74 79 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c ropertyInfo......Private.ReadOnl
85f80 79 20 5f 65 72 72 6f 72 73 20 41 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 0d 0a 20 20 20 20 50 y._errors.As.PropertyInfo......P
85fa0 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 68 6f 73 74 20 41 73 20 50 72 6f 70 65 72 74 rivate.ReadOnly._host.As.Propert
85fc0 79 49 6e 66 6f 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 yInfo........'''.<summary>......
85fe0 27 27 27 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 44 '''.Creates.an.instance.of.the.D
86000 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 63 6c 61 73 73 20 61 ynamicTextTransformation.class.a
86020 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 0d 0a 20 20 20 20 27 27 27 20 54 65 78 round.the.passed.in......'''.Tex
86040 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 68 61 70 70 65 64 20 69 6e 73 74 61 6e 63 65 tTransformation.shapped.instance
86060 20 70 61 73 73 65 64 20 69 6e 2c 20 6f 72 20 69 66 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 20 .passed.in,.or.if.the.passed.in.
86080 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 27 27 27 20 61 6c 72 65 61 64 79 20 69 73 20 61 20 44 instance......'''.already.is.a.D
860a0 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 69 74 20 63 61 73 ynamicTextTransformation,.it.cas
860c0 74 73 20 69 74 20 61 6e 64 20 73 65 6e 64 73 20 69 74 20 62 61 63 6b 2e 0d 0a 20 20 20 20 27 27 ts.it.and.sends.it.back.......''
860e0 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 '.</summary>......Public.Shared.
86100 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 28 42 79 56 61 6c 20 69 6e 73 74 61 6e 63 65 20 41 Function.Create(ByVal.instance.A
86120 73 20 4f 62 6a 65 63 74 29 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 s.Object).As.DynamicTextTransfor
86140 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 69 6e 73 74 61 6e 63 65 20 49 73 20 4e mation..........If.instance.Is.N
86160 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e othing.Then..............Throw.N
86180 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 69 6e 73 74 61 6e ew.ArgumentNullException("instan
861a0 63 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ce")..........End.If............
861c0 44 69 6d 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 Dim.textTransformation.As.Dynami
861e0 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 54 72 79 43 61 73 74 28 69 6e cTextTransformation.=.TryCast(in
86200 73 74 61 6e 63 65 2c 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f stance,.DynamicTextTransformatio
86220 6e 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f n)..........If.textTransformatio
86240 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 n.IsNot.Nothing.Then............
86260 20 20 52 65 74 75 72 6e 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 ..Return.textTransformation.....
86280 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 .....End.If............Return.Ne
862a0 77 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 28 69 6e 73 74 w.DynamicTextTransformation(inst
862c0 61 6e 63 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 ance)......End.Function........P
862e0 72 69 76 61 74 65 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 69 6e 73 74 61 6e 63 65 20 41 73 rivate.Sub.New(ByVal.instance.As
86300 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 6e .Object).........._instance.=.in
86320 73 74 61 6e 63 65 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 54 79 70 65 stance..........Dim.type.As.Type
86340 20 3d 20 5f 69 6e 73 74 61 6e 63 65 2e 47 65 74 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 20 .=._instance.GetType()..........
86360 5f 77 72 69 74 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 57 72 69 74 65 22 2c _write.=.type.GetMethod("Write",
86380 20 4e 65 77 20 54 79 70 65 28 29 20 7b 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 7d 29 0d 0a .New.Type().{GetType(String)})..
863a0 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 4c 69 6e 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 ........_writeLine.=.type.GetMet
863c0 68 6f 64 28 22 57 72 69 74 65 4c 69 6e 65 22 2c 20 4e 65 77 20 54 79 70 65 28 29 20 7b 47 65 74 hod("WriteLine",.New.Type().{Get
863e0 54 79 70 65 28 53 74 72 69 6e 67 29 7d 29 0d 0a 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 Type(String)}).........._generat
86400 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 ionEnvironment.=.type.GetPropert
86420 79 28 22 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 22 2c 20 42 69 6e 64 69 y("GenerationEnvironment",.Bindi
86440 6e 67 46 6c 61 67 73 2e 49 6e 73 74 61 6e 63 65 20 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 ngFlags.Instance.Or.BindingFlags
86460 2e 4e 6f 6e 50 75 62 6c 69 63 29 0d 0a 20 20 20 20 20 20 20 20 5f 68 6f 73 74 20 3d 20 74 79 70 .NonPublic).........._host.=.typ
86480 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 48 6f 73 74 22 29 0d 0a 20 20 20 20 20 20 20 20 5f e.GetProperty("Host").........._
864a0 65 72 72 6f 72 73 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 45 72 72 6f 72 errors.=.type.GetProperty("Error
864c0 73 22 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d s")......End.Sub........'''.<sum
864e0 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 mary>......'''.Gets.the.value.of
86500 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 .the.wrapped.TextTranformation.i
86520 6e 73 74 61 6e 63 65 27 73 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 nstance's.GenerationEnvironment.
86540 70 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 property......'''.</summary>....
86560 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 47 65 6e 65 72 ..Public.ReadOnly.Property.Gener
86580 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 28 29 20 41 73 20 53 74 72 69 6e 67 42 75 69 6c ationEnvironment().As.StringBuil
865a0 64 65 72 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 der..........Get..............Re
865c0 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 turn.DirectCast(_generationEnvir
865e0 6f 6e 6d 65 6e 74 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 6f 74 68 69 onment.GetValue(_instance,.Nothi
86600 6e 67 29 2c 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 ng),.StringBuilder)..........End
86620 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 .Get......End.Property........''
86640 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 76 61 '.<summary>......'''.Gets.the.va
86660 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 lue.of.the.wrapped.TextTranforma
86680 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 45 72 72 6f 72 73 20 70 72 6f 70 65 72 74 79 0d tion.instance's.Errors.property.
866a0 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
866c0 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 45 72 72 6f 72 73 28 29 20 41 73 20 53 79 ReadOnly.Property.Errors().As.Sy
866e0 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 stem.CodeDom.Compiler.CompilerEr
86700 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 rorCollection..........Get......
86720 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 5f 65 72 72 6f 72 ........Return.DirectCast(_error
86740 73 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 6f 74 68 69 6e 67 29 2c 20 s.GetValue(_instance,.Nothing),.
86760 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 System.CodeDom.Compiler.Compiler
86780 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 ErrorCollection)..........End.Ge
867a0 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c t......End.Property........'''.<
867c0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 61 6c 6c 73 20 74 68 65 20 77 72 61 70 summary>......'''.Calls.the.wrap
867e0 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 ped.TextTranformation.instance's
86800 20 57 72 69 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 .Write.method.......'''.</summar
86820 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 57 72 69 74 65 28 42 79 56 61 6c 20 74 y>......Public.Sub.Write(ByVal.t
86840 65 78 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 2e 49 ext.As.String).........._write.I
86860 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 65 77 20 4f 62 6a 65 63 74 28 29 20 7b 74 nvoke(_instance,.New.Object().{t
86880 65 78 74 7d 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 ext})......End.Sub........'''.<s
868a0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 61 6c 6c 73 20 74 68 65 20 77 72 61 70 70 ummary>......'''.Calls.the.wrapp
868c0 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 ed.TextTranformation.instance's.
868e0 57 72 69 74 65 4c 69 6e 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d WriteLine.method.......'''.</sum
86900 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 57 72 69 74 65 4c 69 6e 65 28 mary>......Public.Sub.WriteLine(
86920 42 79 56 61 6c 20 74 65 78 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 5f ByVal.text.As.String).........._
86940 77 72 69 74 65 4c 69 6e 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 65 77 20 writeLine.Invoke(_instance,.New.
86960 4f 62 6a 65 63 74 28 29 20 7b 74 65 78 74 7d 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d Object().{text})......End.Sub...
86980 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 .....'''.<summary>......'''.Gets
869a0 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 .the.value.of.the.wrapped.TextTr
869c0 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 48 6f 73 74 20 70 72 6f 70 anformation.instance's.Host.prop
869e0 65 72 74 79 0d 0a 20 20 20 20 27 27 27 20 69 66 20 61 76 61 69 6c 61 62 6c 65 20 28 73 68 6f 77 erty......'''.if.available.(show
86a00 73 20 75 70 20 77 68 65 6e 20 68 6f 73 74 73 70 65 63 69 66 69 63 20 69 73 20 73 65 74 20 74 6f s.up.when.hostspecific.is.set.to
86a20 20 74 72 75 65 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 64 69 72 65 63 74 69 76 65 29 .true.in.the.template.directive)
86a40 20 61 6e 64 20 72 65 74 75 72 6e 73 0d 0a 20 20 20 20 27 27 27 20 74 68 65 20 61 70 70 72 6f 70 .and.returns......'''.the.approp
86a60 72 69 61 74 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 6f 66 20 49 44 79 6e 61 6d 69 63 riate.implementation.of.IDynamic
86a80 48 6f 73 74 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 Host......'''.</summary>......Pu
86aa0 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 48 6f 73 74 28 29 20 41 73 blic.ReadOnly.Property.Host().As
86ac0 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 .IDynamicHost..........Get......
86ae0 20 20 20 20 20 20 20 20 49 66 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 49 73 20 4e 6f 74 68 69 ........If._dynamicHost.Is.Nothi
86b00 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 5f 68 6f 73 ng.Then..................If._hos
86b20 74 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 t.Is.Nothing.Then...............
86b40 20 20 20 20 20 20 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 20 4e 65 77 20 4e 75 6c 6c 48 6f ......._dynamicHost.=.New.NullHo
86b60 73 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 st()..................Else......
86b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 3d 20 4e ................_dynamicHost.=.N
86ba0 65 77 20 44 79 6e 61 6d 69 63 48 6f 73 74 28 5f 68 6f 73 74 2e 47 65 74 56 61 6c 75 65 28 5f 69 ew.DynamicHost(_host.GetValue(_i
86bc0 6e 73 74 61 6e 63 65 2c 20 4e 6f 74 68 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nstance,.Nothing))..............
86be0 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a ....End.If..............End.If..
86c00 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 0d ............Return._dynamicHost.
86c20 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 .........End.Get......End.Proper
86c40 74 79 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e ty..End.Class......'''.<summary>
86c60 0d 0a 27 27 27 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 61 62 73 74 72 61 63 74 69 6e 67 ..'''.Reponsible.for.abstracting
86c80 20 74 68 65 20 75 73 65 20 6f 66 20 48 6f 73 74 20 62 65 74 77 65 65 6e 20 74 69 6d 65 73 0d 0a .the.use.of.Host.between.times..
86ca0 27 27 27 20 77 68 65 6e 20 69 74 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 61 6e 64 20 6e 6f 74 '''.when.it.is.available.and.not
86cc0 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 49 6e 74 65 72 66 61 ..'''.</summary>..Public.Interfa
86ce0 63 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 ce.IDynamicHost......'''.<summar
86d00 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 y>......'''.An.abstracted.call.t
86d20 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d o.Microsoft.VisualStudio.TextTem
86d40 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 plating.ITextTemplatingEngineHos
86d60 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 27 27 27 t.ResolveParameterValue......'''
86d80 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 .</summary>......Function.Resolv
86da0 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 42 79 56 61 6c 20 69 64 20 41 73 20 53 74 72 69 eParameterValue(ByVal.id.As.Stri
86dc0 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 ng,.ByVal.name.As.String,.ByVal.
86de0 6f 74 68 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a otherName.As.String).As.String..
86e00 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 ......'''.<summary>......'''.An.
86e20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 abstracted.call.to.Microsoft.Vis
86e40 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 ualStudio.TextTemplating.ITextTe
86e60 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a mplatingEngineHost.ResolvePath..
86e80 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 46 75 6e 63 74 69 6f 6e ....'''.</summary>......Function
86ea0 20 52 65 73 6f 6c 76 65 50 61 74 68 28 42 79 56 61 6c 20 70 61 74 68 20 41 73 20 53 74 72 69 6e .ResolvePath(ByVal.path.As.Strin
86ec0 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 g).As.String........'''.<summary
86ee0 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f >......'''.An.abstracted.call.to
86f00 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 .Microsoft.VisualStudio.TextTemp
86f20 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 lating.ITextTemplatingEngineHost
86f40 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 .TemplateFile......'''.</summary
86f60 3e 0d 0a 20 20 20 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 54 65 6d 70 6c 61 74 >......ReadOnly.Property.Templat
86f80 65 46 69 6c 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 eFile().As.String........'''.<su
86fa0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 48 6f 73 74 mmary>......'''.Returns.the.Host
86fc0 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e 20 49 53 65 72 76 69 63 65 50 72 6f .instance.cast.as.an.IServicePro
86fe0 76 69 64 65 72 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 46 vider......'''.</summary>......F
87000 75 6e 63 74 69 6f 6e 20 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 20 41 73 20 unction.AsIServiceProvider().As.
87020 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 45 6e 64 20 49 6e 74 65 72 66 61 63 65 0d IServiceProvider..End.Interface.
87040 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 70 6f 6e 73 69 62 6c 65 ...'''.<summary>..'''.Reponsible
87060 20 66 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 69 6e 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f .for.implementing.the.IDynamicHo
87080 73 74 20 61 73 20 61 20 64 79 6e 61 6d 69 63 0d 0a 27 27 27 20 73 68 61 70 65 20 77 72 61 70 70 st.as.a.dynamic..'''.shape.wrapp
870a0 65 72 20 6f 76 65 72 20 74 68 65 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 er.over.the.Microsoft.VisualStud
870c0 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e io.TextTemplating.ITextTemplatin
870e0 67 45 6e 67 69 6e 65 48 6f 73 74 20 69 6e 74 65 72 66 61 63 65 0d 0a 27 27 27 20 72 61 74 68 65 gEngineHost.interface..'''.rathe
87100 72 20 74 68 61 6e 20 74 79 70 65 20 64 65 70 65 6e 64 65 6e 74 20 77 72 61 70 70 65 72 2e 20 57 r.than.type.dependent.wrapper..W
87120 65 20 64 6f 6e 27 74 20 75 73 65 20 74 68 65 0d 0a 27 27 27 20 69 6e 74 65 72 66 61 63 65 20 74 e.don't.use.the..'''.interface.t
87140 79 70 65 20 73 6f 20 74 68 61 74 20 74 68 65 20 63 6f 64 65 20 63 61 6e 20 62 65 20 72 75 6e 20 ype.so.that.the.code.can.be.run.
87160 69 6e 20 70 72 65 70 72 6f 63 65 73 73 65 64 20 6d 6f 64 65 0d 0a 27 27 27 20 6f 6e 20 61 20 2e in.preprocessed.mode..'''.on.a..
87180 6e 65 74 20 66 72 61 6d 65 77 6f 72 6b 20 6f 6e 6c 79 20 69 6e 73 74 61 6c 6c 65 64 20 6d 61 63 net.framework.only.installed.mac
871a0 68 69 6e 65 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c hine...'''.</summary>..Public.Cl
871c0 61 73 73 20 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 49 6d 70 6c 65 6d 65 6e 74 73 20 ass.DynamicHost......Implements.
871e0 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e IDynamicHost......Private.ReadOn
87200 6c 79 20 5f 69 6e 73 74 61 6e 63 65 20 41 73 20 4f 62 6a 65 63 74 0d 0a 20 20 20 20 50 72 69 76 ly._instance.As.Object......Priv
87220 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 72 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 ate.ReadOnly._resolveParameterVa
87240 6c 75 65 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 lue.As.MethodInfo......Private.R
87260 65 61 64 4f 6e 6c 79 20 5f 72 65 73 6f 6c 76 65 50 61 74 68 20 41 73 20 4d 65 74 68 6f 64 49 6e eadOnly._resolvePath.As.MethodIn
87280 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 6d 70 6c 61 fo......Private.ReadOnly._templa
872a0 74 65 46 69 6c 65 20 41 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 0d 0a 0d 0a 20 20 20 20 27 27 teFile.As.PropertyInfo........''
872c0 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 65 61 74 65 73 20 61 6e 20 '.<summary>......'''.Creates.an.
872e0 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 44 79 6e 61 6d 69 63 48 6f 73 74 20 63 6c 61 73 instance.of.the.DynamicHost.clas
87300 73 20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 0d 0a 20 20 20 20 27 27 27 20 s.around.the.passed.in......'''.
87320 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c Microsoft.VisualStudio.TextTempl
87340 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 ating.ITextTemplatingEngineHost.
87360 73 68 61 70 70 65 64 20 69 6e 73 74 61 6e 63 65 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 shapped.instance.passed.in......
87380 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 .'''.</summary>......Public.Sub.
873a0 4e 65 77 28 42 79 56 61 6c 20 69 6e 73 74 61 6e 63 65 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 New(ByVal.instance.As.Object)...
873c0 20 20 20 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 ......._instance.=.instance.....
873e0 20 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 5f 69 6e 73 74 61 6e 63 .....Dim.type.As.Type.=._instanc
87400 65 2e 47 65 74 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 73 6f 6c 76 65 50 61 72 e.GetType().........._resolvePar
87420 61 6d 65 74 65 72 56 61 6c 75 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 52 65 ameterValue.=.type.GetMethod("Re
87440 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 22 2c 20 4e 65 77 20 54 79 70 65 28 29 solveParameterValue",.New.Type()
87460 20 7b 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 2c 20 47 65 74 54 79 70 65 28 53 74 72 69 6e .{GetType(String),.GetType(Strin
87480 67 29 2c 20 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 7d 29 0d 0a 20 20 20 20 20 20 20 20 5f g),.GetType(String)}).........._
874a0 72 65 73 6f 6c 76 65 50 61 74 68 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 52 65 resolvePath.=.type.GetMethod("Re
874c0 73 6f 6c 76 65 50 61 74 68 22 2c 20 4e 65 77 20 54 79 70 65 28 29 20 7b 47 65 74 54 79 70 65 28 solvePath",.New.Type().{GetType(
874e0 53 74 72 69 6e 67 29 7d 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 6d 70 6c 61 74 65 46 69 String)})............_templateFi
87500 6c 65 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 54 65 6d 70 6c 61 74 65 46 le.=.type.GetProperty("TemplateF
87520 69 6c 65 22 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 ile")......End.Sub........'''.<s
87540 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f ummary>......'''.A.call.to.Micro
87560 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 soft.VisualStudio.TextTemplating
87580 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c .ITextTemplatingEngineHost.Resol
875a0 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d veParameterValue......'''.</summ
875c0 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 ary>......Public.Function.Resolv
875e0 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 42 79 56 61 6c 20 69 64 20 41 73 20 53 74 72 69 eParameterValue(ByVal.id.As.Stri
87600 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 ng,.ByVal.name.As.String,.ByVal.
87620 6f 74 68 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 20 49 otherName.As.String).As.String.I
87640 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 mplements.IDynamicHost.ResolvePa
87660 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 rameterValue..........Return.Dir
87680 65 63 74 43 61 73 74 28 5f 72 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 2e 49 ectCast(_resolveParameterValue.I
876a0 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 65 77 20 4f 62 6a 65 63 74 28 29 20 7b 69 nvoke(_instance,.New.Object().{i
876c0 64 2c 20 6e 61 6d 65 2c 20 6f 74 68 65 72 4e 61 6d 65 7d 29 2c 20 53 74 72 69 6e 67 29 0d 0a 20 d,.name,.otherName}),.String)...
876e0 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ...End.Function........'''.<summ
87700 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 ary>......'''.A.call.to.Microsof
87720 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 t.VisualStudio.TextTemplating.IT
87740 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 extTemplatingEngineHost.ResolveP
87760 61 74 68 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 ath......'''.</summary>......Pub
87780 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 50 61 74 68 28 42 79 56 61 6c 20 70 lic.Function.ResolvePath(ByVal.p
877a0 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 ath.As.String).As.String.Impleme
877c0 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 nts.IDynamicHost.ResolvePath....
877e0 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 5f 72 65 73 6f 6c 76 65 ......Return.DirectCast(_resolve
87800 50 61 74 68 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 65 77 20 4f 62 6a 65 63 Path.Invoke(_instance,.New.Objec
87820 74 28 29 20 7b 70 61 74 68 7d 29 2c 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 t().{path}),.String)......End.Fu
87840 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 nction........'''.<summary>.....
87860 20 27 27 27 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 .'''.A.call.to.Microsoft.VisualS
87880 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 tudio.TextTemplating.ITextTempla
878a0 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 tingEngineHost.TemplateFile.....
878c0 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 .'''.</summary>......Public.Read
878e0 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 29 20 41 73 20 Only.Property.TemplateFile().As.
87900 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 54 String.Implements.IDynamicHost.T
87920 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 emplateFile..........Get........
87940 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 5f 74 65 6d 70 6c 61 74 ......Return.DirectCast(_templat
87960 65 46 69 6c 65 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 6f 74 68 69 6e eFile.GetValue(_instance,.Nothin
87980 67 29 2c 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 g),.String)..........End.Get....
879a0 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 ..End.Property........'''.<summa
879c0 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 48 6f 73 74 20 69 6e ry>......'''.Returns.the.Host.in
879e0 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 stance.cast.as.an.IServiceProvid
87a00 65 72 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c er......'''.</summary>......Publ
87a20 69 63 20 46 75 6e 63 74 69 6f 6e 20 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 ic.Function.AsIServiceProvider()
87a40 20 41 73 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 49 6d 70 6c 65 6d 65 6e 74 73 20 .As.IServiceProvider.Implements.
87a60 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d IDynamicHost.AsIServiceProvider.
87a80 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 79 43 61 73 74 28 5f 69 6e 73 74 61 6e 63 .........Return.TryCast(_instanc
87aa0 65 2c 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 e,.IServiceProvider)......End.Fu
87ac0 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 nction..End.Class....'''.<summar
87ae0 79 3e 0d 0a 27 27 27 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 y>..'''.Reponsible.for.implement
87b00 69 6e 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 77 68 65 6e 20 74 68 65 0d 0a 27 ing.the.IDynamicHost.when.the..'
87b20 27 27 20 48 6f 73 74 20 70 72 6f 70 65 72 74 79 20 69 73 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c ''.Host.property.is.not.availabl
87b40 65 20 6f 6e 20 74 68 65 20 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 20 74 79 70 65 2e 20 54 68 e.on.the.TextTemplating.type..Th
87b60 65 20 48 6f 73 74 0d 0a 27 27 27 20 70 72 6f 70 65 72 74 79 20 6f 6e 6c 79 20 65 78 69 73 74 73 e.Host..'''.property.only.exists
87b80 20 77 68 65 6e 20 74 68 65 20 68 6f 73 74 73 70 65 63 69 66 69 63 20 61 74 74 72 69 62 75 74 65 .when.the.hostspecific.attribute
87ba0 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 0d 0a 27 27 27 20 64 69 72 65 63 74 69 76 65 20 .of.the.template..'''.directive.
87bc0 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d is.set.to.true...'''.</summary>.
87be0 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 4e 75 6c 6c 48 6f 73 74 0d 0a 20 20 20 20 49 6d 70 6c .Public.Class.NullHost......Impl
87c00 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 ements.IDynamicHost......'''.<su
87c20 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f mmary>......'''.An.abstraction.o
87c40 66 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 f.the.call.to.Microsoft.VisualSt
87c60 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 udio.TextTemplating.ITextTemplat
87c80 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 ingEngineHost.ResolveParameterVa
87ca0 6c 75 65 0d 0a 20 20 20 20 27 27 27 20 74 68 61 74 20 73 69 6d 70 6c 79 20 72 65 74 75 6e 73 20 lue......'''.that.simply.retuns.
87cc0 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 null.......'''.</summary>......P
87ce0 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 ublic.Function.ResolveParameterV
87d00 61 6c 75 65 28 42 79 56 61 6c 20 69 64 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6e alue(ByVal.id.As.String,.ByVal.n
87d20 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6f 74 68 65 72 4e 61 6d 65 20 41 ame.As.String,.ByVal.otherName.A
87d40 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 s.String).As.String.Implements.I
87d60 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 DynamicHost.ResolveParameterValu
87d80 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 e..........Return.Nothing......E
87da0 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
87dc0 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 ......'''.An.abstraction.of.the.
87de0 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 call.to.Microsoft.VisualStudio.T
87e00 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 extTemplating.ITextTemplatingEng
87e20 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 27 27 27 20 74 68 61 ineHost.ResolvePath......'''.tha
87e40 74 20 73 69 6d 70 6c 79 20 72 65 74 75 6e 73 20 74 68 65 20 70 61 74 68 20 70 61 73 73 65 64 20 t.simply.retuns.the.path.passed.
87e60 69 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 in.......'''.</summary>......Pub
87e80 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 50 61 74 68 28 42 79 56 61 6c 20 70 lic.Function.ResolvePath(ByVal.p
87ea0 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 ath.As.String).As.String.Impleme
87ec0 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 nts.IDynamicHost.ResolvePath....
87ee0 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 61 74 68 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 ......Return.path......End.Funct
87f00 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
87f20 27 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 '.An.abstraction.of.the.call.to.
87f40 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c Microsoft.VisualStudio.TextTempl
87f60 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 ating.ITextTemplatingEngineHost.
87f80 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 27 27 27 20 74 68 61 74 20 72 65 74 75 72 TemplateFile......'''.that.retur
87fa0 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ns.null.......'''.</summary>....
87fc0 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 54 65 6d 70 6c ..Public.ReadOnly.Property.Templ
87fe0 61 74 65 46 69 6c 65 28 29 20 41 73 20 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 ateFile().As.String.Implements.I
88000 44 79 6e 61 6d 69 63 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 20 20 DynamicHost.TemplateFile........
88020 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e ..Get..............Return.Nothin
88040 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 g..........End.Get......End.Prop
88060 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 erty........'''.<summary>......'
88080 27 27 20 52 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d ''.Returns.null.......'''.</summ
880a0 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 41 73 49 53 65 72 ary>......Public.Function.AsISer
880c0 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 20 41 73 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 viceProvider().As.IServiceProvid
880e0 65 72 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 41 73 49 53 65 er.Implements.IDynamicHost.AsISe
88100 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f rviceProvider..........Return.No
88120 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 thing......End.Function..End.Cla
88140 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 ss....'''.<summary>..'''.Respons
88160 69 62 6c 65 20 66 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 69 6e 67 20 74 68 65 20 63 6f 6e 73 74 ible.for.encapsulating.the.const
88180 61 6e 74 73 20 64 65 66 69 6e 65 64 20 69 6e 20 4d 65 74 61 64 61 74 61 0d 0a 27 27 27 20 3c 2f ants.defined.in.Metadata..'''.</
881a0 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 4e 6f 74 49 6e 68 65 72 69 74 61 62 6c 65 20 summary>..Public.NotInheritable.
881c0 43 6c 61 73 73 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 0d 0a 20 20 20 20 50 72 69 Class.MetadataConstants......Pri
881e0 76 61 74 65 20 53 75 62 20 4e 65 77 28 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 vate.Sub.New()......End.Sub.....
88200 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 43 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 41 ...Public.Const.CSDL_EXTENSION.A
88220 73 20 53 74 72 69 6e 67 20 3d 20 22 2e 63 73 64 6c 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 s.String.=.".csdl"........Public
88240 20 43 6f 6e 73 74 20 43 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 41 73 .Const.CSDL_EDMX_SECTION_NAME.As
88260 20 53 74 72 69 6e 67 20 3d 20 22 43 6f 6e 63 65 70 74 75 61 6c 4d 6f 64 65 6c 73 22 0d 0a 20 20 .String.=."ConceptualModels"....
88280 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 43 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 ..Public.Const.CSDL_ROOT_ELEMENT
882a0 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 53 63 68 65 6d 61 22 0d 0a 20 20 20 20 _NAME.As.String.=."Schema"......
882c0 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 45 44 4d 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 Public.Const.EDM_ANNOTATION_09_0
882e0 32 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 2.As.String.=."http://schemas.mi
88300 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 30 32 2f 65 64 6d 2f 61 6e 6e 6f crosoft.com/ado/2009/02/edm/anno
88320 74 61 74 69 6f 6e 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 53 53 44 4c tation"........Public.Const.SSDL
88340 5f 45 58 54 45 4e 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 2e 73 73 64 6c 22 0d 0a _EXTENSION.As.String.=.".ssdl"..
88360 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 53 53 44 4c 5f 45 44 4d 58 5f 53 45 43 ......Public.Const.SSDL_EDMX_SEC
88380 54 49 4f 4e 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 53 74 6f 72 61 67 65 4d 6f TION_NAME.As.String.=."StorageMo
883a0 64 65 6c 73 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 53 53 44 4c 5f 52 4f 4f dels"......Public.Const.SSDL_ROO
883c0 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 53 63 68 65 T_ELEMENT_NAME.As.String.=."Sche
883e0 6d 61 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 4d 53 4c 5f 45 58 54 45 ma"........Public.Const.MSL_EXTE
88400 4e 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 2e 6d 73 6c 22 0d 0a 0d 0a 20 20 20 20 NSION.As.String.=.".msl"........
88420 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 4d 53 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 Public.Const.MSL_EDMX_SECTION_NA
88440 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 4d 61 70 70 69 6e 67 73 22 0d 0a 20 20 20 20 50 ME.As.String.=."Mappings"......P
88460 75 62 6c 69 63 20 43 6f 6e 73 74 20 4d 53 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d ublic.Const.MSL_ROOT_ELEMENT_NAM
88480 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 4d 61 70 70 69 6e 67 22 0d 0a 0d 0a 20 20 20 20 50 E.As.String.=."Mapping"........P
884a0 75 62 6c 69 63 20 43 6f 6e 73 74 20 54 54 5f 54 45 4d 50 4c 41 54 45 5f 4e 41 4d 45 20 41 73 20 ublic.Const.TT_TEMPLATE_NAME.As.
884c0 53 74 72 69 6e 67 20 3d 20 22 54 65 6d 70 6c 61 74 65 4e 61 6d 65 22 0d 0a 20 20 20 20 50 75 62 String.=."TemplateName"......Pub
884e0 6c 69 63 20 43 6f 6e 73 74 20 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 20 41 73 lic.Const.TT_TEMPLATE_VERSION.As
88500 20 53 74 72 69 6e 67 20 3d 20 22 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 22 0d 0a 20 20 20 .String.=."TemplateVersion".....
88520 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 54 54 5f 4d 49 4e 49 4d 55 4d 5f 45 4e 54 49 54 59 5f .Public.Const.TT_MINIMUM_ENTITY_
88540 46 52 41 4d 45 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 4d FRAMEWORK_VERSION.As.String.=."M
88560 69 6e 69 6d 75 6d 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 56 65 72 73 69 6f 6e 22 0d 0a 0d inimumEntityFrameworkVersion"...
88580 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 44 45 46 41 55 4c 54 5f 54 45 4d 50 4c 41 .....Public.Const.DEFAULT_TEMPLA
885a0 54 45 5f 56 45 52 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 34 2e 30 22 0d 0a 0d 0a TE_VERSION.As.String.=."4.0"....
885c0 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 52 65 61 64 4f 6e 6c 79 20 56 31 5f 53 43 ....Public.Shared.ReadOnly.V1_SC
885e0 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 41 73 20 4e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 HEMA_CONSTANTS.As.New.SchemaCons
88600 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e tants(.........."http://schemas.
88620 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 37 2f 30 36 2f 65 64 6d 78 22 2c microsoft.com/ado/2007/06/edmx",
88640 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 .........."http://schemas.micros
88660 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 oft.com/ado/2006/04/edm",.......
88680 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d ..."http://schemas.microsoft.com
886a0 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 /ado/2006/04/edm/ssdl",.........
886c0 20 22 75 72 6e 3a 73 63 68 65 6d 61 73 2d 6d 69 63 72 6f 73 6f 66 74 2d 63 6f 6d 3a 77 69 6e 64 ."urn:schemas-microsoft-com:wind
886e0 6f 77 73 3a 73 74 6f 72 61 67 65 3a 6d 61 70 70 69 6e 67 3a 43 53 22 2c 0d 0a 20 20 20 20 20 20 ows:storage:mapping:CS",........
88700 20 20 4e 65 77 20 56 65 72 73 69 6f 6e 28 22 33 2e 35 22 29 29 0d 0a 0d 0a 20 20 20 20 50 75 62 ..New.Version("3.5"))........Pub
88720 6c 69 63 20 53 68 61 72 65 64 20 52 65 61 64 4f 6e 6c 79 20 56 32 5f 53 43 48 45 4d 41 5f 43 4f lic.Shared.ReadOnly.V2_SCHEMA_CO
88740 4e 53 54 41 4e 54 53 20 41 73 20 4e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d NSTANTS.As.New.SchemaConstants(.
88760 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f ........."http://schemas.microso
88780 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 31 30 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 ft.com/ado/2008/10/edmx",.......
887a0 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d ..."http://schemas.microsoft.com
887c0 2f 61 64 6f 2f 32 30 30 38 2f 30 39 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 /ado/2008/09/edm",.........."htt
887e0 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 p://schemas.microsoft.com/ado/20
88800 30 39 2f 30 32 2f 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 09/02/edm/ssdl",.........."http:
88820 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 //schemas.microsoft.com/ado/2008
88840 2f 30 39 2f 6d 61 70 70 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 4e 65 77 20 56 65 /09/mapping/cs",..........New.Ve
88860 72 73 69 6f 6e 28 22 34 2e 30 22 29 29 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 rsion("4.0"))........Public.Shar
88880 65 64 20 52 65 61 64 4f 6e 6c 79 20 56 33 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 ed.ReadOnly.V3_SCHEMA_CONSTANTS.
888a0 41 73 20 4e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 As.New.SchemaConstants(.........
888c0 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 ."http://schemas.microsoft.com/a
888e0 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 do/2009/11/edmx",.........."http
88900 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 ://schemas.microsoft.com/ado/200
88920 39 2f 31 31 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 9/11/edm",.........."http://sche
88940 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 mas.microsoft.com/ado/2009/11/ed
88960 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 m/ssdl",.........."http://schema
88980 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 6d 61 70 70 s.microsoft.com/ado/2009/11/mapp
889a0 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 4e 65 77 20 56 65 72 73 69 6f 6e 28 22 35 ing/cs",..........New.Version("5
889c0 2e 30 22 29 29 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 50 75 62 6c 69 63 20 53 74 72 75 63 .0"))..End.Class....Public.Struc
889e0 74 75 72 65 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 0d 0a 20 20 20 20 50 75 62 6c 69 63 ture.SchemaConstants......Public
88a00 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 65 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 41 73 20 .Sub.New(ByVal.edmxNamespace.As.
88a20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 String,.ByVal.csdlNamespace.As.S
88a40 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 73 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 tring,.ByVal.ssdlNamespace.As.St
88a60 72 69 6e 67 2c 20 42 79 56 61 6c 20 6d 73 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 ring,.ByVal.mslNamespace.As.Stri
88a80 6e 67 2c 20 42 79 56 61 6c 20 6d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e ng,.ByVal.minimumTemplateVersion
88aa0 20 41 73 20 56 65 72 73 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 45 64 6d 78 4e 61 6d .As.Version)..........Me.EdmxNam
88ac0 65 73 70 61 63 65 20 3d 20 65 64 6d 78 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 espace.=.edmxNamespace..........
88ae0 4d 65 2e 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 Me.CsdlNamespace.=.csdlNamespace
88b00 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 73 73 64 ..........Me.SsdlNamespace.=.ssd
88b20 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 4d 73 6c 4e 61 6d 65 73 70 lNamespace..........Me.MslNamesp
88b40 61 63 65 20 3d 20 6d 73 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 4d ace.=.mslNamespace..........Me.M
88b60 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 6d 69 6e 69 6d 75 6d 54 inimumTemplateVersion.=.minimumT
88b80 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 emplateVersion......End.Sub.....
88ba0 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 ...Public.Property.EdmxNamespace
88bc0 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 ().As.String..........Get.......
88be0 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 0d 0a 20 .......Return.m_EdmxNamespace...
88c00 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 .......End.Get..........Private.
88c20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 Set..............m_EdmxNamespace
88c40 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 .=.Value..........End.Set......E
88c60 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 45 64 6d 78 4e nd.Property......Private.m_EdmxN
88c80 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 amespace.As.String........Public
88ca0 20 50 72 6f 70 65 72 74 79 20 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 28 29 20 41 73 20 53 74 72 .Property.CsdlNamespace().As.Str
88cc0 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 ing..........Get..............Re
88ce0 74 75 72 6e 20 6d 5f 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e turn.m_CsdlNamespace..........En
88d00 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 20 20 20 d.Get..........Private.Set......
88d20 20 20 20 20 20 20 20 20 6d 5f 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 56 61 6c 75 65 0d ........m_CsdlNamespace.=.Value.
88d40 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 .........End.Set......End.Proper
88d60 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 ty......Private.m_CsdlNamespace.
88d80 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 As.String........Public.Property
88da0 20 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 .SsdlNamespace().As.String......
88dc0 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 53 73 ....Get..............Return.m_Ss
88de0 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 dlNamespace..........End.Get....
88e00 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d ......Private.Set..............m
88e20 5f 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 _SsdlNamespace.=.Value..........
88e40 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 End.Set......End.Property......P
88e60 72 69 76 61 74 65 20 6d 5f 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 rivate.m_SsdlNamespace.As.String
88e80 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4d 73 6c 4e 61 6d 65 73 ........Public.Property.MslNames
88ea0 70 61 63 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 pace().As.String..........Get...
88ec0 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 4d 73 6c 4e 61 6d 65 73 70 61 63 65 ...........Return.m_MslNamespace
88ee0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 ..........End.Get..........Priva
88f00 74 65 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 73 6c 4e 61 6d 65 73 70 61 te.Set..............m_MslNamespa
88f20 63 65 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 ce.=.Value..........End.Set.....
88f40 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 4d 73 6c .End.Property......Private.m_Msl
88f60 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 Namespace.As.String........Publi
88f80 63 20 50 72 6f 70 65 72 74 79 20 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f c.Property.MinimumTemplateVersio
88fa0 6e 28 29 20 41 73 20 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 n().As.Version..........Get.....
88fc0 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 .........Return.m_MinimumTemplat
88fe0 65 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 eVersion..........End.Get.......
89000 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 69 ...Private.Set..............m_Mi
89020 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 56 61 6c 75 65 0d 0a 20 20 nimumTemplateVersion.=.Value....
89040 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d ......End.Set......End.Property.
89060 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 .....Private.m_MinimumTemplateVe
89080 72 73 69 6f 6e 20 41 73 20 56 65 72 73 69 6f 6e 0d 0a 45 6e 64 20 53 74 72 75 63 74 75 72 65 0d rsion.As.Version..End.Structure.
890a0 0a 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 20 20 20 20 23 52 65 67 69 6f 6e 20 22 42 61 ......End.Class......#Region."Ba
890c0 73 65 20 63 6c 61 73 73 22 0d 0a 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 se.class"......'''<summary>.....
890e0 20 27 27 27 42 61 73 65 20 63 6c 61 73 73 20 66 6f 72 20 74 68 69 73 20 74 72 61 6e 73 66 6f 72 .'''Base.class.for.this.transfor
89100 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 3c mation......'''</summary>......<
89120 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 Global.System.CodeDom.Compiler.G
89140 65 6e 65 72 61 74 65 64 43 6f 64 65 41 74 74 72 69 62 75 74 65 28 22 4d 69 63 72 6f 73 6f 66 74 eneratedCodeAttribute("Microsoft
89160 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 22 2c 20 22 .VisualStudio.TextTemplating",."
89180 31 31 2e 30 2e 30 2e 30 22 29 3e 20 20 5f 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6c 61 73 73 11.0.0.0")>.._......Public.Class
891a0 20 56 42 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 42 61 73 65 0d 0a 20 20 20 20 20 20 20 20 .VBCodeGenTemplateBase..........
891c0 23 52 65 67 69 6f 6e 20 22 46 69 65 6c 64 73 22 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 #Region."Fields"..........Privat
891e0 65 20 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 41 73 20 e.generationEnvironmentField.As.
89200 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 Global.System.Text.StringBuilder
89220 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 65 72 72 6f 72 73 46 69 65 6c 64 20 41 73 ..........Private.errorsField.As
89240 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e .Global.System.CodeDom.Compiler.
89260 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 CompilerErrorCollection.........
89280 20 50 72 69 76 61 74 65 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 20 41 73 20 47 .Private.indentLengthsField.As.G
892a0 6c 6f 62 61 6c 2e 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 lobal.System.Collections.Generic
892c0 2e 4c 69 73 74 28 4f 66 20 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 .List(Of.Integer)..........Priva
892e0 74 65 20 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 41 73 20 53 74 72 69 6e 67 20 te.currentIndentField.As.String.
89300 3d 20 22 22 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 65 6e 64 73 57 69 74 68 4e 65 =.""..........Private.endsWithNe
89320 77 6c 69 6e 65 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 wline.As.Boolean..........Privat
89340 65 20 73 65 73 73 69 6f 6e 46 69 65 6c 64 20 41 73 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e e.sessionField.As.Global.System.
89360 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 28 Collections.Generic.IDictionary(
89380 4f 66 20 53 74 72 69 6e 67 2c 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 Of.String,.Object)..........#End
893a0 20 52 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 52 65 67 69 6f 6e 20 22 50 72 6f 70 65 72 .Region..........#Region."Proper
893c0 74 69 65 73 22 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ties"..........'''<summary>.....
893e0 20 20 20 20 20 27 27 27 54 68 65 20 73 74 72 69 6e 67 20 62 75 69 6c 64 65 72 20 74 68 61 74 20 .....'''The.string.builder.that.
89400 67 65 6e 65 72 61 74 69 6f 6e 2d 74 69 6d 65 20 63 6f 64 65 20 69 73 20 75 73 69 6e 67 20 74 6f generation-time.code.is.using.to
89420 20 61 73 73 65 6d 62 6c 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 .assemble.generated.output......
89440 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 ....'''</summary>..........Prote
89460 63 74 65 64 20 50 72 6f 70 65 72 74 79 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d cted.Property.GenerationEnvironm
89480 65 6e 74 28 29 20 41 73 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 ent().As.System.Text.StringBuild
894a0 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 er..............Get.............
894c0 20 20 20 20 20 49 66 20 28 4d 65 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e .....If.(Me.generationEnvironmen
894e0 74 46 69 65 6c 64 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 tField.Is.Nothing).Then.........
89500 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f .............Me.generationEnviro
89520 6e 6d 65 6e 74 46 69 65 6c 64 20 3d 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 54 nmentField.=.New.Global.System.T
89540 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ext.StringBuilder().............
89560 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 .....End.If..................Ret
89580 75 72 6e 20 4d 65 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c urn.Me.generationEnvironmentFiel
895a0 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 d..............End.Get..........
895c0 20 20 20 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 67 65 6e 65 ....Set..................Me.gene
895e0 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 3d 20 76 61 6c 75 65 0d 0a rationEnvironmentField.=.value..
89600 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 ............End.Set..........End
89620 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d .Property..........'''<summary>.
89640 0a 20 20 20 20 20 20 20 20 27 27 27 54 68 65 20 65 72 72 6f 72 20 63 6f 6c 6c 65 63 74 69 6f 6e .........'''The.error.collection
89660 20 66 6f 72 20 74 68 65 20 67 65 6e 65 72 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 0d 0a 20 20 20 .for.the.generation.process.....
89680 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c .....'''</summary>..........Publ
896a0 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 45 72 72 6f 72 73 28 29 20 41 73 ic.ReadOnly.Property.Errors().As
896c0 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 .System.CodeDom.Compiler.Compile
896e0 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 rErrorCollection..............Ge
89700 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4d 65 2e 65 72 72 6f 72 73 t..................If.(Me.errors
89720 46 69 65 6c 64 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 Field.Is.Nothing).Then..........
89740 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 65 72 72 6f 72 73 46 69 65 6c 64 20 3d 20 4e 65 77 ............Me.errorsField.=.New
89760 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e .Global.System.CodeDom.Compiler.
89780 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 CompilerErrorCollection().......
897a0 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........End.If...............
897c0 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 65 72 72 6f 72 73 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 ...Return.Me.errorsField........
897e0 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 ......End.Get..........End.Prope
89800 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 rty..........'''<summary>.......
89820 20 20 20 27 27 27 41 20 6c 69 73 74 20 6f 66 20 74 68 65 20 6c 65 6e 67 74 68 73 20 6f 66 20 65 ...'''A.list.of.the.lengths.of.e
89840 61 63 68 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 61 73 20 61 64 64 65 64 20 77 69 74 68 20 50 ach.indent.that.was.added.with.P
89860 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e ushIndent..........'''</summary>
89880 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 ..........Private.ReadOnly.Prope
898a0 72 74 79 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 28 29 20 41 73 20 53 79 73 74 65 6d 2e 43 6f rty.indentLengths().As.System.Co
898c0 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 4c 69 73 74 28 4f 66 20 49 6e 74 65 67 65 llections.Generic.List(Of.Intege
898e0 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 r)..............Get.............
89900 20 20 20 20 20 49 66 20 28 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 20 49 .....If.(Me.indentLengthsField.I
89920 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.Nothing).Then.................
89940 20 20 20 20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 20 3d 20 4e 65 77 .....Me.indentLengthsField.=.New
89960 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 .Global.System.Collections.Gener
89980 69 63 2e 4c 69 73 74 28 4f 66 20 49 6e 74 65 67 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 ic.List(Of.Integer)()...........
899a0 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 .......End.If..................R
899c0 65 74 75 72 6e 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 0d 0a 20 20 20 eturn.Me.indentLengthsField.....
899e0 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 .........End.Get..........End.Pr
89a00 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 operty..........'''<summary>....
89a20 20 20 20 20 20 20 27 27 27 47 65 74 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 ......'''Gets.the.current.indent
89a40 20 77 65 20 75 73 65 20 77 68 65 6e 20 61 64 64 69 6e 67 20 6c 69 6e 65 73 20 74 6f 20 74 68 65 .we.use.when.adding.lines.to.the
89a60 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a .output..........'''</summary>..
89a80 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 ........Public.ReadOnly.Property
89aa0 20 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 .CurrentIndent().As.String......
89ac0 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 ........Get..................Ret
89ae0 75 72 6e 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 0d 0a 20 20 20 20 20 urn.Me.currentIndentField.......
89b00 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 .......End.Get..........End.Prop
89b20 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 erty..........'''<summary>......
89b40 20 20 20 20 27 27 27 43 75 72 72 65 6e 74 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 65 ....'''Current.transformation.se
89b60 73 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ssion..........'''</summary>....
89b80 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 72 69 64 61 62 6c 65 20 50 72 6f 70 65 72 74 ......Public.Overridable.Propert
89ba0 79 20 53 65 73 73 69 6f 6e 28 29 20 41 73 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 6c y.Session().As.Global.System.Col
89bc0 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 lections.Generic.IDictionary(Of.
89be0 53 74 72 69 6e 67 2c 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 String,.Object)..............Get
89c00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 73 65 73 73 ..................Return.Me.sess
89c20 69 6f 6e 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 ionField..............End.Get...
89c40 20 20 20 20 20 20 20 20 20 20 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........Set..................
89c60 4d 65 2e 73 65 73 73 69 6f 6e 46 69 65 6c 64 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 Me.sessionField.=.value.........
89c80 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 .....End.Set..........End.Proper
89ca0 74 79 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 ty..........#End.Region.........
89cc0 20 23 52 65 67 69 6f 6e 20 22 54 72 61 6e 73 66 6f 72 6d 2d 74 69 6d 65 20 68 65 6c 70 65 72 73 .#Region."Transform-time.helpers
89ce0 22 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 "..........'''<summary>.........
89d00 20 27 27 27 57 72 69 74 65 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 .'''Write.text.directly.into.the
89d20 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f .generated.output..........'''</
89d40 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 6c 6f 61 summary>..........Public.Overloa
89d60 64 73 20 53 75 62 20 57 72 69 74 65 28 42 79 56 61 6c 20 74 65 78 74 54 6f 41 70 70 65 6e 64 20 ds.Sub.Write(ByVal.textToAppend.
89d80 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e As.String)..............If.Strin
89da0 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 20 54 68 g.IsNullOrEmpty(textToAppend).Th
89dc0 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 0d 0a 20 20 20 20 en..................Return......
89de0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 49 66 20 ........End.If..............'If.
89e00 77 65 27 72 65 20 73 74 61 72 74 69 6e 67 20 6f 66 66 2c 20 6f 72 20 69 66 20 74 68 65 20 70 72 we're.starting.off,.or.if.the.pr
89e20 65 76 69 6f 75 73 20 74 65 78 74 20 65 6e 64 65 64 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 evious.text.ended.with.a.newline
89e40 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 77 65 20 68 61 76 65 20 74 6f 20 61 70 70 65 6e ,..............'we.have.to.appen
89e60 64 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 66 69 72 73 74 2e 0d 0a 20 20 20 d.the.current.indent.first......
89e80 20 20 20 20 20 20 20 20 20 49 66 20 28 28 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 .........If.((Me.GenerationEnvir
89ea0 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 20 30 29 20 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 onment.Length.=.0).._...........
89ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 72 45 6c 73 65 20 4d 65 2e 65 6e 64 73 57 69 74 ...............OrElse.Me.endsWit
89ee0 68 4e 65 77 6c 69 6e 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hNewline).Then..................
89f00 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 Me.GenerationEnvironment.Append(
89f20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 29 0d 0a 20 20 20 20 20 20 20 20 Me.currentIndentField)..........
89f40 20 20 20 20 20 20 20 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 66 61 6c ........Me.endsWithNewline.=.fal
89f60 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 se..............End.If..........
89f80 20 20 20 20 27 43 68 65 63 6b 20 69 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 65 78 74 20 65 ....'Check.if.the.current.text.e
89fa0 6e 64 73 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nds.with.a.newline..............
89fc0 49 66 20 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 45 6e 64 73 57 69 74 68 28 47 6c 6f 62 61 6c 2e If.textToAppend.EndsWith(Global.
89fe0 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 47 6c 6f 62 System.Environment.NewLine,.Glob
8a000 61 6c 2e 53 79 73 74 65 6d 2e 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 43 75 72 72 65 al.System.StringComparison.Curre
8a020 6e 74 43 75 6c 74 75 72 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntCulture).Then.................
8a040 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 0d 0a 20 20 20 20 .Me.endsWithNewline.=.true......
8a060 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 54 68 69 ........End.If..............'Thi
8a080 73 20 69 73 20 61 6e 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 49 66 20 74 68 65 20 63 75 72 s.is.an.optimization..If.the.cur
8a0a0 72 65 6e 74 20 69 6e 64 65 6e 74 20 69 73 20 22 22 2c 20 74 68 65 6e 20 77 65 20 64 6f 6e 27 74 rent.indent.is."",.then.we.don't
8a0c0 20 68 61 76 65 20 74 6f 20 64 6f 20 61 6e 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 6f 66 .have.to.do.any..............'of
8a0e0 20 74 68 65 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 20 73 74 75 66 66 20 66 75 72 74 68 65 72 20 .the.more.complex.stuff.further.
8a100 64 6f 77 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4d 65 2e 63 75 72 72 65 6e down...............If.(Me.curren
8a120 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 20 3d 20 30 29 20 54 68 65 6e 0d 0a 20 tIndentField.Length.=.0).Then...
8a140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 ...............Me.GenerationEnvi
8a160 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 ronment.Append(textToAppend)....
8a180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 ..............Return............
8a1a0 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 45 76 65 72 79 77 68 65 72 ..End.If..............'Everywher
8a1c0 65 20 74 68 65 72 65 20 69 73 20 61 20 6e 65 77 6c 69 6e 65 20 69 6e 20 74 68 65 20 74 65 78 74 e.there.is.a.newline.in.the.text
8a1e0 2c 20 61 64 64 20 61 6e 20 69 6e 64 65 6e 74 20 61 66 74 65 72 20 69 74 0d 0a 20 20 20 20 20 20 ,.add.an.indent.after.it........
8a200 20 20 20 20 20 20 74 65 78 74 54 6f 41 70 70 65 6e 64 20 3d 20 74 65 78 74 54 6f 41 70 70 65 6e ......textToAppend.=.textToAppen
8a220 64 2e 52 65 70 6c 61 63 65 28 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d d.Replace(Global.System.Environm
8a240 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 28 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 45 6e 76 69 ent.NewLine,.(Global.System.Envi
8a260 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 20 2b 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 ronment.NewLine.+.Me.currentInde
8a280 6e 74 46 69 65 6c 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 49 66 20 74 68 65 20 74 ntField))..............'If.the.t
8a2a0 65 78 74 20 65 6e 64 73 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 2c 20 74 68 65 6e 20 77 65 ext.ends.with.a.newline,.then.we
8a2c0 20 73 68 6f 75 6c 64 20 73 74 72 69 70 20 6f 66 66 20 74 68 65 20 69 6e 64 65 6e 74 20 61 64 64 .should.strip.off.the.indent.add
8a2e0 65 64 20 61 74 20 74 68 65 20 76 65 72 79 20 65 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ed.at.the.very.end..............
8a300 27 62 65 63 61 75 73 65 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 69 6e 64 65 6e 74 20 'because.the.appropriate.indent.
8a320 77 69 6c 6c 20 62 65 20 61 64 64 65 64 20 77 68 65 6e 20 74 68 65 20 6e 65 78 74 20 74 69 6d 65 will.be.added.when.the.next.time
8a340 20 57 72 69 74 65 28 29 20 69 73 20 63 61 6c 6c 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .Write().is.called..............
8a360 49 66 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 54 68 65 6e 0d 0a 20 20 20 20 If.Me.endsWithNewline.Then......
8a380 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e ............Me.GenerationEnviron
8a3a0 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 78 74 54 6f 41 70 70 65 6e 64 2c 20 30 2c 20 28 74 65 ment.Append(textToAppend,.0,.(te
8a3c0 78 74 54 6f 41 70 70 65 6e 64 2e 4c 65 6e 67 74 68 20 2d 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e xtToAppend.Length.-.Me.currentIn
8a3e0 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 dentField.Length))..............
8a400 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 Else..................Me.Generat
8a420 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 78 74 54 6f 41 70 70 65 ionEnvironment.Append(textToAppe
8a440 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 nd)..............End.If.........
8a460 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a .End.Sub..........'''<summary>..
8a480 20 20 20 20 20 20 20 20 27 27 27 57 72 69 74 65 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 ........'''Write.text.directly.i
8a4a0 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 nto.the.generated.output........
8a4c0 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 ..'''</summary>..........Public.
8a4e0 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 20 57 72 69 74 65 4c 69 6e 65 28 42 79 56 61 6c 20 74 65 Overloads.Sub.WriteLine(ByVal.te
8a500 78 74 54 6f 41 70 70 65 6e 64 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 xtToAppend.As.String)...........
8a520 20 20 20 4d 65 2e 57 72 69 74 65 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 ...Me.Write(textToAppend).......
8a540 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e .......Me.GenerationEnvironment.
8a560 41 70 70 65 6e 64 4c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 65 6e 64 73 57 AppendLine..............Me.endsW
8a580 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 ithNewline.=.true..........End.S
8a5a0 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ub..........'''<summary>........
8a5c0 20 20 27 27 27 57 72 69 74 65 20 66 6f 72 6d 61 74 74 65 64 20 74 65 78 74 20 64 69 72 65 63 74 ..'''Write.formatted.text.direct
8a5e0 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 ly.into.the.generated.output....
8a600 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 ......'''</summary>..........Pub
8a620 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 20 57 72 69 74 65 28 42 79 56 61 6c 20 66 6f lic.Overloads.Sub.Write(ByVal.fo
8a640 72 6d 61 74 20 41 73 20 53 74 72 69 6e 67 2c 20 3c 53 79 73 74 65 6d 2e 50 61 72 61 6d 41 72 72 rmat.As.String,.<System.ParamArr
8a660 61 79 41 74 74 72 69 62 75 74 65 28 29 3e 20 42 79 56 61 6c 20 61 72 67 73 28 29 20 41 73 20 4f ayAttribute()>.ByVal.args().As.O
8a680 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 53 74 72 bject)..............Me.Write(Str
8a6a0 69 6e 67 2e 46 6f 72 6d 61 74 28 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 ing.Format(Global.System.Globali
8a6c0 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 zation.CultureInfo.CurrentCultur
8a6e0 65 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 e,.format,.args))..........End.S
8a700 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ub..........'''<summary>........
8a720 20 20 27 27 27 57 72 69 74 65 20 66 6f 72 6d 61 74 74 65 64 20 74 65 78 74 20 64 69 72 65 63 74 ..'''Write.formatted.text.direct
8a740 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 ly.into.the.generated.output....
8a760 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 ......'''</summary>..........Pub
8a780 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 20 57 72 69 74 65 4c 69 6e 65 28 42 79 56 61 lic.Overloads.Sub.WriteLine(ByVa
8a7a0 6c 20 66 6f 72 6d 61 74 20 41 73 20 53 74 72 69 6e 67 2c 20 3c 53 79 73 74 65 6d 2e 50 61 72 61 l.format.As.String,.<System.Para
8a7c0 6d 41 72 72 61 79 41 74 74 72 69 62 75 74 65 28 29 3e 20 42 79 56 61 6c 20 61 72 67 73 28 29 20 mArrayAttribute()>.ByVal.args().
8a7e0 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 As.Object)..............Me.Write
8a800 4c 69 6e 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d Line(String.Format(Global.System
8a820 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 .Globalization.CultureInfo.Curre
8a840 6e 74 43 75 6c 74 75 72 65 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 0d 0a 20 20 20 20 20 ntCulture,.format,.args)).......
8a860 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e ...End.Sub..........'''<summary>
8a880 0d 0a 20 20 20 20 20 20 20 20 27 27 27 52 61 69 73 65 20 61 6e 20 65 72 72 6f 72 0d 0a 20 20 20 ..........'''Raise.an.error.....
8a8a0 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c .....'''</summary>..........Publ
8a8c0 69 63 20 53 75 62 20 5b 45 72 72 6f 72 5d 28 42 79 56 61 6c 20 6d 65 73 73 61 67 65 20 41 73 20 ic.Sub.[Error](ByVal.message.As.
8a8e0 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 5b 65 72 72 6f 72 5d String)..............Dim.[error]
8a900 20 41 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 .As.System.CodeDom.Compiler.Comp
8a920 69 6c 65 72 45 72 72 6f 72 20 3d 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f ilerError.=.New.Global.System.Co
8a940 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 0d 0a deDom.Compiler.CompilerError()..
8a960 20 20 20 20 20 20 20 20 20 20 20 20 5b 65 72 72 6f 72 5d 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 ............[error].ErrorText.=.
8a980 6d 65 73 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 45 72 72 6f 72 73 2e 41 message..............Me.Errors.A
8a9a0 64 64 28 5b 65 72 72 6f 72 5d 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 dd([error])..........End.Sub....
8a9c0 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 52 ......'''<summary>..........'''R
8a9e0 61 69 73 65 20 61 20 77 61 72 6e 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d aise.a.warning..........'''</sum
8aa00 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 57 61 72 6e 69 6e mary>..........Public.Sub.Warnin
8aa20 67 28 42 79 56 61 6c 20 6d 65 73 73 61 67 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 g(ByVal.message.As.String)......
8aa40 20 20 20 20 20 20 20 20 44 69 6d 20 5b 65 72 72 6f 72 5d 20 41 73 20 53 79 73 74 65 6d 2e 43 6f ........Dim.[error].As.System.Co
8aa60 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 3d 20 4e deDom.Compiler.CompilerError.=.N
8aa80 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 ew.Global.System.CodeDom.Compile
8aaa0 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b r.CompilerError()..............[
8aac0 65 72 72 6f 72 5d 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 6d 65 73 73 61 67 65 0d 0a 20 20 20 20 error].ErrorText.=.message......
8aae0 20 20 20 20 20 20 20 20 5b 65 72 72 6f 72 5d 2e 49 73 57 61 72 6e 69 6e 67 20 3d 20 74 72 75 65 ........[error].IsWarning.=.true
8ab00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 45 72 72 6f 72 73 2e 41 64 64 28 5b 65 72 72 ..............Me.Errors.Add([err
8ab20 6f 72 5d 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 or])..........End.Sub..........'
8ab40 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 49 6e 63 72 65 61 73 65 ''<summary>..........'''Increase
8ab60 20 74 68 65 20 69 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 .the.indent..........'''</summar
8ab80 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 50 75 73 68 49 6e 64 65 6e y>..........Public.Sub.PushInden
8aba0 74 28 42 79 56 61 6c 20 69 6e 64 65 6e 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 t(ByVal.indent.As.String).......
8abc0 20 20 20 20 20 20 20 49 66 20 28 69 6e 64 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 .......If.(indent.=.Nothing).The
8abe0 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 47 6c 6f n..................Throw.New.Glo
8ac00 62 61 6c 2e 53 79 73 74 65 6d 2e 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e bal.System.ArgumentNullException
8ac20 28 22 69 6e 64 65 6e 74 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a ("indent")..............End.If..
8ac40 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c ............Me.currentIndentFiel
8ac60 64 20 3d 20 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 2b 20 69 6e 64 d.=.(Me.currentIndentField.+.ind
8ac80 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 ent)..............Me.indentLengt
8aca0 68 73 2e 41 64 64 28 69 6e 64 65 6e 74 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 45 hs.Add(indent.Length)..........E
8acc0 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 nd.Sub..........'''<summary>....
8ace0 20 20 20 20 20 20 27 27 27 52 65 6d 6f 76 65 20 74 68 65 20 6c 61 73 74 20 69 6e 64 65 6e 74 20 ......'''Remove.the.last.indent.
8ad00 74 68 61 74 20 77 61 73 20 61 64 64 65 64 20 77 69 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a that.was.added.with.PushIndent..
8ad20 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 ........'''</summary>..........P
8ad40 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 50 6f 70 49 6e 64 65 6e 74 28 29 20 41 73 20 53 74 ublic.Function.PopIndent().As.St
8ad60 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 74 75 72 6e 56 61 6c 75 ring..............Dim.returnValu
8ad80 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 e.As.String.=.""..............If
8ada0 20 28 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 3e 20 30 29 20 54 68 .(Me.indentLengths.Count.>.0).Th
8adc0 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 69 6e 64 65 6e 74 4c 65 en..................Dim.indentLe
8ade0 6e 67 74 68 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 ngth.As.Integer.=.Me.indentLengt
8ae00 68 73 28 28 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 2d 20 31 29 29 hs((Me.indentLengths.Count.-.1))
8ae20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 ..................Me.indentLengt
8ae40 68 73 2e 52 65 6d 6f 76 65 41 74 28 28 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f hs.RemoveAt((Me.indentLengths.Co
8ae60 75 6e 74 20 2d 20 31 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 69 unt.-.1))..................If.(i
8ae80 6e 64 65 6e 74 4c 65 6e 67 74 68 20 3e 20 30 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 ndentLength.>.0).Then...........
8aea0 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 56 61 6c 75 65 20 3d 20 4d 65 2e 63 75 72 72 ...........returnValue.=.Me.curr
8aec0 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 53 75 62 73 74 72 69 6e 67 28 28 4d 65 2e 63 75 72 entIndentField.Substring((Me.cur
8aee0 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c rentIndentField.Length.-.indentL
8af00 65 6e 67 74 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 4d 65 2e ength))......................Me.
8af20 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 4d 65 2e 63 75 72 72 65 6e 74 49 currentIndentField.=.Me.currentI
8af40 6e 64 65 6e 74 46 69 65 6c 64 2e 52 65 6d 6f 76 65 28 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 ndentField.Remove((Me.currentInd
8af60 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 entField.Length.-.indentLength))
8af80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 ..................End.If........
8afa0 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ......End.If..............Return
8afc0 20 72 65 74 75 72 6e 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 .returnValue..........End.Functi
8afe0 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 on..........'''<summary>........
8b000 20 20 27 27 27 52 65 6d 6f 76 65 20 61 6e 79 20 69 6e 64 65 6e 74 61 74 69 6f 6e 0d 0a 20 20 20 ..'''Remove.any.indentation.....
8b020 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c .....'''</summary>..........Publ
8b040 69 63 20 53 75 62 20 43 6c 65 61 72 49 6e 64 65 6e 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ic.Sub.ClearIndent()............
8b060 20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6c 65 61 72 0d 0a 20 20 20 20 20 20 ..Me.indentLengths.Clear........
8b080 20 20 20 20 20 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 22 22 ......Me.currentIndentField.=.""
8b0a0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 ..........End.Sub..........#End.
8b0c0 52 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 52 65 67 69 6f 6e 20 22 54 6f 53 74 72 69 6e Region..........#Region."ToStrin
8b0e0 67 20 48 65 6c 70 65 72 73 22 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e g.Helpers"..........'''<summary>
8b100 0d 0a 20 20 20 20 20 20 20 20 27 27 27 55 74 69 6c 69 74 79 20 63 6c 61 73 73 20 74 6f 20 70 72 ..........'''Utility.class.to.pr
8b120 6f 64 75 63 65 20 63 75 6c 74 75 72 65 2d 6f 72 69 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 oduce.culture-oriented.represent
8b140 61 74 69 6f 6e 20 6f 66 20 61 6e 20 6f 62 6a 65 63 74 20 61 73 20 61 20 73 74 72 69 6e 67 2e 0d ation.of.an.object.as.a.string..
8b160 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 .........'''</summary>..........
8b180 50 75 62 6c 69 63 20 43 6c 61 73 73 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c Public.Class.ToStringInstanceHel
8b1a0 70 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 66 6f 72 6d 61 74 50 per..............Private.formatP
8b1c0 72 6f 76 69 64 65 72 46 69 65 6c 64 20 20 41 73 20 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 roviderField..As.System.IFormatP
8b1e0 72 6f 76 69 64 65 72 20 3d 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a rovider.=.Global.System.Globaliz
8b200 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 ation.CultureInfo.InvariantCultu
8b220 72 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 re..............'''<summary>....
8b240 20 20 20 20 20 20 20 20 20 20 27 27 27 47 65 74 73 20 6f 72 20 73 65 74 73 20 66 6f 72 6d 61 74 ..........'''Gets.or.sets.format
8b260 20 70 72 6f 76 69 64 65 72 20 74 6f 20 62 65 20 75 73 65 64 20 62 79 20 54 6f 53 74 72 69 6e 67 .provider.to.be.used.by.ToString
8b280 57 69 74 68 43 75 6c 74 75 72 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 WithCulture.method..............
8b2a0 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 75 62 6c .'''</summary>..............Publ
8b2c0 69 63 20 50 72 6f 70 65 72 74 79 20 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 28 29 20 41 73 20 ic.Property.FormatProvider().As.
8b2e0 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 20 20 20 20 System.IFormatProvider..........
8b300 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........Get.....................
8b320 20 52 65 74 75 72 6e 20 4d 65 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 0d .Return.Me.formatProviderField..
8b340 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 .................End.Get........
8b360 20 20 20 20 20 20 20 20 20 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........Set...................
8b380 20 20 20 49 66 20 28 4e 6f 74 20 28 76 61 6c 75 65 29 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 ...If.(Not.(value).Is.Nothing).T
8b3a0 68 65 6e 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 4d 65 2e hen..........................Me.
8b3c0 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 20 3d 20 76 61 6c 75 65 0d 0a 20 20 formatProviderField..=.value....
8b3e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 ..................End.If........
8b400 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 ..........End.Set..............E
8b420 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d nd.Property..............'''<sum
8b440 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 27 27 54 68 69 73 20 69 73 20 63 61 mary>..............'''This.is.ca
8b460 6c 6c 65 64 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d 70 69 6c 65 2f 72 75 6e 20 61 70 70 64 6f 6d lled.from.the.compile/run.appdom
8b480 61 69 6e 20 74 6f 20 63 6f 6e 76 65 72 74 20 6f 62 6a 65 63 74 73 20 77 69 74 68 69 6e 20 61 6e ain.to.convert.objects.within.an
8b4a0 20 65 78 70 72 65 73 73 69 6f 6e 20 62 6c 6f 63 6b 20 74 6f 20 61 20 73 74 72 69 6e 67 0d 0a 20 .expression.block.to.a.string...
8b4c0 20 20 20 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ...........'''</summary>........
8b4e0 20 20 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 6f 53 74 72 69 6e 67 57 69 ......Public.Function.ToStringWi
8b500 74 68 43 75 6c 74 75 72 65 28 42 79 56 61 6c 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 20 thCulture(ByVal.objectToConvert.
8b520 41 73 20 4f 62 6a 65 63 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 As.Object).As.String............
8b540 20 20 20 20 20 20 49 66 20 28 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 20 49 73 20 4e 6f 74 ......If.(objectToConvert.Is.Not
8b560 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hing).Then......................
8b580 54 68 72 6f 77 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 41 72 67 75 6d 65 6e 74 Throw.New.Global.System.Argument
8b5a0 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 22 29 NullException("objectToConvert")
8b5c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 ..................End.If........
8b5e0 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 20 41 73 20 53 79 73 74 65 6d 2e 54 79 70 65 20 3d ..........Dim.t.As.System.Type.=
8b600 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2e 47 65 74 54 79 70 65 0d 0a 20 20 20 20 20 20 .objectToConvert.GetType........
8b620 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6d 65 74 68 6f 64 20 41 73 20 53 79 73 74 65 6d 2e 52 ..........Dim.method.As.System.R
8b640 65 66 6c 65 63 74 69 6f 6e 2e 4d 65 74 68 6f 64 49 6e 66 6f 20 3d 20 74 2e 47 65 74 4d 65 74 68 eflection.MethodInfo.=.t.GetMeth
8b660 6f 64 28 22 54 6f 53 74 72 69 6e 67 22 2c 20 4e 65 77 20 53 79 73 74 65 6d 2e 54 79 70 65 28 29 od("ToString",.New.System.Type()
8b680 20 7b 47 65 74 54 79 70 65 28 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 .{GetType(System.IFormatProvider
8b6a0 29 7d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 6d 65 74 68 6f 64 20 )})..................If.(method.
8b6c0 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Is.Nothing).Then................
8b6e0 20 20 20 20 20 20 52 65 74 75 72 6e 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2e 54 6f 53 ......Return.objectToConvert.ToS
8b700 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 tring..................Else.....
8b720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 6d 65 .................Return.CType(me
8b740 74 68 6f 64 2e 49 6e 76 6f 6b 65 28 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2c 20 4e 65 77 thod.Invoke(objectToConvert,.New
8b760 20 4f 62 6a 65 63 74 28 29 20 7b 4d 65 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c .Object().{Me.formatProviderFiel
8b780 64 20 7d 29 2c 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e d.}),String)..................En
8b7a0 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a d.If..............End.Function..
8b7c0 20 20 20 20 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 ........End.Class..........Priva
8b7e0 74 65 20 74 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 46 69 65 6c 64 20 41 73 20 54 6f 53 74 72 69 te.toStringHelperField.As.ToStri
8b800 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 20 3d 20 4e 65 77 20 54 6f 53 74 72 69 6e 67 49 ngInstanceHelper.=.New.ToStringI
8b820 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d nstanceHelper()..........'''<sum
8b840 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 48 65 6c 70 65 72 20 74 6f 20 70 72 6f 64 mary>..........'''Helper.to.prod
8b860 75 63 65 20 63 75 6c 74 75 72 65 2d 6f 72 69 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 uce.culture-oriented.representat
8b880 69 6f 6e 20 6f 66 20 61 6e 20 6f 62 6a 65 63 74 20 61 73 20 61 20 73 74 72 69 6e 67 0d 0a 20 20 ion.of.an.object.as.a.string....
8b8a0 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 ......'''</summary>..........Pub
8b8c0 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 54 6f 53 74 72 69 6e 67 48 65 lic.ReadOnly.Property.ToStringHe
8b8e0 6c 70 65 72 28 29 20 41 73 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 lper().As.ToStringInstanceHelper
8b900 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............Get...............
8b920 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 74 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 46 69 65 6c 64 ...Return.Me.toStringHelperField
8b940 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 ..............End.Get..........E
8b960 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e nd.Property..........#End.Region
8b980 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e ......End.Class......#End.Region
8b9a0 0d 0a 45 6e 64 20 4e 61 6d 65 73 70 61 63 65 0d 0a 00 00 00 00 00 00 00 24 1d 03 00 49 6d 70 6f ..End.Namespace.........$...Impo
8b9c0 72 74 73 20 53 79 73 74 65 6d 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 4c 69 6e 71 0d rts.System..Imports.System.Linq.
8b9e0 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 49 4f 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 .Imports.System.IO..Imports.Syst
8ba00 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 0d 0a 49 6d 70 6f 72 74 73 20 em.Collections.Generic..Imports.
8ba20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 System.Data.Objects..Imports.Sys
8ba40 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 74 73 2e 44 61 74 61 43 6c 61 73 73 65 73 0d 0a 49 6d tem.Data.Objects.DataClasses..Im
8ba60 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 58 6d 6c 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d ports.System.Xml..Imports.System
8ba80 2e 58 6d 6c 2e 4c 69 6e 71 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c .Xml.Linq..Imports.System.Global
8baa0 69 7a 61 74 69 6f 6e 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 ization..Imports.System.Reflecti
8bac0 6f 6e 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4d 65 74 61 64 61 74 61 on..Imports.System.Data.Metadata
8bae0 2e 45 64 6d 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 4d 61 70 70 69 6e .Edm..Imports.System.Data.Mappin
8bb00 67 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 g..Imports.System.Data.Entity.De
8bb20 73 69 67 6e 0d 0a 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 0d 0a 49 6d sign..Imports.System.CodeDom..Im
8bb40 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 0d 0a 49 ports.System.CodeDom.Compiler..I
8bb60 6d 70 6f 72 74 73 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 0d 0a 49 6d mports.Microsoft.VisualBasic..Im
8bb80 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 54 65 78 74 0d 0a 0d 0a 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ports.System.Text....'----------
8bba0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8bbc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8bbe0 2d 2d 2d 2d 0d 0a 27 3c 61 75 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 0d 0a 27 20 20 20 20 54 68 ----..'<auto-generated>..'....Th
8bc00 69 73 20 63 6f 64 65 20 77 61 73 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 61 20 74 6f 6f 6c 2e is.code.was.generated.by.a.tool.
8bc20 0d 0a 27 20 20 20 20 52 75 6e 74 69 6d 65 20 56 65 72 73 69 6f 6e 3a 20 31 31 2e 30 2e 30 2e 30 ..'....Runtime.Version:.11.0.0.0
8bc40 0d 0a 27 20 0d 0a 27 20 20 20 20 43 68 61 6e 67 65 73 20 74 6f 20 74 68 69 73 20 66 69 6c 65 20 ..'...'....Changes.to.this.file.
8bc60 6d 61 79 20 63 61 75 73 65 20 69 6e 63 6f 72 72 65 63 74 20 62 65 68 61 76 69 6f 72 20 61 6e 64 may.cause.incorrect.behavior.and
8bc80 20 77 69 6c 6c 20 62 65 20 6c 6f 73 74 20 69 66 0d 0a 27 20 20 20 20 74 68 65 20 63 6f 64 65 20 .will.be.lost.if..'....the.code.
8bca0 69 73 20 72 65 67 65 6e 65 72 61 74 65 64 2e 0d 0a 27 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 74 is.regenerated...'</auto-generat
8bcc0 65 64 3e 0d 0a 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ed>..'--------------------------
8bce0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8bd00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 4e 61 6d 65 73 70 61 63 65 20 --------------------..Namespace.
8bd20 54 65 6d 70 6c 61 74 65 43 6f 64 65 47 65 6e 65 72 61 74 6f 72 73 0d 0a 20 20 20 20 27 27 27 3c TemplateCodeGenerators......'''<
8bd40 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 43 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 63 summary>......'''Class.to.produc
8bd60 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 27 27 27 3c 2f e.the.template.output......'''</
8bd80 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 3c 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 summary>......<Global.System.Cod
8bda0 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 65 6e 65 72 61 74 65 64 43 6f 64 65 41 74 74 72 69 eDom.Compiler.GeneratedCodeAttri
8bdc0 62 75 74 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 bute("Microsoft.VisualStudio.Tex
8bde0 74 54 65 6d 70 6c 61 74 69 6e 67 22 2c 20 22 31 31 2e 30 2e 30 2e 30 22 29 3e 20 20 5f 0d 0a 20 tTemplating",."11.0.0.0")>.._...
8be00 20 20 20 50 61 72 74 69 61 6c 20 50 75 62 6c 69 63 20 43 6c 61 73 73 20 56 42 43 6f 64 65 47 65 ...Partial.Public.Class.VBCodeGe
8be20 6e 54 65 6d 70 6c 61 74 65 56 35 30 0d 0a 20 20 20 20 20 20 20 20 49 6e 68 65 72 69 74 73 20 56 nTemplateV50..........Inherits.V
8be40 42 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 56 35 30 42 61 73 65 0d 0a 20 20 20 20 20 20 20 BCodeGenTemplateV50Base.........
8be60 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 43 72 65 61 74 65 .'''<summary>..........'''Create
8be80 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 .the.template.output..........''
8bea0 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 '</summary>..........Public.Over
8bec0 72 69 64 61 62 6c 65 20 46 75 6e 63 74 69 6f 6e 20 54 72 61 6e 73 66 6f 72 6d 54 65 78 74 28 29 ridable.Function.TransformText()
8bee0 20 41 73 20 53 74 72 69 6e 67 0d 0a 0a 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 0d 0a 27 20 .As.String.....'...'...'...'..'.
8bf00 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 0d ..'...'...'...'...'...'...'...'.
8bf20 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 27 20 0d 0a 0a 0a 0d 0a 0d 0a 44 65 66 69 6e 65 4d 65 74 .'...'...'...'.........DefineMet
8bf40 61 64 61 74 61 28 29 0d 0a 0d 0a 44 69 6d 20 75 73 65 72 53 65 74 74 69 6e 67 73 20 41 73 20 55 adata()....Dim.userSettings.As.U
8bf60 73 65 72 53 65 74 74 69 6e 67 73 20 3d 0d 0a 20 20 20 20 4e 65 77 20 55 73 65 72 53 65 74 74 69 serSettings.=......New.UserSetti
8bf80 6e 67 73 20 57 69 74 68 20 5f 0d 0a 20 20 20 20 7b 20 5f 0d 0a 20 20 20 20 20 20 20 20 2e 53 6f ngs.With._......{._...........So
8bfa0 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 22 24 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 24 22 urceCsdlPath.=."$edmxInputFile$"
8bfc0 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 2e 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 ,._...........ReferenceCsdlPaths
8bfe0 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 20 28 29 20 7b 7d 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 .=.new.string.().{},._..........
8c000 2e 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 54 72 75 65 2c .FullyQualifySystemTypes.=.True,
8c020 20 5f 0d 0a 20 20 20 20 20 20 20 20 2e 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d ._...........CreateContextAddToM
8c040 65 74 68 6f 64 73 20 3d 20 54 72 75 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 2e 43 61 6d 65 6c ethods.=.True,._...........Camel
8c060 43 61 73 65 46 69 65 6c 64 73 20 3d 20 46 61 6c 73 65 20 5f 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 41 CaseFields.=.False._......}....A
8c080 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e 67 73 28 75 73 65 72 53 65 74 74 69 6e 67 73 29 0d 0a pplyUserSettings(userSettings)..
8c0a0 49 66 20 45 72 72 6f 72 73 2e 48 61 73 45 72 72 6f 72 73 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 If.Errors.HasErrors......Return.
8c0c0 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 45 6e 64 20 49 66 0d 0a 44 69 6d 20 6c 6f 61 64 65 72 String.Empty..End.If..Dim.loader
8c0e0 20 41 73 20 4e 65 77 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 28 4d 65 29 0d 0a 44 69 6d 20 .As.New.MetadataLoader(Me)..Dim.
8c100 65 66 20 41 73 20 4e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 4d 65 29 0d 0a 44 69 6d ef.As.New.MetadataTools(Me)..Dim
8c120 20 72 65 67 69 6f 6e 20 41 73 20 4e 65 77 20 43 6f 64 65 52 65 67 69 6f 6e 28 4d 65 29 0d 0a 44 .region.As.New.CodeRegion(Me)..D
8c140 69 6d 20 63 6f 64 65 20 41 73 20 4e 65 77 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f im.code.As.New.CodeGenerationToo
8c160 6c 73 28 4d 65 29 20 57 69 74 68 20 7b 2e 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d ls(Me).With.{.FullyQualifySystem
8c180 54 79 70 65 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 46 75 6c 6c 79 51 75 61 6c 69 66 Types.=.userSettings.FullyQualif
8c1a0 79 53 79 73 74 65 6d 54 79 70 65 73 2c 20 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d ySystemTypes,..CamelCaseFields.=
8c1c0 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 7d 0d 0a .userSettings.CamelCaseFields}..
8c1e0 0d 0a 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 6c 6f 61 64 65 72 2e 43 72 65 61 74 65 ..ItemCollection.=.loader.Create
8c200 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 EdmItemCollection(SourceCsdlPath
8c220 2c 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 2e 54 6f 41 72 72 61 79 28 29 29 0d ,.ReferenceCsdlPaths.ToArray()).
8c240 0a 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 6c 6f 61 64 65 72 2e 47 65 74 4d 6f 64 65 .ModelNamespace.=.loader.GetMode
8c260 6c 4e 61 6d 65 73 70 61 63 65 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 0d 0a 44 69 6d 20 lNamespace(SourceCsdlPath)..Dim.
8c280 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 47 65 74 4e 61 6d namespaceName.As.String.=.GetNam
8c2a0 65 73 70 61 63 65 4e 61 6d 65 28 63 6f 64 65 29 0d 0a 55 70 64 61 74 65 4f 62 6a 65 63 74 4e 61 espaceName(code)..UpdateObjectNa
8c2c0 6d 65 73 70 61 63 65 4d 61 70 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 0d 0a 0a 20 20 20 20 mespaceMap(namespaceName).......
8c2e0 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f ........Me.Write(""&Global.Micro
8c300 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
8c320 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
8c340 22 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d "'------------------------------
8c360 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8c380 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 ----------------"&._............
8c3a0 20 20 20 20 20 20 20 20 20 20 20 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ...........""&Global.Microsoft.V
8c3c0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
8c3e0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 20 3c 61 75 soft.VisualBasic.ChrW(10)&"'.<au
8c400 74 6f 2d 67 65 6e 65 72 61 74 65 64 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e to-generated>"&Global.Microsoft.
8c420 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
8c440 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 20 22 29 osoft.VisualBasic.ChrW(10)&"'.")
8c460 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
8c480 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 6f ingHelper.ToStringWithCulture(Co
8c4a0 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 deGenerationTools.GetResourceStr
8c4c0 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 ing("Template_GeneratedCodeComme
8c4e0 6e 74 4c 69 6e 65 31 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 ntLine1")))...............Me.Wri
8c500 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 te(""&Global.Microsoft.VisualBas
8c520 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
8c540 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ualBasic.ChrW(10)&"'"&Global.Mic
8c560 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
8c580 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
8c5a0 29 26 22 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d )&"'.")...............Me.Write(M
8c5c0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
8c5e0 74 75 72 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f ture(CodeGenerationTools.GetReso
8c600 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 74 65 64 43 6f urceString("Template_GeneratedCo
8c620 64 65 43 6f 6d 6d 65 6e 74 4c 69 6e 65 32 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 deCommentLine2")))..............
8c640 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 .Me.Write(""&Global.Microsoft.Vi
8c660 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
8c680 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 20 22 29 0d 0a oft.VisualBasic.ChrW(10)&"'.")..
8c6a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
8c6c0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 6f 64 65 gHelper.ToStringWithCulture(Code
8c6e0 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e GenerationTools.GetResourceStrin
8c700 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 65 72 61 74 65 64 43 6f 64 65 43 6f 6d 6d 65 6e 74 g("Template_GeneratedCodeComment
8c720 4c 69 6e 65 33 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 Line3")))...............Me.Write
8c740 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
8c760 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
8c780 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 20 3c 2f 61 75 74 6f 2d 67 65 6e 65 72 61 lBasic.ChrW(10)&"'.</auto-genera
8c7a0 74 65 64 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 ted>"&Global.Microsoft.VisualBas
8c7c0 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
8c7e0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ualBasic.ChrW(10)&"'------------
8c800 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d --------------------------------
8c820 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 -------------"&._...............
8c840 20 20 20 20 20 20 20 20 22 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 22 26 ........"---------------------"&
8c860 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
8c880 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
8c8a0 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(10)&Global.Microsoft.Vis
8c8c0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
8c8e0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 ft.VisualBasic.ChrW(10)&"Imports
8c900 20 53 79 73 74 65 6d 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c .System"&Global.Microsoft.Visual
8c920 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
8c940 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 VisualBasic.ChrW(10)&"Imports.Sy
8c960 73 74 65 6d 2e 43 6f 6d 70 6f 6e 65 6e 74 4d 6f 64 65 6c 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 stem.ComponentModel"&Global.Micr
8c980 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
8c9a0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
8c9c0 26 22 49 6d 70 6f 72 74 73 20 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 &"Imports."&._..................
8c9e0 20 20 20 20 20 22 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 43 6c 69 65 6e 74 22 26 ....."System.Data.EntityClient"&
8ca00 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
8ca20 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
8ca40 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 44 61 74 61 ic.ChrW(10)&"Imports.System.Data
8ca60 2e 4f 62 6a 65 63 74 73 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .Objects"&Global.Microsoft.Visua
8ca80 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
8caa0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 .VisualBasic.ChrW(10)&"Imports.S
8cac0 79 73 74 65 6d 2e 44 61 74 61 2e 4f 62 6a 65 63 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 ystem.Data.Objec"&._............
8cae0 20 20 20 20 20 20 20 20 20 20 20 22 74 73 2e 44 61 74 61 43 6c 61 73 73 65 73 22 26 47 6c 6f 62 ..........."ts.DataClasses"&Glob
8cb00 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
8cb20 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
8cb40 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 4c 69 6e 71 22 26 47 6c hrW(10)&"Imports.System.Linq"&Gl
8cb60 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8cb80 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
8cba0 2e 43 68 72 57 28 31 30 29 26 22 49 6d 70 6f 72 74 73 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d .ChrW(10)&"Imports.System.Runtim
8cbc0 65 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 e.Serialization"&Global.Microsof
8cbe0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
8cc00 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 49 6d crosoft.VisualBasic.ChrW(10)&"Im
8cc20 70 6f 72 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 por"&._......................."t
8cc40 73 20 53 79 73 74 65 6d 2e 58 6d 6c 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 22 26 47 6c 6f 62 s.System.Xml.Serialization"&Glob
8cc60 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
8cc80 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
8cca0 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(10)&Global.Microsoft.VisualB
8ccc0 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
8cce0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 41 73 73 65 6d 62 6c 79 3a 20 isualBasic.ChrW(10)&"<Assembly:.
8cd00 45 64 6d 53 63 68 65 6d 61 41 74 74 72 69 62 75 74 65 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 EdmSchemaAttribute(""").........
8cd20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
8cd40 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 47 75 69 64 2e 4e 65 77 47 75 69 .ToStringWithCulture(Guid.NewGui
8cd60 64 28 29 2e 54 6f 53 74 72 69 6e 67 28 22 44 22 2c 20 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e d().ToString("D",.CultureInfo.In
8cd80 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 variantCulture)))...............
8cda0 4d 65 2e 57 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 Me.Write(""")>"&Global.Microsoft
8cdc0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
8cde0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d rosoft.VisualBasic.ChrW(10))....
8ce00 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 57 72 69 74 .....''''''''......''''''''.Writ
8ce20 65 20 52 65 6c 61 74 69 6f 6e 73 68 69 70 20 41 74 74 72 69 62 75 74 65 73 2e 0d 0a 20 20 20 20 e.Relationship.Attributes.......
8ce40 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 ''''''''......region.Begin(CodeG
8ce60 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 enerationTools.GetResourceString
8ce80 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 22 29 ("Template_RegionRelationships")
8cea0 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 41 73 20 41 )......For.Each.association.As.A
8cec0 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d ssociationType.in.GetSourceSchem
8cee0 61 54 79 70 65 73 28 4f 66 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 28 29 0d 0a 0a 20 aTypes(Of.AssociationType)()....
8cf00 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 3c 41 73 73 65 6d 62 6c 79 3a 20 ...........Me.Write("<Assembly:.
8cf20 45 64 6d 52 65 6c 61 74 69 6f 6e 73 68 69 70 41 74 74 72 69 62 75 74 65 28 22 22 22 29 0d 0a 0a EdmRelationshipAttribute(""")...
8cf40 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
8cf60 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 73 73 6f 63 Helper.ToStringWithCulture(assoc
8cf80 69 61 74 69 6f 6e 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 iation.NamespaceName))..........
8cfa0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 .....Me.Write(""",.""").........
8cfc0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
8cfe0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 73 73 6f 63 69 61 74 69 6f 6e .ToStringWithCulture(association
8d000 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 .Name))...............Me.Write("
8d020 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 "",.""")...............Me.Write(
8d040 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
8d060 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 30 29 29 29 0d lture(EndName(association,.0))).
8d080 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 29 0d 0a ..............Me.Write(""",.")..
8d0a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
8d0c0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4d gHelper.ToStringWithCulture(EndM
8d0e0 75 6c 74 69 70 6c 69 63 69 74 79 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 30 2c 20 63 6f 64 65 ultiplicity(association,.0,.code
8d100 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 2c 20 47 65 )))...............Me.Write(",.Ge
8d120 74 54 79 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 tType(")...............Me.Write(
8d140 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
8d160 6c 74 75 72 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 lture(EscapeEndTypeName(associat
8d180 69 6f 6e 2c 20 30 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 ion,.0,.code)))...............Me
8d1a0 2e 57 72 69 74 65 28 22 29 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 .Write("),.""")...............Me
8d1c0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
8d1e0 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 4e 61 6d 65 28 61 73 73 6f 63 69 61 74 69 6f 6e gWithCulture(EndName(association
8d200 2c 20 31 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 ,.1)))...............Me.Write(""
8d220 22 2c 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e ",.")...............Me.Write(Me.
8d240 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
8d260 72 65 28 45 6e 64 4d 75 6c 74 69 70 6c 69 63 69 74 79 28 61 73 73 6f 63 69 61 74 69 6f 6e 2c 20 re(EndMultiplicity(association,.
8d280 31 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 1,.code)))...............Me.Writ
8d2a0 65 28 22 2c 20 47 65 74 54 79 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 e(",.GetType(")...............Me
8d2c0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
8d2e0 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 73 63 61 70 65 45 6e 64 54 79 70 65 4e 61 6d 65 28 61 gWithCulture(EscapeEndTypeName(a
8d300 73 73 6f 63 69 61 74 69 6f 6e 2c 20 31 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 ssociation,.1,.code)))..........
8d320 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 .....Me.Write(")")..............
8d340 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
8d360 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 ringWithCulture(code.StringBefor
8d380 65 28 22 2c 20 22 2c 20 49 66 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 49 73 46 6f 72 65 69 67 6e e(",.",.If(association.IsForeign
8d3a0 4b 65 79 2c 20 22 54 72 75 65 22 2c 20 4e 6f 74 68 69 6e 67 29 29 29 29 0d 0a 0a 20 20 20 20 20 Key,."True",.Nothing))))........
8d3c0 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 .......Me.Write(")>"&Global.Micr
8d3e0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
8d400 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
8d420 29 0d 0a 0a 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 ).........Next......region.End()
8d440 0d 0a 0d 0a 20 20 20 20 49 66 28 4e 6f 74 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d ........If(Not.String.IsNullOrEm
8d460 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 20 54 68 65 6e 0d 0a 0a 20 20 20 20 20 pty(namespaceName)).Then........
8d480 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 4e 61 6d 65 73 70 61 63 65 20 22 29 0d 0a 0a .......Me.Write("Namespace.")...
8d4a0 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
8d4c0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 6d 65 73 Helper.ToStringWithCulture(names
8d4e0 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 paceName))...............Me.Writ
8d500 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 e(""&Global.Microsoft.VisualBasi
8d520 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
8d540 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(10)&Global.Microsof
8d560 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
8d580 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a crosoft.VisualBasic.ChrW(10))...
8d5a0 0d 0a 20 20 20 20 20 20 20 20 50 75 73 68 49 6e 64 65 6e 74 28 43 6f 64 65 52 65 67 69 6f 6e 2e ..........PushIndent(CodeRegion.
8d5c0 47 65 74 49 6e 64 65 6e 74 28 31 29 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 GetIndent(1))......End.If.......
8d5e0 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 .''''''''......''''''''.......''
8d600 27 27 27 27 27 27 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e ''''''......region.Begin(CodeGen
8d620 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 erationTools.GetResourceString("
8d640 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6e 74 65 78 74 73 22 29 29 0d 0a 20 20 20 20 Template_RegionContexts"))......
8d660 46 6f 72 20 45 61 63 68 20 63 6f 6e 74 61 69 6e 65 72 20 61 73 20 45 6e 74 69 74 79 43 6f 6e 74 For.Each.container.as.EntityCont
8d680 61 69 6e 65 72 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 28 4f 66 ainer.in.GetSourceSchemaTypes(Of
8d6a0 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 .EntityContainer)().............
8d6c0 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ..Me.Write(""&Global.Microsoft.V
8d6e0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
8d700 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c soft.VisualBasic.ChrW(10)&"'''.<
8d720 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 summary>"&Global.Microsoft.Visua
8d740 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
8d760 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 22 29 0d 0a 0a .VisualBasic.ChrW(10)&"'''.")...
8d780 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
8d7a0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 Helper.ToStringWithCulture(Summa
8d7c0 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 ryComment(container)))..........
8d7e0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 .....Me.Write(""&Global.Microsof
8d800 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
8d820 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 crosoft.VisualBasic.ChrW(10)&"''
8d840 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e '.</summary>")...............Me.
8d860 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
8d880 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 WithCulture(LongDescriptionComme
8d8a0 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6e 74 61 69 6e 65 72 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 ntElement(container,.region.Curr
8d8c0 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 entIndentLevel)))...............
8d8e0 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Me.Write(""&Global.Microsoft.Vis
8d900 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
8d920 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 20 20 20 20 20 ft.VisualBasic.ChrW(10))........
8d940 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .......Me.Write(Me.ToStringHelpe
8d960 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c r.ToStringWithCulture(Accessibil
8d980 69 74 79 2e 46 6f 72 54 79 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 ity.ForType(container)))........
8d9a0 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 50 61 72 74 69 61 6c 20 43 6c 61 73 73 20 .......Me.Write(".Partial.Class.
8d9c0 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
8d9e0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
8da00 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 code.Escape(container)))........
8da20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 .......Me.Write(""&Global.Micros
8da40 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
8da60 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
8da80 20 20 20 20 49 6e 68 65 72 69 74 73 20 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 22 26 47 6c 6f 62 ....Inherits.ObjectContext"&Glob
8daa0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
8dac0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
8dae0 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(10)&Global.Microsoft.VisualB
8db00 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
8db20 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 23 52 65 67 69 6f 6e isualBasic.ChrW(10)&"....#Region
8db40 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e .""")...............Me.Write(Me.
8db60 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
8db80 72 65 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 re(CodeGenerationTools.GetResour
8dba0 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 6f 6e 73 74 72 75 ceString("Template_RegionConstru
8dbc0 63 74 6f 72 73 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ctors")))...............Me.Write
8dbe0 28 22 22 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 (""""&Global.Microsoft.VisualBas
8dc00 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
8dc20 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(10)&Global.Microso
8dc40 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
8dc60 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
8dc80 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ...'''.<summary>"&Global.Microso
8dca0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
8dcc0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
8dce0 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ...'''.")...............Me.Write
8dd00 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
8dd20 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f ulture(String.Format(CultureInfo
8dd40 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 .CurrentCulture,.CodeGenerationT
8dd60 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 ools.GetResourceString("Template
8dd80 5f 43 6f 6e 74 65 78 74 44 65 66 61 75 6c 74 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f _ContextDefaultCtorComment"),.co
8dda0 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 0d ntainer.Name,.container.Name))).
8ddc0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c ..............Me.Write(""&Global
8dde0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
8de00 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
8de20 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 W(10)&"....'''.</summary>"&Globa
8de40 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
8de60 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
8de80 72 57 28 31 30 29 26 22 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 29 22 26 47 6c rW(10)&"....Public.Sub.New()"&Gl
8dea0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8dec0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
8dee0 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 4d 79 42 61 73 65 2e 4e 65 77 28 22 22 .ChrW(10)&"........MyBase.New(""
8df00 6e 61 6d 65 3d 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d name=")...............Me.Write(M
8df20 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
8df40 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 ture(container.Name))...........
8df60 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 ....Me.Write(""",.""")..........
8df80 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
8dfa0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 ToStringWithCulture(container.Na
8dfc0 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 me))...............Me.Write(""")
8dfe0 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
8e000 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
8e020 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 asic.ChrW(10)).............Write
8e040 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 0d 0a 0a LazyLoadingEnabled(container)...
8e060 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e ............Me.Write("........On
8e080 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ContextCreated()"&Global.Microso
8e0a0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
8e0c0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
8e0e0 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ...End.Sub"&Global.Microsoft.Vis
8e100 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
8e120 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(10)&Global.M
8e140 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
8e160 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8e180 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 10)&"....'''.<summary>"&Global.M
8e1a0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
8e1c0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8e1e0 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 10)&"....'''.")...............Me
8e200 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
8e220 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 gWithCulture(String.Format(Cultu
8e240 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 reInfo.CurrentCulture,.CodeGener
8e260 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ationTools.GetResourceString("Te
8e280 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 74 43 6f 6d 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 mplate_ContextCommonCtorComment"
8e2a0 29 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ),.container.Name)))............
8e2c0 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
8e2e0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
8e300 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
8e320 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 '''.</summary>"&Global.Microsoft
8e340 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
8e360 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
8e380 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e .Public.Sub.New(ByVal.connection
8e3a0 53 74 72 69 6e 67 20 41 73 20 53 74 72 69 6e 67 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 String.As.String)"&Global.Micros
8e3c0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
8e3e0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
8e400 20 20 20 20 20 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....."&._.......................
8e420 22 20 20 20 4d 79 42 61 73 65 2e 4e 65 77 28 63 6f 6e 6e 65 63 74 69 6f 6e 53 74 72 69 6e 67 2c "...MyBase.New(connectionString,
8e440 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e .""")...............Me.Write(Me.
8e460 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
8e480 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 re(container.Name)).............
8e4a0 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 ..Me.Write(""")"&Global.Microsof
8e4c0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
8e4e0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a crosoft.VisualBasic.ChrW(10))...
8e500 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 ..........WriteLazyLoadingEnable
8e520 64 28 63 6f 6e 74 61 69 6e 65 72 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 d(container)...............Me.Wr
8e540 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 29 22 ite("........OnContextCreated()"
8e560 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
8e580 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
8e5a0 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 sic.ChrW(10)&"....End.Sub"&Globa
8e5c0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
8e5e0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
8e600 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(10)&Global.Microsoft.VisualBa
8e620 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
8e640 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d sualBasic.ChrW(10)&"....'''.<sum
8e660 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 mary>"&Global.Microsoft.VisualBa
8e680 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
8e6a0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a sualBasic.ChrW(10)&"....'''.")..
8e6c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
8e6e0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 gHelper.ToStringWithCulture(Stri
8e700 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c ng.Format(CultureInfo.CurrentCul
8e720 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 ture,.CodeGenerationTools.GetRes
8e740 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6e 74 65 78 74 43 6f 6d ourceString("Template_ContextCom
8e760 6d 6f 6e 43 74 6f 72 43 6f 6d 6d 65 6e 74 22 29 2c 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 monCtorComment"),.container.Name
8e780 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c )))...............Me.Write(""&Gl
8e7a0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8e7c0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
8e7e0 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 26 47 .ChrW(10)&"....'''.</summary>"&G
8e800 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
8e820 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
8e840 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 c.ChrW(10)&"....Public.Sub.New(B
8e860 79 56 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 41 73 20 45 6e 74 69 74 79 43 6f 6e 6e 65 63 74 yVal.connection.As.EntityConnect
8e880 69 6f 6e 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 ion)"&Global.Microsoft.VisualBas
8e8a0 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
8e8c0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 22 26 20 5f 20 0d 0a 20 20 20 20 20 ualBasic.ChrW(10)&"."&._........
8e8e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 20 20 20 20 20 20 4d 79 42 61 73 65 2e 4e 65 ...............".......MyBase.Ne
8e900 77 28 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 w(connection,.""")..............
8e920 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
8e940 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 29 29 ringWithCulture(container.Name))
8e960 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c ...............Me.Write(""")"&Gl
8e980 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8e9a0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
8e9c0 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 57 72 69 74 65 4c 61 7a 79 .ChrW(10)).............WriteLazy
8e9e0 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 63 6f 6e 74 61 69 6e 65 72 29 0d 0a 0a 20 20 20 20 LoadingEnabled(container).......
8ea00 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 4f 6e 43 6f 6e 74 ........Me.Write("........OnCont
8ea20 65 78 74 43 72 65 61 74 65 64 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 extCreated()"&Global.Microsoft.V
8ea40 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
8ea60 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 soft.VisualBasic.ChrW(10)&"....E
8ea80 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 nd.Sub"&Global.Microsoft.VisualB
8eaa0 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
8eac0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(10)&Global.Micro
8eae0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
8eb00 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
8eb20 22 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f "....#End.Region"&Global.Microso
8eb40 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
8eb60 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c icrosoft.VisualBasic.ChrW(10)&Gl
8eb80 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8eba0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
8ebc0 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 23 52 65 67 69 6f 6e 20 22 22 22 29 0d 0a 0a 20 20 .ChrW(10)&"....#Region.""").....
8ebe0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
8ec00 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 6f 64 65 47 65 6e lper.ToStringWithCulture(CodeGen
8ec20 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 erationTools.GetResourceString("
8ec40 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 50 61 72 74 69 61 6c 4d 65 74 68 6f 64 73 22 29 29 Template_RegionPartialMethods"))
8ec60 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 22 26 47 6c )...............Me.Write(""""&Gl
8ec80 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8eca0 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
8ecc0 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(10)&Global.Microsoft.Visua
8ece0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
8ed00 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 61 72 74 69 .VisualBasic.ChrW(10)&"....Parti
8ed20 61 6c 20 50 72 69 76 61 74 65 20 53 75 62 20 4f 6e 43 6f 6e 74 65 78 74 43 72 65 61 74 65 64 28 al.Private.Sub.OnContextCreated(
8ed40 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e )"&Global.Microsoft.VisualBasic.
8ed60 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
8ed80 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f Basic.ChrW(10)&"....End.Sub"&Glo
8eda0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
8edc0 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
8ede0 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(10)&Global.Microsoft.Visual
8ee00 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
8ee20 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 23 45 6e 64 20 52 VisualBasic.ChrW(10)&"....#End.R
8ee40 65 67 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 egion"&Global.Microsoft.VisualBa
8ee60 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
8ee80 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 sualBasic.ChrW(10)&._...........
8eea0 20 20 20 20 20 20 20 20 20 20 20 20 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ............""&Global.Microsoft.
8eec0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
8eee0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a osoft.VisualBasic.ChrW(10)).....
8ef00 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 ........''''''''..........''''''
8ef20 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 20 20 20 20 72 ''...........''''''''..........r
8ef40 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e egion.Begin(CodeGenerationTools.
8ef60 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 GetResourceString("Template_Regi
8ef80 6f 6e 4f 62 6a 65 63 74 53 65 74 50 72 6f 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 onObjectSetProperties"))........
8efa0 20 20 46 6f 72 20 45 61 63 68 20 65 6e 74 69 74 79 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 ..For.Each.entitySet.As.EntitySe
8efc0 74 20 49 6e 20 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 73 2e 4f 66 t.In.container.BaseEntitySets.Of
8efe0 54 79 70 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 Type(Of.EntitySet)()............
8f000 20 20 56 65 72 69 66 79 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 ..VerifyEntityTypeAndSetAccessib
8f020 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 65 6e 74 69 74 79 53 65 74 29 0d 0a 0a ilityCompatability(entitySet)...
8f040 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d ............Me.Write(""&Global.M
8f060 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
8f080 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8f0a0 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 10)&"....'''.<summary>"&Global.M
8f0c0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
8f0e0 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
8f100 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 10)&"....'''.")...............Me
8f120 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
8f140 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 6e 74 69 gWithCulture(SummaryComment(enti
8f160 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 tySet)))...............Me.Write(
8f180 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e ""&Global.Microsoft.VisualBasic.
8f1a0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
8f1c0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 Basic.ChrW(10)&"....'''.</summar
8f1e0 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 y>")...............Me.Write(Me.T
8f200 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
8f220 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 e(LongDescriptionCommentElement(
8f240 65 6e 74 69 74 79 53 65 74 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c entitySet,.region.CurrentIndentL
8f260 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 evel)))...............Me.Write("
8f280 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
8f2a0 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
8f2c0 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 asic.ChrW(10)&"....")...........
8f2e0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
8f300 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 oStringWithCulture(code.SpaceAft
8f320 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 6e 74 69 74 79 53 65 74 29 29 29 29 0d 0a 0a 0a er(NewModifier(entitySet))))....
8f340 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
8f360 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 Helper.ToStringWithCulture(Acces
8f380 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 6e 74 sibility.ForReadOnlyProperty(ent
8f3a0 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 itySet)))...............Me.Write
8f3c0 28 22 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 20 20 20 20 20 (".ReadOnly.Property.").........
8f3e0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
8f400 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 .ToStringWithCulture(code.Escape
8f420 28 65 6e 74 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 (entitySet)))...............Me.W
8f440 72 69 74 65 28 22 28 29 20 41 73 20 4f 62 6a 65 63 74 53 65 74 28 4f 66 20 22 29 0d 0a 0a 20 20 rite("().As.ObjectSet(Of.").....
8f460 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
8f480 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 lper.ToStringWithCulture(MultiSc
8f4a0 68 65 6d 61 45 73 63 61 70 65 28 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 hemaEscape(entitySet.ElementType
8f4c0 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ,.code)))...............Me.Write
8f4e0 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (")"&Global.Microsoft.VisualBasi
8f500 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
8f520 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 47 65 74 22 26 47 alBasic.ChrW(10)&"........Get"&G
8f540 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
8f560 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
8f580 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 22 29 0d 0a c.ChrW(10)&"............If.(")..
8f5a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
8f5c0 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 gHelper.ToStringWithCulture(code
8f5e0 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 .FieldName(entitySet))).........
8f600 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 ......Me.Write(".Is.Nothing).The
8f620 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e n"&Global.Microsoft.VisualBasic.
8f640 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
8f660 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Basic.ChrW(10)&"................
8f680 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
8f6a0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
8f6c0 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 code.FieldName(entitySet))).....
8f6e0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4d 79 42 61 73 65 2e 43 72 ..........Me.Write(".=.MyBase.Cr
8f700 65 61 74 65 4f 62 6a 65 63 74 53 65 74 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 eateObjectSet(Of.").............
8f720 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
8f740 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 tringWithCulture(MultiSchemaEsca
8f760 70 65 28 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 pe(entitySet.ElementType,.code))
8f780 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 )...............Me.Write(")(""")
8f7a0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
8f7c0 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e ingHelper.ToStringWithCulture(en
8f7e0 74 69 74 79 53 65 74 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e titySet.Name))...............Me.
8f800 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Write(""")"&Global.Microsoft.Vis
8f820 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
8f840 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
8f860 20 20 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 .....End.If"&Global.Microsoft.Vi
8f880 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
8f8a0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 oft.VisualBasic.ChrW(10)&"......
8f8c0 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 ......Return.")...............Me
8f8e0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
8f900 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 gWithCulture(code.FieldName(enti
8f920 74 79 53 65 74 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 tySet)))...............Me.Write(
8f940 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e ""&Global.Microsoft.VisualBasic.
8f960 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
8f980 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 Basic.ChrW(10)&"........End.Get"
8f9a0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
8f9c0 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
8f9e0 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 22 26 sic.ChrW(10)&"....End.Property"&
8fa00 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
8fa20 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
8fa40 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(10)&Global.Microsoft.Vis
8fa60 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
8fa80 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 ft.VisualBasic.ChrW(10)&"....Pri
8faa0 76 61 74 65 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d vate.")...............Me.Write(M
8fac0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
8fae0 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 65 6e 74 69 74 79 53 65 74 29 29 29 ture(code.FieldName(entitySet)))
8fb00 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 4f 62 6a ...............Me.Write(".As.Obj
8fb20 65 63 74 53 65 74 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 ectSet(Of.")...............Me.Wr
8fb40 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
8fb60 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 65 6e 74 69 thCulture(MultiSchemaEscape(enti
8fb80 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 tySet.ElementType,.code)))......
8fba0 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 .........Me.Write(")"&Global.Mic
8fbc0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
8fbe0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
8fc00 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 )).............Next..........reg
8fc20 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 ion.End()............''''''''...
8fc40 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 .......''''''''...........''''''
8fc60 27 27 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 ''..........''''''''...........'
8fc80 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 '''''''...........''''''''......
8fca0 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 ....''''''''...........''''''''.
8fcc0 0d 0a 20 20 20 20 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 20 20 20 20 27 27 27 ..........''''''''...........'''
8fce0 27 27 27 27 27 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 '''''..........region.Begin(Code
8fd00 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e GenerationTools.GetResourceStrin
8fd20 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 41 64 64 54 6f 4d 65 74 68 6f 64 73 22 29 g("Template_RegionAddToMethods")
8fd40 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 61 64 64 54 6f 4d 65 74 68 6f 64 73 20 41 73 20 49 )..........Dim.addToMethods.As.I
8fd60 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 20 3d 20 49 66 28 43 72 Enumerable(Of.EntitySet).=.If(Cr
8fd80 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 2e 56 61 6c 75 65 2c 20 63 eateContextAddToMethods.Value,.c
8fda0 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 6e 74 69 74 79 53 65 74 73 2e 4f 66 54 79 70 65 28 4f ontainer.BaseEntitySets.OfType(O
8fdc0 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 2c 20 45 6e 75 6d 65 72 61 62 6c 65 2e 45 6d 70 74 79 f.EntitySet)(),.Enumerable.Empty
8fde0 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 (Of.EntitySet)())..........For.E
8fe00 61 63 68 20 61 64 64 54 6f 20 41 73 20 45 6e 74 69 74 79 53 65 74 20 69 6e 20 61 64 64 54 6f 4d ach.addTo.As.EntitySet.in.addToM
8fe20 65 74 68 6f 64 73 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d 65 74 65 72 4e 61 6d ethods..........Dim.parameterNam
8fe40 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 46 69 78 50 61 72 e.As.String.=.code.Escape(FixPar
8fe60 61 6d 65 74 65 72 4e 61 6d 65 28 61 64 64 54 6f 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2e 4e 61 6d ameterName(addTo.ElementType.Nam
8fe80 65 2c 20 63 6f 64 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 e,.code))...............Me.Write
8fea0 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
8fec0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
8fee0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 lBasic.ChrW(10)&"....'''.<summar
8ff00 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 y>"&Global.Microsoft.VisualBasic
8ff20 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
8ff40 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 lBasic.ChrW(10)&"....'''.").....
8ff60 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
8ff80 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e lper.ToStringWithCulture(String.
8ffa0 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 Format(CultureInfo.CurrentCultur
8ffc0 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 e,.CodeGenerationTools.GetResour
8ffe0 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 47 65 6e 43 6f 6d 6d 65 6e 74 41 64 64 ceString("Template_GenCommentAdd
90000 54 6f 4d 65 74 68 6f 64 56 62 22 29 2c 20 61 64 64 54 6f 2e 4e 61 6d 65 29 29 29 0d 0a 0a 20 20 ToMethodVb"),.addTo.Name))).....
90020 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ..........Me.Write(""&Global.Mic
90040 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
90060 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
90080 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 )&"....'''.</summary>"&Global.Mi
900a0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f crosoft.VisualBasic.ChrW(13)&Glo
900c0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
900e0 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 0)&"....")...............Me.Writ
90100 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
90120 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 61 64 Culture(Accessibility.ForType(ad
90140 64 54 6f 2e 45 6c 65 6d 65 6e 74 54 79 70 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 dTo.ElementType)))..............
90160 20 4d 65 2e 57 72 69 74 65 28 22 20 53 75 62 20 41 64 64 54 6f 22 29 0d 0a 0a 20 20 20 20 20 20 .Me.Write(".Sub.AddTo").........
90180 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
901a0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 64 64 54 6f 2e 4e 61 6d 65 29 .ToStringWithCulture(addTo.Name)
901c0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 42 79 56 61 6c )...............Me.Write("(ByVal
901e0 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f .")...............Me.Write(Me.To
90200 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
90220 28 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d (parameterName))...............M
90240 65 2e 57 72 69 74 65 28 22 20 41 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 e.Write(".As.")...............Me
90260 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
90280 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 61 gWithCulture(MultiSchemaEscape(a
902a0 64 64 54 6f 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 ddTo.ElementType,.code))).......
902c0 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 ........Me.Write(")"&Global.Micr
902e0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
90300 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
90320 26 22 20 20 20 20 20 20 20 20 4d 79 42 61 73 65 2e 41 64 64 4f 62 6a 65 63 74 28 22 22 22 29 0d &"........MyBase.AddObject(""").
90340 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
90360 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 61 64 64 ngHelper.ToStringWithCulture(add
90380 54 6f 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 To.Name))...............Me.Write
903a0 28 22 22 22 2c 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 (""",.")...............Me.Write(
903c0 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
903e0 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 lture(parameterName))...........
90400 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 ....Me.Write(")"&Global.Microsof
90420 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
90440 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
90460 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ..End.Sub"&Global.Microsoft.Visu
90480 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
904a0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 t.VisualBasic.ChrW(10)).........
904c0 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a ....Next..........region.End()..
904e0 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 ..........region.Begin(CodeGener
90500 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 ationTools.GetResourceString("Te
90520 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 73 22 29 29 0d mplate_RegionFunctionImports")).
90540 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 .........For.Each.edmFunction.As
90560 20 45 64 6d 46 75 6e 63 74 69 6f 6e 20 69 6e 20 63 6f 6e 74 61 69 6e 65 72 2e 46 75 6e 63 74 69 .EdmFunction.in.container.Functi
90580 6f 6e 49 6d 70 6f 72 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d onImports..............Dim.param
905a0 65 74 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 75 6e 63 74 69 6f 6e eters.As.IEnumerable(Of.Function
905c0 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 20 3d 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 ImportParameter).=.FunctionImpor
905e0 74 50 61 72 61 6d 65 74 65 72 2e 43 72 65 61 74 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 50 61 tParameter.Create(edmFunction.Pa
90600 72 61 6d 65 74 65 72 73 2c 20 63 6f 64 65 2c 20 65 66 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rameters,.code,.ef).............
90620 20 44 69 6d 20 70 61 72 61 6d 4c 69 73 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 53 74 72 69 6e .Dim.paramList.As.String.=.Strin
90640 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 g.Join(",.",.parameters.Select(F
90660 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 unction(p).p.FunctionParameterNa
90680 6d 65 20 26 20 22 20 41 73 20 22 20 26 20 70 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 me.&.".As.".&.p.FunctionParamete
906a0 72 54 79 70 65 29 2e 54 6f 41 72 72 61 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 rType).ToArray())..............D
906c0 69 6d 20 72 65 74 75 72 6e 54 79 70 65 20 41 73 20 54 79 70 65 55 73 61 67 65 20 3d 20 49 66 28 im.returnType.As.TypeUsage.=.If(
906e0 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 edmFunction.ReturnParameters.Cou
90700 6e 74 20 3d 20 30 2c 20 4e 6f 74 68 69 6e 67 2c 20 65 66 2e 47 65 74 45 6c 65 6d 65 6e 74 54 79 nt.=.0,.Nothing,.ef.GetElementTy
90720 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 52 65 74 75 72 6e 50 61 72 61 6d 65 74 65 72 73 28 pe(edmFunction.ReturnParameters(
90740 30 29 2e 54 79 70 65 55 73 61 67 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 65 0).TypeUsage))..............If.e
90760 64 6d 46 75 6e 63 74 69 6f 6e 2e 49 73 43 6f 6d 70 6f 73 61 62 6c 65 41 74 74 72 69 62 75 74 65 dmFunction.IsComposableAttribute
90780 20 54 68 65 6e 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 .Then...............Me.Write(""&
907a0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
907c0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
907e0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 ic.ChrW(10)&"....'''.<summary>"&
90800 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
90820 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
90840 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 ic.ChrW(10)&"....'''.").........
90860 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
90880 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d .ToStringWithCulture(SummaryComm
908a0 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ent(edmFunction)))..............
908c0 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 .Me.Write(""&Global.Microsoft.Vi
908e0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
90900 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 oft.VisualBasic.ChrW(10)&"....''
90920 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e '.</summary>")...............Me.
90940 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
90960 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 WithCulture(LongDescriptionComme
90980 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 ntElement(edmFunction,.region.Cu
909a0 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 rrentIndentLevel))).............
909c0 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
909e0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 StringWithCulture(ParameterComme
90a00 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 nts(parameters.Select(Function(p
90a20 29 20 4e 65 77 20 54 75 70 6c 65 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 28 70 ).New.Tuple(Of.string,.string)(p
90a40 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 53 75 6d 6d 61 .RawFunctionParameterName,.Summa
90a60 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 ryComment(p.Source))),.region.Cu
90a80 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 rrentIndentLevel))).............
90aa0 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ..Me.Write(""&Global.Microsoft.V
90ac0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
90ae0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c soft.VisualBasic.ChrW(10)&"....<
90b00 45 64 6d 46 75 6e 63 74 69 6f 6e 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d EdmFunction(""")...............M
90b20 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
90b40 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 73 70 ngWithCulture(edmFunction.Namesp
90b60 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 aceName))...............Me.Write
90b80 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 (""",.""")...............Me.Writ
90ba0 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
90bc0 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 Culture(edmFunction.Name))......
90be0 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e .........Me.Write(""")>"&Global.
90c00 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
90c20 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
90c40 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 (10)&"....")...............Me.Wr
90c60 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
90c80 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 thCulture(code.SpaceAfter(NewMod
90ca0 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 ifier(edmFunction))))...........
90cc0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
90ce0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 ToStringWithCulture(Accessibilit
90d00 79 2e 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 y.ForMethod(edmFunction)))......
90d20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 46 75 6e 63 74 69 6f 6e 20 22 29 0d .........Me.Write(".Function.").
90d40 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
90d60 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
90d80 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 e.Escape(edmFunction))).........
90da0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 ......Me.Write("(").............
90dc0 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
90de0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 4c 69 73 74 29 29 0d 0a 0a 20 tringWithCulture(paramList))....
90e00 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 20 41 73 20 49 51 75 65 72 79 ...........Me.Write(").As.IQuery
90e20 61 62 6c 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 able(Of.")...............Me.Writ
90e40 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
90e60 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 75 72 6e Culture(MultiSchemaEscape(return
90e80 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 Type,.code)))...............Me.W
90ea0 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c rite(")"&Global.Microsoft.Visual
90ec0 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
90ee0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 VisualBasic.ChrW(10))...........
90f00 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 ..........WriteFunctionParameter
90f20 73 28 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 s(parameters)...............Me.W
90f40 72 69 74 65 28 22 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 79 42 61 73 65 2e 43 72 65 61 rite("........Return.MyBase.Crea
90f60 74 65 51 75 65 72 79 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 teQuery(Of.")...............Me.W
90f80 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
90fa0 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 72 65 74 ithCulture(MultiSchemaEscape(ret
90fc0 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d urnType,.code)))...............M
90fe0 65 2e 57 72 69 74 65 28 22 29 28 22 22 5b 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d e.Write(")(""[")...............M
91000 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
91020 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 73 70 ngWithCulture(edmFunction.Namesp
91040 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 aceName))...............Me.Write
91060 28 22 5d 2e 5b 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d ("].[")...............Me.Write(M
91080 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
910a0 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 ture(edmFunction.Name)).........
910c0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 5d 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ......Me.Write("](")............
910e0 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
91100 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c StringWithCulture(String.Join(",
91120 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 .",.parameters.Select(Function(p
91140 29 20 22 40 22 20 2b 20 70 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 )."@".+.p.EsqlParameterName).ToA
91160 72 72 61 79 28 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 rray())))...............Me.Write
91180 28 22 29 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d (")""")...............Me.Write(M
911a0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
911c0 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 53 74 72 ture(code.StringBefore(",.",.Str
911e0 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 ing.Join(",.",.parameters.Select
91200 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e (Function(p).p.ExecuteParameterN
91220 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ame).ToArray()))))..............
91240 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .Me.Write(")"&Global.Microsoft.V
91260 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
91280 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(10)&Global
912a0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
912c0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
912e0 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e W(10)&"....End.Function"&Global.
91300 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
91320 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
91340 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 0a 20 20 20 (10)).................Else......
91360 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 .........Me.Write(""&Global.Micr
91380 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
913a0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
913c0 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 &"....'''.<summary>"&Global.Micr
913e0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
91400 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
91420 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 &"....'''.")...............Me.Wr
91440 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
91460 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 thCulture(SummaryComment(edmFunc
91480 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 tion)))...............Me.Write("
914a0 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
914c0 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
914e0 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 asic.ChrW(10)&"....'''.</summary
91500 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f >")...............Me.Write(Me.To
91520 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
91540 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 (LongDescriptionCommentElement(e
91560 64 6d 46 75 6e 63 74 69 6f 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 dmFunction,.region.CurrentIndent
91580 4c 65 76 65 6c 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 Level)))................Me.Write
915a0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
915c0 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 73 28 70 61 72 61 6d 65 74 ulture(ParameterComments(paramet
915e0 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 4e 65 77 20 54 75 70 6c 65 ers.Select(Function(p).New.Tuple
91600 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 28 70 2e 52 61 77 46 75 6e 63 74 69 6f (Of.string,.string)(p.RawFunctio
91620 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 70 nParameterName,.SummaryComment(p
91640 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 .Source))),.region.CurrentIndent
91660 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 Level)))...............Me.Write(
91680 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e ""&Global.Microsoft.VisualBasic.
916a0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
916c0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 Basic.ChrW(10)&"....")..........
916e0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
91700 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 ToStringWithCulture(code.SpaceAf
91720 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 29 0d ter(NewModifier(edmFunction)))).
91740 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
91760 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 ingHelper.ToStringWithCulture(Ac
91780 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 4d 65 74 68 6f 64 28 65 64 6d 46 75 6e 63 74 69 6f cessibility.ForMethod(edmFunctio
917a0 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 46 75 n)))...............Me.Write(".Fu
917c0 6e 63 74 69 6f 6e 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 nction.")...............Me.Write
917e0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
91800 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 ulture(code.Escape(edmFunction))
91820 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 22 29 0d 0a 0a )...............Me.Write("(")...
91840 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
91860 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d Helper.ToStringWithCulture(param
91880 4c 69 73 74 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 List))...............Me.Write(")
918a0 20 41 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 .As.")...............Me.Write(Me
918c0 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
918e0 75 72 65 28 49 66 28 72 65 74 75 72 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 2c ure(If(returnType.IsNot.Nothing,
91900 20 22 4f 62 6a 65 63 74 52 65 73 75 6c 74 28 4f 66 20 22 20 26 20 4d 75 6c 74 69 53 63 68 65 6d ."ObjectResult(Of.".&.MultiSchem
91920 61 45 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 26 20 22 29 22 2c aEscape(returnType,.code).&.")",
91940 20 22 49 6e 74 65 67 65 72 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 ."Integer")))...............Me.W
91960 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 rite(""&Global.Microsoft.VisualB
91980 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
919a0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 isualBasic.ChrW(10))............
919c0 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 73 .........WriteFunctionParameters
919e0 28 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 (parameters)...............Me.Wr
91a00 69 74 65 28 22 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 79 42 61 73 65 2e 45 78 65 63 75 ite("........Return.MyBase.Execu
91a20 74 65 46 75 6e 63 74 69 6f 6e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 teFunction")...............Me.Wr
91a40 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
91a60 74 68 43 75 6c 74 75 72 65 28 49 66 28 72 65 74 75 72 6e 54 79 70 65 20 49 73 20 4e 6f 74 68 69 thCulture(If(returnType.Is.Nothi
91a80 6e 67 2c 20 22 22 2c 20 22 28 4f 66 20 22 20 26 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 ng,."",."(Of.".&.MultiSchemaEsca
91aa0 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 26 20 22 29 22 29 29 29 0d 0a 0a pe(returnType,.code).&.")")))...
91ac0 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 22 22 22 29 0d 0a 0a 20 20 ............Me.Write("(""").....
91ae0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
91b00 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 lper.ToStringWithCulture(edmFunc
91b20 74 69 6f 6e 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 tion.Name))...............Me.Wri
91b40 74 65 28 22 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 te("""")...............Me.Write(
91b60 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
91b80 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 2c 20 22 2c 20 53 74 lture(code.StringBefore(",.",.St
91ba0 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 ring.Join(",.",.parameters.Selec
91bc0 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 t(Function(p).p.ExecuteParameter
91be0 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 Name).ToArray())))).............
91c00 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ..Me.Write(")"&Global.Microsoft.
91c20 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
91c40 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(10)&Globa
91c60 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
91c80 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
91ca0 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 22 26 47 6c 6f 62 61 6c rW(10)&"....End.Function"&Global
91cc0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
91ce0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
91d00 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 72 W(10)).....................If.(r
91d20 65 74 75 72 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 eturnType.IsNot.Nothing.AndAlso.
91d40 72 65 74 75 72 6e 54 79 70 65 2e 45 64 6d 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 returnType.EdmType.BuiltInTypeKi
91d60 6e 64 20 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 29 nd.=.BuiltInTypeKind.EntityType)
91d80 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 27 27 27 ...............Me.Write("....'''
91da0 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 .<summary>"&Global.Microsoft.Vis
91dc0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
91de0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 ft.VisualBasic.ChrW(10)&"....'''
91e00 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f .")...............Me.Write(Me.To
91e20 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
91e40 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a (SummaryComment(edmFunction)))..
91e60 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e .............Me.Write(""&Global.
91e80 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
91ea0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
91ec0 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 (10)&"....'''.</summary>")......
91ee0 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c .........Me.Write(Me.ToStringHel
91f00 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 per.ToStringWithCulture(LongDesc
91f20 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 64 6d 46 75 6e 63 74 69 6f riptionCommentElement(edmFunctio
91f40 6e 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d n,.region.CurrentIndentLevel))).
91f60 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c ..............Me.Write(""&Global
91f80 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
91fa0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
91fc0 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 22 6d 65 72 W(10)&"....'''.<param.name=""mer
91fe0 67 65 4f 70 74 69 6f 6e 22 22 3e 3c 2f 70 61 72 61 6d 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 geOption""></param>")...........
92000 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
92020 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d oStringWithCulture(ParameterComm
92040 65 6e 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 ents(parameters.Select(Function(
92060 70 29 20 4e 65 77 20 54 75 70 6c 65 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 28 p).New.Tuple(Of.string,.string)(
92080 70 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 53 75 6d 6d p.RawFunctionParameterName,.Summ
920a0 61 72 79 43 6f 6d 6d 65 6e 74 28 70 2e 53 6f 75 72 63 65 29 29 29 2c 20 72 65 67 69 6f 6e 2e 43 aryComment(p.Source))),.region.C
920c0 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 urrentIndentLevel)))............
920e0 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
92100 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
92120 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
92140 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
92160 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
92180 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 65 64 6d 46 code.SpaceAfter(NewModifier(edmF
921a0 75 6e 63 74 69 6f 6e 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 unction))))................Me.Wr
921c0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
921e0 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 4d 65 74 68 6f thCulture(Accessibility.ForMetho
92200 64 28 65 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d d(edmFunction)))...............M
92220 65 2e 57 72 69 74 65 28 22 20 46 75 6e 63 74 69 6f 6e 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 e.Write(".Function.")...........
92240 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
92260 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 oStringWithCulture(code.Escape(e
92280 64 6d 46 75 6e 63 74 69 6f 6e 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 dmFunction)))...............Me.W
922a0 72 69 74 65 28 22 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 rite("(")...............Me.Write
922c0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
922e0 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 41 66 74 65 72 28 70 61 72 61 6d 4c 69 73 ulture(code.StringAfter(paramLis
92300 74 2c 20 22 2c 20 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 t,.",.")))...............Me.Writ
92320 65 28 22 6d 65 72 67 65 4f 70 74 69 6f 6e 20 41 73 20 4d 65 72 67 65 4f 70 74 69 6f 6e 29 20 41 e("mergeOption.As.MergeOption).A
92340 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 s.")...............Me.Write(Me.T
92360 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
92380 65 28 49 66 28 72 65 74 75 72 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 2c 20 22 e(If(returnType.IsNot.Nothing,."
923a0 4f 62 6a 65 63 74 52 65 73 75 6c 74 28 4f 66 20 22 20 26 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 ObjectResult(Of.".&.MultiSchemaE
923c0 73 63 61 70 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 20 26 20 22 29 22 2c 20 22 scape(returnType,.code).&.")",."
923e0 49 6e 74 65 67 65 72 22 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 Integer")))...............Me.Wri
92400 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 te(""&Global.Microsoft.VisualBas
92420 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
92440 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 ualBasic.ChrW(10))..............
92460 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 ...........WriteFunctionParamete
92480 72 73 28 70 61 72 61 6d 65 74 65 72 73 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e rs(parameters)...............Me.
924a0 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 79 42 61 73 65 2e 45 78 65 Write("........Return.MyBase.Exe
924c0 63 75 74 65 46 75 6e 63 74 69 6f 6e 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 cuteFunction(Of.")..............
924e0 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
92500 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 ringWithCulture(MultiSchemaEscap
92520 65 28 72 65 74 75 72 6e 54 79 70 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 e(returnType,.code)))...........
92540 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ....Me.Write(")(""")............
92560 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
92580 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 StringWithCulture(edmFunction.Na
925a0 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c me))...............Me.Write(""",
925c0 20 6d 65 72 67 65 4f 70 74 69 6f 6e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e .mergeOption")...............Me.
925e0 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
92600 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 2c WithCulture(code.StringBefore(",
92620 20 22 2c 20 53 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 .",.String.Join(",.",.parameters
92640 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 45 78 65 63 75 74 65 50 61 72 .Select(Function(p).p.ExecutePar
92660 61 6d 65 74 65 72 4e 61 6d 65 29 2e 54 6f 41 72 72 61 79 28 29 29 29 29 29 0d 0a 0a 20 20 20 20 ameterName).ToArray())))).......
92680 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 ........Me.Write(")"&Global.Micr
926a0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
926c0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
926e0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
92700 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
92720 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 22 26 sic.ChrW(10)&"....End.Function"&
92740 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
92760 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
92780 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ic.ChrW(10))....................
927a0 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 .End.If..............End.If.....
927c0 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d .....Next..........region.End().
927e0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 45 6e 64 20 43 6c 61 73 ..............Me.Write("End.Clas
92800 73 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e s"&Global.Microsoft.VisualBasic.
92820 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
92840 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e Basic.ChrW(10)).............If.N
92860 6f 74 20 63 6f 64 65 2e 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 45 6e 74 ot.code.VerifyCaseInsensitiveEnt
92880 69 74 79 53 65 74 55 6e 69 71 75 65 6e 65 73 73 28 63 6f 6e 74 61 69 6e 65 72 2e 42 61 73 65 45 itySetUniqueness(container.BaseE
928a0 6e 74 69 74 79 53 65 74 73 2e 4f 66 54 79 70 65 28 4f 66 20 45 6e 74 69 74 79 53 65 74 29 28 29 ntitySets.OfType(Of.EntitySet)()
928c0 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 65 29 20 65 2e 4e 61 6d 65 29 2c 20 5f 0d 0a .Select(Function(e).e.Name),._..
928e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d 65 2c 20 ................container.Name,.
92900 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 SourceCsdlPath).Then............
92920 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 ..Return.String.Empty..........E
92940 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e nd.If........Next......region.En
92960 64 28 29 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 d()........''''''''......'''''''
92980 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 '.......''''''''......region.Beg
929a0 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 in(CodeGenerationTools.GetResour
929c0 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 45 6e 74 69 74 69 65 ceString("Template_RegionEntitie
929e0 73 22 29 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 6c 6f 6f 70 45 6e 74 69 74 79 20 41 73 s"))......For.Each.loopEntity.As
92a00 20 45 6e 74 69 74 79 54 79 70 65 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 .EntityType.in.GetSourceSchemaTy
92a20 70 65 73 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 28 29 2e 4f 72 64 65 72 42 79 28 46 75 6e pes(Of.EntityType)().OrderBy(Fun
92a40 63 74 69 6f 6e 28 65 29 20 65 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e ction(e).e.Name)..........Dim.en
92a60 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 6c 6f 6f 70 45 6e 74 69 74 79 0d tity.As.EntityType.=.loopEntity.
92a80 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c ..............Me.Write(""&Global
92aa0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
92ac0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
92ae0 57 28 31 30 29 26 22 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 W(10)&"'''.<summary>"&Global.Mic
92b00 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
92b20 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
92b40 29 26 22 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 )&"'''.")...............Me.Write
92b60 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
92b80 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 65 6e 74 69 74 79 29 29 29 0d ulture(SummaryComment(entity))).
92ba0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c ..............Me.Write(""&Global
92bc0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
92be0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
92c00 57 28 31 30 29 26 22 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 W(10)&"'''.</summary>").........
92c20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
92c40 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 .ToStringWithCulture(LongDescrip
92c60 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 65 6e 74 69 74 79 2c 20 72 65 67 69 6f tionCommentElement(entity,.regio
92c80 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 n.CurrentIndentLevel))).........
92ca0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ......Me.Write(""&Global.Microso
92cc0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
92ce0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c icrosoft.VisualBasic.ChrW(10)&"<
92d00 45 64 6d 45 6e 74 69 74 79 54 79 70 65 41 74 74 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 EdmEntityTypeAttribute(Namespace
92d20 4e 61 6d 65 3a 3d 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 Name:=""")...............Me.Writ
92d40 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
92d60 43 75 6c 74 75 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a Culture(entity.NamespaceName))..
92d80 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 4e 61 6d 65 3a .............Me.Write(""",.Name:
92da0 3d 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e =""")...............Me.Write(Me.
92dc0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
92de0 72 65 28 65 6e 74 69 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d re(entity.Name))...............M
92e00 65 2e 57 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e e.Write(""")>"&Global.Microsoft.
92e20 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
92e40 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 53 65 72 osoft.VisualBasic.ChrW(10)&"<Ser
92e60 69 61 6c 69 7a 61 62 6c 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 ializable()>"&Global.Microsoft.V
92e80 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
92ea0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 44 61 74 61 soft.VisualBasic.ChrW(10)&"<Data
92ec0 43 6f 6e 74 72 61 63 74 41 74 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3a 3d 54 ContractAttribute(IsReference:=T
92ee0 72 75 65 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rue)>"&Global.Microsoft.VisualBa
92f00 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
92f20 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 sualBasic.ChrW(10)).............
92f40 46 6f 72 20 45 61 63 68 20 73 75 62 54 79 70 65 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 69 For.Each.subType.As.EntityType.i
92f60 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 45 6e 74 n.ItemCollection.GetItems(Of.Ent
92f80 69 74 79 54 79 70 65 29 28 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 62 29 20 62 2e 42 ityType)().Where(Function(b).b.B
92fa0 61 73 65 54 79 70 65 20 69 73 20 65 6e 74 69 74 79 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 aseType.is.entity)..............
92fc0 20 4d 65 2e 57 72 69 74 65 28 22 3c 4b 6e 6f 77 6e 54 79 70 65 41 74 74 72 69 62 75 74 65 28 47 .Me.Write("<KnownTypeAttribute(G
92fe0 65 74 54 79 70 65 28 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 etType(")...............Me.Write
93000 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
93020 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 75 62 54 79 70 65 ulture(MultiSchemaEscape(subType
93040 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ,.code)))...............Me.Write
93060 28 22 29 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 ("))>"&Global.Microsoft.VisualBa
93080 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
930a0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 sualBasic.ChrW(10)).............
930c0 4e 65 78 74 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e Next................Me.Write(Me.
930e0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
93100 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 65 6e 74 69 74 79 29 re(Accessibility.ForType(entity)
93120 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 22 29 0d 0a ))...............Me.Write(".")..
93140 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
93160 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 gHelper.ToStringWithCulture(code
93180 2e 53 70 61 63 65 41 66 74 65 72 28 63 6f 64 65 2e 4d 75 73 74 49 6e 68 65 72 69 74 4f 70 74 69 .SpaceAfter(code.MustInheritOpti
931a0 6f 6e 28 65 6e 74 69 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 on(entity))))...............Me.W
931c0 72 69 74 65 28 22 50 61 72 74 69 61 6c 20 43 6c 61 73 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 rite("Partial.Class.")..........
931e0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
93200 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 ToStringWithCulture(code.Escape(
93220 65 6e 74 69 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 entity)))...............Me.Write
93240 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
93260 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
93280 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 49 6e 68 65 72 69 74 73 20 22 29 lBasic.ChrW(10)&"....Inherits.")
932a0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 ...............Me.Write(Me.ToStr
932c0 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 42 61 ingHelper.ToStringWithCulture(Ba
932e0 73 65 54 79 70 65 4e 61 6d 65 28 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 seTypeName(entity,.code)))......
93300 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 .........Me.Write(""&Global.Micr
93320 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
93340 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
93360 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 65 6e 74 69 74 79 2e 41 62 73 74 ).............If(Not.entity.Abst
93380 72 61 63 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 46 61 63 ract).Then..............WriteFac
933a0 74 6f 72 79 4d 65 74 68 6f 64 28 65 6e 74 69 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 toryMethod(entity,.code)........
933c0 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e ..End.If............region.Begin
933e0 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 (CodeGenerationTools.GetResource
93400 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 53 69 6d 70 6c 65 50 72 6f String("Template_RegionSimplePro
93420 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d perties"))..........For.Each.edm
93440 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 Property.As.EdmProperty.in.entit
93460 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 y.Properties.Where(Function(p).p
93480 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 20 41 6e 64 41 6c 73 6f .DeclaringType.Is.entity.AndAlso
934a0 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 53 .TypeOf.p.TypeUsage.EdmType.Is.S
934c0 69 6d 70 6c 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 47 65 impleType)..............VerifyGe
934e0 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 tterAndSetterAccessibilityCompat
93500 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ability(edmProperty)............
93520 20 20 57 72 69 74 65 53 69 6d 70 6c 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f ..WriteSimpleTypeProperty(edmPro
93540 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 perty,.code)..........Next......
93560 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 ....region.End()............regi
93580 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 on.Begin(CodeGenerationTools.Get
935a0 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 43 ResourceString("Template_RegionC
935c0 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 omplexProperties"))..........For
935e0 20 45 61 63 68 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 .Each.edmProperty.As.EdmProperty
93600 20 69 6e 20 65 6e 74 69 74 79 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 .in.entity.Properties.Where(Func
93620 74 69 6f 6e 28 70 29 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 tion(p).p.DeclaringType.Is.entit
93640 79 20 41 6e 64 41 6c 73 6f 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d y.AndAlso.TypeOf.p.TypeUsage.Edm
93660 54 79 70 65 20 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 Type.Is.ComplexType)............
93680 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 ..VerifyGetterAndSetterAccessibi
936a0 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a lityCompatability(edmProperty)..
936c0 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 ............WriteComplexTypeProp
936e0 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 erty(edmProperty,.code).........
93700 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 .Next..........region.End().....
93720 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 .......region.Begin(CodeGenerati
93740 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c onTools.GetResourceString("Templ
93760 61 74 65 5f 52 65 67 69 6f 6e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 22 29 ate_RegionNavigationProperties")
93780 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 6e 61 76 50 72 6f 70 65 72 74 79 20 )..........For.Each.navProperty.
937a0 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 69 6e 20 65 6e 74 69 74 79 2e As.NavigationProperty.in.entity.
937c0 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 NavigationProperties.Where(Funct
937e0 69 6f 6e 28 6e 29 20 6e 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 ion(n).n.DeclaringType.Is.entity
93800 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 )...............Me.Write(""&Glob
93820 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
93840 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
93860 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 hrW(10)&"....'''.<summary>"&Glob
93880 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
938a0 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
938c0 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 hrW(10)&"....'''.").............
938e0 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
93900 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 tringWithCulture(SummaryComment(
93920 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e navProperty)))...............Me.
93940 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
93960 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
93980 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f VisualBasic.ChrW(10)&"....'''.</
939a0 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 summary>")...............Me.Writ
939c0 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
939e0 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c Culture(LongDescriptionCommentEl
93a00 65 6d 65 6e 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e ement(navProperty,.region.Curren
93a20 74 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 tIndentLevel)))...............Me
93a40 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .Write(""&Global.Microsoft.Visua
93a60 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
93a80 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 58 6d 6c 49 .VisualBasic.ChrW(10)&"....<XmlI
93aa0 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 gnoreAttribute()>"&Global.Micros
93ac0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
93ae0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
93b00 20 20 20 20 3c 53 6f 61 70 49 67 6e 6f 72 65 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f ....<SoapIgnoreAttribute()>"&Glo
93b20 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
93b40 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
93b60 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 ChrW(10)&"....<DataMemberAttribu
93b80 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 65 28 29 "&._......................."te()
93ba0 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e >"&Global.Microsoft.VisualBasic.
93bc0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
93be0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 45 64 6d 52 65 6c 61 74 69 6f 6e Basic.ChrW(10)&"....<EdmRelation
93c00 73 68 69 70 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 shipNavigationPropertyAttribute(
93c20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 """)...............Me.Write(Me.T
93c40 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
93c60 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 4e e(navProperty.RelationshipType.N
93c80 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e amespaceName))...............Me.
93ca0 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 Write(""",.""")...............Me
93cc0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
93ce0 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f gWithCulture(navProperty.Relatio
93d00 6e 73 68 69 70 54 79 70 65 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d nshipType.Name))...............M
93d20 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 e.Write(""",.""")...............
93d40 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
93d60 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 ingWithCulture(navProperty.ToEnd
93d80 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 Member.Name))...............Me.W
93da0 72 69 74 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 rite(""")>"&Global.Microsoft.Vis
93dc0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
93de0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 ft.VisualBasic.ChrW(10))........
93e00 20 20 20 20 20 20 20 20 20 49 66 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d .........If(navProperty.ToEndMem
93e20 62 65 72 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 20 3d 20 52 ber.RelationshipMultiplicity.=.R
93e40 65 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 2e 4d 61 6e 79 29 20 54 68 elationshipMultiplicity.Many).Th
93e60 65 6e 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 en...............Me.Write(".....
93e80 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
93ea0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
93ec0 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 6e 61 76 50 code.SpaceAfter(NewModifier(navP
93ee0 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 roperty))))................Me.Wr
93f00 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
93f20 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 thCulture(Accessibility.ForPrope
93f40 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 rty(navProperty)))..............
93f60 20 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 20 20 20 20 20 .Me.Write(".Property.").........
93f80 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
93fa0 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 .ToStringWithCulture(code.Escape
93fc0 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 (navProperty)))...............Me
93fe0 2e 57 72 69 74 65 28 22 28 29 20 41 73 20 45 6e 74 69 74 79 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f .Write("().As.EntityCollection(O
94000 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 f.")...............Me.Write(Me.T
94020 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
94040 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e e(MultiSchemaEscape(navProperty.
94060 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 ToEndMember.GetEntityType(),.cod
94080 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 e)))...............Me.Write(")"&
940a0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
940c0 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
940e0 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 ic.ChrW(10)&"........").........
94100 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
94120 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 .ToStringWithCulture(code.SpaceA
94140 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 fter(Accessibility.ForGetter(nav
94160 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 Property))))...............Me.Wr
94180 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 ite("Get"&Global.Microsoft.Visua
941a0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
941c0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 .VisualBasic.ChrW(10)&".........
941e0 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 4d 65 2c 49 45 6e 74 69 74 79 57 69 74 68 52 65 ...Return.CType(Me,IEntityWithRe
94200 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 lationships).RelationshipManager
94220 2e 47 65 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 74 .Ge"&._......................."t
94240 52 65 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 RelatedCollection(Of.").........
94260 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ......Me.Write(Me.ToStringHelper
94280 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 .ToStringWithCulture(MultiSchema
942a0 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 Escape(navProperty.ToEndMember.G
942c0 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 etEntityType(),.code))).........
942e0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 ......Me.Write(")(""")..........
94300 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
94320 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e ToStringWithCulture(navProperty.
94340 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 RelationshipType.FullName)).....
94360 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 ..........Me.Write(""",.""")....
94380 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
943a0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f elper.ToStringWithCulture(navPro
943c0 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 perty.ToEndMember.Name))........
943e0 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 .......Me.Write(""")"&Global.Mic
94400 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
94420 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
94440 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f )&"........End.Get"&Global.Micro
94460 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
94480 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
944a0 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 "........")...............Me.Wri
944c0 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
944e0 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 hCulture(code.SpaceAfter(Accessi
94500 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 bility.ForSetter(navProperty))))
94520 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c ...............Me.Write("Set"&Gl
94540 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
94560 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
94580 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 76 .ChrW(10)&"............If.(Not.v
945a0 61 6c 75 65 20 49 73 20 4e 6f 74 68 69 6e 67 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f alue.Is.Nothing)"&Global.Microso
945c0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
945e0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
94600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 79 ...............CType(Me,.IEntity
94620 57 69 74 68 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 With"&._......................."
94640 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 Relationships).RelationshipManag
94660 65 72 2e 49 6e 69 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f er.InitializeRelatedCollection(O
94680 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 f.")...............Me.Write(Me.T
946a0 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
946c0 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e e(MultiSchemaEscape(navProperty.
946e0 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 ToEndMember.GetEntityType(),.cod
94700 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 e)))...............Me.Write(")("
94720 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f "")...............Me.Write(Me.To
94740 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
94760 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 (navProperty.RelationshipType.Fu
94780 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 llName))...............Me.Write(
947a0 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 """,.""")...............Me.Write
947c0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
947e0 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e ulture(navProperty.ToEndMember.N
94800 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 ame))...............Me.Write("""
94820 2c 20 76 61 6c 75 65 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 ,.value)"&Global.Microsoft.Visua
94840 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
94860 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 .VisualBasic.ChrW(10)&".........
94880 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ...End.If"&Global.Microsoft.Visu
948a0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
948c0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 t.VisualBasic.ChrW(10)&"........
948e0 45 6e 64 20 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c End.Set"&Global.Microsoft.Visual
94900 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
94920 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 VisualBasic.ChrW(10)&"....End.Pr
94940 6f 70 65 72 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 operty"&Global.Microsoft.VisualB
94960 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
94980 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 isualBasic.ChrW(10))............
949a0 20 20 20 20 45 6c 73 65 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 ....Else...............Me.Write(
949c0 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d "....")...............Me.Write(M
949e0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
94a00 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 ture(code.SpaceAfter(NewModifier
94a20 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 (navProperty))))................
94a40 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
94a60 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 ingWithCulture(Accessibility.For
94a80 50 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 Property(navProperty))).........
94aa0 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 ......Me.Write(".Property.")....
94ac0 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
94ae0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 elper.ToStringWithCulture(code.E
94b00 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 scape(navProperty)))............
94b20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 28 29 20 41 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 ...Me.Write("().As.")...........
94b40 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
94b60 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 oStringWithCulture(MultiSchemaEs
94b80 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 cape(navProperty.ToEndMember.Get
94ba0 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 EntityType(),.code)))...........
94bc0 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ....Me.Write(""&Global.Microsoft
94be0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
94c00 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
94c20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d .....")...............Me.Write(M
94c40 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
94c60 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 ture(code.SpaceAfter(Accessibili
94c80 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 ty.ForGetter(navProperty))))....
94ca0 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c ...........Me.Write("Get"&Global
94cc0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
94ce0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
94d00 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 W(10)&"............Return.CType(
94d20 4d 65 2c 20 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 Me,.IEntityWithRelationships).Re
94d40 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 47 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 lationshipManager.G"&._.........
94d60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 65 74 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 .............."etRelatedReferenc
94d80 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d e(Of.")...............Me.Write(M
94da0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
94dc0 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 ture(MultiSchemaEscape(navProper
94de0 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 ty.ToEndMember.GetEntityType(),.
94e00 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 code)))...............Me.Write("
94e20 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 )(""")...............Me.Write(Me
94e40 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 .ToStringHelper.ToStringWithCult
94e60 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 ure(navProperty.RelationshipType
94e80 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 .FullName))...............Me.Wri
94ea0 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 te(""",.""")...............Me.Wr
94ec0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
94ee0 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 thCulture(navProperty.ToEndMembe
94f00 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 r.Name))...............Me.Write(
94f20 22 22 22 29 2e 56 61 6c 75 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 """).Value"&Global.Microsoft.Vis
94f40 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
94f60 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
94f80 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .End.Get"&Global.Microsoft.Visua
94fa0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
94fc0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 .VisualBasic.ChrW(10)&"........"
94fe0 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 )...............Me.Write(Me.ToSt
95000 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
95020 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 ode.SpaceAfter(Accessibility.For
95040 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 Setter(navProperty))))..........
95060 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f .....Me.Write("Set"&Global.Micro
95080 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
950a0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
950c0 22 20 20 20 20 20 20 20 20 20 20 20 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 79 57 69 "............CType(Me,.IEntityWi
950e0 74 68 52 65 6c 61 74 69 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e thRelationships).RelationshipMan
95100 61 67 65 72 2e 47 65 74 52 65 6c 61 74 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ager.GetRelat"&._...............
95120 20 20 20 20 20 20 20 20 22 65 64 52 65 66 65 72 65 6e 63 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 ........"edReference(Of.")......
95140 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c .........Me.Write(Me.ToStringHel
95160 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 per.ToStringWithCulture(MultiSch
95180 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 emaEscape(navProperty.ToEndMembe
951a0 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 r.GetEntityType(),.code)))......
951c0 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 .........Me.Write(")(""").......
951e0 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
95200 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 er.ToStringWithCulture(navProper
95220 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a ty.RelationshipType.FullName))..
95240 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d .............Me.Write(""",.""").
95260 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
95280 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 ngHelper.ToStringWithCulture(nav
952a0 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 Property.ToEndMember.Name)).....
952c0 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 2e 56 61 6c 75 65 20 3d 20 ..........Me.Write(""").Value.=.
952e0 76 61 6c 75 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 value"&Global.Microsoft.VisualBa
95300 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
95320 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 sualBasic.ChrW(10)&"........End.
95340 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 Set"&Global.Microsoft.VisualBasi
95360 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
95380 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 alBasic.ChrW(10)&"....End.Proper
953a0 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 ty"&Global.Microsoft.VisualBasic
953c0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
953e0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d lBasic.ChrW(10)).............Dim
95400 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 6e 61 76 .refPropertyName.As.String.=.nav
95420 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 20 26 20 22 52 65 66 65 72 65 6e 63 65 22 0d 0a 20 20 20 Property.Name.&."Reference".....
95440 20 20 20 20 20 49 66 28 65 6e 74 69 74 79 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 46 75 6e 63 74 .....If(entity.Members.Any(Funct
95460 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 20 3d 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 ion(m).m.Name.=.refPropertyName)
95480 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 0d 0a 20 20 20 20 20 20 20 20 20 ).Then..............'...........
954a0 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d ...Errors.Add(New.System.CodeDom
954c0 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 .Compiler.CompilerError(SourceCs
954e0 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 31 37 22 2c 0d 0a 20 20 20 20 20 20 20 dlPath,.-1,.-1,."6017",.........
95500 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e .........String.Format(CultureIn
95520 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f fo.CurrentCulture,.CodeGeneratio
95540 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 nTools.GetResourceString("Templa
95560 74 65 5f 43 6f 6e 66 6c 69 63 74 69 6e 67 47 65 6e 65 72 61 74 65 64 4e 61 76 50 72 6f 70 4e 61 te_ConflictingGeneratedNavPropNa
95580 6d 65 22 29 2c 20 6e 61 76 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 2c 20 65 6e 74 69 74 79 2e 46 me"),.navProperty.Name,.entity.F
955a0 75 6c 6c 4e 61 6d 65 2c 20 72 65 66 50 72 6f 70 65 72 74 79 4e 61 6d 65 29 29 29 0d 0a 20 20 20 ullName,.refPropertyName))).....
955c0 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 .....End.If...............Me.Wri
955e0 74 65 28 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 te("....'''.<summary>"&Global.Mi
95600 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f crosoft.VisualBasic.ChrW(13)&Glo
95620 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
95640 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 0)&"....'''.")...............Me.
95660 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
95680 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 6e 61 76 50 72 WithCulture(SummaryComment(navPr
956a0 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 operty)))...............Me.Write
956c0 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
956e0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
95700 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 lBasic.ChrW(10)&"....'''.</summa
95720 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e ry>")...............Me.Write(Me.
95740 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
95760 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 re(LongDescriptionCommentElement
95780 28 6e 61 76 50 72 6f 70 65 72 74 79 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 (navProperty,.region.CurrentInde
957a0 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 ntLevel)))...............Me.Writ
957c0 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 e(""&Global.Microsoft.VisualBasi
957e0 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
95800 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 42 72 6f 77 73 61 62 6c 65 alBasic.ChrW(10)&"....<Browsable
95820 41 74 74 72 69 62 75 74 65 28 46 61 6c 73 65 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 Attribute(False)>"&Global.Micros
95840 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
95860 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
95880 20 20 20 20 3c 44 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f ....<DataMemberAttribute()>"&Glo
958a0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
958c0 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
958e0 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d ChrW(10)&"....")...............M
95900 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
95920 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 ngWithCulture(Accessibility.ForP
95940 72 6f 70 65 72 74 79 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 roperty(navProperty)))..........
95960 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 20 20 .....Me.Write(".Property.").....
95980 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ..........Me.Write(Me.ToStringHe
959a0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 72 65 66 50 72 6f 70 lper.ToStringWithCulture(refProp
959c0 65 72 74 79 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 ertyName))...............Me.Writ
959e0 65 28 22 28 29 20 41 73 20 45 6e 74 69 74 79 52 65 66 65 72 65 6e 63 65 28 4f 66 20 22 29 0d 0a e("().As.EntityReference(Of.")..
95a00 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
95a20 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 gHelper.ToStringWithCulture(Mult
95a40 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d iSchemaEscape(navProperty.ToEndM
95a60 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a ember.GetEntityType(),.code)))..
95a80 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c .............Me.Write(")"&Global
95aa0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
95ac0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
95ae0 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 W(10)&"........")...............
95b00 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
95b20 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 ingWithCulture(code.SpaceAfter(A
95b40 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 ccessibility.ForGetter(navProper
95b60 74 79 29 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 47 ty))))...............Me.Write("G
95b80 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 et"&Global.Microsoft.VisualBasic
95ba0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
95bc0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 lBasic.ChrW(10)&"............Ret
95be0 75 72 6e 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 79 57 69 74 68 52 65 6c 61 74 69 6f urn.CType(Me,.IEntityWithRelatio
95c00 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 47 22 26 20 nships).RelationshipManager.G"&.
95c20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 65 74 52 65 6c 61 74 _......................."etRelat
95c40 65 64 52 65 66 65 72 65 6e 63 65 28 4f 66 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 edReference(Of.")...............
95c60 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
95c80 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 ingWithCulture(MultiSchemaEscape
95ca0 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 (navProperty.ToEndMember.GetEnti
95cc0 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 tyType(),.code)))...............
95ce0 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d Me.Write(")(""")...............M
95d00 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
95d20 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 ngWithCulture(navProperty.Relati
95d40 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 onshipType.FullName))...........
95d60 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 22 29 0d 0a 0a 20 20 20 20 20 20 20 ....Me.Write(""",.""")..........
95d80 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e .....Me.Write(Me.ToStringHelper.
95da0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e ToStringWithCulture(navProperty.
95dc0 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ToEndMember.Name))..............
95de0 20 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 .Me.Write(""")"&Global.Microsoft
95e00 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
95e20 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 rosoft.VisualBasic.ChrW(10)&"...
95e40 20 20 20 20 20 45 6e 64 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 .....End.Get"&Global.Microsoft.V
95e60 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
95e80 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 soft.VisualBasic.ChrW(10)&".....
95ea0 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e ...")...............Me.Write(Me.
95ec0 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 ToStringHelper.ToStringWithCultu
95ee0 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 re(code.SpaceAfter(Accessibility
95f00 2e 46 6f 72 53 65 74 74 65 72 28 6e 61 76 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 20 20 20 .ForSetter(navProperty))))......
95f20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d .........Me.Write("Set"&Global.M
95f40 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
95f60 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
95f80 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 76 61 6c 75 65 20 49 10)&"............If.(Not.value.I
95fa0 73 20 4e 6f 74 68 69 6e 67 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 s.Nothing)"&Global.Microsoft.Vis
95fc0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
95fe0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
96000 20 20 20 20 20 20 20 20 20 43 54 79 70 65 28 4d 65 2c 20 49 45 6e 74 69 74 79 57 69 74 68 22 26 .........CType(Me,.IEntityWith"&
96020 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 52 65 6c 61 74 69 ._......................."Relati
96040 6f 6e 73 68 69 70 73 29 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 4d 61 6e 61 67 65 72 2e 49 6e 69 onships).RelationshipManager.Ini
96060 74 69 61 6c 69 7a 65 52 65 6c 61 74 65 64 52 65 66 65 72 65 6e 63 65 28 4f 66 20 22 29 0d 0a 0a tializeRelatedReference(Of.")...
96080 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
960a0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 Helper.ToStringWithCulture(Multi
960c0 53 63 68 65 6d 61 45 73 63 61 70 65 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 SchemaEscape(navProperty.ToEndMe
960e0 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 2c 20 63 6f 64 65 29 29 29 0d 0a 0a mber.GetEntityType(),.code)))...
96100 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 29 28 22 22 22 29 0d 0a 0a 20 ............Me.Write(")(""")....
96120 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
96140 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6e 61 76 50 72 6f elper.ToStringWithCulture(navPro
96160 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 perty.RelationshipType.FullName)
96180 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 22 )...............Me.Write(""",.""
961a0 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
961c0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
961e0 6e 61 76 50 72 6f 70 65 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 4e 61 6d 65 29 29 0d 0a navProperty.ToEndMember.Name))..
96200 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 76 61 6c 75 65 .............Me.Write(""",.value
96220 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e )"&Global.Microsoft.VisualBasic.
96240 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
96260 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 Basic.ChrW(10)&"............End.
96280 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 If"&Global.Microsoft.VisualBasic
962a0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
962c0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 lBasic.ChrW(10)&"........End.Set
962e0 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
96300 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
96320 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 22 asic.ChrW(10)&"....End.Property"
96340 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
96360 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
96380 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e sic.ChrW(10)).................En
963a0 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 d.If..........Next..........regi
963c0 6f 6e 2e 45 6e 64 28 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 on.End()...............Me.Write(
963e0 22 45 6e 64 20 43 6c 61 73 73 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 "End.Class"&Global.Microsoft.Vis
96400 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
96420 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 ft.VisualBasic.ChrW(10))........
96440 20 20 20 20 20 49 66 20 4e 6f 74 20 63 6f 64 65 2e 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e .....If.Not.code.VerifyCaseInsen
96460 73 69 74 69 76 65 4d 65 6d 62 65 72 55 6e 69 71 75 65 6e 65 73 73 28 63 6f 64 65 2e 47 65 74 41 sitiveMemberUniqueness(code.GetA
96480 6c 6c 44 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 28 65 6e 74 69 74 79 29 2c 20 65 6e 74 69 74 llDeclaredMembers(entity),.entit
964a0 79 2e 46 75 6c 6c 4e 61 6d 65 2c 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 54 68 65 6e y.FullName,.SourceCsdlPath).Then
964c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 ..............Return.String.Empt
964e0 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 y..........End.If......Next.....
96500 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 .region.End()........''''''''...
96520 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 ...''''''''.......''''''''......
96540 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 region.Begin(CodeGenerationTools
96560 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 .GetResourceString("Template_Reg
96580 69 6f 6e 43 6f 6d 70 6c 65 78 54 79 70 65 73 22 29 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 ionComplexTypes"))......For.Each
965a0 20 20 6c 6f 6f 70 43 6f 6d 70 6c 65 78 20 41 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 69 6e 20 ..loopComplex.As.ComplexType.in.
965c0 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 79 70 65 73 28 4f 66 20 43 6f 6d 70 6c 65 78 54 GetSourceSchemaTypes(Of.ComplexT
965e0 79 70 65 29 28 29 2e 4f 72 64 65 72 42 79 28 46 75 6e 63 74 69 6f 6e 28 65 29 20 65 2e 4e 61 6d ype)().OrderBy(Function(e).e.Nam
96600 65 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6d 70 6c 65 78 20 41 73 20 43 6f 6d 70 6c e)..........Dim.complex.As.Compl
96620 65 78 54 79 70 65 20 3d 20 6c 6f 6f 70 43 6f 6d 70 6c 65 78 0d 0a 0a 20 20 20 20 20 20 20 20 20 exType.=.loopComplex............
96640 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
96660 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
96680 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 osoft.VisualBasic.ChrW(10)&"'''.
966a0 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 <summary>"&Global.Microsoft.Visu
966c0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
966e0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 22 29 0d 0a t.VisualBasic.ChrW(10)&"'''.")..
96700 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
96720 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d gHelper.ToStringWithCulture(Summ
96740 61 72 79 43 6f 6d 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 aryComment(complex)))...........
96760 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 ....Me.Write(""&Global.Microsoft
96780 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
967a0 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 rosoft.VisualBasic.ChrW(10)&"'''
967c0 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 .</summary>")...............Me.W
967e0 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
96800 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e ithCulture(LongDescriptionCommen
96820 74 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 tElement(complex,.region.Current
96840 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e IndentLevel)))...............Me.
96860 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
96880 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
968a0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 45 64 6d 43 6f 6d 70 6c 65 VisualBasic.ChrW(10)&"<EdmComple
968c0 78 54 79 70 65 41 74 74 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3a 3d 22 22 xTypeAttribute(NamespaceName:=""
968e0 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ")...............Me.Write(Me.ToS
96900 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
96920 63 6f 6d 70 6c 65 78 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 complex.NamespaceName)).........
96940 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 4e 61 6d 65 3a 3d 22 22 22 29 0d 0a ......Me.Write(""",.Name:=""")..
96960 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
96980 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 gHelper.ToStringWithCulture(comp
969a0 6c 65 78 2e 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 lex.Name))...............Me.Writ
969c0 65 28 22 22 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c e(""")>"&Global.Microsoft.Visual
969e0 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
96a00 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 44 61 74 61 43 6f 6e 74 72 VisualBasic.ChrW(10)&"<DataContr
96a20 61 63 74 41 74 74 72 69 62 75 74 65 28 49 73 52 65 66 65 72 65 6e 63 65 3a 3d 54 72 75 65 29 3e actAttribute(IsReference:=True)>
96a40 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
96a60 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
96a80 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 53 65 72 69 61 6c 69 7a 61 62 6c 65 28 29 3e 22 asic.ChrW(10)&"<Serializable()>"
96aa0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
96ac0 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
96ae0 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 sic.ChrW(10))...............Me.W
96b00 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
96b20 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 ithCulture(Accessibility.ForType
96b40 28 63 6f 6d 70 6c 65 78 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 (complex)))...............Me.Wri
96b60 74 65 28 22 20 50 61 72 74 69 61 6c 20 43 6c 61 73 73 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 te(".Partial.Class.")...........
96b80 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
96ba0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 63 oStringWithCulture(code.Escape(c
96bc0 6f 6d 70 6c 65 78 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 omplex)))...............Me.Write
96be0 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
96c00 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
96c20 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 49 6e 68 65 72 69 74 73 20 43 6f lBasic.ChrW(10)&"....Inherits.Co
96c40 6d 70 6c 65 78 4f 62 6a 65 63 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 mplexObject"&Global.Microsoft.Vi
96c60 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
96c80 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 oft.VisualBasic.ChrW(10)).......
96ca0 20 20 20 20 20 20 57 72 69 74 65 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 63 6f 6d 70 6c 65 78 ......WriteFactoryMethod(complex
96cc0 2c 20 63 6f 64 65 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 65 67 69 6e 28 ,.code)............region.Begin(
96ce0 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 CodeGenerationTools.GetResourceS
96d00 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 53 69 6d 70 6c 65 50 72 6f 70 tring("Template_RegionSimpleProp
96d20 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 50 erties"))..........For.Each.edmP
96d40 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 69 6e 20 63 6f 6d 70 6c 65 roperty.As.EdmProperty.in.comple
96d60 78 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 x.Properties.Where(Function(p).p
96d80 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 63 6f 6d 70 6c 65 78 20 41 6e 64 41 6c 73 .DeclaringType.Is.complex.AndAls
96da0 6f 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 o.TypeOf.p.TypeUsage.EdmType.Is.
96dc0 53 69 6d 70 6c 65 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 72 69 66 79 47 SimpleType)..............VerifyG
96de0 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 etterAndSetterAccessibilityCompa
96e00 74 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 tability(edmProperty)...........
96e20 20 20 20 57 72 69 74 65 53 69 6d 70 6c 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 ...WriteSimpleTypeProperty(edmPr
96e40 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 operty,.code)..........Next.....
96e60 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 .....region.End()............reg
96e80 69 6f 6e 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 ion.Begin(CodeGenerationTools.Ge
96ea0 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e tResourceString("Template_Region
96ec0 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 69 65 73 22 29 29 0d 0a 20 20 20 20 20 20 20 20 46 6f ComplexProperties"))..........Fo
96ee0 72 20 45 61 63 68 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 r.Each.edmProperty.As.EdmPropert
96f00 79 20 69 6e 20 63 6f 6d 70 6c 65 78 2e 50 72 6f 70 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 y.in.complex.Properties.Where(Fu
96f20 6e 63 74 69 6f 6e 28 70 29 20 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 20 49 73 20 63 6f 6d nction(p).p.DeclaringType.Is.com
96f40 70 6c 65 78 20 41 6e 64 41 6c 73 6f 20 54 79 70 65 4f 66 20 70 2e 54 79 70 65 55 73 61 67 65 2e plex.AndAlso.TypeOf.p.TypeUsage.
96f60 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 EdmType.Is.ComplexType).........
96f80 20 20 20 20 20 56 65 72 69 66 79 47 65 74 74 65 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 .....VerifyGetterAndSetterAccess
96fa0 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 ibilityCompatability(edmProperty
96fc0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 )..............WriteComplexTypeP
96fe0 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 roperty(edmProperty,.code)......
97000 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a ....Next..........region.End()..
97020 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 45 6e 64 20 43 6c 61 73 73 .............Me.Write("End.Class
97040 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
97060 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
97080 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f asic.ChrW(10)).............If.No
970a0 74 20 63 6f 64 65 2e 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 4d 65 6d 62 t.code.VerifyCaseInsensitiveMemb
970c0 65 72 55 6e 69 71 75 65 6e 65 73 73 28 63 6f 64 65 2e 47 65 74 41 6c 6c 44 65 63 6c 61 72 65 64 erUniqueness(code.GetAllDeclared
970e0 4d 65 6d 62 65 72 73 28 63 6f 6d 70 6c 65 78 29 2c 20 63 6f 6d 70 6c 65 78 2e 46 75 6c 6c 4e 61 Members(complex),.complex.FullNa
97100 6d 65 2c 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 me,.SourceCsdlPath).Then........
97120 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 ......Return.String.Empty.......
97140 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e ...End.If......Next......region.
97160 45 6e 64 28 29 0d 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 End()..........''''''''......'''
97180 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 72 65 67 69 6f 6e '''''.......''''''''......region
971a0 2e 42 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 .Begin(CodeGenerationTools.GetRe
971c0 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 45 6e 75 sourceString("Template_RegionEnu
971e0 6d 54 79 70 65 73 22 29 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 6e 75 6d 54 79 70 65 mTypes"))......For.Each.enumType
97200 20 41 73 20 45 6e 75 6d 54 79 70 65 20 69 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 65 6d 61 54 .As.EnumType.in.GetSourceSchemaT
97220 79 70 65 73 28 4f 66 20 45 6e 75 6d 54 79 70 65 29 28 29 2e 4f 72 64 65 72 42 79 28 46 75 6e 63 ypes(Of.EnumType)().OrderBy(Func
97240 74 69 6f 6e 28 65 29 20 65 2e 4e 61 6d 65 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 tion(e).e.Name)...............Me
97260 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .Write(""&Global.Microsoft.Visua
97280 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
972a0 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c 73 75 6d 6d .VisualBasic.ChrW(10)&"'''.<summ
972c0 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 ary>"&Global.Microsoft.VisualBas
972e0 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
97300 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 22 29 0d 0a 0a 20 20 20 20 ualBasic.ChrW(10)&"'''.").......
97320 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
97340 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f er.ToStringWithCulture(SummaryCo
97360 6d 6d 65 6e 74 28 65 6e 75 6d 54 79 70 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 mment(enumType)))...............
97380 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Me.Write(""&Global.Microsoft.Vis
973a0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
973c0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 27 27 27 20 3c 2f 73 ft.VisualBasic.ChrW(10)&"'''.</s
973e0 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 ummary>")...............Me.Write
97400 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
97420 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 ulture(LongDescriptionCommentEle
97440 6d 65 6e 74 28 65 6e 75 6d 54 79 70 65 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 ment(enumType,.region.CurrentInd
97460 65 6e 74 4c 65 76 65 6c 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 entLevel)))...............Me.Wri
97480 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 te(""&Global.Microsoft.VisualBas
974a0 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
974c0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 45 64 6d 45 6e 75 6d 54 79 70 65 41 ualBasic.ChrW(10)&"<EdmEnumTypeA
974e0 74 74 72 69 62 75 74 65 28 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 3a 3d 22 22 22 29 0d 0a 0a 20 ttribute(NamespaceName:=""")....
97500 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 ...........Me.Write(Me.ToStringH
97520 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 75 6d 54 79 elper.ToStringWithCulture(enumTy
97540 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 pe.NamespaceName))..............
97560 20 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 4e 61 6d 65 3a 3d 22 22 22 29 0d 0a 0a 20 20 20 20 .Me.Write(""",.Name:=""").......
97580 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ........Me.Write(Me.ToStringHelp
975a0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 65 6e 75 6d 54 79 70 65 2e er.ToStringWithCulture(enumType.
975c0 4e 61 6d 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 Name))...............Me.Write(""
975e0 22 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 ")>"&Global.Microsoft.VisualBasi
97600 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
97620 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 3c 44 61 74 61 43 6f 6e 74 72 61 63 74 41 alBasic.ChrW(10)&"<DataContractA
97640 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 ttribute()>"&Global.Microsoft.Vi
97660 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
97680 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 oft.VisualBasic.ChrW(10)).......
976a0 20 20 20 20 20 20 49 66 20 65 6e 75 6d 54 79 70 65 2e 49 73 46 6c 61 67 73 20 54 68 65 6e 0d 0a ......If.enumType.IsFlags.Then..
976c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 3c 46 6c 61 67 73 41 74 74 .............Me.Write("<FlagsAtt
976e0 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ribute()>"&Global.Microsoft.Visu
97700 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
97720 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 t.VisualBasic.ChrW(10)).........
97740 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 ....End.If................Me.Wri
97760 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
97780 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 54 79 70 65 28 65 hCulture(Accessibility.ForType(e
977a0 6e 75 6d 54 79 70 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 numType)))...............Me.Writ
977c0 65 28 22 20 45 6e 75 6d 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 e(".Enum.")...............Me.Wri
977e0 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
97800 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 75 6d 54 79 70 65 29 29 29 hCulture(code.Escape(enumType)))
97820 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 22 29 0d ...............Me.Write(".As.").
97840 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 ..............Me.Write(Me.ToStri
97860 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
97880 65 2e 45 73 63 61 70 65 28 65 6e 75 6d 54 79 70 65 2e 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 e.Escape(enumType.UnderlyingType
978a0 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2c 20 66 75 6c 6c 79 51 75 61 6c 69 66 79 .ClrEquivalentType,.fullyQualify
978c0 53 79 73 74 65 6d 54 79 70 65 73 3a 3d 20 46 61 6c 73 65 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 SystemTypes:=.False)))..........
978e0 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 .....Me.Write(""&Global.Microsof
97900 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
97920 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a crosoft.VisualBasic.ChrW(10))...
97940 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 6d 65 6d 62 65 72 20 41 73 20 45 6e 75 ..........For.Each.member.As.Enu
97960 6d 4d 65 6d 62 65 72 20 49 6e 20 65 6e 75 6d 54 79 70 65 2e 4d 65 6d 62 65 72 73 0d 0a 0a 20 20 mMember.In.enumType.Members.....
97980 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 27 27 27 20 3c 73 75 6d ..........Me.Write("....'''.<sum
979a0 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 mary>"&Global.Microsoft.VisualBa
979c0 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
979e0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a sualBasic.ChrW(10)&"....'''.")..
97a00 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e .............Me.Write(Me.ToStrin
97a20 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d gHelper.ToStringWithCulture(Summ
97a40 61 72 79 43 6f 6d 6d 65 6e 74 28 6d 65 6d 62 65 72 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 aryComment(member)))............
97a60 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
97a80 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
97aa0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
97ac0 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d '''.</summary>")...............M
97ae0 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
97b00 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d ngWithCulture(LongDescriptionCom
97b20 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 6d 65 6d 62 65 72 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 mentElement(member,.region.Curre
97b40 6e 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2b 20 31 29 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 ntIndentLevel.+.1)))............
97b60 20 20 20 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e ...Me.Write(""&Global.Microsoft.
97b80 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 VisualBasic.ChrW(13)&Global.Micr
97ba0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 osoft.VisualBasic.ChrW(10)&"....
97bc0 3c 45 6e 75 6d 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e <EnumMemberAttribute()>"&Global.
97be0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
97c00 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
97c20 28 31 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 (10)&"....")...............Me.Wr
97c40 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
97c60 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 6d 65 6d 62 65 72 29 29 29 0d thCulture(code.Escape(member))).
97c80 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 22 29 0d 0a 0a ..............Me.Write(".=.")...
97ca0 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 ............Me.Write(Me.ToString
97cc0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6d 65 6d 62 65 Helper.ToStringWithCulture(membe
97ce0 72 2e 56 61 6c 75 65 29 29 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 r.Value))...............Me.Write
97d00 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
97d20 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
97d40 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(10)&Global.Microsoft
97d60 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
97d80 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d rosoft.VisualBasic.ChrW(10))....
97da0 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 20 0d 0a 20 20 .........Next............''.....
97dc0 20 20 20 20 20 20 49 66 20 65 6e 75 6d 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 29 20 ......If.enumType.Members.Any().
97de0 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 Then..............Me.GenerationE
97e00 6e 76 69 72 6f 6e 6d 65 6e 74 2e 52 65 6d 6f 76 65 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nvironment.Remove(..............
97e20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e ....Me.GenerationEnvironment.Len
97e40 67 74 68 20 2d 20 28 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 2e 4c 65 6e 67 74 68 20 2b 20 32 29 gth.-.(CurrentIndent.Length.+.2)
97e60 2c 20 28 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 2e 4c 65 6e 67 74 68 20 2b 20 32 29 29 0d 0a 20 ,.(CurrentIndent.Length.+.2))...
97e80 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 .......Else...............Me.Wri
97ea0 74 65 28 22 20 20 20 20 4e 6f 6e 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 te("....None"&Global.Microsoft.V
97ec0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
97ee0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 soft.VisualBasic.ChrW(10))......
97f00 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 .......End.If...............Me.W
97f20 72 69 74 65 28 22 45 6e 64 20 45 6e 75 6d 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 rite("End.Enum"&Global.Microsoft
97f40 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
97f60 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d rosoft.VisualBasic.ChrW(10))....
97f80 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 63 6f 64 65 2e 56 65 72 69 66 79 43 61 73 65 49 .........If.Not.code.VerifyCaseI
97fa0 6e 73 65 6e 73 69 74 69 76 65 4d 65 6d 62 65 72 55 6e 69 71 75 65 6e 65 73 73 28 63 6f 64 65 2e nsensitiveMemberUniqueness(code.
97fc0 47 65 74 41 6c 6c 44 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 28 65 6e 75 6d 54 79 70 65 29 2c GetAllDeclaredMembers(enumType),
97fe0 20 65 6e 75 6d 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 2c 20 53 6f 75 72 63 65 43 73 64 6c 50 61 .enumType.FullName,.SourceCsdlPa
98000 74 68 29 20 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 th)..Then..............Return.St
98020 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 ring.Empty..........End.If......
98040 4e 65 78 74 0d 0a 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 0d 0a 20 20 20 20 49 66 Next......region.End()........If
98060 20 28 4e 6f 74 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 .(Not.String.IsNullOrEmpty(names
98080 70 61 63 65 4e 61 6d 65 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 50 6f 70 49 6e 64 65 6e 74 28 29 paceName)).Then......PopIndent()
980a0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 22 45 6e 64 20 4e 61 6d ...............Me.Write("End.Nam
980c0 65 73 70 61 63 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 espace"&Global.Microsoft.VisualB
980e0 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
98100 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0d 0a 20 20 20 20 45 6e 64 isualBasic.ChrW(10)).........End
98120 20 49 66 0d 0a 0d 0a 20 20 20 20 49 66 20 4e 6f 74 20 63 6f 64 65 2e 56 65 72 69 66 79 43 61 73 .If........If.Not.code.VerifyCas
98140 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 55 6e 69 71 75 65 6e 65 73 73 28 63 6f 64 65 2e eInsensitiveTypeUniqueness(code.
98160 47 65 74 41 6c 6c 47 6c 6f 62 61 6c 49 74 65 6d 73 28 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e GetAllGlobalItems(ItemCollection
98180 29 2c 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 ),.SourceCsdlPath).Then.........
981a0 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 45 6e 64 20 49 66 .Return.String.Empty......End.If
981c0 0d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 47 65 6e 65 72 61 74 ...............Return.Me.Generat
981e0 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 ionEnvironment.ToString.........
98200 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 .End.Function...........''''''''
98220 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 0d ......''''''''.......''''''''...
98240 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 .....''''''''......''''''''.....
98260 20 20 27 27 27 27 27 27 27 27 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 57 72 ..''''''''........Private.Sub.Wr
98280 69 74 65 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 iteFactoryMethod(structuralType.
982a0 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 2c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 As.StructuralType,.code.As.CodeG
982c0 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 67 enerationTools)..........Dim.reg
982e0 69 6f 6e 20 41 73 20 43 6f 64 65 52 65 67 69 6f 6e 20 3d 20 6e 65 77 20 43 6f 64 65 52 65 67 69 ion.As.CodeRegion.=.new.CodeRegi
98300 6f 6e 28 4d 65 2c 20 31 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6d 65 74 68 6f 64 4e on(Me,.1)............Dim.methodN
98320 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 43 72 65 61 74 65 22 20 2b 20 73 74 72 75 63 ame.As.String.=."Create".+.struc
98340 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 75 6e 69 71 turalType.Name..........Dim.uniq
98360 75 65 49 64 65 6e 74 69 66 69 65 72 20 41 73 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 ueIdentifier.As.UniqueIdentifier
98380 53 65 72 76 69 63 65 20 3d 20 6e 65 77 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 Service.=.new.UniqueIdentifierSe
983a0 72 76 69 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 6e 73 74 61 6e 63 65 4e 61 6d rvice()..........Dim.instanceNam
983c0 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 75 6e 69 71 75 65 e.As.String.=.code.Escape(unique
983e0 49 64 65 6e 74 69 66 69 65 72 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 28 63 6f 64 Identifier.AdjustIdentifier((cod
98400 65 2e 43 61 6d 65 6c 43 61 73 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4e 61 6d 65 29 e.CamelCase(structuralType.Name)
98420 29 29 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d 65 74 65 72 73 20 41 73 20 49 )))..........Dim.parameters.As.I
98440 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d Enumerable(Of.FactoryMethodParam
98460 65 74 65 72 29 20 3d 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 2e 43 eter).=.FactoryMethodParameter.C
98480 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 73 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4d reateParameters(structuralType.M
984a0 65 6d 62 65 72 73 2e 4f 66 54 79 70 65 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 28 29 2e embers.OfType(Of.EdmProperty)().
984c0 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 49 6e 63 6c 75 64 65 50 72 6f 70 65 72 74 Where(Function(p).IncludePropert
984e0 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2c yInFactoryMethod(structuralType,
98500 20 70 29 29 2c 20 75 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 2c 20 46 75 6e 63 74 69 6f 6e .p)),.uniqueIdentifier,.Function
98520 28 74 2c 20 63 29 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 74 2c 20 63 29 2c 20 (t,.c).MultiSchemaEscape(t,.c),.
98540 63 6f 64 65 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 28 70 61 72 61 6d 65 74 65 72 73 2e code)............If.(parameters.
98560 43 6f 75 6e 74 28 29 20 3d 20 30 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 Count().=.0).Then..............R
98580 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 eturn..........End.If...........
985a0 20 49 66 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 4d 65 6d 62 65 72 73 2e 41 6e 79 28 46 .If(structuralType.Members.Any(F
985c0 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 20 3d 20 6d 65 74 68 6f 64 4e 61 6d 65 29 29 unction(m).m.Name.=.methodName))
985e0 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 20 0d 0a 20 20 20 20 20 20 20 20 20 .Then..............'............
98600 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d ...Errors.Add(new.System.CodeDom
98620 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 .Compiler.CompilerError(SourceCs
98640 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 32 39 22 2c 0d 0a 20 20 20 20 20 20 20 dlPath,.-1,.-1,."6029",.........
98660 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e .........String.Format(CultureIn
98680 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 fo.CurrentCulture,._............
986a0 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 .........CodeGenerationTools.Get
986c0 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 46 61 63 74 6f 72 79 ResourceString("Template_Factory
986e0 4d 65 74 68 6f 64 4e 61 6d 65 43 6f 6e 66 6c 69 63 74 22 29 2c 20 6d 65 74 68 6f 64 4e 61 6d 65 MethodNameConflict"),.methodName
98700 2c 20 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 29 29 29 0d 0a 20 20 ,.structuralType.FullName)))....
98720 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 72 65 67 69 6f 6e 2e 42 ......End.If............region.B
98740 65 67 69 6e 28 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f egin(CodeGenerationTools.GetReso
98760 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 67 69 6f 6e 46 61 63 74 6f urceString("Template_RegionFacto
98780 72 79 4d 65 74 68 6f 64 22 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 ryMethod"))....Me.Write(""&Globa
987a0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
987c0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
987e0 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 rW(10)&"....'''.<summary>"&Globa
98800 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
98820 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
98840 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d rW(10)&"....'''.")....Me.Write(M
98860 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
98880 74 75 72 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 ture(String.Format(CultureInfo.C
988a0 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f urrentCulture,.CodeGenerationToo
988c0 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 46 ls.GetResourceString("Template_F
988e0 61 63 74 6f 72 79 4d 65 74 68 6f 64 43 6f 6d 6d 65 6e 74 22 29 2c 20 73 74 72 75 63 74 75 72 61 actoryMethodComment"),.structura
98900 6c 54 79 70 65 2e 4e 61 6d 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f lType.Name)))....Me.Write(""&Glo
98920 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
98940 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
98960 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a ChrW(10)&"....'''.</summary>")..
98980 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
989a0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e tringWithCulture(ParameterCommen
989c0 74 73 28 70 61 72 61 6d 65 74 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 ts(parameters.Select(Function(p)
989e0 20 4e 65 77 20 54 75 70 6c 65 28 4f 66 20 53 74 72 69 6e 67 2c 20 53 74 72 69 6e 67 29 28 70 2e .New.Tuple(Of.String,.String)(p.
98a00 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 2c 20 70 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d RawParameterName,.p.ParameterCom
98a20 6d 65 6e 74 29 29 2c 20 72 65 67 69 6f 6e 2e 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 4c 65 76 65 ment)),.region.CurrentIndentLeve
98a40 6c 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f l)))....Me.Write(""&Global.Micro
98a60 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
98a80 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
98aa0 22 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 22 29 0d 0a "....Public.Shared.Function.")..
98ac0 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
98ae0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 6d 65 74 68 6f 64 4e 61 6d 65 29 29 0d 0a 0a tringWithCulture(methodName))...
98b00 0a 4d 65 2e 57 72 69 74 65 28 22 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f .Me.Write("(")....Me.Write(Me.To
98b20 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
98b40 28 53 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 70 61 72 61 6d 65 74 65 72 73 2e 53 65 (String.Join(",.",.parameters.Se
98b60 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 lect(Function(p).p.ParameterName
98b80 20 26 20 22 20 41 73 20 22 20 26 20 70 2e 50 61 72 61 6d 65 74 65 72 54 79 70 65 29 2e 54 6f 41 .&.".As.".&.p.ParameterType).ToA
98ba0 72 72 61 79 28 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 20 41 73 20 22 29 0d 0a rray())))....Me.Write(").As.")..
98bc0 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
98be0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 72 tringWithCulture(code.Escape(str
98c00 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c ucturalType)))....Me.Write(""&Gl
98c20 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
98c40 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
98c60 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 44 69 6d 20 22 29 0d 0a 0a 0a 4d 65 2e .ChrW(10)&"........Dim.")....Me.
98c80 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
98ca0 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 WithCulture(instanceName))....Me
98cc0 2e 57 72 69 74 65 28 22 20 61 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f .Write(".as.")....Me.Write(Me.To
98ce0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
98d00 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 29 29 0d 0a (code.Escape(structuralType)))..
98d20 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4e 65 77 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 ..Me.Write(".=.New.")....Me.Writ
98d40 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
98d60 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 74 72 75 63 74 75 72 61 6c 54 79 Culture(code.Escape(structuralTy
98d80 70 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 pe)))....Me.Write(""&Global.Micr
98da0 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
98dc0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
98de0 29 0d 0a 0a 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 72 61 6d 65 )................For.Each.parame
98e00 74 65 72 20 41 73 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 20 69 6e ter.As.FactoryMethodParameter.in
98e20 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 28 70 61 72 61 .parameters..............If(para
98e40 6d 65 74 65 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 meter.IsComplexType).Then.......
98e60 20 20 20 20 20 20 20 20 20 20 20 27 20 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 ...........'.....Me.Write(".....
98e80 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c ...")....Me.Write(Me.ToStringHel
98ea0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 per.ToStringWithCulture(instance
98ec0 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 2e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 Name))....Me.Write(".")....Me.Wr
98ee0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
98f00 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e thCulture(code.Escape(parameter.
98f20 53 6f 75 72 63 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 53 74 72 75 63 74 Source)))....Me.Write(".=.Struct
98f40 75 72 61 6c 4f 62 6a 65 63 74 2e 56 65 72 69 66 79 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 49 73 uralObject.VerifyComplexObjectIs
98f60 4e 6f 74 4e 75 6c 6c 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 NotNull(")....Me.Write(Me.ToStri
98f80 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 ngHelper.ToStringWithCulture(par
98fa0 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 ameter.ParameterName))....Me.Wri
98fc0 74 65 28 22 2c 20 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 te(",.""")....Me.Write(Me.ToStri
98fe0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 ngHelper.ToStringWithCulture(par
99000 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 ameter.Source.Name))....Me.Write
99020 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 (""")"&Global.Microsoft.VisualBa
99040 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
99060 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 0d 0a 20 20 20 20 20 sualBasic.ChrW(10)).............
99080 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 0d .......Else..................'..
990a0 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 ...Me.Write("........")....Me.Wr
990c0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
990e0 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 thCulture(instanceName))....Me.W
99100 72 69 74 65 28 22 2e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e rite(".")....Me.Write(Me.ToStrin
99120 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 gHelper.ToStringWithCulture(code
99140 2e 45 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 29 29 29 0d 0a 0a 0a 4d .Escape(parameter.Source)))....M
99160 65 2e 57 72 69 74 65 28 22 20 3d 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f e.Write(".=.")....Me.Write(Me.To
99180 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
991a0 28 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 (parameter.ParameterName))....Me
991c0 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .Write(""&Global.Microsoft.Visua
991e0 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 lBasic.ChrW(13)&Global.Microsoft
99200 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 .VisualBasic.ChrW(10))..........
99220 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0a 0a ........End.If..........Next....
99240 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 29 0d 0a 0a 0a 4d Me.Write("........Return.")....M
99260 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
99280 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 69 6e 73 74 61 6e 63 65 4e 61 6d 65 29 29 0d 0a 0a 0a ngWithCulture(instanceName))....
992a0 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 Me.Write(""&Global.Microsoft.Vis
992c0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
992e0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 ft.VisualBasic.ChrW(10)&"....End
99300 20 46 75 6e 63 74 69 6f 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 .Function"&Global.Microsoft.Visu
99320 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
99340 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 t.VisualBasic.ChrW(10)).........
99360 20 20 20 20 20 72 65 67 69 6f 6e 2e 45 6e 64 28 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a .....region.End()......End.Sub..
99380 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d ........''''''''......''''''''..
993a0 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 57 .....''''''''......Private.Sub.W
993c0 72 69 74 65 53 69 6d 70 6c 65 54 79 70 65 50 72 6f 70 65 72 74 79 28 73 69 6d 70 6c 65 50 72 6f riteSimpleTypeProperty(simplePro
993e0 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 20 41 73 20 43 6f perty.As.EdmProperty,.code.As.Co
99400 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 deGenerationTools)..........Dim.
99420 65 66 20 41 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 3d 20 4e 65 77 20 4d 65 74 61 64 61 ef.As.MetadataTools.=.New.Metada
99440 74 61 54 6f 6f 6c 73 28 4d 65 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 taTools(Me)....Me.Write(""&Globa
99460 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
99480 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
994a0 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 rW(10)&"....'''.<summary>"&Globa
994c0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
994e0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
99500 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d rW(10)&"....'''.")....Me.Write(M
99520 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
99540 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 ture(SummaryComment(simpleProper
99560 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 ty)))....Me.Write(""&Global.Micr
99580 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 osoft.VisualBasic.ChrW(13)&Globa
995a0 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 l.Microsoft.VisualBasic.ChrW(10)
995c0 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 &"....'''.</summary>")....Me.Wri
995e0 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
99600 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 hCulture(LongDescriptionCommentE
99620 6c 65 6d 65 6e 74 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2c 20 31 29 29 29 0d 0a 0a 0a 4d lement(simpleProperty,.1)))....M
99640 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 e.Write(""&Global.Microsoft.Visu
99660 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
99680 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 45 64 6d t.VisualBasic.ChrW(10)&"....<Edm
996a0 53 63 61 6c 61 72 50 72 6f 70 65 72 74 79 41 74 74 72 69 62 75 74 65 28 45 6e 74 69 74 79 4b 65 ScalarPropertyAttribute(EntityKe
996c0 79 50 72 6f 70 65 72 74 79 3a 3d 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 yProperty:=")....Me.Write(Me.ToS
996e0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
99700 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 65 66 2e 49 73 4b 65 79 28 73 69 6d 70 code.CreateLiteral(ef.IsKey(simp
99720 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 2c 20 49 73 leProperty))))....Me.Write(",.Is
99740 4e 75 6c 6c 61 62 6c 65 3a 3d 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 Nullable:=")....Me.Write(Me.ToSt
99760 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 ringHelper.ToStringWithCulture(c
99780 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 ode.CreateLiteral(ef.IsNullable(
997a0 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 simpleProperty))))....Me.Write("
997c0 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 )>"&Global.Microsoft.VisualBasic
997e0 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
99800 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 61 74 61 4d 65 6d 62 65 72 lBasic.ChrW(10)&"....<DataMember
99820 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 Attribute()>"&Global.Microsoft.V
99840 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f isualBasic.ChrW(13)&Global.Micro
99860 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 22 soft.VisualBasic.ChrW(10)&"...."
99880 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e )....Me.Write(Me.ToStringHelper.
998a0 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 ToStringWithCulture(code.SpaceAf
998c0 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 ter(NewModifier(simpleProperty))
998e0 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ))....Me.Write(Me.ToStringHelper
99900 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 63 63 65 73 73 69 62 69 6c 69 .ToStringWithCulture(Accessibili
99920 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 ty.ForProperty(simpleProperty)))
99940 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 74 79 20 22 29 0d 0a 0a 0a 4d 65 ....Me.Write(".Property.")....Me
99960 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
99980 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 61 70 65 28 73 69 6d 70 6c 65 50 gWithCulture(code.Escape(simpleP
999a0 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 29 20 41 73 20 22 29 roperty)))....Me.Write("().As.")
999c0 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
999e0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 oStringWithCulture(MultiSchemaEs
99a00 63 61 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 cape(simpleProperty.TypeUsage,.c
99a20 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 ode)))....Me.Write(""&Global.Mic
99a40 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 rosoft.VisualBasic.ChrW(13)&Glob
99a60 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 al.Microsoft.VisualBasic.ChrW(10
99a80 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 )&"........")....Me.Write(Me.ToS
99aa0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
99ac0 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f code.SpaceAfter(Accessibility.Fo
99ae0 72 47 65 74 74 65 72 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 rGetter(simpleProperty))))....Me
99b00 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 .Write("Get"&Global.Microsoft.Vi
99b20 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
99b40 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 20 20 20 oft.VisualBasic.ChrW(10)).......
99b60 20 20 20 20 20 20 20 20 20 20 49 66 28 65 66 2e 43 6c 72 54 79 70 65 28 73 69 6d 70 6c 65 50 72 ..........If(ef.ClrType(simplePr
99b80 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 29 20 3d 20 47 65 74 54 79 70 65 28 62 79 74 65 operty.TypeUsage).=.GetType(byte
99ba0 28 29 29 29 20 54 68 65 6e 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 ())).Then....Me.Write(".........
99bc0 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 47 .......Return.StructuralObject.G
99be0 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 etValidValue(")....Me.Write(Me.T
99c00 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
99c20 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 e(code.FieldName(simpleProperty)
99c40 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 ))....Me.Write(")"&Global.Micros
99c60 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
99c80 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d Microsoft.VisualBasic.ChrW(10)).
99ca0 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 ................Else....Me.Write
99cc0 28 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 ("............Return.")....Me.Wr
99ce0 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
99d00 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 thCulture(code.FieldName(simpleP
99d20 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c roperty)))....Me.Write(""&Global
99d40 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
99d60 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
99d80 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 W(10))......................End.
99da0 49 66 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 22 If....Me.Write("........End.Get"
99dc0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
99de0 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
99e00 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 sic.ChrW(10)&"........")....Me.W
99e20 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
99e40 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 65 73 ithCulture(code.SpaceAfter(Acces
99e60 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 sibility.ForSetter((simpleProper
99e80 74 79 29 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c 6f 62 61 6c ty)))))....Me.Write("Set"&Global
99ea0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
99ec0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
99ee0 57 28 31 30 29 29 0d 0a 0a 0a 20 20 20 20 20 20 20 20 20 49 66 28 65 66 2e 49 73 4b 65 79 28 73 W(10)).............If(ef.IsKey(s
99f00 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 impleProperty)).Then............
99f20 20 20 20 20 20 20 49 66 28 65 66 2e 43 6c 72 54 79 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 ......If(ef.ClrType(simpleProper
99f40 74 79 2e 54 79 70 65 55 73 61 67 65 29 20 3d 20 47 65 74 54 79 70 65 28 62 79 74 65 28 29 29 29 ty.TypeUsage).=.GetType(byte()))
99f60 20 54 68 65 6e 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 49 .Then....Me.Write("............I
99f80 66 20 28 4e 6f 74 20 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 74 2e 42 69 6e 61 72 79 45 71 f.(Not.StructuralObject.BinaryEq
99fa0 75 61 6c 73 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 uals(")....Me.Write(Me.ToStringH
99fc0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 elper.ToStringWithCulture(code.F
99fe0 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 ieldName(simpleProperty)))....Me
9a000 2e 57 72 69 74 65 28 22 2c 20 56 61 6c 75 65 29 29 20 54 68 65 6e 22 26 47 6c 6f 62 61 6c 2e 4d .Write(",.Value)).Then"&Global.M
9a020 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
9a040 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
9a060 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 10))......................Else..
9a080 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 22 29 0d 0a ..Me.Write("............If.(")..
9a0a0 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 ..Me.Write(Me.ToStringHelper.ToS
9a0c0 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 tringWithCulture(code.FieldName(
9a0e0 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 simpleProperty)))....Me.Write(".
9a100 3c 3e 20 56 61 6c 75 65 29 20 54 68 65 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 <>.Value).Then"&Global.Microsoft
9a120 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 .VisualBasic.ChrW(13)&Global.Mic
9a140 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a rosoft.VisualBasic.ChrW(10))....
9a160 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 ..................End.If........
9a180 20 20 20 20 20 20 20 20 20 20 50 75 73 68 49 6e 64 65 6e 74 28 43 6f 64 65 52 65 67 69 6f 6e 2e ..........PushIndent(CodeRegion.
9a1a0 47 65 74 49 6e 64 65 6e 74 28 31 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 GetIndent(1))..............End.I
9a1c0 66 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a f....Me.Write("............")...
9a1e0 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
9a200 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 ringWithCulture(ChangingMethodNa
9a220 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 me(simpleProperty)))....Me.Write
9a240 28 22 28 76 61 6c 75 65 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 ("(value)"&Global.Microsoft.Visu
9a260 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
9a280 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 t.VisualBasic.ChrW(10)&"........
9a2a0 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 69 6e 67 28 22 22 22 29 0d ....ReportPropertyChanging(""").
9a2c0 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f ...Me.Write(Me.ToStringHelper.To
9a2e0 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 StringWithCulture(simpleProperty
9a300 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c .Name))....Me.Write(""")"&Global
9a320 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
9a340 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
9a360 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 W(10)&"............")....Me.Writ
9a380 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
9a3a0 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f Culture(code.FieldName(simplePro
9a3c0 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 22 29 0d 0a 0a 0a 4d perty)))....Me.Write(".=.")....M
9a3e0 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
9a400 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 42 65 67 69 6e 43 61 73 74 54 6f 45 6e 75 6d 54 79 70 ngWithCulture(BeginCastToEnumTyp
9a420 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 e(simpleProperty.TypeUsage,.code
9a440 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 53 74 72 75 63 74 75 72 61 6c 4f 62 6a 65 63 )))....Me.Write("StructuralObjec
9a460 74 2e 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d t.SetValidValue(")....Me.Write(M
9a480 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
9a4a0 74 75 72 65 28 42 65 67 69 6e 43 61 73 74 54 6f 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 28 73 ture(BeginCastToUnderlyingType(s
9a4c0 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 impleProperty.TypeUsage,.code)))
9a4e0 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 76 61 6c 75 65 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 ....Me.Write("value")....Me.Writ
9a500 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 e(Me.ToStringHelper.ToStringWith
9a520 43 75 6c 74 75 72 65 28 45 6e 64 43 61 73 74 54 6f 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 28 Culture(EndCastToUnderlyingType(
9a540 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 simpleProperty.TypeUsage,.code))
9a560 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e )....Me.Write(Me.ToStringHelper.
9a580 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4f 70 74 69 6f 6e 61 6c 4e 75 6c 6c ToStringWithCulture(OptionalNull
9a5a0 61 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 73 69 ableParameterForSetValidValue(si
9a5c0 6d 70 6c 65 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 mpleProperty,.code)))....Me.Writ
9a5e0 65 28 22 2c 20 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e e(",.""")....Me.Write(Me.ToStrin
9a600 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 73 69 6d 70 gHelper.ToStringWithCulture(simp
9a620 6c 65 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 leProperty.Name))....Me.Write(""
9a640 22 29 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 ")")....Me.Write(Me.ToStringHelp
9a660 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 45 6e 64 43 61 73 74 54 6f er.ToStringWithCulture(EndCastTo
9a680 45 6e 75 6d 54 79 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 EnumType(simpleProperty.TypeUsag
9a6a0 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c e,.code)))....Me.Write(""&Global
9a6c0 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
9a6e0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
9a700 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 W(10)&"............ReportPropert
9a720 79 43 68 61 6e 67 65 64 28 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 yChanged(""")....Me.Write(Me.ToS
9a740 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
9a760 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 simpleProperty.Name))....Me.Writ
9a780 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 e(""")"&Global.Microsoft.VisualB
9a7a0 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
9a7c0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 isualBasic.ChrW(10)&"...........
9a7e0 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 .")....Me.Write(Me.ToStringHelpe
9a800 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 r.ToStringWithCulture(ChangedMet
9a820 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e hodName(simpleProperty)))....Me.
9a840 57 72 69 74 65 28 22 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 Write("()"&Global.Microsoft.Visu
9a860 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
9a880 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 20 20 20 20 20 t.VisualBasic.ChrW(10)).........
9a8a0 20 20 20 20 49 66 28 65 66 2e 49 73 4b 65 79 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 ....If(ef.IsKey(simpleProperty))
9a8c0 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 6f 70 49 6e 64 65 6e 74 .Then..................PopIndent
9a8e0 28 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 ()....Me.Write("............End.
9a900 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 If"&Global.Microsoft.VisualBasic
9a920 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
9a940 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 lBasic.ChrW(10))................
9a960 20 20 45 6e 64 20 49 66 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 20 20 20 20 20 45 6e ..End.If....Me.Write("........En
9a980 64 20 53 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 d.Set"&Global.Microsoft.VisualBa
9a9a0 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 sic.ChrW(13)&Global.Microsoft.Vi
9a9c0 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 sualBasic.ChrW(10)&"....End.Prop
9a9e0 65 72 74 79 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 erty"&Global.Microsoft.VisualBas
9aa00 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
9aa20 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(10)&Global.Microso
9aa40 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
9aa60 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 icrosoft.VisualBasic.ChrW(10)&".
9aa80 20 20 20 50 72 69 76 61 74 65 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 ...Private.")....Me.Write(Me.ToS
9aaa0 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 tringHelper.ToStringWithCulture(
9aac0 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 code.FieldName(simpleProperty)))
9aae0 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 ....Me.Write(".As.")....Me.Write
9ab00 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
9ab20 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 73 69 6d 70 6c 65 50 ulture(MultiSchemaEscape(simpleP
9ab40 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 roperty.TypeUsage,.code)))....Me
9ab60 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
9ab80 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 74 72 69 6e 67 42 65 66 6f 72 65 28 22 gWithCulture(code.StringBefore("
9aba0 20 3d 20 22 2c 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 73 69 6d 70 6c 65 50 .=.",.code.CreateLiteral(simpleP
9abc0 72 6f 70 65 72 74 79 2e 44 65 66 61 75 6c 74 56 61 6c 75 65 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 roperty.DefaultValue))))....Me.W
9abe0 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 rite(""&Global.Microsoft.VisualB
9ac00 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
9ac20 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 isualBasic.ChrW(10)&"....Private
9ac40 20 50 61 72 74 69 61 6c 20 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 .Partial.Sub.")....Me.Write(Me.T
9ac60 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
9ac80 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 e(ChangingMethodName(simplePrope
9aca0 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 76 61 6c 75 65 20 41 73 20 22 29 rty)))....Me.Write("(value.As.")
9acc0 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
9ace0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 oStringWithCulture(MultiSchemaEs
9ad00 63 61 70 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 cape(simpleProperty.TypeUsage,.c
9ad20 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 ode)))....Me.Write(")"&Global.Mi
9ad40 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f crosoft.VisualBasic.ChrW(13)&Glo
9ad60 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
9ad80 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 0)&"....End.Sub"&Global.Microsof
9ada0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
9adc0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f crosoft.VisualBasic.ChrW(10)&Glo
9ade0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
9ae00 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
9ae20 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 20 50 61 72 74 69 61 6c 20 53 75 ChrW(10)&"....Private.Partial.Su
9ae40 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 b.")....Me.Write(Me.ToStringHelp
9ae60 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 er.ToStringWithCulture(ChangedMe
9ae80 74 68 6f 64 4e 61 6d 65 28 73 69 6d 70 6c 65 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 thodName(simpleProperty)))....Me
9aea0 2e 57 72 69 74 65 28 22 28 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 .Write("()"&Global.Microsoft.Vis
9aec0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
9aee0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 ft.VisualBasic.ChrW(10)&"....End
9af00 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 .Sub"&Global.Microsoft.VisualBas
9af20 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
9af40 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 45 6e 64 20 ualBasic.ChrW(10))..........End.
9af60 53 75 62 0d 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 Sub..........''''''''......'''''
9af80 27 27 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 '''.......''''''''......Private.
9afa0 53 75 62 20 57 72 69 74 65 43 6f 6d 70 6c 65 78 54 79 70 65 50 72 6f 70 65 72 74 79 28 63 6f 6d Sub.WriteComplexTypeProperty(com
9afc0 70 6c 65 78 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 plexProperty.As.EdmProperty,.cod
9afe0 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 0d 0a 0a 0a 4d 65 2e e.As.CodeGenerationTools)....Me.
9b000 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c Write(""&Global.Microsoft.Visual
9b020 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
9b040 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 73 VisualBasic.ChrW(10)&"....'''.<s
9b060 75 6d 6d 61 72 79 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ummary>"&Global.Microsoft.Visual
9b080 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
9b0a0 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 22 29 VisualBasic.ChrW(10)&"....'''.")
9b0c0 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
9b0e0 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e oStringWithCulture(SummaryCommen
9b100 74 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 t(complexProperty)))....Me.Write
9b120 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 (""&Global.Microsoft.VisualBasic
9b140 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 .ChrW(13)&Global.Microsoft.Visua
9b160 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 lBasic.ChrW(10)&"....'''.</summa
9b180 72 79 3e 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c ry>")....Me.Write(Me.ToStringHel
9b1a0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4c 6f 6e 67 44 65 73 63 per.ToStringWithCulture(LongDesc
9b1c0 72 69 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 63 6f 6d 70 6c 65 78 50 72 6f riptionCommentElement(complexPro
9b1e0 70 65 72 74 79 2c 20 31 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 6c 6f 62 61 perty,.1)))....Me.Write(""&Globa
9b200 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
9b220 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
9b240 72 57 28 31 30 29 26 22 20 20 20 20 3c 45 64 6d 43 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 41 rW(10)&"....<EdmComplexPropertyA
9b260 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 ttribute()>"&Global.Microsoft.Vi
9b280 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
9b2a0 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 oft.VisualBasic.ChrW(10)&"....<D
9b2c0 65 73 69 67 6e 65 72 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e 56 69 73 69 62 69 6c 69 74 79 28 44 esignerSerializationVisibility(D
9b2e0 65 73 69 67 22 26 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 22 6e 65 72 53 65 72 69 61 6c 69 7a 61 esig"&._..........."nerSerializa
9b300 74 69 6f 6e 56 69 73 69 62 69 6c 69 74 79 2e 43 6f 6e 74 65 6e 74 29 3e 22 26 47 6c 6f 62 61 6c tionVisibility.Content)>"&Global
9b320 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
9b340 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
9b360 57 28 31 30 29 26 22 20 20 20 20 3c 58 6d 6c 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c 6c 61 62 6c W(10)&"....<XmlElement(IsNullabl
9b380 65 3a 3d 54 72 75 65 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 e:=True)>"&Global.Microsoft.Visu
9b3a0 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
9b3c0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 53 22 26 t.VisualBasic.ChrW(10)&"....<S"&
9b3e0 20 5f 20 0d 0a 20 20 20 20 20 20 20 20 22 6f 61 70 45 6c 65 6d 65 6e 74 28 49 73 4e 75 6c 6c 61 ._..........."oapElement(IsNulla
9b400 62 6c 65 3a 3d 54 72 75 65 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 ble:=True)>"&Global.Microsoft.Vi
9b420 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 sualBasic.ChrW(13)&Global.Micros
9b440 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 3c 44 oft.VisualBasic.ChrW(10)&"....<D
9b460 61 74 61 4d 65 6d 62 65 72 41 74 74 72 69 62 75 74 65 28 29 3e 22 26 47 6c 6f 62 61 6c 2e 4d 69 ataMemberAttribute()>"&Global.Mi
9b480 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f crosoft.VisualBasic.ChrW(13)&Glo
9b4a0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
9b4c0 30 29 26 22 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 0)&"....")....Me.Write(Me.ToStri
9b4e0 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 ngHelper.ToStringWithCulture(cod
9b500 65 2e 53 70 61 63 65 41 66 74 65 72 28 4e 65 77 4d 6f 64 69 66 69 65 72 28 63 6f 6d 70 6c 65 78 e.SpaceAfter(NewModifier(complex
9b520 50 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 Property))))....Me.Write(Me.ToSt
9b540 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 41 ringHelper.ToStringWithCulture(A
9b560 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 50 72 6f 70 65 72 74 79 28 63 6f 6d 70 6c 65 78 ccessibility.ForProperty(complex
9b580 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 50 72 6f 70 65 72 Property)))....Me.Write(".Proper
9b5a0 74 79 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c ty.")....Me.Write(Me.ToStringHel
9b5c0 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 45 73 63 per.ToStringWithCulture(code.Esc
9b5e0 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 ape(complexProperty)))....Me.Wri
9b600 74 65 28 22 28 29 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 te("().As.")....Me.Write(Me.ToSt
9b620 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d ringHelper.ToStringWithCulture(M
9b640 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 ultiSchemaEscape(complexProperty
9b660 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 .TypeUsage,.code)))....Me.Write(
9b680 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e ""&Global.Microsoft.VisualBasic.
9b6a0 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c ChrW(13)&Global.Microsoft.Visual
9b6c0 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 Basic.ChrW(10)&"........")....Me
9b6e0 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e .Write(Me.ToStringHelper.ToStrin
9b700 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 41 63 63 gWithCulture(code.SpaceAfter(Acc
9b720 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 47 65 74 74 65 72 28 63 6f 6d 70 6c 65 78 50 72 6f 70 essibility.ForGetter(complexProp
9b740 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 47 65 74 22 26 47 6c 6f 62 61 erty))))....Me.Write("Get"&Globa
9b760 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 l.Microsoft.VisualBasic.ChrW(13)
9b780 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
9b7a0 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 rW(10)&"............")....Me.Wri
9b7c0 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 te(Me.ToStringHelper.ToStringWit
9b7e0 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 hCulture(code.FieldName(complexP
9b800 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 47 65 74 56 61 roperty)))....Me.Write(".=.GetVa
9b820 6c 69 64 56 61 6c 75 65 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 lidValue(")....Me.Write(Me.ToStr
9b840 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f ingHelper.ToStringWithCulture(co
9b860 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d de.FieldName(complexProperty))).
9b880 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 2c 20 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 ...Me.Write(",.""")....Me.Write(
9b8a0 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
9b8c0 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 0d 0a 0a 0a lture(complexProperty.Name))....
9b8e0 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 46 61 6c 73 65 2c 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 Me.Write(""",.False,.")....Me.Wr
9b900 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
9b920 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 thCulture(InitializedTrackingFie
9b940 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d ld(complexProperty,.code)))....M
9b960 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 e.Write(")"&Global.Microsoft.Vis
9b980 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f ualBasic.ChrW(13)&Global.Microso
9b9a0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 ft.VisualBasic.ChrW(10)&".......
9b9c0 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 .....")....Me.Write(Me.ToStringH
9b9e0 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 elper.ToStringWithCulture(Initia
9ba00 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 lizedTrackingField(complexProper
9ba20 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 54 72 75 65 ty,.code)))....Me.Write(".=.True
9ba40 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
9ba60 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
9ba80 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 asic.ChrW(10)&"............Retur
9baa0 6e 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 n.")....Me.Write(Me.ToStringHelp
9bac0 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c er.ToStringWithCulture(code.Fiel
9bae0 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 dName(complexProperty)))....Me.W
9bb00 72 69 74 65 28 22 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 rite(""&Global.Microsoft.VisualB
9bb20 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
9bb40 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 isualBasic.ChrW(10)&"........End
9bb60 20 47 65 74 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 .Get"&Global.Microsoft.VisualBas
9bb80 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 ic.ChrW(13)&Global.Microsoft.Vis
9bba0 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 22 29 0d 0a 0a ualBasic.ChrW(10)&"........")...
9bbc0 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 .Me.Write(Me.ToStringHelper.ToSt
9bbe0 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 53 70 61 63 65 41 66 74 65 72 28 ringWithCulture(code.SpaceAfter(
9bc00 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 53 65 74 74 65 72 28 63 6f 6d 70 6c 65 78 50 Accessibility.ForSetter(complexP
9bc20 72 6f 70 65 72 74 79 29 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 53 65 74 22 26 47 6c roperty))))....Me.Write("Set"&Gl
9bc40 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
9bc60 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 13)&Global.Microsoft.VisualBasic
9bc80 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e .ChrW(10)&"............")....Me.
9bca0 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 Write(Me.ToStringHelper.ToString
9bcc0 57 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 WithCulture(ChangingMethodName(c
9bce0 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 omplexProperty)))....Me.Write("(
9bd00 76 61 6c 75 65 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 value)"&Global.Microsoft.VisualB
9bd20 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
9bd40 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 isualBasic.ChrW(10)&"...........
9bd60 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 69 6e 67 28 22 22 22 29 0d 0a 0a 0a .ReportPropertyChanging(""")....
9bd80 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
9bda0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e ingWithCulture(complexProperty.N
9bdc0 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d ame))....Me.Write(""")"&Global.M
9bde0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
9be00 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
9be20 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 10)&"............")....Me.Write(
9be40 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
9be60 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 lture(code.FieldName(complexProp
9be80 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 53 65 74 56 61 6c 69 64 erty)))....Me.Write(".=.SetValid
9bea0 56 61 6c 75 65 28 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 Value(")....Me.Write(Me.ToString
9bec0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e Helper.ToStringWithCulture(code.
9bee0 46 69 65 6c 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a FieldName(complexProperty)))....
9bf00 4d 65 2e 57 72 69 74 65 28 22 2c 20 76 61 6c 75 65 2c 20 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 Me.Write(",.value,.""")....Me.Wr
9bf20 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 ite(Me.ToStringHelper.ToStringWi
9bf40 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 29 thCulture(complexProperty.Name))
9bf60 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 ....Me.Write(""")"&Global.Micros
9bf80 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e oft.VisualBasic.ChrW(13)&Global.
9bfa0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 Microsoft.VisualBasic.ChrW(10)&"
9bfc0 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f ............")....Me.Write(Me.To
9bfe0 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
9c000 28 49 6e 69 74 69 61 6c 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 (InitializedTrackingField(comple
9c020 78 50 72 6f 70 65 72 74 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 xProperty,.code)))....Me.Write("
9c040 20 3d 20 54 72 75 65 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c .=.True"&Global.Microsoft.Visual
9c060 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e Basic.ChrW(13)&Global.Microsoft.
9c080 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 VisualBasic.ChrW(10)&"..........
9c0a0 20 20 52 65 70 6f 72 74 50 72 6f 70 65 72 74 79 43 68 61 6e 67 65 64 28 22 22 22 29 0d 0a 0a 0a ..ReportPropertyChanged(""")....
9c0c0 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
9c0e0 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 4e ingWithCulture(complexProperty.N
9c100 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 29 22 26 47 6c 6f 62 61 6c 2e 4d ame))....Me.Write(""")"&Global.M
9c120 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
9c140 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
9c160 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 10)&"............")....Me.Write(
9c180 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
9c1a0 6c 74 75 72 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 lture(ChangedMethodName(complexP
9c1c0 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 29 22 26 47 6c 6f 62 roperty)))....Me.Write("()"&Glob
9c1e0 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
9c200 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
9c220 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 22 26 47 6c 6f 62 61 6c hrW(10)&"........End.Set"&Global
9c240 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 .Microsoft.VisualBasic.ChrW(13)&
9c260 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
9c280 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 22 26 47 6c 6f 62 61 6c 2e W(10)&"....End.Property"&Global.
9c2a0 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 Microsoft.VisualBasic.ChrW(13)&G
9c2c0 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
9c2e0 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (10)&Global.Microsoft.VisualBasi
9c300 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
9c320 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 20 22 29 alBasic.ChrW(10)&"....Private.")
9c340 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 ....Me.Write(Me.ToStringHelper.T
9c360 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 63 6f 64 65 2e 46 69 65 6c 64 4e 61 6d oStringWithCulture(code.FieldNam
9c380 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 e(complexProperty)))....Me.Write
9c3a0 28 22 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 (".As.")....Me.Write(Me.ToString
9c3c0 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c 74 69 Helper.ToStringWithCulture(Multi
9c3e0 53 63 68 65 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 79 70 SchemaEscape(complexProperty.Typ
9c400 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 26 47 eUsage,.code)))....Me.Write(""&G
9c420 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 lobal.Microsoft.VisualBasic.ChrW
9c440 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 (13)&Global.Microsoft.VisualBasi
9c460 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(10)&Global.Microsoft.Visu
9c480 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(13)&Global.Microsof
9c4a0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 t.VisualBasic.ChrW(10)&"....Priv
9c4c0 61 74 65 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 ate.")....Me.Write(Me.ToStringHe
9c4e0 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 6e 69 74 69 61 6c lper.ToStringWithCulture(Initial
9c500 69 7a 65 64 54 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 izedTrackingField(complexPropert
9c520 79 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 42 6f 6f 6c y,.code)))....Me.Write(".As.Bool
9c540 65 61 6e 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 ean"&Global.Microsoft.VisualBasi
9c560 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 c.ChrW(13)&Global.Microsoft.Visu
9c580 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 alBasic.ChrW(10)&Global.Microsof
9c5a0 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 t.VisualBasic.ChrW(13)&Global.Mi
9c5c0 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 crosoft.VisualBasic.ChrW(10)&"..
9c5e0 20 20 50 72 69 76 61 74 65 20 50 61 72 74 69 61 6c 20 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 ..Private.Partial.Sub.")....Me.W
9c600 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
9c620 69 74 68 43 75 6c 74 75 72 65 28 43 68 61 6e 67 69 6e 67 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f ithCulture(ChangingMethodName(co
9c640 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 76 mplexProperty)))....Me.Write("(v
9c660 61 6c 75 65 20 41 73 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 alue.As.")....Me.Write(Me.ToStri
9c680 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 4d 75 6c ngHelper.ToStringWithCulture(Mul
9c6a0 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 72 74 79 2e 54 tiSchemaEscape(complexProperty.T
9c6c0 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 ypeUsage,.code)))....Me.Write(")
9c6e0 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
9c700 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
9c720 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 asic.ChrW(10)&"....End.Sub"&Glob
9c740 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 al.Microsoft.VisualBasic.ChrW(13
9c760 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 )&Global.Microsoft.VisualBasic.C
9c780 68 72 57 28 31 30 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(10)&Global.Microsoft.VisualB
9c7a0 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 asic.ChrW(13)&Global.Microsoft.V
9c7c0 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 50 72 69 76 61 74 65 isualBasic.ChrW(10)&"....Private
9c7e0 20 50 61 72 74 69 61 6c 20 53 75 62 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 .Partial.Sub.")....Me.Write(Me.T
9c800 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 oStringHelper.ToStringWithCultur
9c820 65 28 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 63 6f 6d 70 6c 65 78 50 72 6f 70 65 e(ChangedMethodName(complexPrope
9c840 72 74 79 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 28 29 22 26 47 6c 6f 62 61 6c 2e 4d rty)))....Me.Write("()"&Global.M
9c860 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
9c880 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
9c8a0 31 30 29 26 22 20 20 20 20 45 6e 64 20 53 75 62 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 10)&"....End.Sub"&Global.Microso
9c8c0 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d ft.VisualBasic.ChrW(13)&Global.M
9c8e0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a icrosoft.VisualBasic.ChrW(10))..
9c900 0a 0a 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 ........End.Sub........Private.S
9c920 75 62 20 57 72 69 74 65 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 73 28 42 79 56 61 6c ub.WriteFunctionParameters(ByVal
9c940 20 70 61 72 61 6d 65 74 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 75 .parameters.As.IEnumerable(Of.Fu
9c960 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 29 0d 0a 20 20 20 20 20 20 20 nctionImportParameter)).........
9c980 20 46 6f 72 20 45 61 63 68 20 70 61 72 61 6d 65 74 65 72 20 41 73 20 46 75 6e 63 74 69 6f 6e 49 .For.Each.parameter.As.FunctionI
9c9a0 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 49 6e 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 mportParameter.In.parameters....
9c9c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 70 61 72 61 6d 65 74 65 72 2e ..............If.(Not.parameter.
9c9e0 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 NeedsLocalVariable).Then........
9ca00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6e 74 69 6e 75 65 20 46 6f 72 0d 0a 20 20 20 20 ..............Continue.For......
9ca20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 ............End.If....Me.Write("
9ca40 20 20 20 20 20 20 20 20 44 69 6d 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f ........Dim.")....Me.Write(Me.To
9ca60 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 StringHelper.ToStringWithCulture
9ca80 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 29 29 0d 0a (parameter.LocalVariableName))..
9caa0 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 41 73 20 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 22 ..Me.Write(".As.ObjectParameter"
9cac0 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 &Global.Microsoft.VisualBasic.Ch
9cae0 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 rW(13)&Global.Microsoft.VisualBa
9cb00 73 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 49 66 20 28 22 29 0d 0a 0a 0a sic.ChrW(10)&"........If.(")....
9cb20 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 Me.Write(Me.ToStringHelper.ToStr
9cb40 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 49 66 28 70 61 72 61 6d 65 74 65 72 2e 49 73 4e 75 ingWithCulture(If(parameter.IsNu
9cb60 6c 6c 61 62 6c 65 4f 66 54 2c 20 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 llableOfT,.parameter.FunctionPar
9cb80 61 6d 65 74 65 72 4e 61 6d 65 20 2b 20 22 2e 48 61 73 56 61 6c 75 65 22 2c 20 70 61 72 61 6d 65 ameterName.+.".HasValue",.parame
9cba0 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 26 20 22 20 49 73 ter.FunctionParameterName.&.".Is
9cbc0 4e 6f 74 20 4e 6f 74 68 69 6e 67 22 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 Not.Nothing")))....Me.Write(")"&
9cbe0 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
9cc00 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
9cc20 69 63 2e 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d ic.ChrW(10)&"............")....M
9cc40 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 e.Write(Me.ToStringHelper.ToStri
9cc60 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 ngWithCulture(parameter.LocalVar
9cc80 69 61 62 6c 65 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4e 65 77 20 iableName))....Me.Write(".=.New.
9cca0 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 28 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 ObjectParameter(""")....Me.Write
9ccc0 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 (Me.ToStringHelper.ToStringWithC
9cce0 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 ulture(parameter.EsqlParameterNa
9cd00 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 22 29 0d 0a 0a 0a 4d 65 2e 57 me))....Me.Write(""",.")....Me.W
9cd20 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
9cd40 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 ithCulture(parameter.FunctionPar
9cd60 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 22 26 47 6c 6f ameterName))....Me.Write(")"&Glo
9cd80 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
9cda0 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 3)&Global.Microsoft.VisualBasic.
9cdc0 43 68 72 57 28 31 30 29 26 22 20 20 20 20 20 20 20 20 45 6c 73 65 22 26 47 6c 6f 62 61 6c 2e 4d ChrW(10)&"........Else"&Global.M
9cde0 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c icrosoft.VisualBasic.ChrW(13)&Gl
9ce00 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 obal.Microsoft.VisualBasic.ChrW(
9ce20 31 30 29 26 22 20 20 20 20 20 20 20 20 20 20 20 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 10)&"............")....Me.Write(
9ce40 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 Me.ToStringHelper.ToStringWithCu
9ce60 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d lture(parameter.LocalVariableNam
9ce80 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 3d 20 4e 65 77 20 4f 62 6a 65 63 74 50 61 e))....Me.Write(".=.New.ObjectPa
9cea0 72 61 6d 65 74 65 72 28 22 22 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d 65 2e 54 6f 53 74 rameter(""")....Me.Write(Me.ToSt
9cec0 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 70 ringHelper.ToStringWithCulture(p
9cee0 61 72 61 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 29 0d 0a 0a 0a arameter.EsqlParameterName))....
9cf00 4d 65 2e 57 72 69 74 65 28 22 22 22 2c 20 47 65 74 54 79 70 65 28 22 29 0d 0a 0a 0a 4d 65 2e 57 Me.Write(""",.GetType(")....Me.W
9cf20 72 69 74 65 28 4d 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 rite(Me.ToStringHelper.ToStringW
9cf40 69 74 68 43 75 6c 74 75 72 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e ithCulture(parameter.RawClrTypeN
9cf60 61 6d 65 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 29 29 22 26 47 6c 6f 62 61 6c 2e 4d 69 ame))....Me.Write("))"&Global.Mi
9cf80 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f crosoft.VisualBasic.ChrW(13)&Glo
9cfa0 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 bal.Microsoft.VisualBasic.ChrW(1
9cfc0 30 29 26 22 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 0)&"........End.If"&Global.Micro
9cfe0 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c soft.VisualBasic.ChrW(13)&Global
9d000 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 57 28 31 30 29 26 .Microsoft.VisualBasic.ChrW(10)&
9d020 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 68 72 Global.Microsoft.VisualBasic.Chr
9d040 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 W(13)&Global.Microsoft.VisualBas
9d060 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 ic.ChrW(10))..................Ne
9d080 78 74 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 xt......End.Sub........Private.S
9d0a0 75 62 20 57 72 69 74 65 4c 61 7a 79 4c 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 28 42 79 56 61 6c ub.WriteLazyLoadingEnabled(ByVal
9d0c0 20 63 6f 6e 74 61 69 6e 65 72 20 41 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 0d 0a .container.As.EntityContainer)..
9d0e0 20 20 20 20 20 20 20 20 44 69 6d 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 ........Dim.lazyLoadingAttribute
9d100 56 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 Value.As.String.=.Nothing.......
9d120 20 20 20 44 69 6d 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 4e 61 6d 65 20 ...Dim.lazyLoadingAttributeName.
9d140 41 73 20 53 74 72 69 6e 67 20 3d 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 45 44 As.String.=.MetadataConstants.ED
9d160 4d 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 26 20 22 3a 4c 61 7a 79 4c 6f 61 64 69 M_ANNOTATION_09_02.&.":LazyLoadi
9d180 6e 67 45 6e 61 62 6c 65 64 22 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4d 65 74 61 64 61 74 61 54 ngEnabled"..........If.MetadataT
9d1a0 6f 6f 6c 73 2e 54 72 79 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 ools.TryGetStringMetadataPropert
9d1c0 79 53 65 74 74 69 6e 67 28 63 6f 6e 74 61 69 6e 65 72 2c 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 ySetting(container,.lazyLoadingA
9d1e0 74 74 72 69 62 75 74 65 4e 61 6d 65 2c 20 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 ttributeName,.lazyLoadingAttribu
9d200 74 65 56 61 6c 75 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 69 teValue).Then..............Dim.i
9d220 73 4c 61 7a 79 4c 6f 61 64 69 6e 67 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 46 61 6c 73 65 0d sLazyLoading.As.Boolean.=.False.
9d240 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 42 6f 6f 6c 65 61 6e 2e 54 72 79 50 61 72 73 65 .............If.Boolean.TryParse
9d260 28 6c 61 7a 79 4c 6f 61 64 69 6e 67 41 74 74 72 69 62 75 74 65 56 61 6c 75 65 2c 20 69 73 4c 61 (lazyLoadingAttributeValue,.isLa
9d280 7a 79 4c 6f 61 64 69 6e 67 29 20 54 68 65 6e 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 20 20 20 zyLoading).Then....Me.Write("...
9d2a0 20 20 20 20 20 4d 79 42 61 73 65 2e 43 6f 6e 74 65 78 74 4f 70 74 69 6f 6e 73 2e 4c 61 7a 79 4c .....MyBase.ContextOptions.LazyL
9d2c0 6f 61 64 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 22 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 4d oadingEnabled.=.")....Me.Write(M
9d2e0 65 2e 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 2e 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c e.ToStringHelper.ToStringWithCul
9d300 74 75 72 65 28 69 73 4c 61 7a 79 4c 6f 61 64 69 6e 67 2e 54 6f 53 74 72 69 6e 67 28 29 2e 54 6f ture(isLazyLoading.ToString().To
9d320 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 29 29 0d 0a 0a 0a 4d 65 2e 57 72 69 74 65 28 22 LowerInvariant()))....Me.Write("
9d340 22 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 61 73 69 63 2e 43 "&Global.Microsoft.VisualBasic.C
9d360 68 72 57 28 31 33 29 26 47 6c 6f 62 61 6c 2e 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 42 hrW(13)&Global.Microsoft.VisualB
9d380 61 73 69 63 2e 43 68 72 57 28 31 30 29 29 0d 0a 0a 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 asic.ChrW(10))..................
9d3a0 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 End.If..........End.If......End.
9d3c0 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 Sub........''''''''......'''''''
9d3e0 27 20 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f '.......''''''''......Public.Pro
9d400 70 65 72 74 79 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 28 29 20 41 73 20 53 74 72 69 6e 67 perty.SourceCsdlPath().As.String
9d420 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4d 6f 64 65 6c 4e 61 6d 65 73 ......Public.Property.ModelNames
9d440 70 61 63 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f pace().As.String......Public.Pro
9d460 70 65 72 74 79 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 20 41 73 20 45 64 6d 49 74 65 perty.ItemCollection().As.EdmIte
9d480 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 mCollection......Public.Property
9d4a0 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 28 29 20 41 73 20 49 45 6e 75 6d 65 72 .ReferenceCsdlPaths().As.IEnumer
9d4c0 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 able(Of.String)......Public.Prop
9d4e0 65 72 74 79 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 28 29 20 41 erty.FullyQualifySystemTypes().A
9d500 73 20 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 50 75 62 6c s.Nullable(Of.Boolean)......Publ
9d520 69 63 20 50 72 6f 70 65 72 74 79 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 ic.Property.CreateContextAddToMe
9d540 74 68 6f 64 73 20 41 73 20 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 thods.As.Nullable(Of.Boolean)...
9d560 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 45 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 ...Public.Property.EdmToObjectNa
9d580 6d 65 73 70 61 63 65 4d 61 70 28 29 20 41 73 20 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 73 74 mespaceMap().As.Dictionary(Of.st
9d5a0 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 ring,.string)..........Get......
9d5c0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 ........Return._edmToObjectNames
9d5e0 70 61 63 65 4d 61 70 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 paceMap..........End.Get........
9d600 20 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e ..Set.............._edmToObjectN
9d620 61 6d 65 73 70 61 63 65 4d 61 70 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 amespaceMap.=.Value..........End
9d640 20 53 65 74 0d 0a 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 44 69 .Set........End.Property......Di
9d660 6d 20 5f 65 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 20 41 73 20 44 69 m._edmToObjectNamespaceMap.As.Di
9d680 63 74 69 6f 6e 61 72 79 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 20 3d 20 6e 65 ctionary(Of.string,.string).=.ne
9d6a0 77 20 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 29 0d w.Dictionary(Of.string,.string).
9d6c0 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 .......Public.ReadOnly.Property.
9d6e0 53 6f 75 72 63 65 45 64 6d 56 65 72 73 69 6f 6e 20 41 73 20 44 6f 75 62 6c 65 0d 0a 20 20 20 20 SourceEdmVersion.As.Double......
9d700 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 49 74 65 ....Get..............If.(Not.Ite
9d720 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 mCollection.Is.Nothing).Then....
9d740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 ..............Return.ItemCollect
9d760 69 6f 6e 2e 45 64 6d 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 ion.EdmVersion..............End.
9d780 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 30 2e 30 0d 0a 20 20 20 20 If..............Return.0.0......
9d7a0 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d ....End.Get......End.Property...
9d7c0 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 41 70 70 6c 79 55 73 65 72 53 65 74 74 69 6e .....Private.Sub.ApplyUserSettin
9d7e0 67 73 28 75 73 65 72 53 65 74 74 69 6e 67 73 20 61 73 20 55 73 65 72 53 65 74 74 69 6e 67 73 29 gs(userSettings.as.UserSettings)
9d800 0d 0a 20 20 20 20 20 20 20 20 49 66 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 49 73 20 4e ..........If(SourceCsdlPath.Is.N
9d820 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 23 49 66 20 4e 4f 54 20 50 52 45 50 52 4f 43 45 53 53 othing).Then..#If.NOT.PREPROCESS
9d840 45 44 5f 54 45 4d 50 4c 41 54 45 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 75 73 65 72 ED_TEMPLATE..............If.user
9d860 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 28 22 24 22 20 26 Settings.SourceCsdlPath.=.("$".&
9d880 20 22 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 22 20 26 20 22 24 22 29 0d 0a 20 20 20 20 20 20 20 ."edmxInputFile".&."$").........
9d8a0 20 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 .........Errors.Add(New.System.C
9d8c0 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 48 6f odeDom.Compiler.CompilerError(Ho
9d8e0 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 2c 20 2d 31 2c 20 2d 31 2c 20 53 74 72 69 6e 67 2e st.TemplateFile,.-1,.-1,.String.
9d900 45 6d 70 74 79 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 Empty,......................Code
9d920 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e GenerationTools.GetResourceStrin
9d940 67 28 22 54 65 6d 70 6c 61 74 65 5f 52 65 70 6c 61 63 65 56 73 49 74 65 6d 54 65 6d 70 6c 61 74 g("Template_ReplaceVsItemTemplat
9d960 65 54 6f 6b 65 6e 22 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 eToken")))..................Retu
9d980 72 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 rn..............End.If..........
9d9a0 20 20 20 20 20 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 20 3d 20 48 6f 73 74 2e 52 65 73 6f ......SourceCsdlPath.=.Host.Reso
9d9c0 6c 76 65 50 61 74 68 28 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 6c 50 lvePath(userSettings.SourceCsdlP
9d9e0 61 74 68 29 0d 0a 23 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 6f 75 72 63 65 43 ath)..#Else..............SourceC
9da00 73 64 6c 50 61 74 68 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 53 6f 75 72 63 65 43 73 64 sdlPath.=.userSettings.SourceCsd
9da20 6c 50 61 74 68 0d 0a 23 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a lPath..#End.If..........End.If..
9da40 0d 0a 20 20 20 20 20 20 20 20 27 20 6e 6f 72 6d 61 6c 69 7a 65 20 74 68 65 20 70 61 74 68 2c 20 ..........'.normalize.the.path,.
9da60 72 65 6d 6f 76 65 20 2e 2e 5c 20 66 72 6f 6d 20 69 74 0d 0a 20 20 20 20 20 20 20 20 53 6f 75 72 remove...\.from.it..........Sour
9da80 63 65 43 73 64 6c 50 61 74 68 20 3d 20 50 61 74 68 2e 47 65 74 46 75 6c 6c 50 61 74 68 28 53 6f ceCsdlPath.=.Path.GetFullPath(So
9daa0 75 72 63 65 43 73 64 6c 50 61 74 68 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 52 65 66 65 urceCsdlPath)............If(Refe
9dac0 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d renceCsdlPaths.Is.Nothing).Then.
9dae0 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 73 20 .............ReferenceCsdlPaths.
9db00 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 52 65 66 65 72 65 6e 63 65 43 73 64 6c 50 61 74 68 =.userSettings.ReferenceCsdlPath
9db20 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 s..........End.If............If(
9db40 4e 6f 74 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 2e 48 61 73 56 Not.FullyQualifySystemTypes.HasV
9db60 61 6c 75 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6c 6c 79 51 75 61 alue).Then..............FullyQua
9db80 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 46 lifySystemTypes.=.userSettings.F
9dba0 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 20 20 20 20 ullyQualifySystemTypes..........
9dbc0 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 43 72 65 61 74 65 43 End.If............If(Not.CreateC
9dbe0 6f 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 2e 48 61 73 56 61 6c 75 65 29 20 54 68 65 ontextAddToMethods.HasValue).The
9dc00 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 54 n..............CreateContextAddT
9dc20 6f 4d 65 74 68 6f 64 73 20 3d 20 75 73 65 72 53 65 74 74 69 6e 67 73 2e 43 72 65 61 74 65 43 6f oMethods.=.userSettings.CreateCo
9dc40 6e 74 65 78 74 41 64 64 54 6f 4d 65 74 68 6f 64 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 ntextAddToMethods..........End.I
9dc60 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 f............DefaultSummaryComme
9dc80 6e 74 20 3d 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f nt.=.CodeGenerationTools.GetReso
9dca0 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6d 6d 65 6e 74 4e 6f 44 6f urceString("Template_CommentNoDo
9dcc0 63 75 6d 65 6e 74 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 0d 0a cumentation")......End.Sub......
9dce0 20 20 20 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 27 27 27 27 27 27 27 27 20 0d 0a 20 20 20 ....''''''''......''''''''......
9dd00 20 27 27 27 27 27 27 27 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 55 73 65 .''''''''......Private.Class.Use
9dd20 72 53 65 74 74 69 6e 67 73 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 rSettings..........Public.Proper
9dd40 74 79 20 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 ty.SourceCsdlPath().As.String...
9dd60 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 52 65 66 65 72 65 6e 63 65 .......Public.Property.Reference
9dd80 43 73 64 6c 50 61 74 68 73 28 29 20 41 73 20 53 74 72 69 6e 67 20 28 29 0d 0a 20 20 20 20 20 20 CsdlPaths().As.String.()........
9dda0 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 ..Public.Property.FullyQualifySy
9ddc0 73 74 65 6d 54 79 70 65 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 stemTypes().As.Boolean..........
9dde0 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 43 72 65 61 74 65 43 6f 6e 74 65 78 74 41 64 64 Public.Property.CreateContextAdd
9de00 54 6f 4d 65 74 68 6f 64 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 ToMethods().As.Boolean..........
9de20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 28 Public.Property.CamelCaseFields(
9de40 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 20 ).As.Boolean......End.Class.....
9de60 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d 65 73 70 61 63 65 ...Private.Function.GetNamespace
9de80 4e 61 6d 65 28 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 Name(code.As.CodeGenerationTools
9dea0 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6e 61 6d 65 73 70 61 ).As.String..........Dim.namespa
9dec0 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e 56 73 4e 61 6d 65 73 70 ceName.As.String.=.code.VsNamesp
9dee0 61 63 65 53 75 67 67 65 73 74 69 6f 6e 28 29 0d 0a 0d 0a 23 49 66 20 50 52 45 50 52 4f 43 45 53 aceSuggestion()....#If.PREPROCES
9df00 53 45 44 5f 54 45 4d 50 4c 41 54 45 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 SED_TEMPLATE.Then..........If.St
9df20 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 ring.IsNullOrEmpty(namespaceName
9df40 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d ).Then..............namespaceNam
9df60 65 20 3d 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 4d 6f 64 65 6c 4e 61 6d 65 e.=.GetObjectNamespace(ModelName
9df80 73 70 61 63 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 23 45 6e 64 20 49 66 0d space)..........End.If..#End.If.
9dfa0 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d 0a 20 .........Return.namespaceName...
9dfc0 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 ...End.Function....Private.Funct
9dfe0 69 6f 6e 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 42 79 56 61 6c 20 75 73 61 67 ion.MultiSchemaEscape(ByVal.usag
9e000 65 20 41 73 20 54 79 70 65 55 73 61 67 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f e.As.TypeUsage,.ByVal.code.As.Co
9e020 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 deGenerationTools).As.String....
9e040 20 20 44 69 6d 20 65 66 20 41 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 3d 20 4e 65 77 20 ..Dim.ef.As.MetadataTools.=.New.
9e060 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 4d 65 29 0d 0a 20 20 20 20 49 66 20 75 73 61 67 65 2e MetadataTools(Me)......If.usage.
9e080 45 64 6d 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 EdmType.IsNot.Nothing.Then......
9e0a0 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 75 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 53 ....If.TypeOf.usage.EdmType.Is.S
9e0c0 74 72 75 63 74 75 72 61 6c 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 tructuralType.Then..............
9e0e0 52 65 74 75 72 6e 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 75 73 61 67 65 2e 45 Return.MultiSchemaEscape(usage.E
9e100 64 6d 54 79 70 65 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 54 79 dmType,.code)..........ElseIf.Ty
9e120 70 65 4f 66 20 75 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 45 6e 75 6d 54 79 70 65 20 54 peOf.usage.EdmType.Is.EnumType.T
9e140 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 4e 61 6d 65 20 41 73 hen..............Dim.typeName.As
9e160 20 53 74 72 69 6e 67 20 3d 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 75 73 61 67 .String.=.MultiSchemaEscape(usag
9e180 65 2e 45 64 6d 54 79 70 65 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 e.EdmType,.code)..............If
9e1a0 20 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 75 73 61 67 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 .ef.IsNullable(usage).Then......
9e1c0 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 ............Return.String.Format
9e1e0 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 (CultureInfo.InvariantCulture,."
9e200 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 7b 30 7d 29 22 2c 20 74 79 70 65 4e 61 6d 65 29 0d 0a 20 20 Nullable(Of.{0})",.typeName)....
9e220 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..........End.If................
9e240 52 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d Return.typeName..........End.If.
9e260 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 63 6f 64 65 2e 45 .....End.If........Return.code.E
9e280 73 63 61 70 65 28 75 73 61 67 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 scape(usage)..End.Function....Pr
9e2a0 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 ivate.Function.MultiSchemaEscape
9e2c0 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 2c 20 42 79 56 61 6c 20 63 6f (ByVal.type.As.EdmType,.ByVal.co
9e2e0 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 de.As.CodeGenerationTools).As.St
9e300 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 74 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 ring......If.type.NamespaceName.
9e320 3c 3e 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 <>.ModelNamespace.Then..........
9e340 52 65 74 75 72 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e Return.code.CreateFullName(code.
9e360 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 EscapeNamespace(GetObjectNamespa
9e380 63 65 28 74 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 ce(type.NamespaceName)),.code.Es
9e3a0 63 61 70 65 28 74 79 70 65 29 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 cape(type))......End.If........R
9e3c0 65 74 75 72 6e 20 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 29 0d 0a 45 6e 64 20 46 75 6e eturn.code.Escape(type)..End.Fun
9e3e0 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d 6f 64 ction....Private.Function.NewMod
9e400 69 66 69 65 72 28 42 79 56 61 6c 20 6e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 20 41 ifier(ByVal.navigationProperty.A
9e420 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 41 73 20 53 74 72 69 6e 67 0d s.NavigationProperty).As.String.
9e440 0a 20 20 20 20 44 69 6d 20 62 61 73 65 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 47 65 74 54 .....Dim.baseType.As.Type.=.GetT
9e460 79 70 65 28 45 6e 74 69 74 79 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 4e 65 ype(EntityObject)......Return.Ne
9e480 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 6e 61 76 69 67 61 74 69 6f 6e 50 72 wModifier(baseType,.navigationPr
9e4a0 6f 70 65 72 74 79 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 operty.Name)..End.Function....Pr
9e4c0 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 6c ivate.Function.NewModifier(ByVal
9e4e0 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 20 45 64 6d 46 75 6e 63 74 69 6f 6e 29 20 41 73 20 .edmFunction.As.EdmFunction).As.
9e500 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 61 73 65 54 79 70 65 20 41 73 20 54 79 70 65 String......Dim.baseType.As.Type
9e520 20 3d 20 47 65 74 54 79 70 65 28 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 29 0d 0a 20 20 20 20 52 .=.GetType(ObjectContext)......R
9e540 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 65 64 6d 46 eturn.NewModifier(baseType,.edmF
9e560 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 unction.Name)..End.Function....P
9e580 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 rivate.Function.NewModifier(ByVa
9e5a0 6c 20 65 6e 74 69 74 79 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 29 20 41 73 20 53 74 72 l.entitySet.As.EntitySet).As.Str
9e5c0 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 61 73 65 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 ing......Dim.baseType.As.Type.=.
9e5e0 47 65 74 54 79 70 65 28 4f 62 6a 65 63 74 43 6f 6e 74 65 78 74 29 0d 0a 20 20 20 20 52 65 74 75 GetType(ObjectContext)......Retu
9e600 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 65 6e 74 69 74 79 53 rn.NewModifier(baseType,.entityS
9e620 65 74 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 et.Name)..End.Function....Privat
9e640 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 56 61 6c 20 65 64 6d e.Function.NewModifier(ByVal.edm
9e660 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 41 73 20 53 74 72 69 Property.As.EdmProperty).As.Stri
9e680 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 61 73 65 54 79 70 65 20 41 73 20 54 79 70 65 0d 0a 20 20 ng......Dim.baseType.As.Type....
9e6a0 20 20 49 66 20 65 64 6d 50 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 ..If.edmProperty.DeclaringType.B
9e6c0 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 uiltInTypeKind.=.BuiltInTypeKind
9e6e0 2e 45 6e 74 69 74 79 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 62 61 73 65 54 79 .EntityType.Then..........baseTy
9e700 70 65 20 3d 20 47 65 74 54 79 70 65 28 45 6e 74 69 74 79 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 pe.=.GetType(EntityObject)......
9e720 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 47 65 74 54 79 70 65 Else..........baseType.=.GetType
9e740 28 43 6f 6d 70 6c 65 78 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 (ComplexObject)......End.If.....
9e760 20 52 65 74 75 72 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 62 61 73 65 54 79 70 65 2c 20 65 64 .Return.NewModifier(baseType,.ed
9e780 6d 50 72 6f 70 65 72 74 79 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d mProperty.Name)..End.Function...
9e7a0 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4e 65 77 4d 6f 64 69 66 69 65 72 28 42 79 .Private.Function.NewModifier(By
9e7c0 56 61 6c 20 74 79 70 65 20 41 73 20 54 79 70 65 2c 20 42 79 56 61 6c 20 6d 65 6d 62 65 72 4e 61 Val.type.As.Type,.ByVal.memberNa
9e7e0 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 me.As.String).As.String......If.
9e800 48 61 73 42 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d 61 74 63 68 69 6e 67 4e 61 6d 65 28 74 79 HasBaseMemberWithMatchingName(ty
9e820 70 65 2c 20 6d 65 6d 62 65 72 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 pe,.memberName).Then..........Re
9e840 74 75 72 6e 20 22 53 68 61 64 6f 77 73 22 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 turn."Shadows"......End.If......
9e860 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f Return.String.Empty..End.Functio
9e880 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 43 68 61 6e 67 69 6e 67 4d 65 n....Private.Function.ChangingMe
9e8a0 74 68 6f 64 4e 61 6d 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 thodName(ByVal.member.As.EdmMemb
9e8c0 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 er).As.String......Return.String
9e8e0 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c .Format(CultureInfo.InvariantCul
9e900 74 75 72 65 2c 20 22 4f 6e 7b 30 7d 43 68 61 6e 67 69 6e 67 22 2c 20 6d 65 6d 62 65 72 2e 4e 61 ture,."On{0}Changing",.member.Na
9e920 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e me)..End.Function....Private.Fun
9e940 63 74 69 6f 6e 20 43 68 61 6e 67 65 64 4d 65 74 68 6f 64 4e 61 6d 65 28 42 79 56 61 6c 20 6d 65 ction.ChangedMethodName(ByVal.me
9e960 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 mber.As.EdmMember).As.String....
9e980 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e ..Return.String.Format(CultureIn
9e9a0 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4f 6e 7b 30 7d 43 68 61 6e 67 fo.InvariantCulture,."On{0}Chang
9e9c0 65 64 22 2c 20 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d ed",.member.Name)..End.Function.
9e9e0 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 49 6e 69 74 69 61 6c 69 7a 65 64 54 ...Private.Function.InitializedT
9ea00 72 61 63 6b 69 6e 67 46 69 65 6c 64 28 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 rackingField(ByVal.edmProperty.A
9ea20 73 20 45 64 6d 50 72 6f 70 65 72 74 79 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 s.EdmProperty,.ByVal.code.As.Cod
9ea40 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 eGenerationTools).As.String.....
9ea60 20 44 69 6d 20 6e 61 6d 65 50 61 72 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 65 64 6d 50 72 6f .Dim.namePart.As.String.=.edmPro
9ea80 70 65 72 74 79 2e 4e 61 6d 65 20 26 20 22 49 6e 69 74 69 61 6c 69 7a 65 64 22 0d 0a 20 20 20 20 perty.Name.&."Initialized"......
9eaa0 49 66 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 54 68 65 6e 0d 0a 20 20 If.code.CamelCaseFields.Then....
9eac0 20 20 20 20 20 20 6e 61 6d 65 50 61 72 74 20 3d 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 ......namePart.=.code.CamelCase(
9eae0 6e 61 6d 65 50 61 72 74 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 namePart)......End.If......Retur
9eb00 6e 20 22 5f 22 20 26 20 6e 61 6d 65 50 61 72 74 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a n."_".&.namePart..End.Function..
9eb20 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4f 70 74 69 6f 6e 61 6c 4e 75 6c 6c 61 ..Private.Function.OptionalNulla
9eb40 62 6c 65 50 61 72 61 6d 65 74 65 72 46 6f 72 53 65 74 56 61 6c 69 64 56 61 6c 75 65 28 42 79 56 bleParameterForSetValidValue(ByV
9eb60 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 2c 20 42 79 56 61 6c 20 63 6f al.member.As.EdmMember,.ByVal.co
9eb80 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 de.As.CodeGenerationTools).As.St
9eba0 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 65 66 20 41 73 20 4e 65 77 20 4d 65 74 61 64 61 74 61 ring......Dim.ef.As.New.Metadata
9ebc0 54 6f 6f 6c 73 28 4d 65 29 0d 0a 20 20 20 20 44 69 6d 20 6c 69 73 74 20 41 73 20 53 74 72 69 6e Tools(Me)......Dim.list.As.Strin
9ebe0 67 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 g.=.String.Empty......Dim.type.A
9ec00 73 20 50 72 69 6d 69 74 69 76 65 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 6d 65 6d 62 65 72 s.PrimitiveType.=.TryCast(member
9ec20 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 50 72 69 6d 69 74 69 76 65 54 79 70 .TypeUsage.EdmType,.PrimitiveTyp
9ec40 65 29 0d 0a 20 20 20 20 49 66 20 74 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e e)......If.type.IsNot.Nothing.An
9ec60 64 41 6c 73 6f 20 74 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2e 49 73 43 dAlso.type.ClrEquivalentType.IsC
9ec80 6c 61 73 73 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 74 6f 72 65 47 65 6e 65 lass.Then..........Dim.storeGene
9eca0 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 20 41 73 20 4d 65 74 61 64 61 74 61 ratedPatternProperty.As.Metadata
9ecc0 50 72 6f 70 65 72 74 79 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 Property.=.Nothing..........Dim.
9ece0 69 73 4e 75 6c 6c 61 62 6c 65 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 65 66 2e 49 73 4e 75 6c isNullable.As.Boolean.=.ef.IsNul
9ed00 6c 61 62 6c 65 28 6d 65 6d 62 65 72 2e 54 79 70 65 55 73 61 67 65 29 20 4f 72 45 6c 73 65 0d 0a lable(member.TypeUsage).OrElse..
9ed20 20 20 20 20 20 20 20 20 20 20 20 20 28 6d 65 6d 62 65 72 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 ............(member.MetadataProp
9ed40 65 72 74 69 65 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 erties.TryGetValue(MetadataConst
9ed60 61 6e 74 73 2e 45 44 4d 5f 41 4e 4e 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 26 20 22 3a 53 74 ants.EDM_ANNOTATION_09_02.&.":St
9ed80 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 22 2c 20 46 61 6c 73 65 2c 20 73 74 6f oreGeneratedPattern",.False,.sto
9eda0 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 29 20 41 6e 64 41 reGeneratedPatternProperty).AndA
9edc0 6c 73 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 2e 45 71 75 61 6c 73 28 lso...............Object.Equals(
9ede0 73 74 6f 72 65 47 65 6e 65 72 61 74 65 64 50 61 74 74 65 72 6e 50 72 6f 70 65 72 74 79 2e 56 61 storeGeneratedPatternProperty.Va
9ee00 6c 75 65 2c 20 22 43 6f 6d 70 75 74 65 64 22 29 29 0d 0a 20 20 20 20 20 20 20 20 6c 69 73 74 20 lue,."Computed"))..........list.
9ee20 2b 3d 20 22 2c 20 22 20 26 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 69 73 4e +=.",.".&.code.CreateLiteral(isN
9ee40 75 6c 6c 61 62 6c 65 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 6e ullable)......End.If......Return
9ee60 20 6c 69 73 74 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 .list..End.Function....Private.S
9ee80 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 28 42 hared.Function.IsVisibleMember(B
9eea0 79 56 61 6c 20 6d 65 6d 62 65 72 49 6e 66 6f 20 41 73 20 4d 65 6d 62 65 72 49 6e 66 6f 29 20 41 yVal.memberInfo.As.MemberInfo).A
9eec0 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 6d 65 6d 62 65 72 49 s.Boolean......If.TypeOf.memberI
9eee0 6e 66 6f 20 49 73 20 45 76 65 6e 74 49 6e 66 6f 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 nfo.Is.EventInfo.Then..........D
9ef00 69 6d 20 65 69 20 41 73 20 45 76 65 6e 74 49 6e 66 6f 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 im.ei.As.EventInfo.=.DirectCast(
9ef20 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 45 76 65 6e 74 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 memberInfo,.EventInfo)..........
9ef40 44 69 6d 20 61 64 64 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 20 3d 20 65 69 2e 47 65 74 41 64 Dim.add.As.MethodInfo.=.ei.GetAd
9ef60 64 4d 65 74 68 6f 64 28 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 6d 6f 76 65 20 41 73 dMethod()..........Dim.remove.As
9ef80 20 4d 65 74 68 6f 64 49 6e 66 6f 20 3d 20 65 69 2e 47 65 74 52 65 6d 6f 76 65 4d 65 74 68 6f 64 .MethodInfo.=.ei.GetRemoveMethod
9efa0 28 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 ()..........Return.IsVisibleMeth
9efc0 6f 64 28 61 64 64 29 20 4f 72 45 6c 73 65 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 72 od(add).OrElse.IsVisibleMethod(r
9efe0 65 6d 6f 76 65 29 0d 0a 20 20 20 20 45 6c 73 65 49 66 20 54 79 70 65 4f 66 20 6d 65 6d 62 65 72 emove)......ElseIf.TypeOf.member
9f000 49 6e 66 6f 20 49 73 20 46 69 65 6c 64 49 6e 66 6f 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 Info.Is.FieldInfo.Then..........
9f020 44 69 6d 20 66 69 20 41 73 20 46 69 65 6c 64 49 6e 66 6f 20 3d 20 44 69 72 65 63 74 43 61 73 74 Dim.fi.As.FieldInfo.=.DirectCast
9f040 28 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 46 69 65 6c 64 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 (memberInfo,.FieldInfo).........
9f060 20 52 65 74 75 72 6e 20 4e 6f 74 20 66 69 2e 49 73 50 72 69 76 61 74 65 20 41 6e 64 41 6c 73 6f .Return.Not.fi.IsPrivate.AndAlso
9f080 20 4e 6f 74 20 66 69 2e 49 73 41 73 73 65 6d 62 6c 79 0d 0a 20 20 20 20 45 6c 73 65 49 66 20 54 .Not.fi.IsAssembly......ElseIf.T
9f0a0 79 70 65 4f 66 20 6d 65 6d 62 65 72 49 6e 66 6f 20 49 73 20 4d 65 74 68 6f 64 42 61 73 65 20 54 ypeOf.memberInfo.Is.MethodBase.T
9f0c0 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6d 62 20 41 73 20 4d 65 74 68 6f 64 42 61 73 hen..........Dim.mb.As.MethodBas
9f0e0 65 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 6d 65 6d 62 65 72 49 6e 66 6f 2c 20 4d 65 74 68 6f e.=.DirectCast(memberInfo,.Metho
9f100 64 42 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 62 2e 49 73 53 70 65 63 69 61 6c 4e dBase)..........If.mb.IsSpecialN
9f120 61 6d 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c ame.Then..............Return.Fal
9f140 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 se..........End.If..........Retu
9f160 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 6f 64 28 6d 62 29 0d 0a 20 20 20 20 45 6c 73 65 rn.IsVisibleMethod(mb)......Else
9f180 49 66 20 54 79 70 65 4f 66 20 6d 65 6d 62 65 72 49 6e 66 6f 20 49 73 20 50 72 6f 70 65 72 74 79 If.TypeOf.memberInfo.Is.Property
9f1a0 49 6e 66 6f 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 69 20 41 73 20 50 72 6f Info.Then..........Dim.pi.As.Pro
9f1c0 70 65 72 74 79 49 6e 66 6f 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 6d 65 6d 62 65 72 49 6e 66 pertyInfo.=.DirectCast(memberInf
9f1e0 6f 2c 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 o,.PropertyInfo)..........Dim.ge
9f200 74 4d 65 74 68 6f 64 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 20 3d 20 70 69 2e 47 65 74 47 65 tMethod.As.MethodInfo.=.pi.GetGe
9f220 74 4d 65 74 68 6f 64 28 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e 74 69 74 79 53 65 74 tMethod()..........Dim.entitySet
9f240 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 20 3d 20 70 69 2e 47 65 74 53 65 74 4d 65 74 68 6f 64 .As.MethodInfo.=.pi.GetSetMethod
9f260 28 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 73 56 69 73 69 62 6c 65 4d 65 74 68 ()..........Return.IsVisibleMeth
9f280 6f 64 28 67 65 74 4d 65 74 68 6f 64 29 20 4f 72 45 6c 73 65 20 49 73 56 69 73 69 62 6c 65 4d 65 od(getMethod).OrElse.IsVisibleMe
9f2a0 74 68 6f 64 28 65 6e 74 69 74 79 53 65 74 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 thod(entitySet)......End.If.....
9f2c0 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d ...Return.False..End.Function...
9f2e0 0a 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 49 73 56 69 73 69 62 .Private.Shared.Function.IsVisib
9f300 6c 65 4d 65 74 68 6f 64 28 42 79 56 61 6c 20 6d 65 74 68 6f 64 42 61 73 65 20 41 73 20 4d 65 74 leMethod(ByVal.methodBase.As.Met
9f320 68 6f 64 42 61 73 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 49 66 20 6d 65 74 68 hodBase).As.Boolean......If.meth
9f340 6f 64 42 61 73 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 odBase.Is.Nothing.Then..........
9f360 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 Return.False......End.If........
9f380 52 65 74 75 72 6e 20 4e 6f 74 20 6d 65 74 68 6f 64 42 61 73 65 2e 49 73 50 72 69 76 61 74 65 20 Return.Not.methodBase.IsPrivate.
9f3a0 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 6d 65 74 68 6f 64 42 61 73 65 2e 49 73 41 73 73 65 6d 62 6c AndAlso.Not.methodBase.IsAssembl
9f3c0 79 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 68 61 72 65 y..End.Function....Private.Share
9f3e0 64 20 46 75 6e 63 74 69 6f 6e 20 48 61 73 42 61 73 65 4d 65 6d 62 65 72 57 69 74 68 4d 61 74 63 d.Function.HasBaseMemberWithMatc
9f400 68 69 6e 67 4e 61 6d 65 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 54 79 70 65 2c 20 42 79 56 hingName(ByVal.type.As.Type,.ByV
9f420 61 6c 20 6d 65 6d 62 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c al.memberName.As.String).As.Bool
9f440 65 61 6e 0d 0a 20 20 20 20 44 69 6d 20 62 69 6e 64 69 6e 67 73 20 41 73 20 42 69 6e 64 69 6e 67 ean......Dim.bindings.As.Binding
9f460 46 6c 61 67 73 20 3d 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 46 6c 61 74 74 65 6e 48 69 65 72 Flags.=.BindingFlags.FlattenHier
9f480 61 72 63 68 79 20 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 62 6c 69 63 20 archy.Or.BindingFlags.NonPublic.
9f4a0 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 50 75 62 6c 69 63 20 4f 72 20 42 69 6e 64 69 6e Or.BindingFlags.Public.Or.Bindin
9f4c0 67 46 6c 61 67 73 2e 49 6e 73 74 61 6e 63 65 20 4f 72 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e gFlags.Instance.Or.BindingFlags.
9f4e0 53 74 61 74 69 63 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 2e 47 65 74 4d 65 6d 62 65 Static......Return.type.GetMembe
9f500 72 73 28 62 69 6e 64 69 6e 67 73 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 49 rs(bindings).Where(Function(m).I
9f520 73 56 69 73 69 62 6c 65 4d 65 6d 62 65 72 28 6d 29 29 2e 41 6e 79 28 46 75 6e 63 74 69 6f 6e 28 sVisibleMember(m)).Any(Function(
9f540 6d 29 20 6d 2e 4e 61 6d 65 2e 45 71 75 61 6c 73 28 6d 65 6d 62 65 72 4e 61 6d 65 2c 20 53 74 72 m).m.Name.Equals(memberName,.Str
9f560 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 ingComparison.OrdinalIgnoreCase)
9f580 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 )..End.Function....Private.Funct
9f5a0 69 6f 6e 20 42 65 67 69 6e 43 61 73 74 54 6f 45 6e 75 6d 54 79 70 65 28 42 79 56 61 6c 20 74 79 ion.BeginCastToEnumType(ByVal.ty
9f5c0 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 peUsage.As.TypeUsage,.ByVal.code
9f5e0 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 .As.CodeGenerationTools).As.Stri
9f600 6e 67 0d 0a 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 45 6e 75 6d 54 79 70 65 20 3d 20 54 ng......Dim.type.As.EnumType.=.T
9f620 72 79 43 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 45 6e 75 6d 54 79 ryCast(typeUsage.EdmType,.EnumTy
9f640 70 65 29 0d 0a 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e pe)......If.type.Is.Nothing.Then
9f660 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 ..........Return.String.Empty...
9f680 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 22 43 54 79 70 65 28 22 ...End.If........Return."CType("
9f6a0 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 ..End.Function....Private.Functi
9f6c0 6f 6e 20 45 6e 64 43 61 73 74 54 6f 45 6e 75 6d 54 79 70 65 28 42 79 56 61 6c 20 74 79 70 65 55 on.EndCastToEnumType(ByVal.typeU
9f6e0 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 sage.As.TypeUsage,.ByVal.code.As
9f700 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d .CodeGenerationTools).As.String.
9f720 0a 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 45 6e 75 6d 54 79 70 65 20 3d 20 54 72 79 43 .....Dim.type.As.EnumType.=.TryC
9f740 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 45 6e 75 6d 54 79 70 65 29 ast(typeUsage.EdmType,.EnumType)
9f760 0d 0a 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 ......If.type.Is.Nothing.Then...
9f780 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 .......Return.String.Empty......
9f7a0 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 22 2c 20 22 20 26 20 4d 75 6c 74 End.If........Return.",.".&.Mult
9f7c0 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 74 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 20 26 iSchemaEscape(typeUsage,.code).&
9f7e0 20 22 29 22 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 .")"..End.Function....Private.Fu
9f800 6e 63 74 69 6f 6e 20 42 65 67 69 6e 43 61 73 74 54 6f 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 nction.BeginCastToUnderlyingType
9f820 28 42 79 56 61 6c 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 2c 20 42 (ByVal.typeUsage.As.TypeUsage,.B
9f840 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 yVal.code.As.CodeGenerationTools
9f860 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 45 6e 75 ).As.String......Dim.type.As.Enu
9f880 6d 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 mType.=.TryCast(typeUsage.EdmTyp
9f8a0 65 2c 20 45 6e 75 6d 54 79 70 65 29 0d 0a 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 4e 6f 74 e,.EnumType)......If.type.Is.Not
9f8c0 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 hing.Then..........Return.String
9f8e0 2e 45 6d 70 74 79 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e .Empty......End.If........Return
9f900 20 22 43 54 79 70 65 28 22 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 ."CType("..End.Function....Priva
9f920 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 6e 64 43 61 73 74 54 6f 55 6e 64 65 72 6c 79 69 6e 67 54 te.Function.EndCastToUnderlyingT
9f940 79 70 65 28 42 79 56 61 6c 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 ype(ByVal.typeUsage.As.TypeUsage
9f960 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f ,.ByVal.code.As.CodeGenerationTo
9f980 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 65 66 20 41 73 20 4d 65 ols).As.String......Dim.ef.As.Me
9f9a0 74 61 64 61 74 61 54 6f 6f 6c 73 20 3d 20 4e 65 77 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 28 tadataTools.=.New.MetadataTools(
9f9c0 4d 65 29 0d 0a 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 45 6e 75 6d 54 79 70 65 20 3d 20 Me)......Dim.type.As.EnumType.=.
9f9e0 54 72 79 43 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 45 6e 75 6d 54 TryCast(typeUsage.EdmType,.EnumT
9fa00 79 70 65 29 0d 0a 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 ype)......If.type.Is.Nothing.The
9fa20 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a n..........Return.String.Empty..
9fa40 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 44 69 6d 20 63 6c 72 54 79 70 65 20 41 73 ....End.If........Dim.clrType.As
9fa60 20 53 74 72 69 6e 67 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 74 79 70 65 2e 55 6e 64 65 72 .String.=.code.Escape(type.Under
9fa80 6c 79 69 6e 67 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 2c 20 66 75 6c lyingType.ClrEquivalentType,.ful
9faa0 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3a 3d 20 46 61 6c 73 65 29 0d 0a lyQualifySystemTypes.:=.False)..
9fac0 0d 0a 20 20 20 20 49 66 20 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 65 ......If.ef.IsNullable(typeUsage
9fae0 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 63 6c 72 54 79 70 65 20 3d 20 53 74 72 69 6e 67 ).Then..........clrType.=.String
9fb00 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c .Format(CultureInfo.InvariantCul
9fb20 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 7b 30 7d 29 22 2c 20 63 6c 72 54 79 70 ture,."Nullable(Of.{0})",.clrTyp
9fb40 65 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 22 2c 20 e)......End.If........Return.",.
9fb60 22 20 26 20 63 6c 72 54 79 70 65 20 26 20 22 29 22 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d ".&.clrType.&.")"..End.Function.
9fb80 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 53 6f 75 72 63 65 53 63 68 ...Private.Function.GetSourceSch
9fba0 65 6d 61 54 79 70 65 73 28 4f 66 20 54 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 28 29 20 41 emaTypes(Of.T.As.GlobalItem)().A
9fbc0 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 54 29 0d 0a 20 20 20 20 49 66 20 50 61 74 68 s.IEnumerable(Of.T)......If.Path
9fbe0 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 29 20 3c 3e .GetExtension(SourceCsdlPath).<>
9fc00 20 22 2e 65 64 6d 78 22 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 74 .".edmx".Then..........Return.It
9fc20 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 54 29 28 29 2e 57 68 emCollection.GetItems(Of.T)().Wh
9fc40 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 65 29 20 65 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 ere(Function(e).e.MetadataProper
9fc60 74 69 65 73 2e 41 6e 79 28 46 75 6e 63 74 69 6f 6e 28 6d 70 29 20 6d 70 2e 4e 61 6d 65 20 3d 20 ties.Any(Function(mp).mp.Name.=.
9fc80 22 53 63 68 65 6d 61 53 6f 75 72 63 65 22 20 41 6e 64 41 6c 73 6f 20 44 69 72 65 63 74 43 61 73 "SchemaSource".AndAlso.DirectCas
9fca0 74 28 6d 70 2e 56 61 6c 75 65 2c 20 53 74 72 69 6e 67 29 20 3d 20 53 6f 75 72 63 65 43 73 64 6c t(mp.Value,.String).=.SourceCsdl
9fcc0 50 61 74 68 29 29 0d 0a 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e Path))......Else..........Return
9fce0 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 54 29 28 29 .ItemCollection.GetItems(Of.T)()
9fd00 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 ......End.If..End.Function....Pr
9fd20 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 6e 64 4e 61 6d 65 28 42 79 56 61 6c 20 61 73 73 ivate.Function.EndName(ByVal.ass
9fd40 6f 63 69 61 74 69 6f 6e 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 2c 20 42 79 56 ociation.As.AssociationType,.ByV
9fd60 61 6c 20 69 6e 64 65 78 20 41 73 20 49 6e 74 65 67 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a al.index.As.Integer).As.String..
9fd80 20 20 20 20 52 65 74 75 72 6e 20 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 ....Return.association.Associati
9fda0 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 69 6e 64 65 78 29 2e 4e 61 6d 65 0d 0a 45 6e 64 20 46 75 onEndMembers(index).Name..End.Fu
9fdc0 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 6e 64 4d 75 nction....Private.Function.EndMu
9fde0 6c 74 69 70 6c 69 63 69 74 79 28 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 41 73 20 ltiplicity(ByVal.association.As.
9fe00 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 2c 20 42 79 56 61 6c 20 69 6e 64 65 78 20 41 73 20 AssociationType,.ByVal.index.As.
9fe20 49 6e 74 65 67 65 72 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 Integer,.ByVal.code.As.CodeGener
9fe40 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 74 75 72 ationTools).As.String......Retur
9fe60 6e 20 63 6f 64 65 2e 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 61 73 73 6f 63 69 61 74 69 6f 6e n.code.CreateLiteral(association
9fe80 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 69 6e 64 65 78 29 2e 52 65 .AssociationEndMembers(index).Re
9fea0 6c 61 74 69 6f 6e 73 68 69 70 4d 75 6c 74 69 70 6c 69 63 69 74 79 29 0d 0a 45 6e 64 20 46 75 6e lationshipMultiplicity)..End.Fun
9fec0 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 ction....Private.Function.Escape
9fee0 45 6e 64 54 79 70 65 4e 61 6d 65 28 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 41 73 EndTypeName(ByVal.association.As
9ff00 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 2c 20 42 79 56 61 6c 20 69 6e 64 65 78 20 41 73 .AssociationType,.ByVal.index.As
9ff20 20 49 6e 74 65 67 65 72 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 .Integer,.ByVal.code.As.CodeGene
9ff40 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 rationTools).As.String......Dim.
9ff60 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 61 73 73 6f 63 69 61 74 69 entity.As.EntityType.=.associati
9ff80 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 69 6e 64 65 78 29 2e on.AssociationEndMembers(index).
9ffa0 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 63 6f 64 65 GetEntityType()......Return.code
9ffc0 2e 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 63 6f 64 65 2e 45 73 63 61 70 65 4e 61 6d 65 73 .CreateFullName(code.EscapeNames
9ffe0 70 61 63 65 28 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 65 6e 74 69 74 79 2e 4e pace(GetObjectNamespace(entity.N
a0000 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 29 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 65 6e 74 69 amespaceName)),.code.Escape(enti
a0020 74 79 29 29 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 ty))..End.Function....Private.Fu
a0040 6e 63 74 69 6f 6e 20 47 65 74 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c 20 nction.GetObjectNamespace(ByVal.
a0060 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 csdlNamespaceName.As.String).As.
a0080 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 20 String......Dim.objectNamespace.
a00a0 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 49 66 20 45 64 6d 54 As.String.=.Nothing......If.EdmT
a00c0 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 54 72 79 47 65 74 56 61 6c 75 65 28 oObjectNamespaceMap.TryGetValue(
a00e0 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2c 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 csdlNamespaceName,.objectNamespa
a0100 63 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6f 62 6a 65 63 74 4e ce).Then..........Return.objectN
a0120 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 52 65 74 75 amespace......End.If........Retu
a0140 72 6e 20 63 73 64 6c 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d 0a 45 6e 64 20 46 75 6e 63 74 69 rn.csdlNamespaceName..End.Functi
a0160 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 75 62 20 55 70 64 61 74 65 4f 62 6a 65 63 74 4e 61 on....Private.Sub.UpdateObjectNa
a0180 6d 65 73 70 61 63 65 4d 61 70 28 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 mespaceMap(objectNamespace.As.St
a01a0 72 69 6e 67 29 0d 0a 20 20 20 20 49 66 20 4e 6f 74 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 ring)......If.Not.objectNamespac
a01c0 65 20 3d 20 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 45 e.=.ModelNamespace.AndAlso.Not.E
a01e0 64 6d 54 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 43 6f 6e 74 61 69 6e 73 4b dmToObjectNamespaceMap.ContainsK
a0200 65 79 28 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 20 20 20 20 45 64 6d 54 ey(ModelNamespace)..........EdmT
a0220 6f 4f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 4d 61 70 2e 41 64 64 28 4d 6f 64 65 6c 4e 61 6d oObjectNamespaceMap.Add(ModelNam
a0240 65 73 70 61 63 65 2c 20 6f 62 6a 65 63 74 4e 61 6d 65 73 70 61 63 65 29 0d 0a 20 20 20 20 45 6e espace,.objectNamespace)......En
a0260 64 20 49 66 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 68 61 72 65 d.If..End.Sub......Private.Share
a0280 64 20 46 75 6e 63 74 69 6f 6e 20 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 42 79 56 61 d.Function.FixParameterName(ByVa
a02a0 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 l.name.As.String,.ByVal.code.As.
a02c0 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a CodeGenerationTools).As.String..
a02e0 20 20 20 20 27 20 0d 0a 20 20 20 20 27 20 0d 0a 20 20 20 20 49 66 20 53 74 72 69 6e 67 43 6f 6d ....'.......'.......If.StringCom
a0300 70 61 72 65 72 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 2e 45 71 75 61 6c 73 28 6e parer.OrdinalIgnoreCase.Equals(n
a0320 61 6d 65 2c 20 22 69 64 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 27 20 0d 0a 20 20 20 ame,."id").Then..........'......
a0340 20 20 20 20 20 52 65 74 75 72 6e 20 22 69 64 22 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 .....Return."id"......End.If....
a0360 20 20 52 65 74 75 72 6e 20 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 6e 61 6d 65 29 0d 0a 45 ..Return.code.CamelCase(name)..E
a0380 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 nd.Function....Private.Function.
a03a0 42 61 73 65 54 79 70 65 4e 61 6d 65 28 42 79 56 61 6c 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 BaseTypeName(ByVal.entity.As.Ent
a03c0 69 74 79 54 79 70 65 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 ityType,.ByVal.code.As.CodeGener
a03e0 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 74 75 72 ationTools).As.String......Retur
a0400 6e 20 49 66 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 2c n.If(entity.BaseType.Is.Nothing,
a0420 20 22 45 6e 74 69 74 79 4f 62 6a 65 63 74 22 2c 20 4d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 ."EntityObject",.MultiSchemaEsca
a0440 70 65 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 2c 20 63 6f 64 65 29 29 0d 0a 45 6e 64 20 pe(entity.BaseType,.code))..End.
a0460 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 49 6e 63 Function....Private.Function.Inc
a0480 6c 75 64 65 50 72 6f 70 65 72 74 79 49 6e 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 28 42 79 56 61 ludePropertyInFactoryMethod(ByVa
a04a0 6c 20 66 61 63 74 6f 72 79 54 79 70 65 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 2c l.factoryType.As.StructuralType,
a04c0 20 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 .ByVal.edmProperty.As.EdmPropert
a04e0 79 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 49 66 20 65 64 6d 50 72 6f 70 65 72 74 y).As.Boolean......If.edmPropert
a0500 79 2e 4e 75 6c 6c 61 62 6c 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 y.Nullable.Then..........Return.
a0520 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 49 66 20 65 64 6d 50 False......End.If........If.edmP
a0540 72 6f 70 65 72 74 79 2e 44 65 66 61 75 6c 74 56 61 6c 75 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 roperty.DefaultValue.IsNot.Nothi
a0560 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 ng.Then..........Return.False...
a0580 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 49 66 20 28 41 63 63 65 73 73 69 62 69 6c 69 ...End.If........If.(Accessibili
a05a0 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 ty.ForReadOnlyProperty(edmProper
a05c0 74 79 29 20 3c 3e 20 22 50 75 62 6c 69 63 22 20 41 6e 64 41 6c 73 6f 20 41 63 63 65 73 73 69 62 ty).<>."Public".AndAlso.Accessib
a05e0 69 6c 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 ility.ForWriteOnlyProperty(edmPr
a0600 6f 70 65 72 74 79 29 20 3c 3e 20 22 50 75 62 6c 69 63 22 29 20 4f 72 45 6c 73 65 20 28 66 61 63 operty).<>."Public").OrElse.(fac
a0620 74 6f 72 79 54 79 70 65 20 49 73 4e 6f 74 20 65 64 6d 50 72 6f 70 65 72 74 79 2e 44 65 63 6c 61 toryType.IsNot.edmProperty.Decla
a0640 72 69 6e 67 54 79 70 65 20 41 6e 64 41 6c 73 6f 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 ringType.AndAlso.Accessibility.F
a0660 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 65 64 6d 50 72 6f 70 65 72 74 79 29 orWriteOnlyProperty(edmProperty)
a0680 20 3d 20 22 50 72 69 76 61 74 65 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 27 20 0d 0a .=."Private").Then..........'...
a06a0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 49 66 ........Return.False......End.If
a06c0 0d 0a 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f ........Return.True..End.Functio
a06e0 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 n....Private.Class.FactoryMethod
a0700 50 61 72 61 6d 65 74 65 72 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 6f 75 72 63 65 20 41 73 20 Parameter......Public.Source.As.
a0720 45 64 6d 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 61 77 50 61 72 61 6d EdmProperty......Public.RawParam
a0740 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 eterName.As.String......Public.P
a0760 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c arameterName.As.String......Publ
a0780 69 63 20 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 ic.ParameterType.As.String......
a07a0 50 75 62 6c 69 63 20 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 20 41 73 20 53 74 72 69 6e Public.ParameterComment.As.Strin
a07c0 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 20 41 73 20 42 g......Public.IsComplexType.As.B
a07e0 6f 6f 6c 65 61 6e 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 oolean........Public.Shared.Func
a0800 74 69 6f 6e 20 43 72 65 61 74 65 50 61 72 61 6d 65 74 65 72 73 28 42 79 56 61 6c 20 70 72 6f 70 tion.CreateParameters(ByVal.prop
a0820 65 72 74 69 65 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 64 6d 50 72 6f 70 erties.As.IEnumerable(Of.EdmProp
a0840 65 72 74 79 29 2c 20 42 79 56 61 6c 20 75 6e 69 71 75 65 20 41 73 20 55 6e 69 71 75 65 49 64 65 erty),.ByVal.unique.As.UniqueIde
a0860 6e 74 69 66 69 65 72 53 65 72 76 69 63 65 2c 20 42 79 56 61 6c 20 6d 75 6c 74 69 53 63 68 65 6d ntifierService,.ByVal.multiSchem
a0880 61 45 73 63 61 70 65 20 41 73 20 46 75 6e 63 28 4f 66 20 54 79 70 65 55 73 61 67 65 2c 20 43 6f aEscape.As.Func(Of.TypeUsage,.Co
a08a0 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2c 20 53 74 72 69 6e 67 29 2c 20 42 79 56 61 deGenerationTools,.String),.ByVa
a08c0 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 29 20 41 l.code.As.CodeGenerationTools).A
a08e0 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 s.IEnumerable(Of.FactoryMethodPa
a0900 72 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d 65 74 65 72 73 rameter)..........Dim.parameters
a0920 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 .As.New.List(Of.FactoryMethodPar
a0940 61 6d 65 74 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 65 64 6d 50 ameter)()..........For.Each.edmP
a0960 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 20 49 6e 20 70 72 6f 70 65 72 roperty.As.EdmProperty.In.proper
a0980 74 69 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 61 6d 65 74 65 72 20 ties..............Dim.parameter.
a09a0 41 73 20 4e 65 77 20 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 65 74 65 72 28 29 0d As.New.FactoryMethodParameter().
a09c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 20 3d 20 .............parameter.Source.=.
a09e0 65 64 6d 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 edmProperty..............paramet
a0a00 65 72 2e 49 73 43 6f 6d 70 6c 65 78 54 79 70 65 20 3d 20 54 79 70 65 4f 66 20 65 64 6d 50 72 6f er.IsComplexType.=.TypeOf.edmPro
a0a20 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6d 70 6c perty.TypeUsage.EdmType.Is.Compl
a0a40 65 78 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 52 61 exType..............parameter.Ra
a0a60 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e 41 64 6a 75 73 74 49 64 wParameterName.=.unique.AdjustId
a0a80 65 6e 74 69 66 69 65 72 28 46 69 78 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 65 64 6d 50 72 6f entifier(FixParameterName(edmPro
a0aa0 70 65 72 74 79 2e 4e 61 6d 65 2c 20 63 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 perty.Name,.code))..............
a0ac0 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 63 6f 64 65 2e 45 parameter.ParameterName.=.code.E
a0ae0 73 63 61 70 65 28 70 61 72 61 6d 65 74 65 72 2e 52 61 77 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 scape(parameter.RawParameterName
a0b00 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 )..............parameter.Paramet
a0b20 65 72 54 79 70 65 20 3d 20 6d 75 6c 74 69 53 63 68 65 6d 61 45 73 63 61 70 65 28 65 64 6d 50 72 erType.=.multiSchemaEscape(edmPr
a0b40 6f 70 65 72 74 79 2e 54 79 70 65 55 73 61 67 65 2c 20 63 6f 64 65 29 0d 0a 20 20 20 20 20 20 20 operty.TypeUsage,.code).........
a0b60 20 20 20 20 20 70 61 72 61 6d 65 74 65 72 2e 50 61 72 61 6d 65 74 65 72 43 6f 6d 6d 65 6e 74 20 .....parameter.ParameterComment.
a0b80 3d 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 =.String.Format(CultureInfo.Curr
a0ba0 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e entCulture,.CodeGenerationTools.
a0bc0 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 6f 6d 6d GetResourceString("Template_Comm
a0be0 65 6e 74 46 61 63 74 6f 72 79 4d 65 74 68 6f 64 50 61 72 61 6d 22 29 2c 20 65 64 6d 50 72 6f 70 entFactoryMethodParam"),.edmProp
a0c00 65 72 74 79 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 61 72 61 6d 65 74 65 erty.Name)..............paramete
a0c20 72 73 2e 41 64 64 28 70 61 72 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d rs.Add(parameter)..........Next.
a0c40 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 ...........Return.parameters....
a0c60 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 50 72 69 ..End.Function..End.Class....Pri
a0c80 76 61 74 65 20 50 72 6f 70 65 72 74 79 20 44 65 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d vate.Property.DefaultSummaryComm
a0ca0 65 6e 74 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 ent().As.String....Private.Funct
a0cc0 69 6f 6e 20 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 28 42 79 56 61 6c 20 69 74 65 6d 20 41 73 ion.SummaryComment(ByVal.item.As
a0ce0 20 4d 65 74 61 64 61 74 61 49 74 65 6d 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 .MetadataItem).As.String......If
a0d00 20 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e .item.Documentation.IsNot.Nothin
a0d20 67 20 41 6e 64 41 6c 73 6f 20 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 53 75 6d g.AndAlso.item.Documentation.Sum
a0d40 6d 61 72 79 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 mary.IsNot.Nothing.Then.........
a0d60 20 52 65 74 75 72 6e 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c 69 6e 65 43 6f .Return.PrefixLinesOfMultilineCo
a0d80 6d 6d 65 6e 74 28 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 20 26 20 22 20 22 2c 20 58 6d mment(XMLCOMMENT_START.&.".",.Xm
a0da0 6c 45 6e 74 69 74 79 69 7a 65 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 53 75 lEntityize(item.Documentation.Su
a0dc0 6d 6d 61 72 79 29 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 49 66 20 44 65 mmary))......End.If........If.De
a0de0 66 61 75 6c 74 53 75 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e faultSummaryComment.IsNot.Nothin
a0e00 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 65 66 61 75 6c 74 53 75 g.Then..........Return.DefaultSu
a0e20 6d 6d 61 72 79 43 6f 6d 6d 65 6e 74 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 mmaryComment......End.If........
a0e40 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f Return.String.Empty..End.Functio
a0e60 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 4c 6f 6e 67 44 65 73 63 72 69 n....Private.Function.LongDescri
a0e80 70 74 69 6f 6e 43 6f 6d 6d 65 6e 74 45 6c 65 6d 65 6e 74 28 42 79 56 61 6c 20 69 74 65 6d 20 41 ptionCommentElement(ByVal.item.A
a0ea0 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 2c 20 42 79 56 61 6c 20 69 6e 64 65 6e 74 4c 65 76 65 s.MetadataItem,.ByVal.indentLeve
a0ec0 6c 20 41 73 20 49 6e 74 65 67 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 l.As.Integer).As.String......If.
a0ee0 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 item.Documentation.IsNot.Nothing
a0f00 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 .AndAlso.Not.String.IsNullOrEmpt
a0f20 79 28 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 4c 6f 6e 67 44 65 73 63 72 69 70 y(item.Documentation.LongDescrip
a0f40 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6d 6d 65 6e 74 20 tion).Then..........Dim.comment.
a0f60 41 73 20 53 74 72 69 6e 67 20 3d 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 0d As.String.=.Environment.NewLine.
a0f80 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6c 69 6e 65 53 74 61 72 74 20 41 73 20 53 74 72 69 6e 67 .........Dim.lineStart.As.String
a0fa0 20 3d 20 43 6f 64 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c 65 .=.CodeRegion.GetIndent(indentLe
a0fc0 76 65 6c 29 20 2b 20 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 20 26 20 22 20 22 0d 0a 20 vel).+.XMLCOMMENT_START.&."."...
a0fe0 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 28 6c 69 6e 65 53 74 61 72 74 20 26 20 22 .......comment.+=.(lineStart.&."
a1000 3c 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 3e 22 29 20 2b 20 45 6e 76 69 72 6f 6e 6d 65 6e <LongDescription>").+.Environmen
a1020 74 2e 4e 65 77 4c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 6c 69 t.NewLine..........comment.+=.li
a1040 6e 65 53 74 61 72 74 20 2b 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 69 6c 69 6e 65 neStart.+.PrefixLinesOfMultiline
a1060 43 6f 6d 6d 65 6e 74 28 6c 69 6e 65 53 74 61 72 74 2c 20 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 Comment(lineStart,.XmlEntityize(
a1080 69 74 65 6d 2e 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 4c 6f 6e 67 44 65 73 63 72 69 70 74 69 item.Documentation.LongDescripti
a10a0 6f 6e 29 29 20 2b 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 0d 0a 20 20 20 20 on)).+.Environment.NewLine......
a10c0 20 20 20 20 63 6f 6d 6d 65 6e 74 20 2b 3d 20 6c 69 6e 65 53 74 61 72 74 20 26 20 22 3c 2f 4c 6f ....comment.+=.lineStart.&."</Lo
a10e0 6e 67 44 65 73 63 72 69 70 74 69 6f 6e 3e 22 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ngDescription>"..........Return.
a1100 63 6f 6d 6d 65 6e 74 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 comment......End.If......Return.
a1120 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 String.Empty..End.Function....Pr
a1140 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 50 72 65 66 69 78 4c 69 6e 65 73 4f 66 4d 75 6c 74 ivate.Function.PrefixLinesOfMult
a1160 69 6c 69 6e 65 43 6f 6d 6d 65 6e 74 28 42 79 56 61 6c 20 70 72 65 66 69 78 20 41 73 20 53 74 72 ilineComment(ByVal.prefix.As.Str
a1180 69 6e 67 2c 20 42 79 56 61 6c 20 63 6f 6d 6d 65 6e 74 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 ing,.ByVal.comment.As.String).As
a11a0 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 52 65 74 75 72 6e 20 63 6f 6d 6d 65 6e 74 2e 52 65 70 6c .String......Return.comment.Repl
a11c0 61 63 65 28 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 45 6e 76 69 72 6f 6e ace(Environment.NewLine,.Environ
a11e0 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 20 2b 20 70 72 65 66 69 78 29 0d 0a 45 6e 64 20 46 75 6e 63 ment.NewLine.+.prefix)..End.Func
a1200 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 50 61 72 61 6d 65 74 tion....Private.Function.Paramet
a1220 65 72 43 6f 6d 6d 65 6e 74 73 28 42 79 56 61 6c 20 70 61 72 61 6d 65 74 65 72 73 20 41 73 20 49 erComments(ByVal.parameters.As.I
a1240 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 54 75 70 6c 65 28 4f 66 20 53 74 72 69 6e 67 2c 20 53 Enumerable(Of.Tuple(Of.String,.S
a1260 74 72 69 6e 67 29 29 2c 20 42 79 56 61 6c 20 69 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e tring)),.ByVal.indentLevel.As.In
a1280 74 65 67 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 44 69 6d 20 62 75 69 6c 64 65 teger).As.String......Dim.builde
a12a0 72 20 41 73 20 4e 65 77 20 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 r.As.New.System.Text.StringBuild
a12c0 65 72 28 29 0d 0a 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 72 61 6d 65 74 65 72 20 41 73 20 er()......For.Each.parameter.As.
a12e0 54 75 70 6c 65 28 4f 66 20 53 74 72 69 6e 67 2c 20 53 74 72 69 6e 67 29 20 49 6e 20 70 61 72 61 Tuple(Of.String,.String).In.para
a1300 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 4c 69 meters..........builder.AppendLi
a1320 6e 65 28 29 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 43 6f 64 ne()..........builder.Append(Cod
a1340 65 52 65 67 69 6f 6e 2e 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 29 29 0d eRegion.GetIndent(indentLevel)).
a1360 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e 64 28 58 4d 4c 43 4f 4d 4d 45 .........builder.Append(XMLCOMME
a1380 4e 54 5f 53 54 41 52 54 29 0d 0a 20 20 20 20 20 20 20 20 62 75 69 6c 64 65 72 2e 41 70 70 65 6e NT_START)..........builder.Appen
a13a0 64 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 d(String.Format(CultureInfo.Inva
a13c0 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 22 7b 30 riantCulture,.".<param.name=""{0
a13e0 7d 22 22 3e 7b 31 7d 3c 2f 70 61 72 61 6d 3e 22 2c 20 70 61 72 61 6d 65 74 65 72 2e 49 74 65 6d }"">{1}</param>",.parameter.Item
a1400 31 2c 20 70 61 72 61 6d 65 74 65 72 2e 49 74 65 6d 32 29 29 0d 0a 20 20 20 20 4e 65 78 74 0d 0a 1,.parameter.Item2))......Next..
a1420 20 20 20 20 52 65 74 75 72 6e 20 62 75 69 6c 64 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a 45 ....Return.builder.ToString()..E
a1440 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 nd.Function....Private.Function.
a1460 58 6d 6c 45 6e 74 69 74 79 69 7a 65 28 42 79 56 61 6c 20 74 65 78 74 20 41 73 20 53 74 72 69 6e XmlEntityize(ByVal.text.As.Strin
a1480 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 g).As.String......If.String.IsNu
a14a0 6c 6c 4f 72 45 6d 70 74 79 28 74 65 78 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 llOrEmpty(text).Then..........Re
a14c0 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d turn.String.Empty......End.If...
a14e0 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 26 22 2c 20 22 26 .....text.=.text.Replace("&",."&
a1500 61 6d 70 3b 22 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 amp;")......text.=.text.Replace(
a1520 22 3c 22 2c 20 22 26 6c 74 3b 22 29 2e 52 65 70 6c 61 63 65 28 22 3e 22 2c 20 22 26 67 74 3b 22 "<",."&lt;").Replace(">",."&gt;"
a1540 29 0d 0a 20 20 20 20 44 69 6d 20 69 64 20 41 73 20 53 74 72 69 6e 67 20 3d 20 47 75 69 64 2e 4e )......Dim.id.As.String.=.Guid.N
a1560 65 77 47 75 69 64 28 29 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 ewGuid().ToString()......text.=.
a1580 74 65 78 74 2e 52 65 70 6c 61 63 65 28 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 text.Replace(Environment.NewLine
a15a0 2c 20 69 64 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 76 ,.id)......text.=.text.Replace(v
a15c0 62 43 72 2c 20 22 26 23 78 44 3b 22 29 2e 52 65 70 6c 61 63 65 28 76 62 4c 66 2c 20 22 26 23 78 bCr,."&#xD;").Replace(vbLf,."&#x
a15e0 41 3b 22 29 0d 0a 20 20 20 20 74 65 78 74 20 3d 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 69 64 A;")......text.=.text.Replace(id
a1600 2c 20 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 29 0d 0a 20 20 20 20 52 65 74 75 ,.Environment.NewLine)......Retu
a1620 72 6e 20 74 65 78 74 2e 52 65 70 6c 61 63 65 28 22 27 22 2c 20 22 26 61 70 6f 73 3b 22 29 2e 52 rn.text.Replace("'",."&apos;").R
a1640 65 70 6c 61 63 65 28 22 22 22 22 2c 20 22 26 71 75 6f 74 3b 22 29 0d 0a 45 6e 64 20 46 75 6e 63 eplace("""",."&quot;")..End.Func
a1660 74 69 6f 6e 0d 0a 0d 0a 43 6f 6e 73 74 20 58 4d 4c 43 4f 4d 4d 45 4e 54 5f 53 54 41 52 54 20 41 tion....Const.XMLCOMMENT_START.A
a1680 73 20 53 74 72 69 6e 67 20 3d 20 22 27 27 27 22 0d 0a 0d 0a 50 72 69 76 61 74 65 20 46 75 6e 63 s.String.=."'''"....Private.Func
a16a0 74 69 6f 6e 20 47 65 74 50 72 6f 70 65 72 74 69 65 73 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 tion.GetProperties(ByVal.type.As
a16c0 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 65 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 .StructuralType).As.IEnumerable(
a16e0 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 49 66 20 74 79 70 65 2e 42 75 69 Of.EdmProperty)......If.type.Bui
a1700 6c 74 49 6e 54 79 70 65 4b 69 6e 64 20 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 ltInTypeKind.=.BuiltInTypeKind.E
a1720 6e 74 69 74 79 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 ntityType.Then..........Return.D
a1740 69 72 65 63 74 43 61 73 74 28 74 79 70 65 2c 20 45 6e 74 69 74 79 54 79 70 65 29 2e 50 72 6f 70 irectCast(type,.EntityType).Prop
a1760 65 72 74 69 65 73 0d 0a 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e erties......Else..........Return
a1780 20 44 69 72 65 63 74 43 61 73 74 28 74 79 70 65 2c 20 43 6f 6d 70 6c 65 78 54 79 70 65 29 2e 50 .DirectCast(type,.ComplexType).P
a17a0 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 46 75 6e 63 74 roperties......End.If..End.Funct
a17c0 69 6f 6e 0d 0a 0d 0a 50 72 6f 74 65 63 74 65 64 20 53 75 62 20 56 65 72 69 66 79 47 65 74 74 65 ion....Protected.Sub.VerifyGette
a17e0 72 41 6e 64 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 rAndSetterAccessibilityCompatabi
a1800 6c 69 74 79 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 0d lity(ByVal.member.As.EdmMember).
a1820 0a 20 20 20 20 44 69 6d 20 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 .....Dim.rawGetterAccessibility.
a1840 41 73 20 53 74 72 69 6e 67 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 As.String.=.Accessibility.ForRea
a1860 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 6d 65 6d 62 65 72 29 0d 0a 20 20 20 20 44 69 6d 20 72 dOnlyProperty(member)......Dim.r
a1880 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 20 awSetterAccessibility.As.String.
a18a0 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 6f 70 =.Accessibility.ForWriteOnlyProp
a18c0 65 72 74 79 28 6d 65 6d 62 65 72 29 0d 0a 0d 0a 20 20 20 20 49 66 20 28 72 61 77 47 65 74 74 65 erty(member)........If.(rawGette
a18e0 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 22 46 72 69 65 6e 64 22 20 41 6e 64 41 6c 73 rAccessibility.=."Friend".AndAls
a1900 6f 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 22 50 72 6f 74 o.rawSetterAccessibility.=."Prot
a1920 65 63 74 65 64 22 29 20 4f 72 45 6c 73 65 20 28 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 ected").OrElse.(rawGetterAccessi
a1940 62 69 6c 69 74 79 20 3d 20 22 50 72 6f 74 65 63 74 65 64 22 20 41 6e 64 41 6c 73 6f 20 72 61 77 bility.=."Protected".AndAlso.raw
a1960 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 22 46 72 69 65 6e 64 22 29 20 SetterAccessibility.=."Friend").
a1980 54 68 65 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 Then............Errors.Add(New.S
a19a0 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 ystem.CodeDom.Compiler.CompilerE
a19c0 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 2d 31 2c 20 22 36 30 rror(SourceCsdlPath,.-1,.-1,."60
a19e0 33 33 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 33",.String.Format(CultureInfo.C
a1a00 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f urrentCulture,.CodeGenerationToo
a1a20 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 47 65 6e 65 72 61 74 65 64 50 ls.GetResourceString("GeneratedP
a1a40 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e 66 6c 69 63 74 22 29 2c 20 ropertyAccessibilityConflict"),.
a1a60 6d 65 6d 62 65 72 2e 4e 61 6d 65 2c 20 72 61 77 47 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c member.Name,.rawGetterAccessibil
a1a80 69 74 79 2c 20 72 61 77 53 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 29 29 0d 0a ity,.rawSetterAccessibility)))..
a1aa0 20 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 50 72 69 76 61 74 65 20 53 ....End.If..End.Sub....Private.S
a1ac0 75 62 20 56 65 72 69 66 79 45 6e 74 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 ub.VerifyEntityTypeAndSetAccessi
a1ae0 62 69 6c 69 74 79 43 6f 6d 70 61 74 61 62 69 6c 69 74 79 28 42 79 56 61 6c 20 65 6e 74 69 74 79 bilityCompatability(ByVal.entity
a1b00 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 29 0d 0a 20 20 20 20 44 69 6d 20 74 79 70 65 41 Set.As.EntitySet)......Dim.typeA
a1b20 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 2e ccess.As.String.=.Accessibility.
a1b40 46 6f 72 54 79 70 65 28 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 29 0d 0a ForType(entitySet.ElementType)..
a1b60 20 20 20 20 44 69 6d 20 73 65 74 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 41 63 ....Dim.setAccess.As.String.=.Ac
a1b80 63 65 73 73 69 62 69 6c 69 74 79 2e 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 cessibility.ForReadOnlyProperty(
a1ba0 65 6e 74 69 74 79 53 65 74 29 0d 0a 0d 0a 20 20 20 20 49 66 20 74 79 70 65 41 63 63 65 73 73 20 entitySet)........If.typeAccess.
a1bc0 3d 20 22 46 72 69 65 6e 64 22 20 41 6e 64 41 6c 73 6f 20 28 73 65 74 41 63 63 65 73 73 20 3d 20 =."Friend".AndAlso.(setAccess.=.
a1be0 22 50 75 62 6c 69 63 22 20 4f 72 45 6c 73 65 20 73 65 74 41 63 63 65 73 73 20 3d 20 22 50 72 6f "Public".OrElse.setAccess.=."Pro
a1c00 74 65 63 74 65 64 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 45 72 72 6f 72 73 2e 41 64 tected").Then..........Errors.Ad
a1c20 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f d(New.System.CodeDom.Compiler.Co
a1c40 6d 70 69 6c 65 72 45 72 72 6f 72 28 53 6f 75 72 63 65 43 73 64 6c 50 61 74 68 2c 20 2d 31 2c 20 mpilerError(SourceCsdlPath,.-1,.
a1c60 2d 31 2c 20 22 36 30 33 36 22 2c 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 -1,."6036",.String.Format(Cultur
a1c80 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 eInfo.CurrentCulture,.CodeGenera
a1ca0 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 45 6e 74 tionTools.GetResourceString("Ent
a1cc0 69 74 79 54 79 70 65 41 6e 64 53 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 43 6f 6e 66 6c 69 ityTypeAndSetAccessibilityConfli
a1ce0 63 74 22 29 2c 20 65 6e 74 69 74 79 53 65 74 2e 45 6c 65 6d 65 6e 74 54 79 70 65 2e 4e 61 6d 65 ct"),.entitySet.ElementType.Name
a1d00 2c 20 74 79 70 65 41 63 63 65 73 73 2c 20 65 6e 74 69 74 79 53 65 74 2e 4e 61 6d 65 2c 20 73 65 ,.typeAccess,.entitySet.Name,.se
a1d20 74 41 63 63 65 73 73 29 29 29 0d 0a 20 20 20 20 45 6e 64 20 49 66 0d 0a 45 6e 64 20 53 75 62 0d tAccess)))......End.If..End.Sub.
a1d40 0a 0d 0a 50 72 69 76 61 74 65 20 53 75 62 20 44 65 66 69 6e 65 4d 65 74 61 64 61 74 61 28 29 0d ...Private.Sub.DefineMetadata().
a1d60 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 28 4d 65 74 61 64 61 74 61 43 6f .....TemplateMetadata(MetadataCo
a1d80 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 4e 41 4d 45 29 20 3d 20 22 56 42 43 nstants.TT_TEMPLATE_NAME).=."VBC
a1da0 6f 64 65 47 65 6e 22 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 28 4d 65 odeGen"......TemplateMetadata(Me
a1dc0 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 tadataConstants.TT_TEMPLATE_VERS
a1de0 49 4f 4e 29 20 3d 20 22 35 2e 30 22 0d 0a 20 20 20 20 54 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 ION).=."5.0"......TemplateMetada
a1e00 74 61 28 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 4d 49 4e 49 4d 55 4d 5f ta(MetadataConstants.TT_MINIMUM_
a1e20 45 4e 54 49 54 59 5f 46 52 41 4d 45 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 29 20 3d 20 22 35 2e 30 ENTITY_FRAMEWORK_VERSION).=."5.0
a1e40 22 0d 0a 45 6e 64 20 53 75 62 0d 0a 0d 0a 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 "..End.Sub....Private.NotInherit
a1e60 61 62 6c 65 20 43 6c 61 73 73 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 69 able.Class.UniqueIdentifierServi
a1e80 63 65 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 6b 6e 6f 77 6e 49 ce......Private.ReadOnly._knownI
a1ea0 64 65 6e 74 69 66 69 65 72 73 20 41 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 dentifiers.As.HashSet(Of.String)
a1ec0 20 3d 20 4e 65 77 20 48 61 73 68 53 65 74 28 4f 66 20 73 74 72 69 6e 67 29 28 53 74 72 69 6e 67 .=.New.HashSet(Of.string)(String
a1ee0 43 6f 6d 70 61 72 65 72 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 0d 0a 0d 0a 20 Comparer.OrdinalIgnoreCase).....
a1f00 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 0d 0a 20 20 20 20 ...'''.<summary>......'''.......
a1f20 27 27 27 20 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 '''.......'''.</summary>......Pu
a1f40 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 69 blic.Function.AdjustIdentifier(i
a1f60 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a dentifier.As.String).As.String..
a1f80 20 20 20 20 20 20 20 20 27 20 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6e 75 6d 62 65 72 4f 66 ........'...........Dim.numberOf
a1fa0 43 6f 6e 66 6c 69 63 74 73 20 41 73 20 49 6e 74 33 32 20 3d 20 30 0d 0a 20 20 20 20 20 20 20 20 Conflicts.As.Int32.=.0..........
a1fc0 44 69 6d 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 Dim.adjustedIdentifier.As.String
a1fe0 20 3d 20 69 64 65 6e 74 69 66 69 65 72 0d 0a 20 20 20 20 20 20 20 20 57 68 69 6c 65 20 4e 6f 74 .=.identifier..........While.Not
a2000 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 2e 41 64 64 28 61 64 6a 75 73 74 65 64 49 ._knownIdentifiers.Add(adjustedI
a2020 64 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 75 6d 62 65 72 4f 66 dentifier)..............numberOf
a2040 43 6f 6e 66 6c 69 63 74 73 20 2b 3d 20 31 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 64 6a 75 Conflicts.+=.1..............adju
a2060 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 3d 20 69 64 65 6e 74 69 66 69 65 72 20 2b 20 6e 75 stedIdentifier.=.identifier.+.nu
a2080 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 mberOfConflicts.ToString(Culture
a20a0 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 0d 0a 20 20 20 20 20 20 20 20 Info.InvariantCulture)..........
a20c0 45 6e 64 20 57 68 69 6c 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 61 64 6a 75 End.While............Return.adju
a20e0 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e stedIdentifier......End.Function
a2100 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0a 0a 0d 0a 27 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 ..End.Class......'.Copyright.(c)
a2120 20 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 2e 20 20 41 6c 6c 20 72 69 67 .Microsoft.Corporation...All.rig
a2140 68 74 73 20 72 65 73 65 72 76 65 64 2e 0d 0a 0d 0a 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 54 hts.reserved.....Public.Shared.T
a2160 65 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 20 41 73 20 4e 65 77 20 44 69 63 74 69 6f 6e 61 72 emplateMetadata.As.New.Dictionar
a2180 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 53 74 72 69 6e 67 29 28 29 0d 0a 0d 0a 27 27 27 20 3c 73 y(Of.String,.String)()....'''.<s
a21a0 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 68 65 6c ummary>..'''.Responsible.for.hel
a21c0 70 69 6e 67 20 74 6f 20 63 72 65 61 74 65 20 73 6f 75 72 63 65 20 63 6f 64 65 20 74 68 61 74 20 ping.to.create.source.code.that.
a21e0 69 73 0d 0a 27 27 27 20 63 6f 72 72 65 63 74 6c 79 20 66 6f 72 6d 61 74 65 64 20 61 6e 64 20 66 is..'''.correctly.formated.and.f
a2200 75 6e 63 74 69 6f 6e 61 6c 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 unctional..'''.</summary>..Publi
a2220 63 20 43 6c 61 73 73 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 0d 0a 20 20 20 c.Class.CodeGenerationTools.....
a2240 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d .Private.ReadOnly._textTransform
a2260 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 ation.As.DynamicTextTransformati
a2280 6f 6e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 63 6f 64 65 20 41 on......Private.ReadOnly._code.A
a22a0 73 20 56 42 43 6f 64 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 s.VBCodeProvider......Private.Re
a22c0 61 64 4f 6e 6c 79 20 5f 65 66 20 41 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 0d 0a 0d 0a 20 adOnly._ef.As.MetadataTools.....
a22e0 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 ...'''.<summary>......'''.Initia
a2300 6c 69 7a 65 73 20 61 20 6e 65 77 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 20 lizes.a.new.CodeGenerationTools.
a2320 6f 62 6a 65 63 74 20 77 69 74 68 20 74 68 65 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 object.with.the.TextTransformati
a2340 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 0d 0a 20 20 20 20 27 27 27 on.(T4.generated.class)......'''
a2360 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 2e 0d 0a 20 20 20 .that.is.currently.running......
a2380 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 .'''.</summary>......Public.Sub.
a23a0 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 New(ByVal.textTransformation.As.
a23c0 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 Object)..........If.textTransfor
a23e0 6d 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 mation.Is.Nothing.Then..........
a2400 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 ....Throw.New.ArgumentNullExcept
a2420 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 ion("textTransformation").......
a2440 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 ...End.If............_textTransf
a2460 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 ormation.=.DynamicTextTransforma
a2480 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d tion.Create(textTransformation).
a24a0 0a 20 20 20 20 20 20 20 20 5f 63 6f 64 65 20 3d 20 4e 65 77 20 56 42 43 6f 64 65 50 72 6f 76 69 ........._code.=.New.VBCodeProvi
a24c0 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 5f 65 66 20 3d 20 4e 65 77 20 4d 65 74 61 64 61 74 der().........._ef.=.New.Metadat
a24e0 61 54 6f 6f 6c 73 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 aTools(_textTransformation).....
a2500 20 20 20 20 20 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 46 .....FullyQualifySystemTypes.=.F
a2520 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 alse..........CamelCaseFields.=.
a2540 54 72 75 65 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 True......End.Sub........'''.<su
a2560 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 57 68 65 6e 20 74 72 75 65 2c 20 61 6c 6c 20 74 mmary>......'''.When.true,.all.t
a2580 79 70 65 73 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 ypes.that.are.not.being.generate
a25a0 64 0d 0a 20 20 20 20 27 27 27 20 61 72 65 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 74 d......'''.are.fully.qualified.t
a25c0 6f 20 6b 65 65 70 20 74 68 65 6d 20 66 72 6f 6d 20 63 6f 6e 66 6c 69 63 74 69 6e 67 20 77 69 74 o.keep.them.from.conflicting.wit
a25e0 68 0d 0a 20 20 20 20 27 27 27 20 74 79 70 65 73 20 74 68 61 74 20 61 72 65 20 62 65 69 6e 67 20 h......'''.types.that.are.being.
a2600 67 65 6e 65 72 61 74 65 64 2e 20 55 73 65 66 75 6c 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 0d generated..Useful.when.you.have.
a2620 0a 20 20 20 20 27 27 27 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 61 20 74 79 70 65 20 62 .....'''.something.like.a.type.b
a2640 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 20 6e 61 6d 65 64 20 53 79 73 74 65 6d 2e 0d 0a 20 20 eing.generated.named.System.....
a2660 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 44 65 66 61 75 6c 74 20 69 73 20 66 61 6c 73 65 2e ..'''......'''.Default.is.false.
a2680 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 ......'''.</summary>......Privat
a26a0 65 20 5f 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 41 73 20 42 6f e._FullyQualifySystemTypes.As.Bo
a26c0 6f 6c 65 61 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 75 6c 6c 79 olean......Public.Property.Fully
a26e0 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d QualifySystemTypes().As.Boolean.
a2700 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e .........Get..............Return
a2720 20 5f 46 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 20 ._FullyQualifySystemTypes.......
a2740 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 ...End.Get..........Set(ByVal.va
a2760 6c 75 65 20 41 73 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 46 75 lue.As.Boolean).............._Fu
a2780 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 3d 20 76 61 6c 75 65 0d 0a 20 llyQualifySystemTypes.=.value...
a27a0 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 .......End.Set......End.Property
a27c0 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 57 ........'''.<summary>......'''.W
a27e0 68 65 6e 20 74 72 75 65 2c 20 74 68 65 20 66 69 65 6c 64 20 6e 61 6d 65 73 20 61 72 65 20 43 61 hen.true,.the.field.names.are.Ca
a2800 6d 65 6c 20 43 61 73 65 64 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 74 68 mel.Cased,......'''.otherwise.th
a2820 65 79 20 77 69 6c 6c 20 70 72 65 73 65 72 76 65 20 74 68 65 20 63 61 73 65 20 74 68 65 79 0d 0a ey.will.preserve.the.case.they..
a2840 20 20 20 20 27 27 27 20 73 74 61 72 74 20 77 69 74 68 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 ....'''.start.with.......'''....
a2860 20 20 27 27 27 20 44 65 66 61 75 6c 74 20 69 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 ..'''.Default.is.true.......'''.
a2880 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 43 61 6d 65 6c 43 61 </summary>......Private._CamelCa
a28a0 73 65 46 69 65 6c 64 73 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 seFields.As.Boolean......Public.
a28c0 50 72 6f 70 65 72 74 79 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 28 29 20 41 73 20 42 6f Property.CamelCaseFields().As.Bo
a28e0 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 olean..........Get..............
a2900 52 65 74 75 72 6e 20 5f 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 20 20 20 Return._CamelCaseFields.........
a2920 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 .End.Get..........Set(ByVal.valu
a2940 65 20 41 73 20 42 6f 6f 6c 65 61 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 43 61 6d 65 e.As.Boolean).............._Came
a2960 6c 43 61 73 65 46 69 65 6c 64 73 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 lCaseFields.=.value..........End
a2980 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 .Set......End.Property........''
a29a0 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 '.<summary>......'''.Returns.the
a29c0 20 4e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 73 75 67 67 65 73 74 65 64 20 62 79 20 56 53 20 69 .NamespaceName.suggested.by.VS.i
a29e0 66 20 72 75 6e 6e 69 6e 67 20 69 6e 73 69 64 65 20 56 53 2e 20 4f 74 68 65 72 77 69 73 65 2c 20 f.running.inside.VS..Otherwise,.
a2a00 72 65 74 75 72 6e 73 0d 0a 20 20 20 20 27 27 27 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 returns......'''.null.......'''.
a2a20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </summary>......Public.Function.
a2a40 56 73 4e 61 6d 65 73 70 61 63 65 53 75 67 67 65 73 74 69 6f 6e 28 29 20 41 73 20 53 74 72 69 6e VsNamespaceSuggestion().As.Strin
a2a60 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 75 67 67 65 73 74 69 6f 6e 20 41 73 20 53 74 72 g..........Dim.suggestion.As.Str
a2a80 69 6e 67 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 ing.=._textTransformation.Host.R
a2aa0 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 22 64 69 72 65 63 74 69 76 65 49 esolveParameterValue("directiveI
a2ac0 64 22 2c 20 22 6e 61 6d 65 73 70 61 63 65 44 69 72 65 63 74 69 76 65 50 72 6f 63 65 73 73 6f 72 d",."namespaceDirectiveProcessor
a2ae0 22 2c 20 22 6e 61 6d 65 73 70 61 63 65 48 69 6e 74 22 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 ",."namespaceHint")..........If.
a2b00 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 75 67 67 65 73 74 69 6f 6e 29 String.IsNullOrEmpty(suggestion)
a2b20 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e .Then..............Return.Nothin
a2b40 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 g..........End.If............Ret
a2b60 75 72 6e 20 73 75 67 67 65 73 74 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e urn.suggestion......End.Function
a2b80 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 ........'''.<summary>......'''.R
a2ba0 65 74 75 72 6e 73 20 61 20 73 74 72 69 6e 67 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 eturns.a.string.that.is.safe.for
a2bc0 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 20 69 6e 20 43 23 2e 0d 0a 20 20 .use.as.an.identifier.in.C#.....
a2be0 20 20 27 27 27 20 4b 65 79 77 6f 72 64 73 20 61 72 65 20 65 73 63 61 70 65 64 2e 0d 0a 20 20 20 ..'''.Keywords.are.escaped......
a2c00 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 .'''.</summary>......Public.Func
a2c20 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 tion.Escape(ByVal.name.As.String
a2c40 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 6d 65 20 49 73 20 ).As.String..........If.name.Is.
a2c60 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e Nothing.Then..............Return
a2c80 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 .Nothing..........End.If........
a2ca0 20 20 20 20 52 65 74 75 72 6e 20 5f 63 6f 64 65 2e 43 72 65 61 74 65 45 73 63 61 70 65 64 49 64 ....Return._code.CreateEscapedId
a2cc0 65 6e 74 69 66 69 65 72 28 6e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e entifier(name)......End.Function
a2ce0 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 ........'''.<summary>......'''.R
a2d00 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 55 73 61 67 65 eturns.the.name.of.the.TypeUsage
a2d20 27 73 20 45 64 6d 54 79 70 65 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 's.EdmType.that.is.safe.for.....
a2d40 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 .'''.use.as.an.identifier.......
a2d60 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 '''.</summary>......Public.Funct
a2d80 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 ion.Escape(ByVal.typeUsage.As.Ty
a2da0 70 65 55 73 61 67 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 peUsage).As.String..........If.t
a2dc0 79 70 65 55 73 61 67 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 ypeUsage.Is.Nothing.Then........
a2de0 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e ......Return.Nothing..........En
a2e00 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 d.If............If.TypeOf.typeUs
a2e20 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 4f 72 45 6c 73 age.EdmType.Is.ComplexType.OrEls
a2e40 65 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 45 6e e.TypeOf.typeUsage.EdmType.Is.En
a2e60 74 69 74 79 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 tityType.Then..............Retur
a2e80 6e 20 45 73 63 61 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2e 4e 61 6d 65 29 n.Escape(typeUsage.EdmType.Name)
a2ea0 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 ..........ElseIf.TypeOf.typeUsag
a2ec0 65 2e 45 64 6d 54 79 70 65 20 49 73 20 53 69 6d 70 6c 65 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 e.EdmType.Is.SimpleType.Then....
a2ee0 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 63 6c 72 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 ..........Dim.clrType.As.Type.=.
a2f00 5f 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 67 65 2e _ef.UnderlyingClrType(typeUsage.
a2f20 45 64 6d 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 4e 61 EdmType)..............Dim.typeNa
a2f40 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 49 66 28 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 me.As.String.=.If(TypeOf.typeUsa
a2f60 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 45 6e 75 6d 54 79 70 65 2c 20 45 73 63 61 70 65 28 74 ge.EdmType.Is.EnumType,.Escape(t
a2f80 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2e 4e 61 6d 65 29 2c 20 45 73 63 61 70 65 28 63 ypeUsage.EdmType.Name),.Escape(c
a2fa0 6c 72 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 63 6c 72 54 79 70 65 lrType))..............If.clrType
a2fc0 2e 49 73 56 61 6c 75 65 54 79 70 65 20 41 6e 64 41 6c 73 6f 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 .IsValueType.AndAlso._ef.IsNulla
a2fe0 62 6c 65 28 74 79 70 65 55 73 61 67 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ble(typeUsage).Then.............
a3000 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 .....Return.String.Format(Cultur
a3020 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c eInfo.InvariantCulture,."Nullabl
a3040 65 28 4f 66 20 7b 30 7d 29 22 2c 20 74 79 70 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 e(Of.{0})",.typeName)...........
a3060 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ...End.If................Return.
a3080 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 54 79 70 65 4f 66 20 typeName..........ElseIf.TypeOf.
a30a0 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 typeUsage.EdmType.Is.CollectionT
a30c0 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 ype.Then..............Return.Str
a30e0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 ing.Format(CultureInfo.Invariant
a3100 43 75 6c 74 75 72 65 2c 20 22 49 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 7b 30 7d 29 22 2c 20 Culture,."ICollection(Of.{0})",.
a3120 45 73 63 61 70 65 28 44 69 72 65 63 74 43 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 Escape(DirectCast(typeUsage.EdmT
a3140 79 70 65 2c 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 2e 54 79 70 65 55 73 61 67 65 29 29 ype,.CollectionType).TypeUsage))
a3160 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 54 68 72 6f ..........End.If............Thro
a3180 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 74 79 70 65 55 73 61 w.New.ArgumentException("typeUsa
a31a0 67 65 22 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 ge")......End.Function........''
a31c0 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 '.<summary>......'''.Returns.the
a31e0 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 4d 65 6d 62 65 72 20 74 68 61 74 20 69 73 20 73 .name.of.the.EdmMember.that.is.s
a3200 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 afe.for......'''.use.as.an.ident
a3220 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ifier.......'''.</summary>......
a3240 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 6d 65 6d Public.Function.Escape(ByVal.mem
a3260 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 ber.As.EdmMember).As.String.....
a3280 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a .....If.member.Is.Nothing.Then..
a32a0 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 ............Return.Nothing......
a32c0 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 ....End.If............Return.Esc
a32e0 61 70 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 ape(member.Name)......End.Functi
a3300 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 on........'''.<summary>......'''
a3320 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 54 79 70 65 .Returns.the.name.of.the.EdmType
a3340 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 .that.is.safe.for......'''.use.a
a3360 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d s.an.identifier.......'''.</summ
a3380 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 ary>......Public.Function.Escape
a33a0 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 53 74 72 69 6e (ByVal.type.As.EdmType).As.Strin
a33c0 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 g..........If.type.Is.Nothing.Th
a33e0 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a en..............Return.Nothing..
a3400 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ........End.If............Return
a3420 20 45 73 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 .Escape(type.Name)......End.Func
a3440 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 tion........'''.<summary>......'
a3460 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 64 6d 46 75 ''.Returns.the.name.of.the.EdmFu
a3480 6e 63 74 69 6f 6e 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 nction.that.is.safe.for......'''
a34a0 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 .use.as.an.identifier.......'''.
a34c0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </summary>......Public.Function.
a34e0 45 73 63 61 70 65 28 42 79 56 61 6c 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 20 45 64 6d 46 Escape(ByVal.edmFunction.As.EdmF
a3500 75 6e 63 74 69 6f 6e 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 unction).As.String..........If.e
a3520 64 6d 46 75 6e 63 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 dmFunction.Is.Nothing.Then......
a3540 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 ........Return.Nothing..........
a3560 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 End.If............Return.Escape(
a3580 65 64 6d 46 75 6e 63 74 69 6f 6e 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 edmFunction.Name)......End.Funct
a35a0 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
a35c0 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 75 6d 4d 65 '.Returns.the.name.of.the.EnumMe
a35e0 6d 62 65 72 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 mber.that.is.safe.for......'''.u
a3600 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f se.as.an.identifier.......'''.</
a3620 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 summary>......Public.Function.Es
a3640 63 61 70 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 6e 75 6d 4d 65 6d 62 65 72 29 cape(ByVal.member.As.EnumMember)
a3660 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 .As.String..........If.member.Is
a3680 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 .Nothing.Then..............Retur
a36a0 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 n.Nothing..........End.If.......
a36c0 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 0d .....Return.Escape(member.Name).
a36e0 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c .....End.Function..........'''.<
a3700 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 summary>......'''.Returns.the.na
a3720 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 20 74 68 61 74 20 69 me.of.the.EntityContainer.that.i
a3740 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 s.safe.for......'''.use.as.an.id
a3760 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 entifier.......'''.</summary>...
a3780 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 ...Public.Function.Escape(ByVal.
a37a0 63 6f 6e 74 61 69 6e 65 72 20 41 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 20 41 73 container.As.EntityContainer).As
a37c0 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 6e 74 61 69 6e 65 72 20 49 73 .String..........If.container.Is
a37e0 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 .Nothing.Then..............Retur
a3800 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 n.Nothing..........End.If.......
a3820 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 63 6f 6e 74 61 69 6e 65 72 2e 4e 61 6d .....Return.Escape(container.Nam
a3840 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 e)......End.Function........'''.
a3860 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e <summary>......'''.Returns.the.n
a3880 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 53 65 74 20 74 68 61 74 20 69 73 20 73 61 66 ame.of.the.EntitySet.that.is.saf
a38a0 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 e.for......'''.use.as.an.identif
a38c0 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 ier.......'''.</summary>......Pu
a38e0 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 65 64 6d 53 65 blic.Function.Escape(ByVal.edmSe
a3900 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 t.As.EntitySet).As.String.......
a3920 20 20 20 49 66 20 65 64 6d 53 65 74 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 ...If.edmSet.Is.Nothing.Then....
a3940 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 ..........Return.Nothing........
a3960 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 ..End.If............Return.Escap
a3980 65 28 65 64 6d 53 65 74 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e e(edmSet.Name)......End.Function
a39a0 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 ........'''.<summary>......'''.R
a39c0 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 53 74 72 75 63 74 75 72 61 eturns.the.name.of.the.Structura
a39e0 6c 54 79 70 65 20 74 68 61 74 20 69 73 20 73 61 66 65 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 lType.that.is.safe.for......'''.
a3a00 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 20 3c use.as.an.identifier.......'''.<
a3a20 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 /summary>......Public.Function.E
a3a40 73 63 61 70 65 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 scape(ByVal.type.As.StructuralTy
a3a60 70 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 20 49 pe).As.String..........If.type.I
a3a80 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 s.Nothing.Then..............Retu
a3aa0 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 rn.Nothing..........End.If......
a3ac0 20 20 20 20 20 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 74 79 70 65 2e 4e 61 6d 65 29 0d 0a ......Return.Escape(type.Name)..
a3ae0 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d ....End.Function........'''.<sum
a3b00 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 4e 61 6d 65 73 mary>......'''.Returns.the.Names
a3b20 70 61 63 65 4e 61 6d 65 20 77 69 74 68 20 65 61 63 68 20 73 65 67 6d 65 6e 74 20 73 61 66 65 20 paceName.with.each.segment.safe.
a3b40 74 6f 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 6e 20 69 64 65 6e 74 69 66 69 65 72 to......'''.use.as.an.identifier
a3b60 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 .......'''.</summary>......Publi
a3b80 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c c.Function.EscapeNamespace(ByVal
a3ba0 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 .namespaceName.As.String).As.Str
a3bc0 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 ing..........If.String.IsNullOrE
a3be0 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 mpty(namespaceName).Then........
a3c00 20 20 20 20 20 20 52 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d 0a 20 20 20 20 ......Return.namespaceName......
a3c20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 61 72 74 73 20 ....End.If............Dim.parts.
a3c40 41 73 20 53 74 72 69 6e 67 28 29 20 3d 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 2e 53 70 6c 69 As.String().=.namespaceName.Spli
a3c60 74 28 22 2e 22 63 29 0d 0a 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3d t("."c)..........namespaceName.=
a3c80 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 .String.Empty..........For.Each.
a3ca0 70 61 72 74 20 41 73 20 53 74 72 69 6e 67 20 49 6e 20 70 61 72 74 73 0d 0a 20 20 20 20 20 20 20 part.As.String.In.parts.........
a3cc0 20 20 20 20 20 49 66 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 3c 3e 20 53 74 72 69 6e 67 2e .....If.namespaceName.<>.String.
a3ce0 45 6d 70 74 79 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 Empty.Then..................name
a3d00 73 70 61 63 65 4e 61 6d 65 20 2b 3d 20 22 2e 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e spaceName.+=."."..............En
a3d20 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d d.If................namespaceNam
a3d40 65 20 2b 3d 20 45 73 63 61 70 65 28 70 61 72 74 29 0d 0a 20 20 20 20 20 20 20 20 4e 65 78 74 0d e.+=.Escape(part)..........Next.
a3d60 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 0d ...........Return.namespaceName.
a3d80 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
a3da0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 mmary>......'''.Returns.the.name
a3dc0 20 6f 66 20 74 68 65 20 45 64 6d 4d 65 6d 62 65 72 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d .of.the.EdmMember.formatted.for.
a3de0 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e 74 69 66 69 .....'''.use.as.a.field.identifi
a3e00 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 6f er.......'''......'''.This.metho
a3e20 64 20 63 68 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 d.changes.behavior.based.on.the.
a3e40 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 0d 0a 20 20 20 20 27 27 27 20 73 65 74 74 69 6e 67 CamelCaseFields......'''.setting
a3e60 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 .......'''.</summary>......Publi
a3e80 63 20 46 75 6e 63 74 69 6f 6e 20 46 69 65 6c 64 4e 61 6d 65 28 42 79 56 61 6c 20 6d 65 6d 62 65 c.Function.FieldName(ByVal.membe
a3ea0 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 r.As.EdmMember).As.String.......
a3ec0 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 ...If.member.Is.Nothing.Then....
a3ee0 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 ..........Return.Nothing........
a3f00 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 69 65 6c 64 ..End.If............Return.Field
a3f20 4e 61 6d 65 28 6d 65 6d 62 65 72 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 Name(member.Name)......End.Funct
a3f40 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
a3f60 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 '.Returns.the.name.of.the.Entity
a3f80 53 65 74 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 61 Set.formatted.for......'''.use.a
a3fa0 73 20 61 20 66 69 65 6c 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a s.a.field.identifier.......'''..
a3fc0 20 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 68 61 6e 67 65 73 20 62 65 68 61 ....'''.This.method.changes.beha
a3fe0 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 vior.based.on.the.CamelCaseField
a4000 73 0d 0a 20 20 20 20 27 27 27 20 73 65 74 74 69 6e 67 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 s......'''.setting.......'''.</s
a4020 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 46 69 65 ummary>......Public.Function.Fie
a4040 6c 64 4e 61 6d 65 28 42 79 56 61 6c 20 65 64 6d 53 65 74 20 41 73 20 45 6e 74 69 74 79 53 65 74 ldName(ByVal.edmSet.As.EntitySet
a4060 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 53 65 74 20 49 ).As.String..........If.edmSet.I
a4080 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 s.Nothing.Then..............Retu
a40a0 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 0d 0a rn.Nothing..........End.If......
a40c0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 69 65 6c 64 4e 61 6d 65 28 65 64 6d 53 65 74 2e ........Return.FieldName(edmSet.
a40e0 4e 61 6d 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 Name)......End.Function........P
a4100 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 46 69 65 6c 64 4e 61 6d 65 28 42 79 56 61 6c 20 rivate.Function.FieldName(ByVal.
a4120 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 name.As.String).As.String.......
a4140 20 20 20 49 66 20 43 61 6d 65 6c 43 61 73 65 46 69 65 6c 64 73 20 54 68 65 6e 0d 0a 20 20 20 20 ...If.CamelCaseFields.Then......
a4160 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 5f 22 20 26 20 43 61 6d 65 6c 43 61 73 65 28 6e ........Return."_".&.CamelCase(n
a4180 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ame)..........Else..............
a41a0 52 65 74 75 72 6e 20 22 5f 22 20 26 20 6e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 Return."_".&.name..........End.I
a41c0 66 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c f......End.Function........'''.<
a41e0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 summary>......'''.Returns.the.na
a4200 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 20 6f 62 6a 65 63 74 20 66 6f 72 6d 61 74 74 65 64 20 me.of.the.Type.object.formatted.
a4220 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 63 6f 64 65 2e for......'''.use.in.source.code.
a4240 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 ......'''......'''.This.method.c
a4260 68 61 6e 67 65 73 20 62 65 68 61 76 69 6f 72 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 46 75 6c hanges.behavior.based.on.the.Ful
a4280 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 0d 0a 20 20 20 20 27 27 27 20 73 65 lyQualifySystemTypes......'''.se
a42a0 74 74 69 6e 67 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 tting.......'''.</summary>......
a42c0 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 42 79 56 61 6c 20 63 6c 72 Public.Function.Escape(ByVal.clr
a42e0 54 79 70 65 20 41 73 20 54 79 70 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 Type.As.Type).As.String.........
a4300 20 52 65 74 75 72 6e 20 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 2c 20 46 75 6c 6c 79 51 75 61 .Return.Escape(clrType,.FullyQua
a4320 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 lifySystemTypes)......End.Functi
a4340 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 on........'''.<summary>......'''
a4360 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 54 79 70 65 20 6f 62 .Returns.the.name.of.the.Type.ob
a4380 6a 65 63 74 20 66 6f 72 6d 61 74 74 65 64 20 66 6f 72 0d 0a 20 20 20 20 27 27 27 20 75 73 65 20 ject.formatted.for......'''.use.
a43a0 69 6e 20 73 6f 75 72 63 65 20 63 6f 64 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 in.source.code.......'''.</summa
a43c0 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 45 73 63 61 70 65 28 ry>......Public.Function.Escape(
a43e0 42 79 56 61 6c 20 63 6c 72 54 79 70 65 20 41 73 20 54 79 70 65 2c 20 42 79 56 61 6c 20 66 75 6c ByVal.clrType.As.Type,.ByVal.ful
a4400 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 20 41 73 20 42 6f 6f 6c 65 61 6e 29 lyQualifySystemTypes.As.Boolean)
a4420 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6c 72 54 79 70 65 20 49 .As.String..........If.clrType.I
a4440 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 s.Nothing.Then..............Retu
a4460 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 rn.Nothing..........End.If......
a4480 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 ......Dim.typeName.As.String....
a44a0 20 20 20 20 20 20 49 66 20 66 75 6c 6c 79 51 75 61 6c 69 66 79 53 79 73 74 65 6d 54 79 70 65 73 ......If.fullyQualifySystemTypes
a44c0 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 28 4e 6f 74 20 63 6c 72 54 79 70 .Then..............If(Not.clrTyp
a44e0 65 2e 49 73 41 72 72 61 79 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.IsArray).Then.................
a4500 20 74 79 70 65 4e 61 6d 65 20 3d 20 63 6c 72 54 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 0d 0a 20 20 .typeName.=.clrType.FullName....
a4520 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........Else..................
a4540 74 79 70 65 4e 61 6d 65 20 3d 20 63 6c 72 54 79 70 65 2e 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 typeName.=.clrType.GetElementTyp
a4560 65 28 29 2e 46 75 6c 6c 4e 61 6d 65 20 26 20 22 28 29 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 e().FullName.&."()".............
a4580 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 .End.If................typeName.
a45a0 3d 20 22 47 6c 6f 62 61 6c 2e 22 20 26 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 =."Global.".&.typeName..........
a45c0 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 5f 63 6f Else..............typeName.=._co
a45e0 64 65 2e 47 65 74 54 79 70 65 4f 75 74 70 75 74 28 4e 65 77 20 43 6f 64 65 54 79 70 65 52 65 66 de.GetTypeOutput(New.CodeTypeRef
a4600 65 72 65 6e 63 65 28 63 6c 72 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 erence(clrType))..........End.If
a4620 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 45 ..........Return.typeName......E
a4640 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
a4660 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 61 62 73 74 72 61 63 74 20 6f ......'''.Returns.the.abstract.o
a4680 70 74 69 6f 6e 20 69 66 20 74 68 65 20 65 6e 74 69 74 79 20 69 73 20 41 62 73 74 72 61 63 74 2c ption.if.the.entity.is.Abstract,
a46a0 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d .otherwise.returns.String.Empty.
a46c0 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
a46e0 46 75 6e 63 74 69 6f 6e 20 4d 75 73 74 49 6e 68 65 72 69 74 4f 70 74 69 6f 6e 28 65 6e 74 69 74 Function.MustInheritOption(entit
a4700 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 y.As.EntityType).As.String......
a4720 20 20 20 20 49 66 20 65 6e 74 69 74 79 2e 41 62 73 74 72 61 63 74 20 54 68 65 6e 0d 0a 20 20 20 ....If.entity.Abstract.Then.....
a4740 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 4d 75 73 74 49 6e 68 65 72 69 74 22 0d 0a 20 .........Return."MustInherit"...
a4760 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 .......End.If............Return.
a4780 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a String.Empty......End.Function..
a47a0 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 ......'''.<summary>......'''.Ret
a47c0 75 72 6e 73 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 20 69 64 65 6e 74 69 66 69 65 72 20 77 69 urns.the.passed.in.identifier.wi
a47e0 74 68 20 74 68 65 20 66 69 72 73 74 20 6c 65 74 74 65 72 20 63 68 61 6e 67 65 64 20 74 6f 20 6c th.the.first.letter.changed.to.l
a4800 6f 77 65 72 63 61 73 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 owercase......'''.</summary>....
a4820 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 43 61 6d 65 6c 43 61 73 65 28 42 79 56 61 ..Public.Function.CamelCase(ByVa
a4840 6c 20 69 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e l.identifier.As.String).As.Strin
a4860 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 g..........If.String.IsNullOrEmp
a4880 74 79 28 69 64 65 6e 74 69 66 69 65 72 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ty(identifier).Then.............
a48a0 20 52 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 .Return.identifier..........End.
a48c0 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 69 64 65 6e 74 69 66 69 65 72 2e 4c 65 6e 67 If............If.identifier.Leng
a48e0 74 68 20 3d 20 31 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 th.=.1.Then..............Return.
a4900 69 64 65 6e 74 69 66 69 65 72 28 30 29 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e identifier(0).ToString(CultureIn
a4920 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2e 54 6f 4c 6f 77 65 72 49 6e 76 61 fo.InvariantCulture).ToLowerInva
a4940 72 69 61 6e 74 28 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 riant()..........End.If.........
a4960 20 20 20 52 65 74 75 72 6e 20 69 64 65 6e 74 69 66 69 65 72 28 30 29 2e 54 6f 53 74 72 69 6e 67 ...Return.identifier(0).ToString
a4980 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2e 54 (CultureInfo.InvariantCulture).T
a49a0 6f 4c 6f 77 65 72 49 6e 76 61 72 69 61 6e 74 28 29 20 2b 20 69 64 65 6e 74 69 66 69 65 72 2e 53 oLowerInvariant().+.identifier.S
a49c0 75 62 73 74 72 69 6e 67 28 31 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d ubstring(1)......End.Function...
a49e0 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 20 74 .....'''.<summary>......'''.If.t
a4a00 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d he.value.parameter.is.null.or.em
a4a20 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c pty.an.empty.string.is.returned,
a4a40 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 ......'''.otherwise.it.retuns.va
a4a60 6c 75 65 20 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 65 6e lue.with.a.single.space.concaten
a4a80 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d ated.on.the.end.......'''.</summ
a4aa0 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 70 61 63 65 41 ary>......Public.Function.SpaceA
a4ac0 66 74 65 72 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 fter(ByVal.value.As.String).As.S
a4ae0 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 41 66 74 65 tring..........Return.StringAfte
a4b00 72 28 76 61 6c 75 65 2c 20 22 20 22 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d r(value,.".")......End.Function.
a4b20 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 .......'''.<summary>......'''.If
a4b40 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 .the.value.parameter.is.null.or.
a4b60 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 empty.an.empty.string.is.returne
a4b80 64 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 d,......'''.otherwise.it.retuns.
a4ba0 76 61 6c 75 65 20 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 73 70 61 63 65 20 63 6f 6e 63 61 74 value.with.a.single.space.concat
a4bc0 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 enated.on.the.end.......'''.</su
a4be0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 70 61 63 mmary>......Public.Function.Spac
a4c00 65 42 65 66 6f 72 65 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 eBefore(ByVal.value.As.String).A
a4c20 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 42 s.String..........Return.StringB
a4c40 65 66 6f 72 65 28 22 20 22 2c 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 efore(".",.value)......End.Funct
a4c60 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
a4c80 27 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 65 72 20 69 73 20 6e 75 6c 6c '.If.the.value.parameter.is.null
a4ca0 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 .or.empty.an.empty.string.is.ret
a4cc0 75 72 6e 65 64 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 74 urned,......'''.otherwise.it.ret
a4ce0 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 61 70 70 65 6e 64 20 63 6f 6e 63 61 74 65 6e 61 74 uns.value.with.append.concatenat
a4d00 65 64 20 6f 6e 20 74 68 65 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 ed.on.the.end.......'''.</summar
a4d20 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 53 74 72 69 6e 67 41 66 y>......Public.Function.StringAf
a4d40 74 65 72 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c ter(ByVal.value.As.String,.ByVal
a4d60 20 61 70 70 65 6e 64 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 .append.As.String).As.String....
a4d80 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 76 61 ......If.String.IsNullOrEmpty(va
a4da0 6c 75 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 lue).Then..............Return.St
a4dc0 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 ring.Empty..........End.If......
a4de0 20 20 20 20 20 20 52 65 74 75 72 6e 20 76 61 6c 75 65 20 2b 20 61 70 70 65 6e 64 0d 0a 20 20 20 ......Return.value.+.append.....
a4e00 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 .End.Function........'''.<summar
a4e20 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 66 20 74 68 65 20 76 61 6c 75 65 20 70 61 72 61 6d 65 74 y>......'''.If.the.value.paramet
a4e40 65 72 20 69 73 20 6e 75 6c 6c 20 6f 72 20 65 6d 70 74 79 20 61 6e 20 65 6d 70 74 79 20 73 74 72 er.is.null.or.empty.an.empty.str
a4e60 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 ing.is.returned,......'''.otherw
a4e80 69 73 65 20 69 74 20 72 65 74 75 6e 73 20 76 61 6c 75 65 20 77 69 74 68 20 70 72 65 70 65 6e 64 ise.it.retuns.value.with.prepend
a4ea0 20 63 6f 6e 63 61 74 65 6e 61 74 65 64 20 6f 6e 20 74 68 65 20 66 72 6f 6e 74 2e 0d 0a 20 20 20 .concatenated.on.the.front......
a4ec0 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 .'''.</summary>......Public.Func
a4ee0 74 69 6f 6e 20 53 74 72 69 6e 67 42 65 66 6f 72 65 28 42 79 56 61 6c 20 70 72 65 70 65 6e 64 20 tion.StringBefore(ByVal.prepend.
a4f00 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 As.String,.ByVal.value.As.String
a4f20 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 ).As.String..........If.String.I
a4f40 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 76 61 6c 75 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 sNullOrEmpty(value).Then........
a4f60 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 ......Return.String.Empty.......
a4f80 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 72 65 70 ...End.If............Return.prep
a4fa0 65 6e 64 20 2b 20 76 61 6c 75 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d end.+.value......End.Function...
a4fc0 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 .....'''.<summary>......'''.Retu
a4fe0 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 rns.false.and.shows.an.error.if.
a5000 74 68 65 20 73 75 70 70 6c 69 65 64 20 74 79 70 65 20 6e 61 6d 65 73 20 61 72 65 6e 27 74 20 63 the.supplied.type.names.aren't.c
a5020 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 27 ase-insensitively.unique,......'
a5040 27 27 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 ''.otherwise.returns.true.......
a5060 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 '''.</summary>......Public.Funct
a5080 69 6f 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 55 6e 69 ion.VerifyCaseInsensitiveTypeUni
a50a0 71 75 65 6e 65 73 73 28 74 79 70 65 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 queness(types.As.IEnumerable(Of.
a50c0 53 74 72 69 6e 67 29 2c 20 42 79 56 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 20 41 73 20 53 74 72 String),.ByVal.sourceFile.As.Str
a50e0 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ing).As.Boolean..........Return.
a5100 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 VerifyCaseInsensitiveUniqueness(
a5120 74 79 70 65 73 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 28 74 types,._..............Function(t
a5140 29 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 ).String.Format(CultureInfo.Curr
a5160 65 6e 74 43 75 6c 74 75 72 65 2c 20 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 entCulture,.GetResourceString("T
a5180 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 54 79 70 65 43 6f 6e 66 6c emplate_CaseInsensitiveTypeConfl
a51a0 69 63 74 22 29 2c 20 74 29 2c 20 73 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 45 6e 64 20 ict"),.t),.sourceFile)......End.
a51c0 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 Function........'''.<summary>...
a51e0 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 ...'''.Returns.false.and.shows.a
a5200 6e 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 65 6e 74 69 74 79 20 73 n.error.if.the.supplied.entity.s
a5220 65 74 20 6e 61 6d 65 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 et.names.aren't.case-insensitive
a5240 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 72 65 ly.unique,......'''.otherwise.re
a5260 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d turns.true.......'''.</summary>.
a5280 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 56 65 72 69 66 79 43 61 73 65 49 .....Public.Function.VerifyCaseI
a52a0 6e 73 65 6e 73 69 74 69 76 65 45 6e 74 69 74 79 53 65 74 55 6e 69 71 75 65 6e 65 73 73 28 65 6e nsensitiveEntitySetUniqueness(en
a52c0 74 69 74 79 53 65 74 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e titySets.As.IEnumerable(Of.Strin
a52e0 67 29 2c 20 42 79 56 61 6c 20 65 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 4e 61 6d 65 20 41 73 g),.ByVal.entityContainerName.As
a5300 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 20 41 73 20 53 74 72 .String,.ByVal.sourceFile.As.Str
a5320 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ing).As.Boolean..........Return.
a5340 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 VerifyCaseInsensitiveUniqueness(
a5360 65 6e 74 69 74 79 53 65 74 73 2c 20 46 75 6e 63 74 69 6f 6e 28 65 29 20 53 74 72 69 6e 67 2e 46 entitySets,.Function(e).String.F
a5380 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 ormat(CultureInfo.CurrentCulture
a53a0 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 6f 75 72 63 65 ,._..................GetResource
a53c0 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 String("Template_CaseInsensitive
a53e0 45 6e 74 69 74 79 53 65 74 43 6f 6e 66 6c 69 63 74 22 29 2c 20 65 6e 74 69 74 79 43 6f 6e 74 61 EntitySetConflict"),.entityConta
a5400 69 6e 65 72 4e 61 6d 65 2c 20 65 29 2c 20 73 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 45 inerName,.e),.sourceFile)......E
a5420 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
a5440 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 ......'''.Returns.false.and.show
a5460 73 20 61 6e 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 74 79 70 65 20 s.an.error.if.the.supplied.type.
a5480 6d 65 6d 62 65 72 73 20 6e 61 6d 65 73 20 61 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 members.names.aren't.case-insens
a54a0 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 itively.unique,......'''.otherwi
a54c0 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d se.returns.true.......'''.</summ
a54e0 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 56 65 72 69 66 79 ary>......Public.Function.Verify
a5500 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 4d 65 6d 62 65 72 55 6e 69 71 75 65 6e 65 73 73 28 CaseInsensitiveMemberUniqueness(
a5520 6d 65 6d 62 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 members.As.IEnumerable(Of.String
a5540 29 2c 20 42 79 56 61 6c 20 64 65 63 6c 61 72 69 6e 67 54 79 70 65 20 41 73 20 53 74 72 69 6e 67 ),.ByVal.declaringType.As.String
a5560 2c 20 42 79 56 61 6c 20 73 6f 75 72 63 65 46 69 6c 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 ,.ByVal.sourceFile.As.String).As
a5580 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 56 65 72 69 66 79 43 .Boolean..........Return.VerifyC
a55a0 61 73 65 49 6e 73 65 6e 73 69 74 69 76 65 55 6e 69 71 75 65 6e 65 73 73 28 6d 65 6d 62 65 72 73 aseInsensitiveUniqueness(members
a55c0 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 28 6d 29 20 53 74 72 ,._..............Function(m).Str
a55e0 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 ing.Format(CultureInfo.CurrentCu
a5600 6c 74 75 72 65 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 52 65 73 lture,._..................GetRes
a5620 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 61 73 65 49 6e 73 65 6e 73 ourceString("Template_CaseInsens
a5640 69 74 69 76 65 4d 65 6d 62 65 72 43 6f 6e 66 6c 69 63 74 22 29 2c 20 64 65 63 6c 61 72 69 6e 67 itiveMemberConflict"),.declaring
a5660 54 79 70 65 2c 20 6d 29 2c 20 73 6f 75 72 63 65 46 69 6c 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 Type,.m),.sourceFile)......End.F
a5680 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 unction........'''.<summary>....
a56a0 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 66 61 6c 73 65 20 61 6e 64 20 73 68 6f 77 73 20 61 6e ..'''.Returns.false.and.shows.an
a56c0 20 65 72 72 6f 72 20 69 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 73 74 72 69 6e 67 73 20 61 .error.if.the.supplied.strings.a
a56e0 72 65 6e 27 74 20 63 61 73 65 2d 69 6e 73 65 6e 73 69 74 69 76 65 6c 79 20 75 6e 69 71 75 65 2c ren't.case-insensitively.unique,
a5700 0d 0a 20 20 20 20 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 74 72 75 65 ......'''.otherwise.returns.true
a5720 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 .......'''.</summary>......Priva
a5740 74 65 20 46 75 6e 63 74 69 6f 6e 20 56 65 72 69 66 79 43 61 73 65 49 6e 73 65 6e 73 69 74 69 76 te.Function.VerifyCaseInsensitiv
a5760 65 55 6e 69 71 75 65 6e 65 73 73 28 69 74 65 6d 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 eUniqueness(items.As.IEnumerable
a5780 28 4f 66 20 53 74 72 69 6e 67 29 2c 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 20 41 73 20 46 75 (Of.String),.formatMessage.As.Fu
a57a0 6e 63 28 4f 66 20 53 74 72 69 6e 67 2c 20 53 74 72 69 6e 67 29 2c 20 42 79 56 61 6c 20 73 6f 75 nc(Of.String,.String),.ByVal.sou
a57c0 72 63 65 46 69 6c 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 rceFile.As.String).As.Boolean...
a57e0 20 20 20 20 20 20 20 44 69 6d 20 68 61 73 68 20 41 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 .......Dim.hash.As.HashSet(Of.St
a5800 72 69 6e 67 29 20 3d 20 4e 65 77 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 28 53 ring).=.New.HashSet(Of.String)(S
a5820 74 72 69 6e 67 43 6f 6d 70 61 72 65 72 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 49 67 tringComparer.InvariantCultureIg
a5840 6e 6f 72 65 43 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 69 74 65 6d noreCase)..........For.Each.item
a5860 20 41 73 20 53 74 72 69 6e 67 20 69 6e 20 69 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .As.String.in.items.............
a5880 20 49 66 20 4e 6f 74 20 68 61 73 68 2e 41 64 64 28 69 74 65 6d 29 20 54 68 65 6e 0d 0a 20 20 20 .If.Not.hash.Add(item).Then.....
a58a0 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e ............._textTransformation
a58c0 2e 45 72 72 6f 72 73 2e 41 64 64 28 4e 65 77 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 .Errors.Add(New.System.CodeDom.C
a58e0 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 73 6f 75 72 63 65 46 69 6c 65 ompiler.CompilerError(sourceFile
a5900 2c 20 2d 31 2c 20 2d 31 2c 20 36 30 32 33 2c 20 66 6f 72 6d 61 74 4d 65 73 73 61 67 65 28 69 74 ,.-1,.-1,.6023,.formatMessage(it
a5920 65 6d 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 em)))..................Return.Fa
a5940 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 lse..............End.If.........
a5960 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 .Next..........Return.True......
a5980 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 End.Function........'''.<summary
a59a0 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 >......'''.Returns.the.names.of.
a59c0 74 68 65 20 69 74 65 6d 73 20 69 6e 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6c 6c 65 63 the.items.in.the.supplied.collec
a59e0 74 69 6f 6e 20 74 68 61 74 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 4f 2d 53 70 61 63 65 20 tion.that.correspond.to.O-Space.
a5a00 74 79 70 65 73 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 types.......'''.</summary>......
a5a20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 41 6c 6c 47 6c 6f 62 61 6c 49 74 65 6d Public.Function.GetAllGlobalItem
a5a40 73 28 42 79 56 61 6c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 s(ByVal.itemCollection.As.EdmIte
a5a60 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 mCollection).As.IEnumerable(Of.S
a5a80 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 tring)..........Return.itemColle
a5aa0 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 47 6c 6f 62 61 6c 49 74 65 6d 29 28 29 20 ction.GetItems(Of.GlobalItem)().
a5ac0 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 57 68 65 72 65 28 46 75 6e 63 74 69 _...................Where(Functi
a5ae0 6f 6e 28 69 29 20 54 79 70 65 4f 66 20 69 20 49 73 20 45 6e 74 69 74 79 54 79 70 65 20 4f 72 45 on(i).TypeOf.i.Is.EntityType.OrE
a5b00 6c 73 65 20 54 79 70 65 4f 66 20 69 20 49 73 20 43 6f 6d 70 6c 65 78 54 79 70 65 20 4f 72 45 6c lse.TypeOf.i.Is.ComplexType.OrEl
a5b20 73 65 20 54 79 70 65 4f 66 20 69 20 49 73 20 45 6e 75 6d 54 79 70 65 20 4f 72 45 6c 73 65 20 54 se.TypeOf.i.Is.EnumType.OrElse.T
a5b40 79 70 65 4f 66 20 69 20 69 73 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 6e 65 72 29 20 5f 0d 0a 20 ypeOf.i.is.EntityContainer)._...
a5b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 ................Select(Function(
a5b80 67 29 20 47 65 74 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 28 67 29 29 0d 0a 20 20 20 20 45 6e g).GetGlobalItemName(g))......En
a5ba0 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d d.Function........'''.<summary>.
a5bc0 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 .....'''.Returns.the.name.of.the
a5be0 20 73 75 70 70 6c 69 65 64 20 47 6c 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 27 27 27 20 3c .supplied.GlobalItem.......'''.<
a5c00 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 /summary>......Private.Function.
a5c20 47 65 74 47 6c 6f 62 61 6c 49 74 65 6d 4e 61 6d 65 28 69 74 65 6d 20 41 73 20 47 6c 6f 62 61 6c GetGlobalItemName(item.As.Global
a5c40 49 74 65 6d 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 54 79 70 65 Item).As.String..........If.Type
a5c60 4f 66 20 69 74 65 6d 20 49 73 20 45 64 6d 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 Of.item.Is.EdmType.Then.........
a5c80 20 20 20 20 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 69 74 65 6d 2c 20 45 64 6d 54 79 70 65 29 .....Return.CType(item,.EdmType)
a5ca0 2e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .Name..........Else.............
a5cc0 20 52 65 74 75 72 6e 20 43 54 79 70 65 28 69 74 65 6d 2c 20 45 6e 74 69 74 79 43 6f 6e 74 61 69 .Return.CType(item,.EntityContai
a5ce0 6e 65 72 29 2e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 ner).Name..........End.If......E
a5d00 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
a5d20 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 74 ......'''.Returns.the.names.of.t
a5d40 68 65 20 6d 65 6d 62 65 72 73 20 6f 66 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 45 64 6d 54 79 he.members.of.the.supplied.EdmTy
a5d60 70 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 pe.......'''.</summary>......Pub
a5d80 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 41 6c 6c 44 65 63 6c 61 72 65 64 4d 65 6d 62 65 lic.Function.GetAllDeclaredMembe
a5da0 72 73 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 49 45 6e 75 6d 65 rs(edmType.As.EdmType).As.IEnume
a5dc0 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e rable(Of.String)..........Dim.en
a5de0 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d tity.As.EntityType.=.TryCast(edm
a5e00 54 79 70 65 2c 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f Type,.EntityType)..........If.No
a5e20 74 20 65 6e 74 69 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 t.entity.Is.Nothing.Then........
a5e40 20 20 20 20 20 20 44 69 6d 20 64 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 20 41 73 20 49 45 6e ......Dim.declaredMembers.As.IEn
a5e60 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 64 6d 4d 65 6d 62 65 72 29 20 3d 20 65 6e 74 69 74 79 2e umerable(Of.EdmMember).=.entity.
a5e80 4d 65 6d 62 65 72 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 44 65 63 6c Members.Where(Function(m).m.Decl
a5ea0 61 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 aringType.Is.entity)............
a5ec0 20 20 44 69 6d 20 64 65 63 61 6c 72 65 64 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 ..Dim.decalredNavigationProperti
a5ee0 65 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 4e 61 76 69 67 61 74 69 6f 6e 50 es.As.IEnumerable(Of.NavigationP
a5f00 72 6f 70 65 72 74 79 29 20 3d 20 65 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 roperty).=.entity.NavigationProp
a5f20 65 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6e 29 20 6e 2e 44 65 63 6c 61 erties.Where(Function(n).n.Decla
a5f40 72 69 6e 67 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ringType.Is.entity).............
a5f60 20 20 20 52 65 74 75 72 6e 20 64 65 63 6c 61 72 65 64 4d 65 6d 62 65 72 73 2e 55 6e 69 6f 6e 28 ...Return.declaredMembers.Union(
a5f80 64 65 63 61 6c 72 65 64 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 43 61 73 decalredNavigationProperties.Cas
a5fa0 74 28 4f 66 20 45 64 6d 4d 65 6d 62 65 72 29 28 29 29 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 t(Of.EdmMember)()).Select(Functi
a5fc0 6f 6e 28 6d 29 20 6d 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d on(m).m.Name)..........End.If...
a5fe0 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 74 72 75 63 74 75 72 61 6c 20 41 73 20 53 74 72 75 63 .........Dim.structural.As.Struc
a6000 74 75 72 61 6c 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 53 74 72 turalType.=.TryCast(edmType,.Str
a6020 75 63 74 75 72 61 6c 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 73 74 72 ucturalType)..........If.Not.str
a6040 75 63 74 75 72 61 6c 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 uctural.Is.Nothing.Then.........
a6060 20 20 20 20 20 52 65 74 75 72 6e 20 73 74 72 75 63 74 75 72 61 6c 2e 4d 65 6d 62 65 72 73 2e 57 .....Return.structural.Members.W
a6080 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 here(Function(m).m.DeclaringType
a60a0 20 49 73 20 73 74 72 75 63 74 75 72 61 6c 29 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 .Is.structural).Select(Function(
a60c0 6d 29 20 6d 2e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 m).m.Name)..........End.If......
a60e0 20 20 20 20 20 20 44 69 6d 20 65 6e 75 6d 54 79 70 65 20 41 73 20 45 6e 75 6d 54 79 70 65 20 3d ......Dim.enumType.As.EnumType.=
a6100 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 45 6e 75 6d 54 79 70 65 29 0d 0a 20 20 20 .TryCast(edmType,.EnumType).....
a6120 20 20 20 20 20 49 66 20 4e 6f 74 20 65 6e 75 6d 54 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 .....If.Not.enumType.Is.Nothing.
a6140 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 65 6e 75 6d 54 79 70 Then..............Return.enumTyp
a6160 65 2e 4d 65 6d 62 65 72 73 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 6d 29 20 6d 2e 4e e.Members.Select(Function(m).m.N
a6180 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ame)..........End.If............
a61a0 52 65 74 75 72 6e 20 45 6e 75 6d 65 72 61 62 6c 65 2e 45 6d 70 74 79 28 4f 66 20 53 74 72 69 6e Return.Enumerable.Empty(Of.Strin
a61c0 67 29 28 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 g)()......End.Function........''
a61e0 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 6e 73 20 61 73 20 66 '.<summary>......'''.Retuns.as.f
a6200 75 6c 6c 20 6f 66 20 61 20 6e 61 6d 65 20 61 73 20 70 6f 73 73 69 62 6c 65 2c 20 69 66 20 61 20 ull.of.a.name.as.possible,.if.a.
a6220 6e 61 6d 65 73 70 61 63 65 20 69 73 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 27 27 27 20 74 namespace.is.provided......'''.t
a6240 68 65 20 6e 61 6d 65 73 70 61 63 65 20 61 6e 64 20 6e 61 6d 65 20 61 72 65 20 63 6f 6d 62 69 6e he.namespace.and.name.are.combin
a6260 65 64 20 77 69 74 68 20 61 20 70 65 72 69 6f 64 2c 20 6f 74 68 65 72 77 69 73 65 20 6a 75 73 74 ed.with.a.period,.otherwise.just
a6280 0d 0a 20 20 20 20 27 27 27 20 74 68 65 20 6e 61 6d 65 20 69 73 20 72 65 74 75 72 6e 65 64 2e 0d ......'''.the.name.is.returned..
a62a0 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
a62c0 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 46 75 6c 6c 4e 61 6d 65 28 42 79 56 61 6c 20 6e 61 Function.CreateFullName(ByVal.na
a62e0 6d 65 73 70 61 63 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d mespaceName.As.String,.ByVal.nam
a6300 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 e.As.String).As.String..........
a6320 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6e 61 6d 65 73 70 61 63 If.String.IsNullOrEmpty(namespac
a6340 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 eName).Then..............Return.
a6360 6e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 name..........End.If............
a6380 52 65 74 75 72 6e 20 28 6e 61 6d 65 73 70 61 63 65 4e 61 6d 65 20 26 20 22 2e 22 29 20 2b 20 6e Return.(namespaceName.&.".").+.n
a63a0 61 6d 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 ame......End.Function........'''
a63c0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 6e 73 20 61 20 6c 69 74 .<summary>......'''.Retuns.a.lit
a63e0 65 72 61 6c 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 76 eral.representing.the.supplied.v
a6400 61 6c 75 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 alue.......'''.</summary>......P
a6420 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 4c 69 74 65 72 61 6c 28 42 79 56 ublic.Function.CreateLiteral(ByV
a6440 61 6c 20 76 61 6c 75 65 20 41 73 20 4f 62 6a 65 63 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 al.value.As.Object).As.String...
a6460 20 20 20 20 20 20 20 49 66 20 76 61 6c 75 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d .......If.value.Is.Nothing.Then.
a6480 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 .............Return.String.Empty
a64a0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 ..........End.If............Dim.
a64c0 74 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 76 61 6c 75 65 2e 47 65 74 54 79 70 65 28 29 0d 0a type.As.Type.=.value.GetType()..
a64e0 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 2e 49 73 45 6e 75 6d 20 54 68 65 6e 0d 0a 20 20 20 ........If.type.IsEnum.Then.....
a6500 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 28 74 79 70 65 2e 46 75 6c 6c 4e 61 6d 65 20 26 .........Return.(type.FullName.&
a6520 20 22 2e 22 29 20 2b 20 76 61 6c 75 65 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 .".").+.value.ToString()........
a6540 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 20 49 73 20 47 65 74 ..End.If..........If.type.Is.Get
a6560 54 79 70 65 28 47 75 69 64 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 Type(Guid).Then..............Ret
a6580 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e urn.String.Format(CultureInfo.In
a65a0 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 47 75 69 64 28 22 22 7b 30 7d 22 variantCulture,."New.Guid(""{0}"
a65c0 22 29 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 47 75 69 64 29 2e 54 6f 53 ")",.DirectCast(value,.Guid).ToS
a65e0 74 72 69 6e 67 28 22 44 22 2c 20 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 tring("D",.CultureInfo.Invariant
a6600 43 75 6c 74 75 72 65 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 20 49 Culture))..........ElseIf.type.I
a6620 73 20 47 65 74 54 79 70 65 28 44 61 74 65 54 69 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 s.GetType(DateTime).Then........
a6640 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 ......Return.String.Format(Cultu
a6660 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 44 61 reInfo.InvariantCulture,."New.Da
a6680 74 65 54 69 6d 65 28 7b 30 7d 2c 20 44 61 74 65 54 69 6d 65 4b 69 6e 64 2e 55 6e 73 70 65 63 69 teTime({0},.DateTimeKind.Unspeci
a66a0 66 69 65 64 29 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 44 61 74 65 54 69 fied)",.DirectCast(value,.DateTi
a66c0 6d 65 29 2e 54 69 63 6b 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 20 me).Ticks)..........ElseIf.type.
a66e0 49 73 20 47 65 74 54 79 70 65 28 42 79 74 65 28 29 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 Is.GetType(Byte()).Then.........
a6700 20 20 20 20 20 44 69 6d 20 61 72 72 61 79 49 6e 69 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 53 .....Dim.arrayInit.As.String.=.S
a6720 74 72 69 6e 67 2e 4a 6f 69 6e 28 22 2c 20 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c 75 tring.Join(",.",.DirectCast(valu
a6740 65 2c 20 42 79 74 65 28 29 29 2e 53 65 6c 65 63 74 28 46 75 6e 63 74 69 6f 6e 28 62 29 20 62 2e e,.Byte()).Select(Function(b).b.
a6760 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 ToString(CultureInfo.InvariantCu
a6780 6c 74 75 72 65 29 29 2e 54 6f 41 72 72 61 79 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 lture)).ToArray())..............
a67a0 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f Return.String.Format(CultureInfo
a67c0 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 42 79 74 65 28 29 20 7b .InvariantCulture,."New.Byte().{
a67e0 7b 7b 30 7d 7d 7d 22 2c 20 61 72 72 61 79 49 6e 69 74 29 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 {{0}}}",.arrayInit)..........Els
a6800 65 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 44 61 74 65 54 69 6d 65 4f 66 66 73 eIf.type.Is.GetType(DateTimeOffs
a6820 65 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 64 74 6f 20 41 73 et).Then..............Dim.dto.As
a6840 20 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 76 61 6c .DateTimeOffset.=.DirectCast(val
a6860 75 65 2c 20 44 61 74 65 54 69 6d 65 4f 66 66 73 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ue,.DateTimeOffset).............
a6880 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 .Return.String.Format(CultureInf
a68a0 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 4e 65 77 20 44 61 74 65 54 69 6d o.InvariantCulture,."New.DateTim
a68c0 65 4f 66 66 73 65 74 28 7b 30 7d 2c 20 4e 65 77 20 54 69 6d 65 53 70 61 6e 28 7b 31 7d 29 29 22 eOffset({0},.New.TimeSpan({1}))"
a68e0 2c 20 64 74 6f 2e 54 69 63 6b 73 2c 20 64 74 6f 2e 4f 66 66 73 65 74 2e 54 69 63 6b 73 29 0d 0a ,.dto.Ticks,.dto.Offset.Ticks)..
a6900 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 44 ........ElseIf.type.Is.GetType(D
a6920 65 63 69 6d 61 6c 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ecimal).Then..............Return
a6940 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 .String.Format(CultureInfo.Invar
a6960 69 61 6e 74 43 75 6c 74 75 72 65 2c 20 22 7b 30 7d 44 22 2c 20 44 69 72 65 63 74 43 61 73 74 28 iantCulture,."{0}D",.DirectCast(
a6980 76 61 6c 75 65 2c 20 44 65 63 69 6d 61 6c 29 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 value,.Decimal).ToString(Culture
a69a0 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 29 0d 0a 20 20 20 20 20 20 20 Info.InvariantCulture)).........
a69c0 20 45 6c 73 65 49 66 20 74 79 70 65 20 49 73 20 47 65 74 54 79 70 65 28 54 69 6d 65 53 70 61 6e .ElseIf.type.Is.GetType(TimeSpan
a69e0 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e ).Then..............Return.Strin
a6a00 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 g.Format(CultureInfo.InvariantCu
a6a20 6c 74 75 72 65 2c 20 22 4e 65 77 20 54 69 6d 65 53 70 61 6e 28 7b 30 7d 29 22 2c 20 44 69 72 65 lture,."New.TimeSpan({0})",.Dire
a6a40 63 74 43 61 73 74 28 76 61 6c 75 65 2c 20 54 69 6d 65 53 70 61 6e 29 2e 54 69 63 6b 73 29 0d 0a ctCast(value,.TimeSpan).Ticks)..
a6a60 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 65 78 ........End.If............Dim.ex
a6a80 70 72 65 73 73 69 6f 6e 20 41 73 20 43 6f 64 65 50 72 69 6d 69 74 69 76 65 45 78 70 72 65 73 73 pression.As.CodePrimitiveExpress
a6aa0 69 6f 6e 20 3d 20 4e 65 77 20 43 6f 64 65 50 72 69 6d 69 74 69 76 65 45 78 70 72 65 73 73 69 6f ion.=.New.CodePrimitiveExpressio
a6ac0 6e 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 77 72 69 74 65 72 20 41 73 20 n(value)..........Dim.writer.As.
a6ae0 53 74 72 69 6e 67 57 72 69 74 65 72 20 3d 20 4e 65 77 20 53 74 72 69 6e 67 57 72 69 74 65 72 28 StringWriter.=.New.StringWriter(
a6b00 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 64 65 20 41 73 20 56 42 43 6f 64 65 50 72 6f )..........Dim.code.As.VBCodePro
a6b20 76 69 64 65 72 20 3d 20 4e 65 77 20 56 42 43 6f 64 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 vider.=.New.VBCodeProvider()....
a6b40 20 20 20 20 20 20 63 6f 64 65 2e 47 65 6e 65 72 61 74 65 43 6f 64 65 46 72 6f 6d 45 78 70 72 65 ......code.GenerateCodeFromExpre
a6b60 73 73 69 6f 6e 28 65 78 70 72 65 73 73 69 6f 6e 2c 20 77 72 69 74 65 72 2c 20 4e 65 77 20 43 6f ssion(expression,.writer,.New.Co
a6b80 64 65 47 65 6e 65 72 61 74 6f 72 4f 70 74 69 6f 6e 73 28 29 29 0d 0a 20 20 20 20 20 20 20 20 52 deGeneratorOptions())..........R
a6ba0 65 74 75 72 6e 20 77 72 69 74 65 72 2e 54 6f 53 74 72 69 6e 67 28 29 0d 0a 20 20 20 20 45 6e 64 eturn.writer.ToString()......End
a6bc0 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
a6be0 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 61 20 72 65 73 6f 75 72 63 65 20 73 74 72 69 6e ....'''.Returns.a.resource.strin
a6c00 67 20 66 72 6f 6d 20 74 68 65 20 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 69 74 79 2e 44 65 g.from.the.System.Data.Entity.De
a6c20 73 69 67 6e 20 61 73 73 65 6d 62 6c 79 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 sign.assembly.......'''.</summar
a6c40 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 47 y>......Public.Shared.Function.G
a6c60 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d 65 20 41 73 etResourceString(resourceName.As
a6c80 20 53 74 72 69 6e 67 2c 20 4f 70 74 69 6f 6e 61 6c 20 63 75 6c 74 75 72 65 20 41 73 20 43 75 6c .String,.Optional.culture.As.Cul
a6ca0 74 75 72 65 49 6e 66 6f 20 3d 20 4e 6f 74 68 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 tureInfo.=.Nothing).As.String...
a6cc0 20 20 20 20 20 20 20 49 66 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 20 49 73 20 4e 6f .......If._resourceManager.Is.No
a6ce0 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 65 73 6f 75 72 63 thing.Then.............._resourc
a6d00 65 4d 61 6e 61 67 65 72 20 3d 20 4e 65 77 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e eManager.=.New.System.Resources.
a6d20 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 28 22 53 79 73 74 65 6d 2e 44 61 74 61 2e 45 6e 74 ResourceManager("System.Data.Ent
a6d40 69 74 79 2e 44 65 73 69 67 6e 22 2c 20 47 65 74 54 79 70 65 28 53 79 73 74 65 6d 2e 44 61 74 61 ity.Design",.GetType(System.Data
a6d60 2e 45 6e 74 69 74 79 2e 44 65 73 69 67 6e 2e 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 .Entity.Design.MetadataItemColle
a6d80 63 74 69 6f 6e 46 61 63 74 6f 72 79 29 2e 41 73 73 65 6d 62 6c 79 29 0d 0a 20 20 20 20 20 20 20 ctionFactory).Assembly).........
a6da0 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 72 65 73 6f 75 .End.If............Return._resou
a6dc0 72 63 65 4d 61 6e 61 67 65 72 2e 47 65 74 53 74 72 69 6e 67 28 72 65 73 6f 75 72 63 65 4e 61 6d rceManager.GetString(resourceNam
a6de0 65 2c 20 63 75 6c 74 75 72 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 e,.culture)......End.Function...
a6e00 20 20 20 53 68 61 72 65 64 20 50 72 69 76 61 74 65 20 5f 72 65 73 6f 75 72 63 65 4d 61 6e 61 67 ...Shared.Private._resourceManag
a6e20 65 72 20 41 73 20 53 79 73 74 65 6d 2e 52 65 73 6f 75 72 63 65 73 2e 52 65 73 6f 75 72 63 65 4d er.As.System.Resources.ResourceM
a6e40 61 6e 61 67 65 72 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 45 78 74 65 anager........Private.Const.Exte
a6e60 72 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 20 41 73 20 53 74 72 rnalTypeNameAttributeName.As.Str
a6e80 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e ing.=."http://schemas.microsoft.
a6ea0 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 45 com/ado/2006/04/codegeneration:E
a6ec0 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 22 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d xternalTypeName"........'''.<sum
a6ee0 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 65 6e 74 69 74 79 2c 20 mary>......'''.Gets.the.entity,.
a6f00 63 6f 6d 70 6c 65 78 2c 20 6f 72 20 65 6e 75 6d 20 74 79 70 65 73 20 66 6f 72 20 77 68 69 63 68 complex,.or.enum.types.for.which
a6f20 20 63 6f 64 65 20 73 68 6f 75 6c 64 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 .code.should.be.generated.from.t
a6f40 68 65 20 67 69 76 65 6e 20 69 74 65 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 27 he.given.item.collection.......'
a6f60 27 27 20 41 6e 79 20 74 79 70 65 73 20 66 6f 72 20 77 68 69 63 68 20 61 6e 20 45 78 74 65 72 6e ''.Any.types.for.which.an.Extern
a6f80 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 alTypeName.annotation.has.been.a
a6fa0 70 70 6c 69 65 64 20 69 6e 20 74 68 65 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 0d 0a pplied.in.the.conceptual.model..
a6fc0 20 20 20 20 27 27 27 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 20 61 72 65 20 66 69 6c 74 ....'''.metadata.(CSDL).are.filt
a6fe0 65 72 65 64 20 6f 75 74 20 6f 66 20 74 68 65 20 72 65 74 75 72 6e 65 64 20 6c 69 73 74 2e 0d 0a ered.out.of.the.returned.list...
a7000 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 74 79 70 ....'''.</summary>......'''.<typ
a7020 65 70 61 72 61 6d 20 6e 61 6d 65 3d 22 54 22 3e 54 68 65 20 74 79 70 65 20 6f 66 20 69 74 65 6d eparam.name="T">The.type.of.item
a7040 20 74 6f 20 72 65 74 75 72 6e 2e 3c 2f 74 79 70 65 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 .to.return.</typeparam>......'''
a7060 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 3e 54 68 .<param.name="itemCollection">Th
a7080 65 20 69 74 65 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 6f 20 6c 6f 6f 6b 20 69 6e 2e 3c 2f 70 e.item.collection.to.look.in.</p
a70a0 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 69 74 65 6d aram>......'''.<returns>The.item
a70c0 73 20 74 6f 20 67 65 6e 65 72 61 74 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 s.to.generate.</returns>......Pu
a70e0 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 49 74 65 6d 73 54 6f 47 65 6e 65 72 61 74 65 blic.Function.GetItemsToGenerate
a7100 28 4f 66 20 54 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 28 69 74 65 6d 43 6f 6c 6c 65 63 74 (Of.T.As.GlobalItem)(itemCollect
a7120 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 49 45 6e 75 6d 65 ion.As.ItemCollection).As.IEnume
a7140 72 61 62 6c 65 28 4f 66 20 54 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 74 65 6d rable(Of.T)..........Return.item
a7160 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 54 29 28 29 2e 57 68 65 72 Collection.GetItems(Of.T)().Wher
a7180 65 28 46 75 6e 63 74 69 6f 6e 28 69 29 20 4e 6f 74 20 69 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 e(Function(i).Not.i.MetadataProp
a71a0 65 72 74 69 65 73 2e 41 6e 79 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 4e 61 6d 65 20 3d 20 erties.Any(Function(p).p.Name.=.
a71c0 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 29 0d ExternalTypeNameAttributeName)).
a71e0 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
a7200 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 mmary>......'''.Returns.the.esca
a7220 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 ped.type.name.to.use.for.the.giv
a7240 65 6e 20 75 73 61 67 65 20 6f 66 20 61 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 en.usage.of.an.o-space.type..Thi
a7260 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 s.might.be......'''.an.external.
a7280 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d type.name.if.the.ExternalTypeNam
a72a0 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 e.annotation.has.been.specified.
a72c0 69 6e 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c in.the......'''.conceptual.model
a72e0 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d .metadata.(CSDL).......'''.</sum
a7300 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 79 70 65 mary>......'''.<param.name="type
a7320 55 73 61 67 65 22 3e 54 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 20 74 6f Usage">The.o-space.type.usage.to
a7340 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 .get.a.name.for.</param>......''
a7360 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e '.<returns>The.type.name.to.use.
a7380 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </returns>......Public.Function.
a73a0 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 GetTypeName(typeUsage.As.TypeUsa
a73c0 67 65 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 66 ge).As.String..........Return.If
a73e0 28 74 79 70 65 55 73 61 67 65 20 49 73 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f 74 68 69 6e 67 2c 20 (typeUsage.Is.Nothing,.Nothing,.
a7400 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 5f GetTypeName(typeUsage.EdmType,._
a7420 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 65 29 2c 20 6d 6f 64 65 6c 4e ef.IsNullable(typeUsage),.modelN
a7440 61 6d 65 73 70 61 63 65 20 3a 3d 20 4e 6f 74 68 69 6e 67 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 amespace.:=.Nothing))......End.F
a7460 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 unction........'''.<summary>....
a7480 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e ..'''.Returns.the.escaped.type.n
a74a0 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 6f 2d 73 70 61 63 65 ame.to.use.for.the.given.o-space
a74c0 20 74 79 70 65 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e .type..This.might.be......'''.an
a74e0 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 .external.type.name.if.the.Exter
a7500 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 nalTypeName.annotation.has.been.
a7520 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 specified.in.the......'''.concep
a7540 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 tual.model.metadata.(CSDL)......
a7560 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 .'''.</summary>......'''.<param.
a7580 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 name="edmType">The.o-space.type.
a75a0 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 to.get.a.name.for.</param>......
a75c0 27 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 '''.<returns>The.type.name.to.us
a75e0 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f e.</returns>......Public.Functio
a7600 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 n.GetTypeName(edmType.As.EdmType
a7620 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 54 ).As.String..........Return.GetT
a7640 79 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3a 3d 20 4e ypeName(edmType,.isNullable.:=.N
a7660 6f 74 68 69 6e 67 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 3a 3d 20 4e 6f 74 68 69 6e othing,.modelNamespace.:=.Nothin
a7680 67 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 g)......End.Function........'''.
a76a0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 <summary>......'''.Returns.the.e
a76c0 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 scaped.type.name.to.use.for.the.
a76e0 67 69 76 65 6e 20 75 73 61 67 65 20 6f 66 20 61 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 given.usage.of.an.o-space.type..
a7700 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e This.might.be......'''.an.extern
a7720 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 al.type.name.if.the.ExternalType
a7740 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 Name.annotation.has.been.specifi
a7760 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f ed.in.the......'''.conceptual.mo
a7780 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f del.metadata.(CSDL).......'''.</
a77a0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 summary>......'''.<param.name="t
a77c0 79 70 65 55 73 61 67 65 22 3e 54 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 75 73 61 67 65 ypeUsage">The.o-space.type.usage
a77e0 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 .to.get.a.name.for.</param>.....
a7800 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 .'''.<param.name="modelNamespace
a7820 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d ">If.not.null.and.the.type's.nam
a7840 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 espace.does.not.match.this.names
a7860 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 27 27 27 20 66 75 6c 6c 79 20 71 75 61 6c pace,.then.a......'''.fully.qual
a7880 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 ified.name.will.be.returned.</pa
a78a0 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 ram>......'''.<returns>The.type.
a78c0 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c name.to.use.</returns>......Publ
a78e0 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 ic.Function.GetTypeName(typeUsag
a7900 65 20 41 73 20 54 79 70 65 55 73 61 67 65 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 41 e.As.TypeUsage,.modelNamespace.A
a7920 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 s.String).As.String..........Ret
a7940 75 72 6e 20 49 66 28 74 79 70 65 55 73 61 67 65 20 49 73 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f 74 urn.If(typeUsage.Is.Nothing,.Not
a7960 68 69 6e 67 2c 20 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 hing,.GetTypeName(typeUsage.EdmT
a7980 79 70 65 2c 20 5f 65 66 2e 49 73 4e 75 6c 6c 61 62 6c 65 28 74 79 70 65 55 73 61 67 65 29 2c 20 ype,._ef.IsNullable(typeUsage),.
a79a0 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 modelNamespace))......End.Functi
a79c0 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 on........'''.<summary>......'''
a79e0 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 .Returns.the.escaped.type.name.t
a7a00 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 o.use.for.the.given.o-space.type
a7a20 2e 20 54 68 69 73 20 6d 69 67 68 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 ..This.might.be......'''.an.exte
a7a40 72 6e 61 6c 20 74 79 70 65 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 rnal.type.name.if.the.ExternalTy
a7a60 70 65 4e 61 6d 65 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 peName.annotation.has.been.speci
a7a80 66 69 65 64 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 fied.in.the......'''.conceptual.
a7aa0 6d 6f 64 65 6c 20 6d 65 74 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 model.metadata.(CSDL).......'''.
a7ac0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d </summary>......'''.<param.name=
a7ae0 22 65 64 6d 54 79 70 65 22 3e 54 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 74 6f 20 67 65 "edmType">The.o-space.type.to.ge
a7b00 74 20 61 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c t.a.name.for.</param>......'''.<
a7b20 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e 49 66 20 6e param.name="modelNamespace">If.n
a7b40 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 70 61 63 65 ot.null.and.the.type's.namespace
a7b60 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 63 65 2c 20 .does.not.match.this.namespace,.
a7b80 74 68 65 6e 20 61 0d 0a 20 20 20 20 27 27 27 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 then.a......'''.fully.qualified.
a7ba0 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a name.will.be.returned.</param>..
a7bc0 20 20 20 20 27 27 27 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 ....'''.<returns>The.type.name.t
a7be0 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e o.use.</returns>......Public.Fun
a7c00 63 74 69 6f 6e 20 47 65 74 54 79 70 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d ction.GetTypeName(edmType.As.Edm
a7c20 54 79 70 65 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 29 20 Type,.modelNamespace.As.String).
a7c40 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 54 79 70 As.String..........Return.GetTyp
a7c60 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3a 3d 20 4e 6f 74 eName(edmType,.isNullable.:=.Not
a7c80 68 69 6e 67 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 3a 3d 20 6d 6f 64 65 6c 4e 61 6d hing,.modelNamespace.:=.modelNam
a7ca0 65 73 70 61 63 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 espace)......End.Function.......
a7cc0 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 .'''.<summary>......'''.Returns.
a7ce0 74 68 65 20 65 73 63 61 70 65 64 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 20 66 6f 72 the.escaped.type.name.to.use.for
a7d00 20 74 68 65 20 67 69 76 65 6e 20 6f 2d 73 70 61 63 65 20 74 79 70 65 2e 20 54 68 69 73 20 6d 69 .the.given.o-space.type..This.mi
a7d20 67 68 74 20 62 65 0d 0a 20 20 20 20 27 27 27 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 74 79 70 65 ght.be......'''.an.external.type
a7d40 20 6e 61 6d 65 20 69 66 20 74 68 65 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 20 61 6e .name.if.the.ExternalTypeName.an
a7d60 6e 6f 74 61 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 notation.has.been.specified.in.t
a7d80 68 65 0d 0a 20 20 20 20 27 27 27 20 63 6f 6e 63 65 70 74 75 61 6c 20 6d 6f 64 65 6c 20 6d 65 74 he......'''.conceptual.model.met
a7da0 61 64 61 74 61 20 28 43 53 44 4c 29 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 adata.(CSDL).......'''.</summary
a7dc0 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 64 6d 54 79 70 65 22 >......'''.<param.name="edmType"
a7de0 3e 54 68 65 20 6f 2d 73 70 61 63 65 20 74 79 70 65 20 74 6f 20 67 65 74 20 61 20 6e 61 6d 65 20 >The.o-space.type.to.get.a.name.
a7e00 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d for.</param>......'''.<param.nam
a7e20 65 3d 22 69 73 4e 75 6c 6c 61 62 6c 65 22 3e 53 65 74 20 74 68 69 73 20 74 6f 20 74 72 75 65 20 e="isNullable">Set.this.to.true.
a7e40 66 6f 72 20 6e 75 6c 6c 61 62 6c 65 20 75 73 61 67 65 20 6f 66 20 74 68 69 73 20 74 79 70 65 2e for.nullable.usage.of.this.type.
a7e60 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d </param>......'''.<param.name="m
a7e80 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 22 3e 49 66 20 6e 6f 74 20 6e 75 6c 6c 20 61 6e 64 20 74 odelNamespace">If.not.null.and.t
a7ea0 68 65 20 74 79 70 65 27 73 20 6e 61 6d 65 73 70 61 63 65 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 he.type's.namespace.does.not.mat
a7ec0 63 68 20 74 68 69 73 20 6e 61 6d 65 73 70 61 63 65 2c 20 74 68 65 6e 20 61 0d 0a 20 20 20 20 27 ch.this.namespace,.then.a......'
a7ee0 27 27 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 6e 61 6d 65 20 77 69 6c 6c 20 62 65 20 ''.fully.qualified.name.will.be.
a7f00 72 65 74 75 72 6e 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 27 27 27 20 3c 72 65 74 75 returned.</param>......'''.<retu
a7f20 72 6e 73 3e 54 68 65 20 74 79 70 65 20 6e 61 6d 65 20 74 6f 20 75 73 65 2e 3c 2f 72 65 74 75 72 rns>The.type.name.to.use.</retur
a7f40 6e 73 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 54 79 70 ns>......Private.Function.GetTyp
a7f60 65 4e 61 6d 65 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 2c 20 69 73 4e 75 6c 6c eName(edmType.As.EdmType,.isNull
a7f80 61 62 6c 65 20 41 73 20 53 79 73 74 65 6d 2e 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 42 6f 6f 6c 65 able.As.System.Nullable(Of.Boole
a7fa0 61 6e 29 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 an),.modelNamespace.As.String).A
a7fc0 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 54 79 70 65 20 49 73 20 s.String..........If.edmType.Is.
a7fe0 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e Nothing.Then..............Return
a8000 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 .Nothing..........End.If........
a8020 20 20 20 20 44 69 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 ....Dim.collectionType.=.TryCast
a8040 28 65 64 6d 54 79 70 65 2c 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 29 0d 0a 20 20 20 20 20 (edmType,.CollectionType).......
a8060 20 20 20 49 66 20 63 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 ...If.collectionType.IsNot.Nothi
a8080 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 ng.Then..............Return.Stri
a80a0 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 ng.Format(CultureInfo.InvariantC
a80c0 75 6c 74 75 72 65 2c 20 22 49 43 6f 6c 6c 65 63 74 69 6f 6e 28 20 4f 66 20 7b 30 7d 29 22 2c 20 ulture,."ICollection(.Of.{0})",.
a80e0 47 65 74 54 79 70 65 4e 61 6d 65 28 63 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 2e 54 79 70 65 55 GetTypeName(collectionType.TypeU
a8100 73 61 67 65 2c 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 29 29 0d 0a 20 20 20 20 20 20 20 20 sage,.modelNamespace))..........
a8120 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 4e 61 6d 65 20 3d End.If............Dim.typeName.=
a8140 20 49 66 28 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 .If(Escape(edmType.MetadataPrope
a8160 72 74 69 65 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 4e 61 6d 65 20 3d rties.Where(Function(p).p.Name.=
a8180 20 45 78 74 65 72 6e 61 6c 54 79 70 65 4e 61 6d 65 41 74 74 72 69 62 75 74 65 4e 61 6d 65 29 2e .ExternalTypeNameAttributeName).
a81a0 5b 53 65 6c 65 63 74 5d 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 44 69 72 65 63 74 43 61 73 74 28 [Select](Function(p).DirectCast(
a81c0 70 2e 56 61 6c 75 65 2c 20 53 74 72 69 6e 67 29 29 2e 46 69 72 73 74 4f 72 44 65 66 61 75 6c 74 p.Value,.String)).FirstOrDefault
a81e0 28 29 29 2c 20 28 49 66 28 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 20 49 73 4e 6f 74 20 4e 6f ()),.(If(modelNamespace.IsNot.No
a8200 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 65 64 6d 54 79 70 65 2e 4e 61 6d 65 73 70 61 63 65 4e thing.AndAlso.edmType.NamespaceN
a8220 61 6d 65 20 3c 3e 20 6d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 2c 20 43 72 65 61 74 65 46 75 6c ame.<>.modelNamespace,.CreateFul
a8240 6c 4e 61 6d 65 28 45 73 63 61 70 65 4e 61 6d 65 73 70 61 63 65 28 65 64 6d 54 79 70 65 2e 4e 61 lName(EscapeNamespace(edmType.Na
a8260 6d 65 73 70 61 63 65 4e 61 6d 65 29 2c 20 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 29 29 2c 20 mespaceName),.Escape(edmType)),.
a8280 45 73 63 61 70 65 28 65 64 6d 54 79 70 65 29 29 29 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 Escape(edmType))))............If
a82a0 20 54 79 70 65 4f 66 20 65 64 6d 54 79 70 65 20 49 73 20 53 74 72 75 63 74 75 72 61 6c 54 79 70 .TypeOf.edmType.Is.StructuralTyp
a82c0 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 4e e.Then..............Return.typeN
a82e0 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 ame..........End.If............I
a8300 66 20 54 79 70 65 4f 66 20 65 64 6d 54 79 70 65 20 49 73 20 53 69 6d 70 6c 65 54 79 70 65 20 54 f.TypeOf.edmType.Is.SimpleType.T
a8320 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 63 6c 72 54 79 70 65 20 3d 20 5f hen..............Dim.clrType.=._
a8340 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 54 79 70 65 28 65 64 6d 54 79 70 65 29 0d 0a 20 ef.UnderlyingClrType(edmType)...
a8360 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 28 54 79 70 65 4f 66 20 65 64 6d 54 79 70 ...........If.Not.(TypeOf.edmTyp
a8380 65 20 49 73 20 45 6e 75 6d 54 79 70 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 e.Is.EnumType).Then.............
a83a0 20 20 20 20 20 74 79 70 65 4e 61 6d 65 20 3d 20 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 0d .....typeName.=.Escape(clrType).
a83c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 .............End.If.............
a83e0 20 20 20 52 65 74 75 72 6e 20 49 66 28 63 6c 72 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 ...Return.If(clrType.IsValueType
a8400 20 41 6e 64 41 6c 73 6f 20 69 73 4e 75 6c 6c 61 62 6c 65 20 3d 20 54 72 75 65 2c 20 53 74 72 69 .AndAlso.isNullable.=.True,.Stri
a8420 6e 67 2e 46 6f 72 6d 61 74 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 ng.Format(CultureInfo.InvariantC
a8440 75 6c 74 75 72 65 2c 20 22 4e 75 6c 6c 61 62 6c 65 28 4f 66 20 7b 30 7d 29 22 2c 20 74 79 70 65 ulture,."Nullable(Of.{0})",.type
a8460 4e 61 6d 65 29 2c 20 74 79 70 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 Name),.typeName)..........End.If
a8480 0d 0a 0d 0a 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 ............Throw.New.ArgumentEx
a84a0 63 65 70 74 69 6f 6e 28 22 74 79 70 65 55 73 61 67 65 22 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 ception("typeUsage")......End.Fu
a84c0 6e 63 74 69 6f 6e 0d 0a 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d nction....End.Class....'''.<summ
a84e0 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 6d 61 6b 69 6e 67 ary>..'''.Responsible.for.making
a8500 20 74 68 65 20 45 6e 74 69 74 79 20 46 72 61 6d 65 77 6f 72 6b 20 4d 65 74 61 64 61 74 61 20 6d .the.Entity.Framework.Metadata.m
a8520 6f 72 65 0d 0a 27 27 27 20 61 63 63 65 73 73 69 62 6c 65 20 66 6f 72 20 63 6f 64 65 20 67 65 6e ore..'''.accessible.for.code.gen
a8540 65 72 61 74 69 6f 6e 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 eration...'''.</summary>..Public
a8560 20 43 6c 61 73 73 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 0d 0a 20 20 20 20 50 72 69 76 61 74 .Class.MetadataTools......Privat
a8580 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 e.ReadOnly._textTransformation.A
a85a0 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 0d 0a 20 s.DynamicTextTransformation.....
a85c0 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 ...'''.<summary>......'''.Initia
a85e0 6c 69 7a 65 73 20 61 6e 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 20 49 6e 73 74 61 6e 63 65 20 lizes.an.MetadataTools.Instance.
a8600 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 with.the......'''.TextTransforma
a8620 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 tion.(T4.generated.class).that.i
a8640 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 s.currently.running......'''.</s
a8660 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 ummary>......Public.Sub.New(ByVa
a8680 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d l.textTransformation.As.Object).
a86a0 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 .........If.textTransformation.I
a86c0 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f s.Nothing.Then..............Thro
a86e0 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 w.New.ArgumentNullException("tex
a8700 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 tTransformation")..........End.I
a8720 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e f............_textTransformation
a8740 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 .=.DynamicTextTransformation.Cre
a8760 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 ate(textTransformation)......End
a8780 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 .Sub........'''.<summary>......'
a87a0 27 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 75 6e 64 65 72 ''.This.method.returns.the.under
a87c0 6c 79 69 6e 67 20 43 4c 52 20 74 79 70 65 20 6f 66 20 74 68 65 20 4f 2d 73 70 61 63 65 20 74 79 lying.CLR.type.of.the.O-space.ty
a87e0 70 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 73 75 70 70 6c 69 65 64 pe.corresponding.to.the.supplied
a8800 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 74 79 70 65 55 73 61 67 65 22 2f 3e 0d 0a 20 .<paramref.name="typeUsage"/>...
a8820 20 20 20 27 27 27 20 4e 6f 74 65 20 74 68 61 74 20 66 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 ...'''.Note.that.for.an.enum.typ
a8840 65 20 74 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 e.this.means.that.the.type.backi
a8860 6e 67 20 74 68 65 20 65 6e 75 6d 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f ng.the.enum.will.be.returned,.no
a8880 74 20 74 68 65 20 65 6e 75 6d 20 74 79 70 65 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 27 27 27 t.the.enum.type.itself.......'''
a88a0 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e .</summary>......Public.Function
a88c0 20 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 .ClrType(typeUsage.As.TypeUsage)
a88e0 20 41 73 20 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 55 6e 64 65 72 6c 79 .As.Type..........Return.Underly
a8900 69 6e 67 43 6c 72 54 79 70 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 0d 0a 20 ingClrType(typeUsage.EdmType)...
a8920 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ...End.Function........'''.<summ
a8940 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 68 69 73 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e ary>......'''.This.method.return
a8960 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 43 4c 52 20 74 79 70 65 20 6f 66 20 67 69 76 s.the.underlying.CLR.type.of.giv
a8980 65 6e 20 74 68 65 20 4f 2d 73 70 61 63 65 20 74 79 70 65 2e 0d 0a 20 20 20 20 27 27 27 20 4e 6f en.the.O-space.type.......'''.No
a89a0 74 65 20 74 68 61 74 20 66 6f 72 20 61 6e 20 65 6e 75 6d 20 74 79 70 65 20 74 68 69 73 20 6d 65 te.that.for.an.enum.type.this.me
a89c0 61 6e 73 20 74 68 61 74 20 74 68 65 20 74 79 70 65 20 62 61 63 6b 69 6e 67 20 74 68 65 20 65 6e ans.that.the.type.backing.the.en
a89e0 75 6d 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 2c 20 6e 6f 74 20 74 68 65 20 65 6e 75 um.will.be.returned,.not.the.enu
a8a00 6d 20 74 79 70 65 20 69 74 73 65 6c 66 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 m.type.itself.......'''.</summar
a8a20 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 55 6e 64 65 72 6c 79 69 y>......Public.Function.Underlyi
a8a40 6e 67 43 6c 72 54 79 70 65 28 65 64 6d 54 79 70 65 20 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 ngClrType(edmType.As.EdmType).As
a8a60 20 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 .Type..........Dim.primitiveType
a8a80 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 50 72 69 6d 69 74 69 76 65 54 79 70 .=.TryCast(edmType,.PrimitiveTyp
a8aa0 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 20 49 73 4e e)..........If.primitiveType.IsN
a8ac0 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 ot.Nothing.Then..............Ret
a8ae0 75 72 6e 20 70 72 69 6d 69 74 69 76 65 54 79 70 65 2e 43 6c 72 45 71 75 69 76 61 6c 65 6e 74 54 urn.primitiveType.ClrEquivalentT
a8b00 79 70 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 ype..........End.If............D
a8b20 69 6d 20 65 6e 75 6d 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 64 6d 54 79 70 65 2c 20 45 im.enumType.=.TryCast(edmType,.E
a8b40 6e 75 6d 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 6e 75 6d 54 79 70 65 20 49 73 numType)..........If.enumType.Is
a8b60 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 Not.Nothing.Then..............Re
a8b80 74 75 72 6e 20 65 6e 75 6d 54 79 70 65 2e 55 6e 64 65 72 6c 79 69 6e 67 54 79 70 65 2e 43 6c 72 turn.enumType.UnderlyingType.Clr
a8ba0 45 71 75 69 76 61 6c 65 6e 74 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a EquivalentType..........End.If..
a8bc0 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 54 79 70 65 28 4f 62 6a 65 63 74 29 ..........Return.GetType(Object)
a8be0 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 ......End.Function........'''.<s
a8c00 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 45 64 6d ummary>......'''.True.if.the.Edm
a8c20 50 72 6f 70 65 72 74 79 20 69 73 20 61 20 6b 65 79 20 6f 66 20 69 74 73 20 44 65 63 6c 61 72 69 Property.is.a.key.of.its.Declari
a8c40 6e 67 54 79 70 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 27 27 ngType,.False.otherwise.......''
a8c60 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f '.</summary>......Public.Functio
a8c80 6e 20 49 73 4b 65 79 28 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 20 41 73 20 45 64 6d 50 72 6f 70 n.IsKey(ByVal.edmProp.As.EdmProp
a8ca0 65 72 74 79 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d erty).As.Boolean..........If.edm
a8cc0 50 72 6f 70 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 65 64 6d 50 72 Prop.IsNot.Nothing.AndAlso.edmPr
a8ce0 6f 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2e 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 op.DeclaringType.BuiltInTypeKind
a8d00 20 3d 20 42 75 69 6c 74 49 6e 54 79 70 65 4b 69 6e 64 2e 45 6e 74 69 74 79 54 79 70 65 20 54 68 .=.BuiltInTypeKind.EntityType.Th
a8d20 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 en..............Return.DirectCas
a8d40 74 28 65 64 6d 50 72 6f 70 2e 44 65 63 6c 61 72 69 6e 67 54 79 70 65 2c 20 45 6e 74 69 74 79 54 t(edmProp.DeclaringType,.EntityT
a8d60 79 70 65 29 2e 4b 65 79 4d 65 6d 62 65 72 73 2e 43 6f 6e 74 61 69 6e 73 28 65 64 6d 50 72 6f 70 ype).KeyMembers.Contains(edmProp
a8d80 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 )..........End.If............Ret
a8da0 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 urn.False......End.Function.....
a8dc0 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 ...'''.<summary>......'''.True.i
a8de0 66 20 74 68 65 20 45 64 6d 50 72 6f 70 65 72 74 79 20 54 79 70 65 55 73 61 67 65 20 69 73 20 4e f.the.EdmProperty.TypeUsage.is.N
a8e00 75 6c 6c 61 62 6c 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 20 27 ullable,.False.otherwise.......'
a8e20 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 ''.</summary>......Public.Functi
a8e40 6f 6e 20 49 73 4e 75 6c 6c 61 62 6c 65 28 42 79 56 61 6c 20 65 64 6d 50 72 6f 70 20 41 73 20 45 on.IsNullable(ByVal.edmProp.As.E
a8e60 64 6d 50 72 6f 70 65 72 74 79 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 dmProperty).As.Boolean..........
a8e80 52 65 74 75 72 6e 20 65 64 6d 50 72 6f 70 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 Return.edmProp.IsNot.Nothing.And
a8ea0 41 6c 73 6f 20 49 73 4e 75 6c 6c 61 62 6c 65 28 65 64 6d 50 72 6f 70 2e 54 79 70 65 55 73 61 67 Also.IsNullable(edmProp.TypeUsag
a8ec0 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 e)......End.Function........'''.
a8ee0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 54 <summary>......'''.True.if.the.T
a8f00 79 70 65 55 73 61 67 65 20 69 73 20 4e 75 6c 6c 61 62 6c 65 2c 20 46 61 6c 73 65 20 6f 74 68 65 ypeUsage.is.Nullable,.False.othe
a8f20 72 77 69 73 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 rwise.......'''.</summary>......
a8f40 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 4e 75 6c 6c 61 62 6c 65 28 42 79 56 61 6c Public.Function.IsNullable(ByVal
a8f60 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 20 42 6f 6f 6c .typeUsage.As.TypeUsage).As.Bool
a8f80 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 20 41 ean..........Dim.nullableFacet.A
a8fa0 73 20 46 61 63 65 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 s.Facet.=.Nothing..........If.ty
a8fc0 70 65 55 73 61 67 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 41 6e 64 41 6c 73 6f 20 74 79 peUsage.IsNot.Nothing.AndAlso.ty
a8fe0 70 65 55 73 61 67 65 2e 46 61 63 65 74 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 22 4e 75 6c 6c peUsage.Facets.TryGetValue("Null
a9000 61 62 6c 65 22 2c 20 54 72 75 65 2c 20 6e 75 6c 6c 61 62 6c 65 46 61 63 65 74 29 20 54 68 65 6e able",.True,.nullableFacet).Then
a9020 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 43 42 6f 6f 6c 28 6e 75 6c 6c 61 ..............Return.CBool(nulla
a9040 62 6c 65 46 61 63 65 74 2e 56 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d bleFacet.Value)..........End.If.
a9060 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 ...........Return.False......End
a9080 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
a90a0 20 20 20 20 27 27 27 20 49 66 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 20 54 79 70 65 55 73 61 ....'''.If.the.passed.in.TypeUsa
a90c0 67 65 20 72 65 70 72 65 73 65 6e 74 73 20 61 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 68 69 73 20 ge.represents.a.collection.this.
a90e0 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 20 66 69 6e 61 6c 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 method.returns.final.element....
a9100 20 20 27 27 27 20 74 79 70 65 20 6f 66 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6f 74 ..'''.type.of.the.collection,.ot
a9120 68 65 72 77 69 73 65 20 69 74 20 72 65 74 75 72 6e 73 20 74 68 65 20 76 61 6c 75 65 20 70 61 73 herwise.it.returns.the.value.pas
a9140 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 sed.in.......'''.</summary>.....
a9160 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 .Public.Function.GetElementType(
a9180 42 79 56 61 6c 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 29 20 41 73 ByVal.typeUsage.As.TypeUsage).As
a91a0 20 54 79 70 65 55 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 55 73 61 67 65 .TypeUsage..........If.typeUsage
a91c0 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 .Is.Nothing.Then..............Re
a91e0 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a turn.Nothing..........End.If....
a9200 20 20 20 20 20 20 20 20 49 66 20 54 79 70 65 4f 66 20 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 ........If.TypeOf.typeUsage.EdmT
a9220 79 70 65 20 49 73 20 43 6f 6c 6c 65 63 74 69 6f 6e 54 79 70 65 20 54 68 65 6e 0d 0a 20 20 20 20 ype.Is.CollectionType.Then......
a9240 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 45 6c 65 6d 65 6e 74 54 79 70 65 28 44 69 ........Return.GetElementType(Di
a9260 72 65 63 74 43 61 73 74 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 43 6f 6c 6c rectCast(typeUsage.EdmType,.Coll
a9280 65 63 74 69 6f 6e 54 79 70 65 29 2e 54 79 70 65 55 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 ectionType).TypeUsage)..........
a92a0 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 79 70 65 55 73 61 Else..............Return.typeUsa
a92c0 67 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 ge..........End.If......End.Func
a92e0 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 tion........'''.<summary>......'
a9300 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 ''.Returns.the.NavigationPropert
a9320 79 20 74 68 61 74 20 69 73 20 74 68 65 20 6f 74 68 65 72 20 65 6e 64 20 6f 66 20 74 68 65 20 73 y.that.is.the.other.end.of.the.s
a9340 61 6d 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 73 65 74 20 69 66 20 69 74 20 69 73 0d 0a 20 20 ame.association.set.if.it.is....
a9360 20 20 27 27 27 20 61 76 61 69 6c 61 62 6c 65 2c 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 ..'''.available,.otherwise.it.re
a9380 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d turns.null.......'''.</summary>.
a93a0 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 6e 76 65 72 73 65 28 42 79 56 .....Public.Function.Inverse(ByV
a93c0 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 al.navProperty.As.NavigationProp
a93e0 65 72 74 79 29 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 erty).As.NavigationProperty.....
a9400 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 .....If.navProperty.Is.Nothing.T
a9420 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d hen..............Return.Nothing.
a9440 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 .........End.If............Dim.t
a9460 6f 45 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 20 3d 20 6e 61 76 50 72 6f 70 65 oEntity.As.EntityType.=.navPrope
a9480 72 74 79 2e 54 6f 45 6e 64 4d 65 6d 62 65 72 2e 47 65 74 45 6e 74 69 74 79 54 79 70 65 28 29 0d rty.ToEndMember.GetEntityType().
a94a0 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 6f 45 6e 74 69 74 79 2e 4e 61 76 69 67 61 74 .........Return.toEntity.Navigat
a94c0 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 2e 53 69 6e 67 6c 65 4f 72 44 65 66 61 75 6c 74 28 46 75 ionProperties.SingleOrDefault(Fu
a94e0 6e 63 74 69 6f 6e 28 6e 29 20 6e 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 20 49 73 20 nction(n).n.RelationshipType.Is.
a9500 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 20 41 6e 64 navProperty.RelationshipType.And
a9520 41 6c 73 6f 20 6e 20 49 73 4e 6f 74 20 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 45 Also.n.IsNot.navProperty)......E
a9540 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
a9560 0d 0a 20 20 20 20 27 27 27 20 47 69 76 65 6e 20 61 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 ......'''.Given.a.property.on.th
a9580 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c e.dependent.end.of.a.referential
a95a0 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 72 65 74 75 72 6e 73 20 74 68 65 20 63 6f 72 72 65 73 70 .constraint,.returns.the.corresp
a95c0 6f 6e 64 69 6e 67 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c onding.property.on.the.principal
a95e0 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 .end.......'''.Requires:.The.ass
a9600 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 ociation.has.a.referential.const
a9620 72 61 69 6e 74 2c 20 61 6e 64 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 64 65 70 65 6e 64 65 raint,.and.the.specified.depende
a9640 6e 74 50 72 6f 70 65 72 74 79 20 69 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 70 72 6f 70 65 72 74 ntProperty.is.one.of.the.propert
a9660 69 65 73 20 6f 6e 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 2e 0d 0a 20 20 20 20 27 ies.on.the.dependent.end.......'
a9680 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 ''.</summary>......Public.Functi
a96a0 6f 6e 20 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 6e 67 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 on.GetCorrespondingPrincipalProp
a96c0 65 72 74 79 28 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 erty(ByVal.navProperty.As.Naviga
a96e0 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 20 42 79 56 61 6c 20 64 65 70 65 6e 64 65 6e 74 50 72 6f tionProperty,.ByVal.dependentPro
a9700 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 41 73 20 45 64 6d 50 72 6f 70 perty.As.EdmProperty).As.EdmProp
a9720 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 erty..........If.navProperty.Is.
a9740 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 Nothing.Then..............Throw.
a9760 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 New.ArgumentNullException("navPr
a9780 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 operty")..........End.If........
a97a0 20 20 20 20 49 66 20 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 ....If.dependentProperty.Is.Noth
a97c0 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 ing.Then..............Throw.New.
a97e0 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 64 65 70 65 6e 64 65 6e 74 ArgumentNullException("dependent
a9800 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 Property")..........End.If......
a9820 20 20 20 20 20 20 44 69 6d 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 52 65 61 64 ......Dim.fromProperties.As.Read
a9840 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f OnlyMetadataCollection(Of.EdmPro
a9860 70 65 72 74 79 29 20 3d 20 47 65 74 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 perty).=.GetPrincipalProperties(
a9880 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 6f 50 72 6f 70 navProperty)..........Dim.toProp
a98a0 65 72 74 69 65 73 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 erties.As.ReadOnlyMetadataCollec
a98c0 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 3d 20 47 65 74 44 65 70 65 6e 64 tion(Of.EdmProperty).=.GetDepend
a98e0 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 entProperties(navProperty)......
a9900 20 20 20 20 52 65 74 75 72 6e 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 28 74 6f 50 72 6f 70 ....Return.fromProperties(toProp
a9920 65 72 74 69 65 73 2e 49 6e 64 65 78 4f 66 28 64 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 erties.IndexOf(dependentProperty
a9940 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 ))......End.Function........'''.
a9960 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 69 76 65 6e 20 61 20 70 72 6f 70 65 <summary>......'''.Given.a.prope
a9980 72 74 79 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 20 72 65 rty.on.the.principal.end.of.a.re
a99a0 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 72 65 74 75 72 6e 73 20 74 68 ferential.constraint,.returns.th
a99c0 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 70 72 6f 70 65 72 74 79 20 6f 6e 20 74 68 65 20 e.corresponding.property.on.the.
a99e0 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 52 65 71 75 69 72 65 73 dependent.end.......'''.Requires
a9a00 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 :.The.association.has.a.referent
a9a20 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 61 6e 64 20 74 68 65 20 73 70 65 63 69 66 69 65 ial.constraint,.and.the.specifie
a9a40 64 20 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 20 69 73 20 6f 6e 65 20 6f 66 20 74 68 d.principalProperty.is.one.of.th
a9a60 65 20 70 72 6f 70 65 72 74 69 65 73 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e e.properties.on.the.principal.en
a9a80 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c d.......'''.</summary>......Publ
a9aa0 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 6e 67 44 65 70 65 ic.Function.GetCorrespondingDepe
a9ac0 6e 64 65 6e 74 50 72 6f 70 65 72 74 79 28 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 ndentProperty(ByVal.navProperty.
a9ae0 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 2c 20 42 79 56 61 6c 20 70 72 69 As.NavigationProperty,.ByVal.pri
a9b00 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 20 41 73 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 41 ncipalProperty.As.EdmProperty).A
a9b20 73 20 45 64 6d 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f s.EdmProperty..........If.navPro
a9b40 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 perty.Is.Nothing.Then...........
a9b60 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 ...Throw.New.ArgumentNullExcepti
a9b80 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 on("navProperty")..........End.I
a9ba0 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 f............If.principalPropert
a9bc0 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 y.Is.Nothing.Then..............T
a9be0 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 hrow.New.ArgumentNullException("
a9c00 70 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 principalProperty")..........End
a9c20 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 .If............Dim.fromPropertie
a9c40 73 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 s.As.ReadOnlyMetadataCollection(
a9c60 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 3d 20 47 65 74 50 72 69 6e 63 69 70 61 6c 50 72 Of.EdmProperty).=.GetPrincipalPr
a9c80 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 44 operties(navProperty)..........D
a9ca0 69 6d 20 74 6f 50 72 6f 70 65 72 74 69 65 73 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 im.toProperties.As.ReadOnlyMetad
a9cc0 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 20 3d 20 ataCollection(Of.EdmProperty).=.
a9ce0 47 65 74 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 6e 61 76 50 72 6f 70 65 72 GetDependentProperties(navProper
a9d00 74 79 29 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 6f 50 72 6f 70 65 72 74 69 65 73 ty)..........Return.toProperties
a9d20 28 66 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 2e 49 6e 64 65 78 4f 66 28 70 72 69 6e 63 69 70 61 (fromProperties.IndexOf(principa
a9d40 6c 50 72 6f 70 65 72 74 79 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d lProperty))......End.Function...
a9d60 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 .....'''.<summary>......'''.Gets
a9d80 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 70 72 6f 70 65 72 74 69 65 73 20 74 68 .the.collection.of.properties.th
a9da0 61 74 20 61 72 65 20 6f 6e 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 65 6e 64 20 6f 66 20 61 at.are.on.the.principal.end.of.a
a9dc0 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 66 6f 72 20 74 68 65 20 .referential.constraint.for.the.
a9de0 73 70 65 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 2e 0d 0a specified.navigation.property...
a9e00 20 20 20 20 27 27 27 20 52 65 71 75 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f ....'''.Requires:.The.associatio
a9e20 6e 20 68 61 73 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2e 0d n.has.a.referential.constraint..
a9e40 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 .....'''.</summary>......Public.
a9e60 46 75 6e 63 74 69 6f 6e 20 47 65 74 50 72 69 6e 63 69 70 61 6c 50 72 6f 70 65 72 74 69 65 73 28 Function.GetPrincipalProperties(
a9e80 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 ByVal.navProperty.As.NavigationP
a9ea0 72 6f 70 65 72 74 79 29 20 41 73 20 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c roperty).As.ReadOnlyMetadataColl
a9ec0 65 63 74 69 6f 6e 28 4f 66 20 45 64 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 ection(Of.EdmProperty)..........
a9ee0 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a If.navProperty.Is.Nothing.Then..
a9f00 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 ............Throw.New.ArgumentNu
a9f20 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 llException("navProperty")......
a9f40 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 ....End.If............Return.Dir
a9f60 65 63 74 43 61 73 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 ectCast(navProperty.Relationship
a9f80 54 79 70 65 2c 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 Type,.AssociationType).Referenti
a9fa0 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 28 30 29 2e 46 72 6f 6d 50 72 6f 70 65 72 74 69 65 73 0d alConstraints(0).FromProperties.
a9fc0 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 .....End.Function........'''.<su
a9fe0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 63 6f 6c 6c 65 63 74 mmary>......'''.Gets.the.collect
aa000 69 6f 6e 20 6f 66 20 70 72 6f 70 65 72 74 69 65 73 20 74 68 61 74 20 61 72 65 20 6f 6e 20 74 68 ion.of.properties.that.are.on.th
aa020 65 20 64 65 70 65 6e 64 65 6e 74 20 65 6e 64 20 6f 66 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c e.dependent.end.of.a.referential
aa040 20 63 6f 6e 73 74 72 61 69 6e 74 20 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6e 61 .constraint.for.the.specified.na
aa060 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 27 27 27 20 52 65 71 75 vigation.property.......'''.Requ
aa080 69 72 65 73 3a 20 54 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 68 61 73 20 61 20 72 65 66 65 ires:.The.association.has.a.refe
aa0a0 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 rential.constraint.......'''.</s
aa0c0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 ummary>......Public.Function.Get
aa0e0 44 65 70 65 6e 64 65 6e 74 50 72 6f 70 65 72 74 69 65 73 28 42 79 56 61 6c 20 6e 61 76 50 72 6f DependentProperties(ByVal.navPro
aa100 70 65 72 74 79 20 41 73 20 4e 61 76 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 41 73 20 perty.As.NavigationProperty).As.
aa120 52 65 61 64 4f 6e 6c 79 4d 65 74 61 64 61 74 61 43 6f 6c 6c 65 63 74 69 6f 6e 28 4f 66 20 45 64 ReadOnlyMetadataCollection(Of.Ed
aa140 6d 50 72 6f 70 65 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 mProperty)..........If.navProper
aa160 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ty.Is.Nothing.Then..............
aa180 54 68 72 6f 77 20 4e 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(
aa1a0 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a "navProperty")..........End.If..
aa1c0 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 6e 61 76 50 ..........Return.DirectCast(navP
aa1e0 72 6f 70 65 72 74 79 2e 52 65 6c 61 74 69 6f 6e 73 68 69 70 54 79 70 65 2c 20 41 73 73 6f 63 69 roperty.RelationshipType,.Associ
aa200 61 74 69 6f 6e 54 79 70 65 29 2e 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 ationType).ReferentialConstraint
aa220 73 28 30 29 2e 54 6f 50 72 6f 70 65 72 74 69 65 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 s(0).ToProperties......End.Funct
aa240 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 ion........'''.<summary>......''
aa260 27 20 54 72 75 65 20 69 66 20 74 68 69 73 20 65 6e 74 69 74 79 20 74 79 70 65 20 72 65 71 75 69 '.True.if.this.entity.type.requi
aa280 72 65 73 20 74 68 65 20 48 61 6e 64 6c 65 43 61 73 63 61 64 65 44 65 6c 65 74 65 20 6d 65 74 68 res.the.HandleCascadeDelete.meth
aa2a0 6f 64 20 64 65 66 69 6e 65 64 20 61 6e 64 20 74 68 65 20 6d 65 74 68 6f 64 20 68 61 73 0d 0a 20 od.defined.and.the.method.has...
aa2c0 20 20 20 27 27 27 20 6e 6f 74 20 62 65 65 6e 20 64 65 66 69 6e 65 64 20 6f 6e 20 61 6e 79 20 62 ...'''.not.been.defined.on.any.b
aa2e0 61 73 65 20 74 79 70 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 ase.type......'''.</summary>....
aa300 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 4e 65 65 64 73 48 61 6e 64 6c 65 43 61 73 ..Public.Function.NeedsHandleCas
aa320 63 61 64 65 44 65 6c 65 74 65 4d 65 74 68 6f 64 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 cadeDeleteMethod(itemCollection.
aa340 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 As.ItemCollection,.entity.As.Ent
aa360 69 74 79 54 79 70 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d ityType).As.Boolean..........Dim
aa380 20 6e 65 65 64 73 4d 65 74 68 6f 64 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 43 6f 6e 74 61 69 .needsMethod.As.Boolean.=.Contai
aa3a0 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 61 74 69 6f 6e 28 69 74 65 6d 43 nsCascadeDeleteAssociation(itemC
aa3c0 6f 6c 6c 65 63 74 69 6f 6e 2c 20 65 6e 74 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 27 20 43 68 ollection,.entity)..........'.Ch
aa3e0 65 63 6b 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 6e 6f 20 62 61 73 65 20 74 79 70 65 73 20 68 eck.to.make.sure.no.base.types.h
aa400 61 76 65 20 61 6c 72 65 61 64 79 20 64 65 63 6c 61 72 65 64 20 74 68 69 73 20 6d 65 74 68 6f 64 ave.already.declared.this.method
aa420 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 62 61 73 65 54 79 70 65 20 41 73 20 45 6e 74 69 74 79 ..........Dim.baseType.As.Entity
aa440 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 65 6e 74 69 74 79 2e 42 61 73 65 54 79 70 65 2c 20 Type.=.TryCast(entity.BaseType,.
aa460 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 57 68 69 6c 65 20 6e 65 65 64 73 EntityType)..........While.needs
aa480 4d 65 74 68 6f 64 20 41 6e 64 41 6c 73 6f 20 62 61 73 65 54 79 70 65 20 49 73 4e 6f 74 20 4e 6f Method.AndAlso.baseType.IsNot.No
aa4a0 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 65 64 73 4d 65 74 68 6f 64 20 3d thing..............needsMethod.=
aa4c0 20 4e 6f 74 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 .Not.ContainsCascadeDeleteAssoci
aa4e0 61 74 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 62 61 73 65 54 79 70 65 29 0d ation(itemCollection,.baseType).
aa500 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 54 79 70 65 20 3d 20 54 72 79 43 61 73 74 28 .............baseType.=.TryCast(
aa520 62 61 73 65 54 79 70 65 2e 42 61 73 65 54 79 70 65 2c 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a baseType.BaseType,.EntityType)..
aa540 20 20 20 20 20 20 20 20 45 6e 64 20 57 68 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 ........End.While..........Retur
aa560 6e 20 6e 65 65 64 73 4d 65 74 68 6f 64 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d n.needsMethod......End.Function.
aa580 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 .......'''.<summary>......'''.Tr
aa5a0 75 65 20 69 66 20 74 68 69 73 20 65 6e 74 69 74 79 20 74 79 70 65 20 70 61 72 74 69 63 69 70 61 ue.if.this.entity.type.participa
aa5c0 74 65 73 20 69 6e 20 61 6e 79 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 20 77 68 65 72 65 20 74 tes.in.any.relationships.where.t
aa5e0 68 65 20 6f 74 68 65 72 20 65 6e 64 20 68 61 73 20 61 6e 20 4f 6e 44 65 6c 65 74 65 0d 0a 20 20 he.other.end.has.an.OnDelete....
aa600 20 20 27 27 27 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2c 20 6f 72 ..'''.cascade.delete.defined,.or
aa620 20 69 66 20 69 74 20 69 73 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 69 6e 20 61 6e 79 20 69 .if.it.is.the.dependent.in.any.i
aa640 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 0d 0a 20 20 20 20 27 27 dentifying.relationships......''
aa660 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 '.</summary>......Private.Functi
aa680 6f 6e 20 43 6f 6e 74 61 69 6e 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 41 73 73 6f 63 69 61 74 on.ContainsCascadeDeleteAssociat
aa6a0 69 6f 6e 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 ion(itemCollection.As.ItemCollec
aa6c0 74 69 6f 6e 2c 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 74 79 54 79 70 65 29 20 41 73 20 42 tion,.entity.As.EntityType).As.B
aa6e0 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 74 65 6d 43 6f 6c 6c 65 oolean..........Return.itemColle
aa700 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 ction.GetItems(Of.AssociationTyp
aa720 65 29 28 29 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 61 29 20 44 69 72 65 63 74 43 61 73 e)().Where(Function(a).DirectCas
aa740 74 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 30 29 2e 54 79 70 t(a.AssociationEndMembers(0).Typ
aa760 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 2c 20 52 65 66 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 eUsage.EdmType,.RefType).Element
aa780 54 79 70 65 20 49 73 20 65 6e 74 69 74 79 20 41 6e 64 41 6c 73 6f 20 49 73 43 61 73 63 61 64 65 Type.Is.entity.AndAlso.IsCascade
aa7a0 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 DeletePrincipal(a.AssociationEnd
aa7c0 4d 65 6d 62 65 72 73 28 31 29 29 20 4f 72 45 6c 73 65 20 44 69 72 65 63 74 43 61 73 74 28 61 2e Members(1)).OrElse.DirectCast(a.
aa7e0 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 31 29 2e 54 79 70 65 55 73 61 AssociationEndMembers(1).TypeUsa
aa800 67 65 2e 45 64 6d 54 79 70 65 2c 20 52 65 66 54 79 70 65 29 2e 45 6c 65 6d 65 6e 74 54 79 70 65 ge.EdmType,.RefType).ElementType
aa820 20 49 73 20 65 6e 74 69 74 79 20 41 6e 64 41 6c 73 6f 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 .Is.entity.AndAlso.IsCascadeDele
aa840 74 65 50 72 69 6e 63 69 70 61 6c 28 61 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 tePrincipal(a.AssociationEndMemb
aa860 65 72 73 28 30 29 29 29 2e 41 6e 79 28 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e ers(0))).Any()......End.Function
aa880 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 ........'''.<summary>......'''.T
aa8a0 72 75 65 20 69 66 20 74 68 65 20 73 6f 75 72 63 65 20 65 6e 64 20 6f 66 20 74 68 65 20 73 70 65 rue.if.the.source.end.of.the.spe
aa8c0 63 69 66 69 65 64 20 6e 61 76 69 67 61 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 20 69 73 20 74 68 cified.navigation.property.is.th
aa8e0 65 20 70 72 69 6e 63 69 70 61 6c 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 e.principal.in.an.identifying.re
aa900 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 27 27 27 20 6f 72 20 69 66 20 74 68 65 20 73 lationship.......'''.or.if.the.s
aa920 6f 75 72 63 65 20 65 6e 64 20 68 61 73 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 ource.end.has.cascade.delete.def
aa940 69 6e 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 ined.......'''.</summary>......P
aa960 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 ublic.Function.IsCascadeDeletePr
aa980 69 6e 63 69 70 61 6c 28 42 79 56 61 6c 20 6e 61 76 50 72 6f 70 65 72 74 79 20 41 73 20 4e 61 76 incipal(ByVal.navProperty.As.Nav
aa9a0 69 67 61 74 69 6f 6e 50 72 6f 70 65 72 74 79 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 igationProperty).As.Boolean.....
aa9c0 20 20 20 20 20 49 66 20 6e 61 76 50 72 6f 70 65 72 74 79 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 .....If.navProperty.Is.Nothing.T
aa9e0 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d hen..............Throw.New.Argum
aaa00 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 76 50 72 6f 70 65 72 74 79 22 29 0d entNullException("navProperty").
aaa20 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 .........End.If............Retur
aaa40 6e 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 44 69 72 65 63 n.IsCascadeDeletePrincipal(Direc
aaa60 74 43 61 73 74 28 6e 61 76 50 72 6f 70 65 72 74 79 2e 46 72 6f 6d 45 6e 64 4d 65 6d 62 65 72 2c tCast(navProperty.FromEndMember,
aaa80 20 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 29 29 0d 0a 20 20 20 20 45 6e 64 .AssociationEndMember))......End
aaaa0 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a .Function........'''.<summary>..
aaac0 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 61 73 ....'''.True.if.the.specified.as
aaae0 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 61 6c 20 69 sociation.end.is.the.principal.i
aab00 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a n.an.identifying.relationship...
aab20 20 20 20 20 27 27 27 20 6f 72 20 69 66 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e ....'''.or.if.the.association.en
aab40 64 20 68 61 73 20 63 61 73 63 61 64 65 20 64 65 6c 65 74 65 20 64 65 66 69 6e 65 64 2e 0d 0a 20 d.has.cascade.delete.defined....
aab60 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 ...'''.</summary>......Public.Fu
aab80 6e 63 74 69 6f 6e 20 49 73 43 61 73 63 61 64 65 44 65 6c 65 74 65 50 72 69 6e 63 69 70 61 6c 28 nction.IsCascadeDeletePrincipal(
aaba0 42 79 56 61 6c 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 20 41 73 20 41 73 73 6f 63 69 61 74 ByVal.associationEnd.As.Associat
aabc0 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 ionEndMember).As.Boolean........
aabe0 20 20 49 66 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 ..If.associationEnd.Is.Nothing.T
aac00 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d hen..............Throw.New.Argum
aac20 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 entNullException("associationEnd
aac40 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 ")..........End.If............Re
aac60 74 75 72 6e 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 2e 44 65 6c 65 74 65 42 65 68 61 76 69 turn.associationEnd.DeleteBehavi
aac80 6f 72 20 3d 20 4f 70 65 72 61 74 69 6f 6e 41 63 74 69 6f 6e 2e 43 61 73 63 61 64 65 20 4f 72 45 or.=.OperationAction.Cascade.OrE
aaca0 6c 73 65 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e 67 52 lse.IsPrincipalEndOfIdentifyingR
aacc0 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 29 0d 0a 20 20 20 elationship(associationEnd).....
aace0 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 .End.Function........'''.<summar
aad00 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 73 70 65 63 69 66 69 65 y>......'''.True.if.the.specifie
aad20 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 65 6e 64 20 69 73 20 74 68 65 20 70 72 69 6e 63 69 70 d.association.end.is.the.princip
aad40 61 6c 20 65 6e 64 20 69 6e 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f al.end.in.an.identifying.relatio
aad60 6e 73 68 69 70 2e 0d 0a 20 20 20 20 27 27 27 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 nship.......'''.In.order.to.be.a
aad80 6e 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2c 20 74 68 65 20 n.identifying.relationship,.the.
aada0 61 73 73 6f 63 69 61 74 69 6f 6e 20 6d 75 73 74 20 68 61 76 65 20 61 20 72 65 66 65 72 65 6e 74 association.must.have.a.referent
aadc0 69 61 6c 20 63 6f 6e 73 74 72 61 69 6e 74 20 77 68 65 72 65 20 61 6c 6c 20 6f 66 20 74 68 65 20 ial.constraint.where.all.of.the.
aade0 64 65 70 65 6e 64 65 6e 74 20 70 72 6f 70 65 72 74 69 65 73 20 61 72 65 20 70 61 72 74 20 6f 66 dependent.properties.are.part.of
aae00 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 74 79 70 65 27 73 20 70 72 69 6d 61 72 79 20 6b 65 .the.dependent.type's.primary.ke
aae20 79 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c y.......'''.</summary>......Publ
aae40 69 63 20 46 75 6e 63 74 69 6f 6e 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e ic.Function.IsPrincipalEndOfIden
aae60 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 42 79 56 61 6c 20 61 73 73 6f 63 69 tifyingRelationship(ByVal.associ
aae80 61 74 69 6f 6e 45 6e 64 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 ationEnd.As.AssociationEndMember
aaea0 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 61 73 73 6f 63 69 61 ).As.Boolean..........If.associa
aaec0 74 69 6f 6e 45 6e 64 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 tionEnd.Is.Nothing.Then.........
aaee0 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 .....Throw.New.ArgumentNullExcep
aaf00 74 69 6f 6e 28 22 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 22 29 0d 0a 20 20 20 20 20 20 20 20 tion("associationEnd")..........
aaf20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 66 43 6f 6e 73 74 72 61 End.If............Dim.refConstra
aaf40 69 6e 74 20 41 73 20 52 65 66 65 72 65 6e 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 44 int.As.ReferentialConstraint.=.D
aaf60 69 72 65 63 74 43 61 73 74 28 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 2e 44 65 63 6c 61 72 69 irectCast(associationEnd.Declari
aaf80 6e 67 54 79 70 65 2c 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 2e 52 65 66 65 72 65 6e ngType,.AssociationType).Referen
aafa0 74 69 61 6c 43 6f 6e 73 74 72 61 69 6e 74 73 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 72 tialConstraints.Where(Function(r
aafc0 63 29 20 72 63 2e 46 72 6f 6d 52 6f 6c 65 20 49 73 20 61 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 c).rc.FromRole.Is.associationEnd
aafe0 29 2e 53 69 6e 67 6c 65 4f 72 44 65 66 61 75 6c 74 28 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 ).SingleOrDefault()..........If.
ab000 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e refConstraint.IsNot.Nothing.Then
ab020 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 6e 74 69 74 79 20 41 73 20 45 6e 74 69 ..............Dim.entity.As.Enti
ab040 74 79 54 79 70 65 20 3d 20 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 2e 54 6f 52 6f 6c 65 2e 47 65 tyType.=.refConstraint.ToRole.Ge
ab060 74 45 6e 74 69 74 79 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 tEntityType()..............Retur
ab080 6e 20 4e 6f 74 20 72 65 66 43 6f 6e 73 74 72 61 69 6e 74 2e 54 6f 50 72 6f 70 65 72 74 69 65 73 n.Not.refConstraint.ToProperties
ab0a0 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 74 70 29 20 4e 6f 74 20 65 6e 74 69 74 79 2e 4b .Where(Function(tp).Not.entity.K
ab0c0 65 79 4d 65 6d 62 65 72 73 2e 43 6f 6e 74 61 69 6e 73 28 74 70 29 29 2e 41 6e 79 28 29 0d 0a 20 eyMembers.Contains(tp)).Any()...
ab0e0 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 .......End.If..........Return.Fa
ab100 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 lse......End.Function........'''
ab120 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 54 72 75 65 20 69 66 20 74 68 65 20 .<summary>......'''.True.if.the.
ab140 73 70 65 63 69 66 69 65 64 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 74 79 70 65 20 69 73 20 61 6e specified.association.type.is.an
ab160 20 69 64 65 6e 74 69 66 79 69 6e 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2e 0d 0a 20 20 20 20 .identifying.relationship.......
ab180 27 27 27 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 6e 20 69 64 65 6e 74 69 66 79 69 6e '''.In.order.to.be.an.identifyin
ab1a0 67 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 2c 20 74 68 65 20 61 73 73 6f 63 69 61 74 69 6f 6e 20 g.relationship,.the.association.
ab1c0 6d 75 73 74 20 68 61 76 65 20 61 20 72 65 66 65 72 65 6e 74 69 61 6c 20 63 6f 6e 73 74 72 61 69 must.have.a.referential.constrai
ab1e0 6e 74 20 77 68 65 72 65 20 61 6c 6c 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 74 20 70 72 nt.where.all.of.the.dependent.pr
ab200 6f 70 65 72 74 69 65 73 20 61 72 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 operties.are.part.of.the.depende
ab220 6e 74 20 74 79 70 65 27 73 20 70 72 69 6d 61 72 79 20 6b 65 79 2e 0d 0a 20 20 20 20 27 27 27 20 nt.type's.primary.key.......'''.
ab240 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </summary>......Public.Function.
ab260 49 73 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 42 79 56 61 6c 20 IsIdentifyingRelationship(ByVal.
ab280 61 73 73 6f 63 69 61 74 69 6f 6e 20 41 73 20 41 73 73 6f 63 69 61 74 69 6f 6e 54 79 70 65 29 20 association.As.AssociationType).
ab2a0 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 61 73 73 6f 63 69 61 74 69 As.Boolean..........If.associati
ab2c0 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 on.Is.Nothing.Then..............
ab2e0 54 68 72 6f 77 20 4e 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(
ab300 22 61 73 73 6f 63 69 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a "association")..........End.If..
ab320 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f ..........Return.IsPrincipalEndO
ab340 66 49 64 65 6e 74 69 66 79 69 6e 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 fIdentifyingRelationship(associa
ab360 74 69 6f 6e 2e 41 73 73 6f 63 69 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 30 29 29 20 4f tion.AssociationEndMembers(0)).O
ab380 72 45 6c 73 65 20 49 73 50 72 69 6e 63 69 70 61 6c 45 6e 64 4f 66 49 64 65 6e 74 69 66 79 69 6e rElse.IsPrincipalEndOfIdentifyin
ab3a0 67 52 65 6c 61 74 69 6f 6e 73 68 69 70 28 61 73 73 6f 63 69 61 74 69 6f 6e 2e 41 73 73 6f 63 69 gRelationship(association.Associ
ab3c0 61 74 69 6f 6e 45 6e 64 4d 65 6d 62 65 72 73 28 31 29 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e ationEndMembers(1))......End.Fun
ab3e0 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ction........'''.<summary>......
ab400 27 27 27 20 72 65 71 75 69 72 65 73 3a 20 66 69 72 73 74 54 79 70 65 20 69 73 20 6e 6f 74 20 6e '''.requires:.firstType.is.not.n
ab420 75 6c 6c 0d 0a 20 20 20 20 27 27 27 20 65 66 66 65 63 74 73 3a 20 69 66 20 73 65 63 6f 6e 64 54 ull......'''.effects:.if.secondT
ab440 79 70 65 20 69 73 20 61 6d 6f 6e 67 20 74 68 65 20 62 61 73 65 20 74 79 70 65 73 20 6f 66 20 74 ype.is.among.the.base.types.of.t
ab460 68 65 20 66 69 72 73 74 54 79 70 65 2c 20 72 65 74 75 72 6e 20 74 72 75 65 2c 0d 0a 20 20 20 20 he.firstType,.return.true,......
ab480 27 27 27 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 75 72 6e 73 20 66 61 6c 73 65 2e 0d 0a 20 20 '''.otherwise.returns.false.....
ab4a0 20 20 27 27 27 20 77 68 65 6e 20 66 69 72 73 74 54 79 70 65 20 69 73 20 73 61 6d 65 20 61 73 20 ..'''.when.firstType.is.same.as.
ab4c0 74 68 65 20 73 65 63 6f 6e 64 54 79 70 65 2c 20 72 65 74 75 72 6e 20 66 61 6c 73 65 2e 0d 0a 20 the.secondType,.return.false....
ab4e0 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 ...'''.</summary>......Public.Fu
ab500 6e 63 74 69 6f 6e 20 49 73 53 75 62 74 79 70 65 4f 66 28 42 79 56 61 6c 20 66 69 72 73 74 54 79 nction.IsSubtypeOf(ByVal.firstTy
ab520 70 65 20 41 73 20 45 64 6d 54 79 70 65 2c 20 42 79 56 61 6c 20 73 65 63 6f 6e 64 54 79 70 65 20 pe.As.EdmType,.ByVal.secondType.
ab540 41 73 20 45 64 6d 54 79 70 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 As.EdmType).As.Boolean..........
ab560 49 66 20 73 65 63 6f 6e 64 54 79 70 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 If.secondType.Is.Nothing.Then...
ab580 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 ...........Return.False.........
ab5a0 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 20 77 61 6c 6b 20 75 70 20 66 69 72 .End.If............'.walk.up.fir
ab5c0 73 74 54 79 70 65 20 68 69 65 72 61 72 63 68 79 20 6c 69 73 74 0d 0a 20 20 20 20 20 20 20 20 44 stType.hierarchy.list..........D
ab5e0 69 6d 20 74 20 41 73 20 45 64 6d 54 79 70 65 20 3d 20 66 69 72 73 74 54 79 70 65 2e 42 61 73 65 im.t.As.EdmType.=.firstType.Base
ab600 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 57 68 69 6c 65 20 74 20 49 73 4e 6f 74 20 4e 6f 74 68 Type..........While.t.IsNot.Noth
ab620 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 74 2e 45 71 75 61 6c 73 28 73 65 63 ing..............If.t.Equals(sec
ab640 6f 6e 64 54 79 70 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 ondType).Then..................R
ab660 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a eturn.True..............End.If..
ab680 20 20 20 20 20 20 20 20 20 20 20 20 74 20 3d 20 74 2e 42 61 73 65 54 79 70 65 0d 0a 20 20 20 20 ............t.=.t.BaseType......
ab6a0 20 20 20 20 45 6e 64 20 57 68 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 ....End.While..........Return.Fa
ab6c0 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 lse......End.Function........'''
ab6e0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 68 65 20 .<summary>......'''.Returns.the.
ab700 73 75 62 74 79 70 65 20 6f 66 20 74 68 65 20 45 6e 74 69 74 79 54 79 70 65 20 69 6e 20 74 68 65 subtype.of.the.EntityType.in.the
ab720 20 63 75 72 72 65 6e 74 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 .current.itemCollection......'''
ab740 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e .</summary>......Public.Function
ab760 20 47 65 74 53 75 62 74 79 70 65 73 4f 66 28 42 79 56 61 6c 20 74 79 70 65 20 41 73 20 45 6e 74 .GetSubtypesOf(ByVal.type.As.Ent
ab780 69 74 79 54 79 70 65 2c 20 42 79 56 61 6c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 ityType,.ByVal.itemCollection.As
ab7a0 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 42 79 56 61 6c 20 69 6e 63 6c 75 64 65 41 62 .ItemCollection,.ByVal.includeAb
ab7c0 73 74 72 61 63 74 54 79 70 65 73 20 41 73 20 42 6f 6f 6c 65 61 6e 29 20 41 73 20 49 45 6e 75 6d stractTypes.As.Boolean).As.IEnum
ab7e0 65 72 61 62 6c 65 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 44 erable(Of.EntityType)..........D
ab800 69 6d 20 73 75 62 54 79 70 65 73 20 41 73 20 4c 69 73 74 28 4f 66 20 45 6e 74 69 74 79 54 79 70 im.subTypes.As.List(Of.EntityTyp
ab820 65 29 20 3d 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 29 0d 0a 20 20 e).=.New.List(Of.EntityType)....
ab840 20 20 20 20 20 20 49 66 20 74 79 70 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e ......If.type.IsNot.Nothing.Then
ab860 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 73 49 6e 43 6f 6c 6c 65 63 74 ..............Dim.typesInCollect
ab880 69 6f 6e 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 45 6e 74 69 74 79 54 79 70 65 ion.As.IEnumerable(Of.EntityType
ab8a0 29 20 3d 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2e 47 65 74 49 74 65 6d 73 28 4f 66 20 45 ).=.itemCollection.GetItems(Of.E
ab8c0 6e 74 69 74 79 54 79 70 65 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 ntityType)()..............For.Ea
ab8e0 63 68 20 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 6e 74 69 74 79 54 79 70 ch.typeInCollection.As.EntityTyp
ab900 65 20 49 6e 20 74 79 70 65 73 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 e.In.typesInCollection..........
ab920 20 20 20 20 20 20 20 20 49 66 20 74 79 70 65 2e 45 71 75 61 6c 73 28 74 79 70 65 49 6e 43 6f 6c ........If.type.Equals(typeInCol
ab940 6c 65 63 74 69 6f 6e 29 20 3d 20 46 61 6c 73 65 20 41 6e 64 41 6c 73 6f 20 4d 65 2e 49 73 53 75 lection).=.False.AndAlso.Me.IsSu
ab960 62 74 79 70 65 4f 66 28 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 74 79 70 65 29 20 btypeOf(typeInCollection,.type).
ab980 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 69 6e 63 Then......................If.inc
ab9a0 6c 75 64 65 41 62 73 74 72 61 63 74 54 79 70 65 73 20 4f 72 45 6c 73 65 20 4e 6f 74 20 74 79 70 ludeAbstractTypes.OrElse.Not.typ
ab9c0 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 2e 41 62 73 74 72 61 63 74 20 54 68 65 6e 0d 0a 20 20 20 eInCollection.Abstract.Then.....
ab9e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 75 62 54 79 70 65 73 2e 41 64 .....................subTypes.Ad
aba00 64 28 74 79 70 65 49 6e 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 d(typeInCollection).............
aba20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........End.If.................
aba40 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 .End.If..............Next.......
aba60 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 73 75 62 54 79 70 ...End.If..........Return.subTyp
aba80 65 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 75 62 6c es......End.Function........Publ
abaa0 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 47 65 74 53 74 72 69 6e 67 4d ic.Shared.Function.TryGetStringM
abac0 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 6e 67 28 42 79 56 61 6c 20 69 74 65 etadataPropertySetting(ByVal.ite
abae0 6d 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 2c 20 42 79 56 61 6c 20 70 72 6f 70 65 72 74 m.As.MetadataItem,.ByVal.propert
abb00 79 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 76 61 6c 75 65 20 41 73 20 yName.As.String,.ByRef.value.As.
abb20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 String).As.Boolean..........Dim.
abb40 5b 70 72 6f 70 65 72 74 79 5d 20 41 73 20 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 20 3d [property].As.MetadataProperty.=
abb60 20 69 74 65 6d 2e 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 69 65 73 2e 46 69 72 73 74 4f 72 .item.MetadataProperties.FirstOr
abb80 44 65 66 61 75 6c 74 28 46 75 6e 63 74 69 6f 6e 28 70 29 20 70 2e 4e 61 6d 65 20 3d 20 70 72 6f Default(Function(p).p.Name.=.pro
abba0 70 65 72 74 79 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 5b 70 72 6f 70 65 72 74 79 pertyName)..........If.[property
abbc0 5d 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 ].IsNot.Nothing.Then............
abbe0 20 20 76 61 6c 75 65 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 5b 70 72 6f 70 65 72 74 79 5d 2e ..value.=.DirectCast([property].
abc00 56 61 6c 75 65 2c 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a Value,.String)..........End.If..
abc20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 76 61 6c 75 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 ........Return.value.IsNot.Nothi
abc40 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 45 6e 64 20 43 6c 61 73 ng......End.Function....End.Clas
abc60 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 s....'''.<summary>..'''.Responsi
abc80 62 6c 65 20 66 6f 72 20 6c 6f 61 64 69 6e 67 20 61 6e 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 ble.for.loading.an.EdmItemCollec
abca0 74 69 6f 6e 20 66 72 6f 6d 20 61 20 2e 65 64 6d 78 20 66 69 6c 65 20 6f 72 20 2e 63 73 64 6c 20 tion.from.a..edmx.file.or..csdl.
abcc0 66 69 6c 65 73 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c files..'''.</summary>..Public.Cl
abce0 61 73 73 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 ass.MetadataLoader......Private.
abd00 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 ReadOnly._textTransformation.As.
abd20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 0d 0a 20 20 20 DynamicTextTransformation.......
abd40 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 .'''.<summary>......'''.Initiali
abd60 7a 65 73 20 61 6e 20 4d 65 74 61 64 61 74 61 4c 6f 61 64 65 72 20 49 6e 73 74 61 6e 63 65 20 77 zes.an.MetadataLoader.Instance.w
abd80 69 74 68 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 ith.the......'''.TextTransformat
abda0 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 69 73 ion.(T4.generated.class).that.is
abdc0 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 .currently.running......'''.</su
abde0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c mmary>......Public.Sub.New(ByVal
abe00 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a .textTransformation.As.Object)..
abe20 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 ........If.textTransformation.Is
abe40 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 .Nothing.Then..............Throw
abe60 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 .New.ArgumentNullException("text
abe80 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 Transformation")..........End.If
abea0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 ............_textTransformation.
abec0 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 =.DynamicTextTransformation.Crea
abee0 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 te(textTransformation)......End.
abf00 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 Sub........'''.<summary>......''
abf20 27 20 4c 6f 61 64 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 66 6f 72 20 45 64 6d 2c 20 53 74 6f '.Load.the.metadata.for.Edm,.Sto
abf40 72 65 2c 20 61 6e 64 20 4d 61 70 70 69 6e 67 20 63 6f 6c 6c 65 63 74 69 6f 6e 73 20 61 6e 64 20 re,.and.Mapping.collections.and.
abf60 72 65 67 69 73 74 65 72 20 74 68 65 6d 0d 0a 20 20 20 20 27 27 27 20 77 69 74 68 20 61 20 6e 65 register.them......'''.with.a.ne
abf80 77 20 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2c 20 72 65 74 75 72 6e 73 20 66 61 6c w.MetadataWorkspace,.returns.fal
abfa0 73 65 20 69 66 20 61 6e 79 20 6f 66 20 74 68 65 20 70 61 72 74 73 20 63 61 6e 27 74 20 62 65 0d se.if.any.of.the.parts.can't.be.
abfc0 0a 20 20 20 20 27 27 27 20 63 72 65 61 74 65 64 2c 20 73 6f 6d 65 20 6f 66 20 74 68 65 20 49 74 .....'''.created,.some.of.the.It
abfe0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 73 20 6d 61 79 20 62 65 20 72 65 67 69 73 74 65 72 65 64 20 emCollections.may.be.registered.
ac000 61 6e 64 20 75 73 61 62 6c 65 20 65 76 65 6e 20 69 66 20 66 61 6c 73 65 20 69 73 0d 0a 20 20 20 and.usable.even.if.false.is.....
ac020 20 27 27 27 20 72 65 74 75 72 6e 65 64 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 .'''.returned......'''.</summary
ac040 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f 61 64 41 6c >......Public.Function.TryLoadAl
ac060 6c 4d 65 74 61 64 61 74 61 28 42 79 56 61 6c 20 69 6e 70 75 74 46 69 6c 65 20 41 73 20 53 74 72 lMetadata(ByVal.inputFile.As.Str
ac080 69 6e 67 2c 20 42 79 52 65 66 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 20 41 73 20 ing,.ByRef.metadataWorkspace.As.
ac0a0 4d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 MetadataWorkspace).As.Boolean...
ac0c0 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 20 3d 20 4e 65 77 20 4d .......metadataWorkspace.=.New.M
ac0e0 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 etadataWorkspace()............Di
ac100 6d 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f m.edmItemCollection.As.EdmItemCo
ac120 6c 6c 65 63 74 69 6f 6e 20 3d 20 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 llection.=.CreateEdmItemCollecti
ac140 6f 6e 28 69 6e 70 75 74 46 69 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 on(inputFile)..........metadataW
ac160 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 orkspace.RegisterItemCollection(
ac180 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 edmItemCollection)............Di
ac1a0 6d 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 m.storeItemCollection.As.StoreIt
ac1c0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 emCollection.=.Nothing..........
ac1e0 49 66 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 If.TryCreateStoreItemCollection(
ac200 69 6e 70 75 74 46 69 6c 65 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 inputFile,.storeItemCollection).
ac220 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 73 74 6f 72 61 67 65 4d 61 70 Then..............Dim.storageMap
ac240 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 61 67 65 4d 61 70 pingItemCollection.As.StorageMap
ac260 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 pingItemCollection.=.Nothing....
ac280 20 20 20 20 20 20 20 20 20 20 49 66 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 67 65 4d 61 70 ..........If.TryCreateStorageMap
ac2a0 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 69 6e 70 75 74 46 69 6c 65 2c 20 65 64 pingItemCollection(inputFile,.ed
ac2c0 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 mItemCollection,.storeItemCollec
ac2e0 74 69 6f 6e 2c 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 tion,.storageMappingItemCollecti
ac300 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 on).Then..................metada
ac320 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 taWorkspace.RegisterItemCollecti
ac340 6f 6e 28 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 on(storeItemCollection).........
ac360 20 20 20 20 20 20 20 20 20 6d 65 74 61 64 61 74 61 57 6f 72 6b 73 70 61 63 65 2e 52 65 67 69 73 .........metadataWorkspace.Regis
ac380 74 65 72 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 terItemCollection(storageMapping
ac3a0 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ItemCollection).................
ac3c0 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 .Return.True..............End.If
ac3e0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 ..........End.If............Retu
ac400 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 rn.False......End.Function......
ac420 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 65 61 74 65 20 ..'''.<summary>......'''.Create.
ac440 61 6e 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 64 65 64 20 77 69 74 68 an.EdmItemCollection.loaded.with
ac460 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 27 27 27 20 .the.metadata.provided......'''.
ac480 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 </summary>......Public.Function.
ac4a0 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f CreateEdmItemCollection(ByVal.so
ac4c0 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 50 61 72 61 6d 41 urcePath.As.String,.ByVal.ParamA
ac4e0 72 72 61 79 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 41 73 20 53 74 72 69 6e 67 28 rray.referenceSchemas.As.String(
ac500 29 29 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 )).As.EdmItemCollection.........
ac520 20 44 69 6d 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 .Dim.edmItemCollection.As.EdmIte
ac540 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 mCollection.=.Nothing..........I
ac560 66 20 54 72 79 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 f.TryCreateEdmItemCollection(sou
ac580 72 63 65 50 61 74 68 2c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2c 20 65 64 6d 49 74 rcePath,.referenceSchemas,.edmIt
ac5a0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 emCollection).Then..............
ac5c0 52 65 74 75 72 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 Return.edmItemCollection........
ac5e0 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 20 45 ..End.If............Return.New.E
ac600 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 dmItemCollection()......End.Func
ac620 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 tion........'''.<summary>......'
ac640 27 27 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 74 65 6d 43 ''.Attempts.to.create.a.EdmItemC
ac660 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 ollection.from.the.specified.met
ac680 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a adata.file......'''.</summary>..
ac6a0 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 45 64 6d ....Public.Function.TryCreateEdm
ac6c0 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 ItemCollection(ByVal.sourcePath.
ac6e0 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 As.String,.ByRef.edmItemCollecti
ac700 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c on.As.EdmItemCollection).As.Bool
ac720 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 79 43 72 65 61 74 65 45 64 6d ean..........Return.TryCreateEdm
ac740 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 4e 6f 74 68 69 ItemCollection(sourcePath,.Nothi
ac760 6e 67 2c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 ng,.edmItemCollection)......End.
ac780 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 Function........'''.<summary>...
ac7a0 20 20 20 27 27 27 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 45 64 6d 49 ...'''.Attempts.to.create.a.EdmI
ac7c0 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 temCollection.from.the.specified
ac7e0 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 .metadata.file......'''.</summar
ac800 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 y>......Public.Function.TryCreat
ac820 65 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 eEdmItemCollection(ByVal.sourceP
ac840 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 72 65 66 65 72 65 6e 63 65 53 63 ath.As.String,.ByVal.referenceSc
ac860 68 65 6d 61 73 20 41 73 20 53 74 72 69 6e 67 28 29 2c 20 42 79 52 65 66 20 65 64 6d 49 74 65 6d hemas.As.String(),.ByRef.edmItem
ac880 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 Collection.As.EdmItemCollection)
ac8a0 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 65 64 6d 49 74 65 6d 43 6f 6c 6c .As.Boolean..........edmItemColl
ac8c0 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e ection.=.Nothing............If.N
ac8e0 6f 74 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c ot.ValidateInputPath(sourcePath,
ac900 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 ._textTransformation).Then......
ac920 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e ........Return.False..........En
ac940 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 d.If............If.referenceSche
ac960 6d 61 73 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 mas.Is.Nothing.Then.............
ac980 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 20 3d 20 4e 65 77 20 53 74 72 69 6e 67 28 2d .referenceSchemas.=.New.String(-
ac9a0 31 29 20 7b 7d 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 1).{}..........End.If...........
ac9c0 20 44 69 6d 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 .Dim.itemCollection.As.ItemColle
ac9e0 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 73 6f 75 72 63 65 50 ction.=.Nothing..........sourceP
aca00 61 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 ath.=._textTransformation.Host.R
aca20 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 0d 0a 20 20 20 20 20 20 20 20 esolvePath(sourcePath)..........
aca40 44 69 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 45 64 6d Dim.collectionBuilder.As.New.Edm
aca60 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 ItemCollectionBuilder(_textTrans
aca80 66 6f 72 6d 61 74 69 6f 6e 2c 20 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 53 65 6c 65 formation,.referenceSchemas.Sele
acaa0 63 74 28 46 75 6e 63 74 69 6f 6e 28 73 29 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 ct(Function(s)._textTransformati
acac0 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 73 29 29 2e 57 68 65 72 65 28 46 75 on.Host.ResolvePath(s)).Where(Fu
acae0 6e 63 74 69 6f 6e 28 73 29 20 73 20 3c 3e 20 73 6f 75 72 63 65 50 61 74 68 29 29 0d 0a 20 20 20 nction(s).s.<>.sourcePath)).....
acb00 20 20 20 20 20 49 66 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 .....If.collectionBuilder.TryCre
acb20 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 2c 20 69 74 ateItemCollection(sourcePath,.it
acb40 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 emCollection).Then..............
acb60 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 69 edmItemCollection.=.DirectCast(i
acb80 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e temCollection,.EdmItemCollection
acba0 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 )..........End.If............Ret
acbc0 75 72 6e 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 urn.edmItemCollection.IsNot.Noth
acbe0 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 ing......End.Function........'''
acc00 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 74 74 65 6d 70 74 73 20 74 6f 20 .<summary>......'''.Attempts.to.
acc20 63 72 65 61 74 65 20 61 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f create.a.StoreItemCollection.fro
acc40 6d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 m.the.specified.metadata.file...
acc60 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 ...'''.</summary>......Public.Fu
acc80 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 nction.TryCreateStoreItemCollect
acca0 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 ion(ByVal.sourcePath.As.String,.
accc0 42 79 52 65 66 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f ByRef.storeItemCollection.As.Sto
acce0 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 reItemCollection).As.Boolean....
acd00 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 ......storeItemCollection.=.Noth
acd20 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e ing............If.Not.ValidateIn
acd40 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f putPath(sourcePath,._textTransfo
acd60 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 rmation).Then..............Retur
acd80 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 n.False..........End.If.........
acda0 20 20 20 44 69 6d 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c ...Dim.itemCollection.As.ItemCol
acdc0 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 lection.=.Nothing..........Dim.c
acde0 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 53 74 6f 72 65 49 74 65 ollectionBuilder.As.New.StoreIte
ace00 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 mCollectionBuilder(_textTransfor
ace20 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 6c 6c 65 63 74 69 6f 6e 42 75 mation)..........If.collectionBu
ace40 69 6c 64 65 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 74 ilder.TryCreateItemCollection(_t
ace60 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 extTransformation.Host.ResolvePa
ace80 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 2c 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 th(sourcePath),.itemCollection).
acea0 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 Then..............storeItemColle
acec0 63 74 69 6f 6e 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ction.=.DirectCast(itemCollectio
acee0 6e 2c 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 n,.StoreItemCollection).........
acf00 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 73 74 6f 72 65 49 74 65 .End.If..........Return.storeIte
acf20 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 mCollection.IsNot.Nothing......E
acf40 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Function........'''.<summary>
acf60 0d 0a 20 20 20 20 27 27 27 20 41 74 74 65 6d 70 74 73 20 74 6f 20 63 72 65 61 74 65 20 61 20 53 ......'''.Attempts.to.create.a.S
acf80 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 66 72 6f 6d torageMappingItemCollection.from
acfa0 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 2c 20 45 64 .the.specified.metadata.file,.Ed
acfc0 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 61 6e 64 20 53 74 6f 72 65 49 74 65 6d 43 6f mItemCollection,.and.StoreItemCo
acfe0 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 llection......'''.</summary>....
ad000 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 53 74 6f 72 61 ..Public.Function.TryCreateStora
ad020 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f geMappingItemCollection(ByVal.so
ad040 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 65 64 6d 49 74 65 urcePath.As.String,.ByVal.edmIte
ad060 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e mCollection.As.EdmItemCollection
ad080 2c 20 42 79 56 61 6c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 ,.ByVal.storeItemCollection.As.S
ad0a0 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 42 79 52 65 66 20 73 74 6f 72 61 67 toreItemCollection,.ByRef.storag
ad0c0 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 61 67 eMappingItemCollection.As.Storag
ad0e0 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 eMappingItemCollection).As.Boole
ad100 61 6e 0d 0a 20 20 20 20 20 20 20 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f an..........storageMappingItemCo
ad120 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 llection.=.Nothing............If
ad140 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 .Not.ValidateInputPath(sourcePat
ad160 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 h,._textTransformation).Then....
ad180 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 ..........Return.False..........
ad1a0 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 6d 49 74 65 6d 43 6f 6c 6c End.If............If.edmItemColl
ad1c0 65 63 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 ection.Is.Nothing.Then..........
ad1e0 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 ....Throw.New.ArgumentNullExcept
ad200 69 6f 6e 28 22 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 ion("edmItemCollection")........
ad220 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 73 74 6f 72 65 49 74 65 6d ..End.If............If.storeItem
ad240 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 Collection.Is.Nothing.Then......
ad260 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 ........Throw.New.ArgumentNullEx
ad280 63 65 70 74 69 6f 6e 28 22 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 22 29 0d 0a ception("storeItemCollection")..
ad2a0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 74 ........End.If............Dim.it
ad2c0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d emCollection.As.ItemCollection.=
ad2e0 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6c 6c 65 63 74 69 6f 6e .Nothing..........Dim.collection
ad300 42 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 Builder.As.New.StorageMappingIte
ad320 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 mCollectionBuilder(_textTransfor
ad340 6d 61 74 69 6f 6e 2c 20 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 73 74 6f 72 65 mation,.edmItemCollection,.store
ad360 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 6c 6c ItemCollection)..........If.coll
ad380 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 2e 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 ectionBuilder.TryCreateItemColle
ad3a0 63 74 69 6f 6e 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 ction(_textTransformation.Host.R
ad3c0 65 73 6f 6c 76 65 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 29 2c 20 69 74 65 6d 43 6f 6c 6c esolvePath(sourcePath),.itemColl
ad3e0 65 63 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6f 72 61 67 ection).Then..............storag
ad400 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 44 69 72 65 63 74 43 eMappingItemCollection.=.DirectC
ad420 61 73 74 28 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 53 74 6f 72 61 67 65 4d 61 70 70 69 ast(itemCollection,.StorageMappi
ad440 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 ngItemCollection)..........End.I
ad460 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 73 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 f..........Return.storageMapping
ad480 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 ItemCollection.IsNot.Nothing....
ad4a0 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 ..End.Function........'''.<summa
ad4c0 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 4d 6f 64 65 6c 20 4e 61 6d 65 ry>......'''.Gets.the.Model.Name
ad4e0 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 73 63 68 65 6d 61 20 66 space.from.the.provided.schema.f
ad500 69 6c 65 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 ile.......'''.</summary>......Pu
ad520 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4d 6f 64 65 6c 4e 61 6d 65 73 70 61 63 65 28 blic.Function.GetModelNamespace(
ad540 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 ByVal.sourcePath.As.String).As.S
ad560 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e tring..........If.Not.ValidateIn
ad580 70 75 74 50 61 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f putPath(sourcePath,._textTransfo
ad5a0 72 6d 61 74 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 rmation).Then..............Retur
ad5c0 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a n.String.Empty..........End.If..
ad5e0 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 62 75 69 6c 64 65 72 20 41 73 20 4e 65 77 20 45 64 6d ..........Dim.builder.As.New.Edm
ad600 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 28 5f 74 65 78 74 54 72 61 6e 73 ItemCollectionBuilder(_textTrans
ad620 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 6d 6f 64 65 6c 20 41 73 formation)..........Dim.model.As
ad640 20 58 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 .XElement.=.Nothing..........If.
ad660 62 75 69 6c 64 65 72 2e 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 5f 74 65 78 74 builder.TryLoadRootElement(_text
ad680 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 61 74 68 28 Transformation.Host.ResolvePath(
ad6a0 73 6f 75 72 63 65 50 61 74 68 29 2c 20 6d 6f 64 65 6c 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 sourcePath),.model).Then........
ad6c0 20 20 20 20 20 20 44 69 6d 20 61 74 74 72 69 62 75 74 65 20 41 73 20 58 41 74 74 72 69 62 75 74 ......Dim.attribute.As.XAttribut
ad6e0 65 20 3d 20 6d 6f 64 65 6c 2e 41 74 74 72 69 62 75 74 65 28 22 4e 61 6d 65 73 70 61 63 65 22 29 e.=.model.Attribute("Namespace")
ad700 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 61 74 74 72 69 62 75 74 65 20 49 73 4e 6f 74 ..............If.attribute.IsNot
ad720 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 .Nothing.Then..................R
ad740 65 74 75 72 6e 20 61 74 74 72 69 62 75 74 65 2e 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 eturn.attribute.Value...........
ad760 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 ...End.If..........End.If.......
ad780 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 45 6e .....Return.String.Empty......En
ad7a0 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d d.Function........'''.<summary>.
ad7c0 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 74 72 75 65 20 69 66 20 74 68 65 20 73 70 65 .....'''.Returns.true.if.the.spe
ad7e0 63 69 66 69 65 64 20 66 69 6c 65 20 70 61 74 68 20 69 73 20 76 61 6c 69 64 0d 0a 20 20 20 20 27 cified.file.path.is.valid......'
ad800 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 ''.</summary>......Private.Share
ad820 64 20 46 75 6e 63 74 69 6f 6e 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 74 68 28 73 6f 75 d.Function.ValidateInputPath(sou
ad840 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 2c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d rcePath.As.String,.textTransform
ad860 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 ation.As.DynamicTextTransformati
ad880 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e on).As.Boolean..........If.Strin
ad8a0 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 6f 75 72 63 65 50 61 74 68 29 20 54 68 65 6e g.IsNullOrEmpty(sourcePath).Then
ad8c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 ..............Throw.New.Argument
ad8e0 45 78 63 65 70 74 69 6f 6e 28 22 73 6f 75 72 63 65 50 61 74 68 22 29 0d 0a 20 20 20 20 20 20 20 Exception("sourcePath").........
ad900 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 73 6f 75 72 63 65 50 61 74 68 .End.If............If.sourcePath
ad920 20 3d 20 22 24 65 64 6d 78 49 6e 70 75 74 46 69 6c 65 24 22 20 54 68 65 6e 0d 0a 20 20 20 20 20 .=."$edmxInputFile$".Then.......
ad940 20 20 20 20 20 20 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 .......textTransformation.Errors
ad960 2e 41 64 64 28 4e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 49 66 28 74 65 78 74 54 72 .Add(New.CompilerError(If(textTr
ad980 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 2c 20 ansformation.Host.TemplateFile,.
ad9a0 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 CodeGenerationTools.GetResourceS
ad9c0 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e 6e 69 6e 67 tring("Template_CurrentlyRunning
ad9e0 54 65 6d 70 6c 61 74 65 22 29 29 2c 20 2d 31 2c 20 2d 31 2c 20 53 74 72 69 6e 67 2e 45 6d 70 74 Template")),.-1,.-1,.String.Empt
ada00 79 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 65 47 65 6e 65 72 61 y,._..................CodeGenera
ada20 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 6e 67 28 22 54 65 6d tionTools.GetResourceString("Tem
ada40 70 6c 61 74 65 5f 52 65 70 6c 61 63 65 56 73 49 74 65 6d 54 65 6d 70 6c 61 74 65 54 6f 6b 65 6e plate_ReplaceVsItemTemplateToken
ada60 22 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a ")))..............Return.False..
ada80 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e ........End.If............Return
adaa0 20 54 72 75 65 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 .True......End.Function........'
adac0 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 62 61 73 65 20 63 6c 61 73 73 ''.<summary>......'''.base.class
adae0 20 66 6f 72 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 63 6c 61 73 73 .for.ItemCollectionBuilder.class
adb00 65 73 20 74 68 61 74 0d 0a 20 20 20 20 27 27 27 20 6c 6f 61 64 20 74 68 65 20 73 70 65 63 69 66 es.that......'''.load.the.specif
adb20 69 63 20 74 79 70 65 73 20 6f 66 20 6d 65 74 61 64 61 74 61 0d 0a 20 20 20 20 27 27 27 20 3c 2f ic.types.of.metadata......'''.</
adb40 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 4d 75 73 74 49 6e 68 65 72 69 summary>......Private.MustInheri
adb60 74 20 43 6c 61 73 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 t.Class.ItemCollectionBuilder...
adb80 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 .......Private.ReadOnly._textTra
adba0 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 nsformation.As.DynamicTextTransf
adbc0 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e ormation..........Private.ReadOn
adbe0 6c 79 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 ly._fileExtension.As.String.....
adc00 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 65 64 6d 78 53 65 63 74 69 .....Private.ReadOnly._edmxSecti
adc20 6f 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 onName.As.String..........Privat
adc40 65 20 52 65 61 64 4f 6e 6c 79 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 41 73 20 53 e.ReadOnly._rootElementName.As.S
adc60 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a tring............'''.<summary>..
adc80 20 20 20 20 20 20 20 20 27 27 27 20 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 69 6e ........'''.FileExtension.for.in
adca0 64 69 76 69 64 75 61 6c 20 28 6e 6f 6e 2d 65 64 6d 78 29 20 6d 65 74 61 64 61 74 61 20 66 69 6c dividual.(non-edmx).metadata.fil
adcc0 65 20 66 6f 72 20 74 68 69 73 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 73 70 65 63 69 66 69 63 e.for.this..........'''.specific
adce0 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 74 79 70 65 0d 0a 20 20 20 20 20 20 20 20 27 27 .ItemCollection.type..........''
add00 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 '.</summary>..........Public.Rea
add20 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 28 29 20 41 dOnly.Property.FileExtension().A
add40 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 s.String..............Get.......
add60 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e ...........Return._fileExtension
add80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 ..............End.Get..........E
adda0 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d nd.Property............'''.<summ
addc0 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 ary>..........'''.The.name.of.th
adde0 65 20 58 6d 6c 45 6c 65 6d 65 6e 74 20 69 6e 20 74 68 65 20 2e 65 64 6d 78 20 3c 52 75 6e 74 69 e.XmlElement.in.the..edmx.<Runti
ade00 6d 65 3e 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 74 6f 20 66 69 6e 64 me>.element..........'''.to.find
ade20 20 74 68 69 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 61 0d .this.ItemCollection's.metadata.
ade40 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 .........'''.</summary>.........
ade60 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 45 64 6d 78 53 65 .Public.ReadOnly.Property.EdmxSe
ade80 63 74 69 6f 6e 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 ctionName().As.String...........
adea0 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f ...Get..................Return._
adec0 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 edmxSectionName..............End
adee0 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 .Get..........End.Property......
adf00 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 ......'''.<summary>..........'''
adf20 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 6f 66 .The.name.of.the.root.element.of
adf40 20 74 68 69 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 27 73 20 6d 65 74 61 64 61 74 61 0d .this.ItemCollection's.metadata.
adf60 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 .........'''.</summary>.........
adf80 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 52 6f 6f 74 45 6c .Public.ReadOnly.Property.RootEl
adfa0 65 6d 65 6e 74 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 ementName().As.String...........
adfc0 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f ...Get..................Return._
adfe0 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 rootElementName..............End
ae000 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 .Get..........End.Property......
ae020 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 ......'''.<summary>..........'''
ae040 20 4d 65 74 68 6f 64 20 74 6f 20 62 75 69 6c 64 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 .Method.to.build.the.appropriate
ae060 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 .ItemCollection..........'''.</s
ae080 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4d 75 73 74 4f ummary>..........Protected.MustO
ae0a0 76 65 72 72 69 64 65 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 verride.Function.CreateItemColle
ae0c0 63 74 69 6f 6e 28 42 79 56 61 6c 20 72 65 61 64 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 ction(ByVal.readers.As.IEnumerab
ae0e0 6c 65 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 2c 20 42 79 52 65 66 20 65 72 72 6f 72 73 20 41 le(Of.XmlReader),.ByRef.errors.A
ae100 73 20 49 4c 69 73 74 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 29 20 41 73 20 49 s.IList(Of.EdmSchemaError)).As.I
ae120 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 temCollection............'''.<su
ae140 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 43 74 6f 72 20 74 6f 20 73 65 74 75 mmary>..........'''.Ctor.to.setu
ae160 70 20 74 68 65 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 20 6d 65 6d 62 p.the.ItemCollectionBuilder.memb
ae180 65 72 73 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ers..........'''.</summary>.....
ae1a0 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 .....Protected.Sub.New(ByVal.tex
ae1c0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 tTransformation.As.DynamicTextTr
ae1e0 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 42 79 56 61 6c 20 66 69 6c 65 45 78 74 65 6e 73 69 6f ansformation,.ByVal.fileExtensio
ae200 6e 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 n.As.String,.ByVal.edmxSectionNa
ae220 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e me.As.String,.ByVal.rootElementN
ae240 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 ame.As.String).............._tex
ae260 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 tTransformation.=.textTransforma
ae280 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e tion.............._fileExtension
ae2a0 20 3d 20 66 69 6c 65 45 78 74 65 6e 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 65 .=.fileExtension.............._e
ae2c0 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 20 3d 20 65 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 dmxSectionName.=.edmxSectionName
ae2e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 3d .............._rootElementName.=
ae300 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 .rootElementName..........End.Su
ae320 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 b............'''.<summary>......
ae340 20 20 20 20 27 27 27 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d ....'''.Selects.a.namespace.from
ae360 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 .the.supplied.constants.........
ae380 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 ..'''.</summary>..........Protec
ae3a0 74 65 64 20 4d 75 73 74 4f 76 65 72 72 69 64 65 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 4e 61 6d ted.MustOverride.Function.GetNam
ae3c0 65 73 70 61 63 65 28 42 79 56 61 6c 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 65 6d 61 espace(ByVal.constants.As.Schema
ae3e0 43 6f 6e 73 74 61 6e 74 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 Constants).As.String............
ae400 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 72 79 20 74 '''.<summary>..........'''.Try.t
ae420 6f 20 63 72 65 61 74 65 20 61 6e 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 6c 6f 61 64 65 o.create.an.ItemCollection.loade
ae440 64 20 77 69 74 68 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 70 72 6f 76 69 64 65 64 0d 0a 20 20 d.with.the.metadata.provided....
ae460 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 ......'''.</summary>..........Pu
ae480 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 blic.Function.TryCreateItemColle
ae4a0 63 74 69 6f 6e 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 ction(ByVal.sourcePath.As.String
ae4c0 2c 20 42 79 52 65 66 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f ,.ByRef.itemCollection.As.ItemCo
ae4e0 6c 6c 65 63 74 69 6f 6e 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 llection).As.Boolean............
ae500 20 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 ..itemCollection.=.Nothing......
ae520 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 56 61 6c 69 64 61 74 65 49 6e 70 75 74 50 61 ..........If.Not.ValidateInputPa
ae540 74 68 28 73 6f 75 72 63 65 50 61 74 68 2c 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 th(sourcePath,._textTransformati
ae560 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e on).Then..................Return
ae580 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 .False..............End.If......
ae5a0 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 41 73 20 58 ..........Dim.schemaElement.As.X
ae5c0 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 Element.=.Nothing..............I
ae5e0 66 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 28 73 6f 75 72 63 65 50 61 74 68 2c f.TryLoadRootElement(sourcePath,
ae600 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 .schemaElement).Then............
ae620 20 20 20 20 20 20 44 69 6d 20 72 65 61 64 65 72 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 ......Dim.readers.As.New.List(Of
ae640 20 58 6d 6c 52 65 61 64 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 .XmlReader)()..................T
ae660 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61 64 65 72 73 2e ry......................readers.
ae680 41 64 64 28 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 2e 43 72 65 61 74 65 52 65 61 64 65 72 28 29 Add(schemaElement.CreateReader()
ae6a0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 72 72 6f 72 )......................Dim.error
ae6c0 73 20 41 73 20 49 4c 69 73 74 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 20 3d 20 s.As.IList(Of.EdmSchemaError).=.
ae6e0 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 Nothing........................D
ae700 69 6d 20 74 65 6d 70 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 49 74 65 6d 43 6f 6c im.tempItemCollection.As.ItemCol
ae720 6c 65 63 74 69 6f 6e 20 3d 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 72 lection.=.CreateItemCollection(r
ae740 65 61 64 65 72 73 2c 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eaders,.errors).................
ae760 20 20 20 20 20 49 66 20 50 72 6f 63 65 73 73 45 72 72 6f 72 73 28 65 72 72 6f 72 73 2c 20 73 6f .....If.ProcessErrors(errors,.so
ae780 75 72 63 65 50 61 74 68 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 urcePath).Then..................
ae7a0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 ........Return.False............
ae7c0 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..........End.If................
ae7e0 20 20 20 20 20 20 20 20 69 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 74 65 6d 70 49 74 65 ........itemCollection.=.tempIte
ae800 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 mCollection.....................
ae820 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 .Return.True..................Fi
ae840 6e 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 nally......................For.E
ae860 61 63 68 20 72 65 61 64 65 72 20 41 73 20 58 6d 6c 52 65 61 64 65 72 20 49 6e 20 72 65 61 64 65 ach.reader.As.XmlReader.In.reade
ae880 72 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 20 44 69 72 65 rs..........................Dire
ae8a0 63 74 43 61 73 74 28 72 65 61 64 65 72 2c 20 49 44 69 73 70 6f 73 61 62 6c 65 29 2e 44 69 73 70 ctCast(reader,.IDisposable).Disp
ae8c0 6f 73 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d ose()......................Next.
ae8e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 54 72 79 0d 0a 20 20 20 20 20 20 .................End.Try........
ae900 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 ......End.If................Retu
ae920 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a rn.False..........End.Function..
ae940 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 ..........'''.<summary>.........
ae960 20 27 27 27 20 54 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d .'''.Tries.to.load.the.root.elem
ae980 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 70 72 6f 76 69 ent.from.the.metadata.file.provi
ae9a0 64 65 64 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ded..........'''.</summary>.....
ae9c0 20 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 .....Public.Function.TryLoadRoot
ae9e0 45 6c 65 6d 65 6e 74 28 42 79 56 61 6c 20 73 6f 75 72 63 65 50 61 74 68 20 41 73 20 53 74 72 69 Element(ByVal.sourcePath.As.Stri
aea00 6e 67 2c 20 42 79 52 65 66 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d ng,.ByRef.schemaElement.As.XElem
aea20 65 6e 74 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 63 68 ent).As.Boolean..............sch
aea40 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 emaElement.=.Nothing............
aea60 20 20 44 69 6d 20 65 78 74 65 6e 73 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 50 61 74 68 ..Dim.extension.As.String.=.Path
aea80 2e 47 65 74 45 78 74 65 6e 73 69 6f 6e 28 73 6f 75 72 63 65 50 61 74 68 29 0d 0a 20 20 20 20 20 .GetExtension(sourcePath).......
aeaa0 20 20 20 20 20 20 20 49 66 20 65 78 74 65 6e 73 69 6f 6e 2e 45 71 75 61 6c 73 28 22 2e 65 64 6d .......If.extension.Equals(".edm
aeac0 78 22 2c 20 53 74 72 69 6e 67 43 6f 6d 70 61 72 69 73 6f 6e 2e 49 6e 76 61 72 69 61 6e 74 43 75 x",.StringComparison.InvariantCu
aeae0 6c 74 75 72 65 49 67 6e 6f 72 65 43 61 73 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 ltureIgnoreCase).Then...........
aeb00 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 .......Return.TryLoadRootElement
aeb20 46 72 6f 6d 45 64 6d 78 28 73 6f 75 72 63 65 50 61 74 68 2c 20 73 63 68 65 6d 61 45 6c 65 6d 65 FromEdmx(sourcePath,.schemaEleme
aeb40 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 65 78 74 65 6e 73 69 6f nt)..............ElseIf.extensio
aeb60 6e 2e 45 71 75 61 6c 73 28 46 69 6c 65 45 78 74 65 6e 73 69 6f 6e 2c 20 53 74 72 69 6e 67 43 6f n.Equals(FileExtension,.StringCo
aeb80 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 72 65 43 mparison.InvariantCultureIgnoreC
aeba0 61 73 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 20 6c 6f 61 ase).Then..................'.loa
aebc0 64 20 66 72 6f 6d 20 73 69 6e 67 6c 65 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 20 28 2e 63 73 d.from.single.metadata.file.(.cs
aebe0 64 6c 2c 20 2e 73 73 64 6c 2c 20 6f 72 20 2e 6d 73 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 dl,..ssdl,.or..msl).............
aec00 20 20 20 20 20 73 63 68 65 6d 61 45 6c 65 6d 65 6e 74 20 3d 20 58 45 6c 65 6d 65 6e 74 2e 4c 6f .....schemaElement.=.XElement.Lo
aec20 61 64 28 73 6f 75 72 63 65 50 61 74 68 2c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 42 61 ad(sourcePath,.LoadOptions.SetBa
aec40 73 65 55 72 69 20 4f 72 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 4c 69 6e 65 49 6e 66 6f seUri.Or.LoadOptions.SetLineInfo
aec60 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 75 65 0d 0a )..................Return.True..
aec80 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ............End.If..............
aeca0 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 ..Return.False..........End.Func
aecc0 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 tion............'''.<summary>...
aece0 20 20 20 20 20 20 20 27 27 27 20 54 72 69 65 73 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f .......'''.Tries.to.load.the.roo
aed00 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 65 64 6d 78 t.element.from.the.provided.edmx
aed20 44 6f 63 75 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e Document..........'''.</summary>
aed40 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f ..........Private.Function.TryLo
aed60 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 42 79 56 61 6c 20 65 64 6d 78 adRootElementFromEdmx(ByVal.edmx
aed80 44 6f 63 75 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 2c 20 42 79 56 61 6c 20 73 63 68 65 Document.As.XElement,.ByVal.sche
aeda0 6d 61 43 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2c 20 maConstants.As.SchemaConstants,.
aedc0 42 79 56 61 6c 20 73 65 63 74 69 6f 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 ByVal.sectionName.As.String,.ByV
aede0 61 6c 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 al.rootElementName.As.String,.By
aee00 52 65 66 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 29 20 41 73 20 Ref.rootElement.As.XElement).As.
aee20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 Boolean..............rootElement
aee40 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 65 64 .=.Nothing................Dim.ed
aee60 6d 78 4e 73 20 41 73 20 58 4e 61 6d 65 73 70 61 63 65 20 3d 20 73 63 68 65 6d 61 43 6f 6e 73 74 mxNs.As.XNamespace.=.schemaConst
aee80 61 6e 74 73 2e 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ants.EdmxNamespace..............
aeea0 44 69 6d 20 73 65 63 74 69 6f 6e 4e 73 20 41 73 20 58 4e 61 6d 65 73 70 61 63 65 20 3d 20 47 65 Dim.sectionNs.As.XNamespace.=.Ge
aeec0 74 4e 61 6d 65 73 70 61 63 65 28 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 0d 0a 0d 0a 20 tNamespace(schemaConstants).....
aeee0 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 72 75 6e 74 69 6d 65 20 41 73 20 58 45 6c 65 6d 65 ...........Dim.runtime.As.XEleme
aef00 6e 74 20 3d 20 65 64 6d 78 44 6f 63 75 6d 65 6e 74 2e 45 6c 65 6d 65 6e 74 28 65 64 6d 78 4e 73 nt.=.edmxDocument.Element(edmxNs
aef20 20 2b 20 22 52 75 6e 74 69 6d 65 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 72 75 .+."Runtime")..............If.ru
aef40 6e 74 69 6d 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 ntime.Is.Nothing.Then...........
aef60 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .......Return.False.............
aef80 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 63 74 69 .End.If................Dim.secti
aefa0 6f 6e 20 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 72 75 6e 74 69 6d 65 2e 45 6c 65 6d 65 6e 74 on.As.XElement.=.runtime.Element
aefc0 28 65 64 6d 78 4e 73 20 2b 20 73 65 63 74 69 6f 6e 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 (edmxNs.+.sectionName)..........
aefe0 20 20 20 20 49 66 20 73 65 63 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a ....If.section.Is.Nothing.Then..
af000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 46 61 6c 73 65 0d 0a 20 20 ................Return.False....
af020 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..........End.If................
af040 44 69 6d 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 Dim.templateVersion.As.String.=.
af060 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 54 65 Nothing................If.Not.Te
af080 6d 70 6c 61 74 65 4d 65 74 61 64 61 74 61 2e 54 72 79 47 65 74 56 61 6c 75 65 28 4d 65 74 61 64 mplateMetadata.TryGetValue(Metad
af0a0 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 54 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e ataConstants.TT_TEMPLATE_VERSION
af0c0 2c 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 ,.templateVersion).Then.........
af0e0 20 20 20 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 4d 65 74 61 64 .........templateVersion.=.Metad
af100 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 44 45 46 41 55 4c 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 ataConstants.DEFAULT_TEMPLATE_VE
af120 52 53 49 4f 4e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 RSION..............End.If.......
af140 20 20 20 20 20 20 20 20 20 49 66 20 73 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 69 6e 69 .........If.schemaConstants.Mini
af160 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 3e 20 4e 65 77 20 56 65 72 73 69 6f 6e mumTemplateVersion.>.New.Version
af180 28 74 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 (templateVersion).Then..........
af1a0 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 45 72 72 6f ........_textTransformation.Erro
af1c0 72 73 2e 41 64 64 28 4e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 49 66 28 5f 74 65 78 rs.Add(New.CompilerError(If(_tex
af1e0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c tTransformation.Host.TemplateFil
af200 65 2c 20 43 6f 64 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 e,.CodeGenerationTools.GetResour
af220 63 65 53 74 72 69 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 43 75 72 72 65 6e 74 6c 79 52 75 6e 6e ceString("Template_CurrentlyRunn
af240 69 6e 67 54 65 6d 70 6c 61 74 65 22 29 29 2c 20 2d 31 2c 20 2d 31 2c 20 53 74 72 69 6e 67 2e 45 ingTemplate")),.-1,.-1,.String.E
af260 6d 70 74 79 2c 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 64 mpty,._......................Cod
af280 65 47 65 6e 65 72 61 74 69 6f 6e 54 6f 6f 6c 73 2e 47 65 74 52 65 73 6f 75 72 63 65 53 74 72 69 eGenerationTools.GetResourceStri
af2a0 6e 67 28 22 54 65 6d 70 6c 61 74 65 5f 55 6e 73 75 70 70 6f 72 74 65 64 53 63 68 65 6d 61 22 29 ng("Template_UnsupportedSchema")
af2c0 29 20 57 69 74 68 20 7b 20 5f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ).With.{._......................
af2e0 20 20 20 20 2e 49 73 57 61 72 6e 69 6e 67 20 3d 20 54 72 75 65 20 5f 0d 0a 20 20 20 20 20 20 20 .....IsWarning.=.True._.........
af300 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 .............})..............End
af320 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 3d .If................rootElement.=
af340 20 73 65 63 74 69 6f 6e 2e 45 6c 65 6d 65 6e 74 28 73 65 63 74 69 6f 6e 4e 73 20 2b 20 72 6f 6f .section.Element(sectionNs.+.roo
af360 74 45 6c 65 6d 65 6e 74 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 tElementName)..............Retur
af380 6e 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 n.rootElement.IsNot.Nothing.....
af3a0 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 .....End.Function............'''
af3c0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 72 69 65 73 20 74 6f .<summary>..........'''.Tries.to
af3e0 20 6c 6f 61 64 20 74 68 65 20 72 6f 6f 74 20 65 6c 65 6d 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 .load.the.root.element.from.the.
af400 70 72 6f 76 69 64 65 64 20 2e 65 64 6d 78 20 6d 65 74 61 64 61 74 61 20 66 69 6c 65 0d 0a 20 20 provided..edmx.metadata.file....
af420 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 ......'''.</summary>..........Pr
af440 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e ivate.Function.TryLoadRootElemen
af460 74 46 72 6f 6d 45 64 6d 78 28 42 79 56 61 6c 20 65 64 6d 78 50 61 74 68 20 41 73 20 53 74 72 69 tFromEdmx(ByVal.edmxPath.As.Stri
af480 6e 67 2c 20 42 79 52 65 66 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e ng,.ByRef.rootElement.As.XElemen
af4a0 74 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 6f 6f 74 45 t).As.Boolean..............rootE
af4c0 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 lement.=.Nothing................
af4e0 44 69 6d 20 65 6c 65 6d 65 6e 74 20 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 58 45 6c 65 6d 65 Dim.element.As.XElement.=.XEleme
af500 6e 74 2e 4c 6f 61 64 28 65 64 6d 78 50 61 74 68 2c 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 nt.Load(edmxPath,.LoadOptions.Se
af520 74 42 61 73 65 55 72 69 20 4f 72 20 4c 6f 61 64 4f 70 74 69 6f 6e 73 2e 53 65 74 4c 69 6e 65 49 tBaseUri.Or.LoadOptions.SetLineI
af540 6e 66 6f 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 79 4c 6f nfo)................Return.TryLo
af560 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 4d adRootElementFromEdmx(element,.M
af580 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 33 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 etadataConstants.V3_SCHEMA_CONST
af5a0 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d 65 ANTS,.EdmxSectionName,.RootEleme
af5c0 6e 74 4e 61 6d 65 2c 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 20 4f 72 45 6c 73 65 20 54 72 79 4c ntName,.rootElement).OrElse.TryL
af5e0 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c 20 oadRootElementFromEdmx(element,.
af600 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 MetadataConstants.V2_SCHEMA_CONS
af620 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 6d TANTS,.EdmxSectionName,.RootElem
af640 65 6e 74 4e 61 6d 65 2c 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 20 4f 72 45 6c 73 65 20 54 72 79 entName,.rootElement).OrElse.Try
af660 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 6e 74 46 72 6f 6d 45 64 6d 78 28 65 6c 65 6d 65 6e 74 2c LoadRootElementFromEdmx(element,
af680 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 56 31 5f 53 43 48 45 4d 41 5f 43 4f 4e .MetadataConstants.V1_SCHEMA_CON
af6a0 53 54 41 4e 54 53 2c 20 45 64 6d 78 53 65 63 74 69 6f 6e 4e 61 6d 65 2c 20 52 6f 6f 74 45 6c 65 STANTS,.EdmxSectionName,.RootEle
af6c0 6d 65 6e 74 4e 61 6d 65 2c 20 72 6f 6f 74 45 6c 65 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 mentName,.rootElement)..........
af6e0 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d End.Function............'''.<sum
af700 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 54 61 6b 65 73 20 61 6e 20 45 6e 75 6d mary>..........'''.Takes.an.Enum
af720 65 72 61 62 6c 65 20 6f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 73 2c 20 61 6e 64 20 61 erable.of.EdmSchemaErrors,.and.a
af740 64 64 73 20 74 68 65 6d 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 74 6f 20 74 68 65 20 65 72 72 dds.them..........'''.to.the.err
af760 6f 72 73 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 ors.collection.of.the.template.c
af780 6c 61 73 73 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 lass..........'''.</summary>....
af7a0 20 20 20 20 20 20 50 72 69 76 61 74 65 20 46 75 6e 63 74 69 6f 6e 20 50 72 6f 63 65 73 73 45 72 ......Private.Function.ProcessEr
af7c0 72 6f 72 73 28 42 79 56 61 6c 20 65 72 72 6f 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 rors(ByVal.errors.As.IEnumerable
af7e0 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 2c 20 42 79 56 61 6c 20 73 6f 75 72 63 (Of.EdmSchemaError),.ByVal.sourc
af800 65 46 69 6c 65 50 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d eFilePath.As.String).As.Boolean.
af820 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 66 6f 75 6e 64 45 72 72 6f 72 73 20 41 73 20 .............Dim.foundErrors.As.
af840 42 6f 6f 6c 65 61 6e 20 3d 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 Boolean.=.False..............For
af860 20 45 61 63 68 20 73 63 68 65 6d 61 45 72 72 6f 72 20 41 73 20 45 64 6d 53 63 68 65 6d 61 45 72 .Each.schemaError.As.EdmSchemaEr
af880 72 6f 72 20 49 6e 20 65 72 72 6f 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 ror.In.errors..................D
af8a0 69 6d 20 6e 65 77 45 72 72 6f 72 20 41 73 20 4e 65 77 20 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 im.newError.As.New.CompilerError
af8c0 28 73 63 68 65 6d 61 45 72 72 6f 72 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 6f 6e 2c 20 73 63 68 (schemaError.SchemaLocation,.sch
af8e0 65 6d 61 45 72 72 6f 72 2e 4c 69 6e 65 2c 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 43 6f 6c 75 6d emaError.Line,.schemaError.Colum
af900 6e 2c 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 45 72 72 6f 72 43 6f 64 65 2e 54 6f 53 74 72 69 6e n,.schemaError.ErrorCode.ToStrin
af920 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 29 2c g(CultureInfo.InvariantCulture),
af940 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 4d 65 73 73 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 .schemaError.Message)...........
af960 20 20 20 20 20 20 20 6e 65 77 45 72 72 6f 72 2e 49 73 57 61 72 6e 69 6e 67 20 3d 20 73 63 68 65 .......newError.IsWarning.=.sche
af980 6d 61 45 72 72 6f 72 2e 53 65 76 65 72 69 74 79 20 3d 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f maError.Severity.=.EdmSchemaErro
af9a0 72 53 65 76 65 72 69 74 79 2e 57 61 72 6e 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rSeverity.Warning...............
af9c0 20 20 20 66 6f 75 6e 64 45 72 72 6f 72 73 20 3d 20 66 6f 75 6e 64 45 72 72 6f 72 73 20 4f 72 20 ...foundErrors.=.foundErrors.Or.
af9e0 73 63 68 65 6d 61 45 72 72 6f 72 2e 53 65 76 65 72 69 74 79 20 3d 20 45 64 6d 53 63 68 65 6d 61 schemaError.Severity.=.EdmSchema
afa00 45 72 72 6f 72 53 65 76 65 72 69 74 79 2e 45 72 72 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ErrorSeverity.Error.............
afa20 20 20 20 20 20 49 66 20 73 63 68 65 6d 61 45 72 72 6f 72 2e 53 63 68 65 6d 61 4c 6f 63 61 74 69 .....If.schemaError.SchemaLocati
afa40 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 on.Is.Nothing.Then..............
afa60 20 20 20 20 20 20 20 20 6e 65 77 45 72 72 6f 72 2e 46 69 6c 65 4e 61 6d 65 20 3d 20 73 6f 75 72 ........newError.FileName.=.sour
afa80 63 65 46 69 6c 65 50 61 74 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 ceFilePath..................End.
afaa0 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f If.................._textTransfo
afac0 72 6d 61 74 69 6f 6e 2e 45 72 72 6f 72 73 2e 41 64 64 28 6e 65 77 45 72 72 6f 72 29 0d 0a 20 20 rmation.Errors.Add(newError)....
afae0 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 ..........Next................Re
afb00 74 75 72 6e 20 66 6f 75 6e 64 45 72 72 6f 72 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 turn.foundErrors..........End.Fu
afb20 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 20 20 20 20 27 27 27 nction......End.Class........'''
afb40 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 42 75 69 6c 64 65 72 20 63 6c 61 73 .<summary>......'''.Builder.clas
afb60 73 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 61 20 53 74 6f 72 61 67 65 4d 61 70 70 69 6e 67 49 s.for.creating.a.StorageMappingI
afb80 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 temCollection......'''.</summary
afba0 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 53 74 6f 72 61 67 65 4d 61 70 70 >......Private.Class.StorageMapp
afbc0 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 ingItemCollectionBuilder........
afbe0 20 20 49 6e 68 65 72 69 74 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 ..Inherits.ItemCollectionBuilder
afc00 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 65 64 6d 49 ..........Private.ReadOnly._edmI
afc20 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 temCollection.As.EdmItemCollecti
afc40 6f 6e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 73 74 on..........Private.ReadOnly._st
afc60 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 53 74 6f 72 65 49 74 65 6d 43 6f oreItemCollection.As.StoreItemCo
afc80 6c 6c 65 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e llection............Public.Sub.N
afca0 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 ew(ByVal.textTransformation.As.D
afcc0 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 42 79 56 61 6c 20 ynamicTextTransformation,.ByVal.
afce0 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 41 73 20 45 64 6d 49 74 65 6d 43 6f 6c 6c edmItemCollection.As.EdmItemColl
afd00 65 63 74 69 6f 6e 2c 20 42 79 56 61 6c 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f ection,.ByVal.storeItemCollectio
afd20 6e 20 41 73 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 n.As.StoreItemCollection).......
afd40 20 20 20 20 20 20 20 4d 79 42 61 73 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 .......MyBase.New(textTransforma
afd60 74 69 6f 6e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 45 58 54 45 tion,.MetadataConstants.MSL_EXTE
afd80 4e 53 49 4f 4e 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 4d 53 4c 5f 45 44 4d NSION,.MetadataConstants.MSL_EDM
afda0 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 X_SECTION_NAME,.MetadataConstant
afdc0 73 2e 4d 53 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 s.MSL_ROOT_ELEMENT_NAME)........
afde0 20 20 20 20 20 20 5f 65 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 65 64 6d 49 74 ......_edmItemCollection.=.edmIt
afe00 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 73 74 6f 72 65 emCollection.............._store
afe20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 20 3d 20 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 ItemCollection.=.storeItemCollec
afe40 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 tion..........End.Sub...........
afe60 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 46 .Protected.Overloads.Overrides.F
afe80 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 unction.CreateItemCollection(ByV
afea0 61 6c 20 72 65 61 64 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 58 6d 6c al.readers.As.IEnumerable(Of.Xml
afec0 52 65 61 64 65 72 29 2c 20 42 79 52 65 66 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f Reader),.ByRef.errors.As.IList(O
afee0 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 29 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 f.EdmSchemaError)).As.ItemCollec
aff00 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 74 61 64 61 74 tion..............Return.Metadat
aff20 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 53 74 6f aItemCollectionFactory.CreateSto
aff40 72 61 67 65 4d 61 70 70 69 6e 67 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 5f 65 64 6d 49 74 rageMappingItemCollection(_edmIt
aff60 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 2c 20 5f 73 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 emCollection,._storeItemCollecti
aff80 6f 6e 2c 20 72 65 61 64 65 72 73 2c 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e on,.readers,.errors)..........En
affa0 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 d.Function............'''.<summa
affc0 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 ry>..........'''.Selects.a.names
affe0 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 pace.from.the.supplied.constants
b0000 2e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 ...........'''.</summary>.......
b0020 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 ...Protected.Overrides.Function.
b0040 47 65 74 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 GetNamespace(ByVal.constants.As.
b0060 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 SchemaConstants).As.String......
b0080 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 4d 73 6c 4e 61 6d 65 ........Return.constants.MslName
b00a0 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 space..........End.Function.....
b00c0 20 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d .End.Class........'''.<summary>.
b00e0 0a 20 20 20 20 27 27 27 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 .....'''.Builder.class.for.creat
b0100 69 6e 67 20 61 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 ing.a.StoreItemCollection......'
b0120 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 73 73 ''.</summary>......Private.Class
b0140 20 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 .StoreItemCollectionBuilder.....
b0160 20 20 20 20 20 49 6e 68 65 72 69 74 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c .....Inherits.ItemCollectionBuil
b0180 64 65 72 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 der..........Public.Sub.New(ByVa
b01a0 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 l.textTransformation.As.DynamicT
b01c0 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 extTransformation)..............
b01e0 4d 79 42 61 73 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d MyBase.New(textTransformation,.M
b0200 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c etadataConstants.SSDL_EXTENSION,
b0220 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 4c 5f 45 44 4d 58 5f 53 45 43 .MetadataConstants.SSDL_EDMX_SEC
b0240 54 49 4f 4e 5f 4e 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 53 53 44 TION_NAME,.MetadataConstants.SSD
b0260 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 45 6e L_ROOT_ELEMENT_NAME)..........En
b0280 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 6c d.Sub............Protected.Overl
b02a0 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 oads.Overrides.Function.CreateIt
b02c0 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 61 6c 20 72 65 61 64 65 72 73 20 41 73 20 49 45 emCollection(ByVal.readers.As.IE
b02e0 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 2c 20 42 79 52 65 66 20 65 numerable(Of.XmlReader),.ByRef.e
b0300 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 rrors.As.IList(Of.EdmSchemaError
b0320 29 29 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 )).As.ItemCollection............
b0340 20 20 52 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 46 ..Return.MetadataItemCollectionF
b0360 61 63 74 6f 72 79 2e 43 72 65 61 74 65 53 74 6f 72 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e actory.CreateStoreItemCollection
b0380 28 72 65 61 64 65 72 73 2c 20 65 72 72 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 (readers,.errors)..........End.F
b03a0 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e unction............'''.<summary>
b03c0 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 53 65 6c 65 63 74 73 20 61 20 6e 61 6d 65 73 70 61 63 ..........'''.Selects.a.namespac
b03e0 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 74 61 6e 74 73 2e 0d 0a e.from.the.supplied.constants...
b0400 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 ........'''.</summary>..........
b0420 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 74 69 6f 6e 20 47 65 74 Protected.Overrides.Function.Get
b0440 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c 20 63 6f 6e 73 74 61 6e 74 73 20 41 73 20 53 63 68 Namespace(ByVal.constants.As.Sch
b0460 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 emaConstants).As.String.........
b0480 20 20 20 20 20 52 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 53 73 64 6c 4e 61 6d 65 73 70 .....Return.constants.SsdlNamesp
b04a0 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 ace..........End.Function.......
b04c0 20 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d .End.Class........'''.<summary>.
b04e0 0a 20 20 20 20 27 27 27 20 42 75 69 6c 64 65 72 20 63 6c 61 73 73 20 66 6f 72 20 63 72 65 61 74 .....'''.Builder.class.for.creat
b0500 69 6e 67 20 61 20 45 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 ing.a.EdmItemCollection......'''
b0520 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6c 61 73 73 20 45 .</summary>......Private.Class.E
b0540 64 6d 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 dmItemCollectionBuilder.........
b0560 20 49 6e 68 65 72 69 74 73 20 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 42 75 69 6c 64 65 72 0d .Inherits.ItemCollectionBuilder.
b0580 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d .........Private._referenceSchem
b05a0 61 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 53 74 72 69 6e 67 29 28 29 0d 0a 0d 0a 20 as.As.New.List(Of.String)().....
b05c0 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 .......Public.Sub.New(ByVal.text
b05e0 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 Transformation.As.DynamicTextTra
b0600 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 79 42 61 73 65 nsformation)..............MyBase
b0620 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 4d 65 74 61 64 61 74 .New(textTransformation,.Metadat
b0640 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 2c 20 4d 65 74 61 64 aConstants.CSDL_EXTENSION,.Metad
b0660 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e ataConstants.CSDL_EDMX_SECTION_N
b0680 41 4d 45 2c 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 6e 74 73 2e 43 53 44 4c 5f 52 4f 4f 54 AME,.MetadataConstants.CSDL_ROOT
b06a0 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d _ELEMENT_NAME)..........End.Sub.
b06c0 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 ...........Public.Sub.New(ByVal.
b06e0 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 textTransformation.As.DynamicTex
b0700 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 42 79 56 61 6c 20 72 65 66 65 72 65 6e 63 65 tTransformation,.ByVal.reference
b0720 53 63 68 65 6d 61 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 Schemas.As.IEnumerable(Of.String
b0740 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 ))..............Me.New(textTrans
b0760 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 72 65 66 65 72 65 6e formation).............._referen
b0780 63 65 53 63 68 65 6d 61 73 2e 41 64 64 52 61 6e 67 65 28 72 65 66 65 72 65 6e 63 65 53 63 68 65 ceSchemas.AddRange(referenceSche
b07a0 6d 61 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 mas)..........End.Sub...........
b07c0 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 20 46 .Protected.Overloads.Overrides.F
b07e0 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 49 74 65 6d 43 6f 6c 6c 65 63 74 69 6f 6e 28 42 79 56 unction.CreateItemCollection(ByV
b0800 61 6c 20 72 65 61 64 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 58 6d 6c al.readers.As.IEnumerable(Of.Xml
b0820 52 65 61 64 65 72 29 2c 20 42 79 52 65 66 20 65 72 72 6f 72 73 20 41 73 20 49 4c 69 73 74 28 4f Reader),.ByRef.errors.As.IList(O
b0840 66 20 45 64 6d 53 63 68 65 6d 61 45 72 72 6f 72 29 29 20 41 73 20 49 74 65 6d 43 6f 6c 6c 65 63 f.EdmSchemaError)).As.ItemCollec
b0860 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6f 77 6e 65 64 52 65 61 64 65 tion..............Dim.ownedReade
b0880 72 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 28 29 0d 0a rs.As.New.List(Of.XmlReader)()..
b08a0 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 61 6c 6c 52 65 61 64 65 72 73 20 41 73 20 4e 65 ............Dim.allReaders.As.Ne
b08c0 77 20 4c 69 73 74 28 4f 66 20 58 6d 6c 52 65 61 64 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 w.List(Of.XmlReader)()..........
b08e0 20 20 20 20 54 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6c 6c 52 65 61 64 ....Try..................allRead
b0900 65 72 73 2e 41 64 64 52 61 6e 67 65 28 72 65 61 64 65 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 ers.AddRange(readers)...........
b0920 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 74 68 20 41 73 20 53 74 72 69 6e 67 20 49 .......For.Each.path.As.String.I
b0940 6e 20 5f 72 65 66 65 72 65 6e 63 65 53 63 68 65 6d 61 73 2e 44 69 73 74 69 6e 63 74 28 29 0d 0a n._referenceSchemas.Distinct()..
b0960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 66 65 72 65 6e 63 ....................Dim.referenc
b0980 65 20 41 73 20 58 45 6c 65 6d 65 6e 74 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 e.As.XElement.=.Nothing.........
b09a0 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 54 72 79 4c 6f 61 64 52 6f 6f 74 45 6c 65 6d 65 .............If.TryLoadRootEleme
b09c0 6e 74 28 70 61 74 68 2c 20 72 65 66 65 72 65 6e 63 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 nt(path,.reference).Then........
b09e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 72 65 61 64 65 72 20 41 73 20 ..................Dim.reader.As.
b0a00 58 6d 6c 52 65 61 64 65 72 20 3d 20 72 65 66 65 72 65 6e 63 65 2e 43 72 65 61 74 65 52 65 61 64 XmlReader.=.reference.CreateRead
b0a20 65 72 28 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 61 6c er()..........................al
b0a40 6c 52 65 61 64 65 72 73 2e 41 64 64 28 72 65 61 64 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 lReaders.Add(reader)............
b0a60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 77 6e 65 64 52 65 61 64 65 72 73 2e 41 64 64 28 72 ..............ownedReaders.Add(r
b0a80 65 61 64 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 eader)......................End.
b0aa0 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 If..................Next........
b0ac0 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 74 61 64 61 74 61 49 74 65 6d 43 ............Return.MetadataItemC
b0ae0 6f 6c 6c 65 63 74 69 6f 6e 46 61 63 74 6f 72 79 2e 43 72 65 61 74 65 45 64 6d 49 74 65 6d 43 6f ollectionFactory.CreateEdmItemCo
b0b00 6c 6c 65 63 74 69 6f 6e 28 61 6c 6c 52 65 61 64 65 72 73 2c 20 65 72 72 6f 72 73 29 0d 0a 20 20 llection(allReaders,.errors)....
b0b20 20 20 20 20 20 20 20 20 20 20 46 69 6e 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........Finally...............
b0b40 20 20 20 46 6f 72 20 45 61 63 68 20 72 65 61 64 65 72 20 41 73 20 58 6d 6c 52 65 61 64 65 72 20 ...For.Each.reader.As.XmlReader.
b0b60 49 6e 20 6f 77 6e 65 64 52 65 61 64 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 In.ownedReaders.................
b0b80 20 20 20 20 20 44 69 72 65 63 74 43 61 73 74 28 72 65 61 64 65 72 2c 20 49 44 69 73 70 6f 73 61 .....DirectCast(reader,.IDisposa
b0ba0 62 6c 65 29 2e 44 69 73 70 6f 73 65 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ble).Dispose()..................
b0bc0 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 54 72 79 0d 0a 20 20 20 20 20 Next..............End.Try.......
b0be0 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c ...End.Function............'''.<
b0c00 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 53 65 6c 65 63 74 73 20 61 20 summary>..........'''.Selects.a.
b0c20 6e 61 6d 65 73 70 61 63 65 20 66 72 6f 6d 20 74 68 65 20 73 75 70 70 6c 69 65 64 20 63 6f 6e 73 namespace.from.the.supplied.cons
b0c40 74 61 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a tants...........'''.</summary>..
b0c60 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 72 69 64 65 73 20 46 75 6e 63 ........Protected.Overrides.Func
b0c80 74 69 6f 6e 20 47 65 74 4e 61 6d 65 73 70 61 63 65 28 42 79 56 61 6c 20 63 6f 6e 73 74 61 6e 74 tion.GetNamespace(ByVal.constant
b0ca0 73 20 41 73 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 29 20 41 73 20 53 74 72 69 6e 67 0d s.As.SchemaConstants).As.String.
b0cc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 73 2e 43 73 .............Return.constants.Cs
b0ce0 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f dlNamespace..........End.Functio
b0d00 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 n......End.Class..End.Class....'
b0d20 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f ''.<summary>..'''.Responsible.fo
b0d40 72 20 65 6e 63 61 70 73 75 6c 61 74 69 6e 67 20 74 68 65 20 72 65 74 72 69 65 76 61 6c 20 61 6e r.encapsulating.the.retrieval.an
b0d60 64 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 43 6f 64 65 47 65 6e 65 72 61 74 d.translation.of.the.CodeGenerat
b0d80 69 6f 6e 0d 0a 27 27 27 20 61 6e 6e 6f 74 61 74 69 6f 6e 73 20 69 6e 20 74 68 65 20 45 6e 74 69 ion..'''.annotations.in.the.Enti
b0da0 74 79 46 72 61 6d 65 77 6f 72 6b 20 4d 65 74 61 64 61 74 61 20 74 6f 20 61 20 66 6f 72 6d 20 74 tyFramework.Metadata.to.a.form.t
b0dc0 68 61 74 20 69 73 20 75 73 65 66 75 6c 20 69 6e 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e hat.is.useful.in.code.generation
b0de0 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 ...'''.</summary>..Public.Class.
b0e00 41 63 63 65 73 73 69 62 69 6c 69 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 4e Accessibility......Private.Sub.N
b0e20 65 77 28 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 ew()......End.Sub......Private.C
b0e40 6f 6e 73 74 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 onst.GETTER_ACCESS.As.String.=."
b0e60 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f http://schemas.microsoft.com/ado
b0e80 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 47 65 74 74 65 72 41 63 /2006/04/codegeneration:GetterAc
b0ea0 63 65 73 73 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 53 45 54 54 45 52 5f cess"......Private.Const.SETTER_
b0ec0 41 43 43 45 53 53 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d ACCESS.As.String.=."http://schem
b0ee0 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 as.microsoft.com/ado/2006/04/cod
b0f00 65 67 65 6e 65 72 61 74 69 6f 6e 3a 53 65 74 74 65 72 41 63 63 65 73 73 22 0d 0a 20 20 20 20 50 egeneration:SetterAccess"......P
b0f20 72 69 76 61 74 65 20 43 6f 6e 73 74 20 54 59 50 45 5f 41 43 43 45 53 53 20 41 73 20 53 74 72 69 rivate.Const.TYPE_ACCESS.As.Stri
b0f40 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 ng.=."http://schemas.microsoft.c
b0f60 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 54 79 om/ado/2006/04/codegeneration:Ty
b0f80 70 65 41 63 63 65 73 73 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 4d 45 54 peAccess"......Private.Const.MET
b0fa0 48 4f 44 5f 41 43 43 45 53 53 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a 2f 2f 73 HOD_ACCESS.As.String.=."http://s
b0fc0 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 chemas.microsoft.com/ado/2006/04
b0fe0 2f 63 6f 64 65 67 65 6e 65 72 61 74 69 6f 6e 3a 4d 65 74 68 6f 64 41 63 63 65 73 73 22 0d 0a 20 /codegeneration:MethodAccess"...
b1000 20 20 20 50 72 69 76 61 74 65 20 43 6f 6e 73 74 20 41 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 ...Private.Const.ACCESS_PROTECTE
b1020 44 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 50 72 6f 74 65 63 74 65 64 22 0d 0a 20 20 20 20 50 D.As.String.=."Protected"......P
b1040 72 69 76 61 74 65 20 43 6f 6e 73 74 20 41 43 43 45 53 53 5f 49 4e 54 45 52 4e 41 4c 20 41 73 20 rivate.Const.ACCESS_INTERNAL.As.
b1060 53 74 72 69 6e 67 20 3d 20 22 49 6e 74 65 72 6e 61 6c 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 String.=."Internal"......Private
b1080 20 43 6f 6e 73 74 20 41 43 43 45 53 53 5f 50 52 49 56 41 54 45 20 41 73 20 53 74 72 69 6e 67 20 .Const.ACCESS_PRIVATE.As.String.
b10a0 3d 20 22 50 72 69 76 61 74 65 22 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 =."Private"......Private.Shared.
b10c0 52 65 61 64 4f 6e 6c 79 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b ReadOnly.AccessibilityRankIdLook
b10e0 75 70 20 41 73 20 4e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 up.As.New.Dictionary(Of.String,.
b1100 49 6e 74 65 67 65 72 29 28 29 20 46 72 6f 6d 20 5f 0d 0a 20 20 20 20 20 20 20 20 7b 20 5f 0d 0a Integer)().From._..........{._..
b1120 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 50 72 69 76 61 74 65 22 2c 20 31 7d 2c 20 5f 0d 0a ............{."Private",.1},._..
b1140 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 46 72 69 65 6e 64 22 2c 20 32 7d 2c 20 5f 0d 0a 20 ............{."Friend",.2},._...
b1160 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 50 72 6f 74 65 63 74 65 64 22 2c 20 33 7d 2c 20 5f 0d ...........{."Protected",.3},._.
b1180 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 22 50 75 62 6c 69 63 22 2c 20 34 7d 20 5f 0d 0a 20 .............{."Public",.4}._...
b11a0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 .......}........'''.<summary>...
b11c0 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 ...'''.Gets.the.accessibility.th
b11e0 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 74 6f 20 61 20 74 79 70 65 20 62 at.should.be.applied.to.a.type.b
b1200 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 eing.generated.from.the.provided
b1220 20 47 6c 6f 62 61 6c 49 74 65 6d 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 .GlobalItem.......'''......'''.d
b1240 65 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 efaults.to.public.if.no.annotati
b1260 6f 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e on.is.found.......'''.</summary>
b1280 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 ......Public.Shared.Function.For
b12a0 54 79 70 65 28 42 79 56 61 6c 20 69 74 65 6d 20 41 73 20 47 6c 6f 62 61 6c 49 74 65 6d 29 20 41 Type(ByVal.item.As.GlobalItem).A
b12c0 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 69 74 65 6d 20 49 73 20 4e 6f 74 s.String..........If.item.Is.Not
b12e0 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f hing.Then..............Return.No
b1300 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 thing..........End.If...........
b1320 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 54 .Return.GetAccessibility(item,.T
b1340 59 50 45 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d YPE_ACCESS)......End.Function...
b1360 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 .....'''.<summary>......'''.Gets
b1380 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 .the.accessibility.that.should.b
b13a0 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 e.applied.at.the.property.level.
b13c0 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 for.a.property.being......'''.ge
b13e0 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d nerated.from.the.provided.EdmMem
b1400 62 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 ber.......'''......'''.defaults.
b1420 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f to.public.if.no.annotation.is.fo
b1440 75 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 und.......'''.</summary>......Pu
b1460 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 50 72 6f 70 65 72 74 79 blic.Shared.Function.ForProperty
b1480 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 (ByVal.member.As.EdmMember).As.S
b14a0 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 tring..........If.member.Is.Noth
b14c0 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 ing.Then..............Return.Not
b14e0 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 hing..........End.If............
b1500 44 69 6d 20 67 65 74 74 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 Dim.getterAccess.As.String.=.Not
b1520 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 73 65 74 74 65 72 41 63 63 65 73 73 20 41 hing..........Dim.setterAccess.A
b1540 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 s.String.=.Nothing..........Dim.
b1560 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 propertyAccess.As.String.=.Nothi
b1580 6e 67 0d 0a 20 20 20 20 20 20 20 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 ng..........CalculatePropertyAcc
b15a0 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 65 72 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 essibility(member,.propertyAcces
b15c0 73 2c 20 67 65 74 74 65 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 73 29 0d 0a s,.getterAccess,.setterAccess)..
b15e0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 0d 0a 20 ........Return.propertyAccess...
b1600 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ...End.Function........'''.<summ
b1620 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 ary>......'''.Gets.the.accessibi
b1640 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 lity.that.should.be.applied.at.t
b1660 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 52 65 61 64 2d 4f 6e 6c he.property.level.for.a.Read-Onl
b1680 79 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 61 y.property.being......'''.genera
b16a0 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 2e ted.from.the.provided.EdmMember.
b16c0 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 70 ......'''......'''.defaults.to.p
b16e0 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 2e ublic.if.no.annotation.is.found.
b1700 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 ......'''.</summary>......Public
b1720 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 52 65 61 64 4f 6e 6c 79 50 72 6f 70 .Shared.Function.ForReadOnlyProp
b1740 65 72 74 79 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 erty(ByVal.member.As.EdmMember).
b1760 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 As.String..........If.member.Is.
b1780 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e Nothing.Then..............Return
b17a0 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 .Nothing..........End.If........
b17c0 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 6d 62 ....Return.GetAccessibility(memb
b17e0 65 72 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 er,.GETTER_ACCESS)......End.Func
b1800 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 tion........'''.<summary>......'
b1820 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 ''.Gets.the.accessibility.that.s
b1840 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 70 72 6f 70 65 72 74 79 hould.be.applied.at.the.property
b1860 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 .level.for.a.property.being.....
b1880 20 27 27 27 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 .'''.generated.from.the.provided
b18a0 20 45 6e 74 69 74 79 53 65 74 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 .EntitySet.......'''......'''.de
b18c0 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f faults.to.public.if.no.annotatio
b18e0 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d n.is.found.......'''.</summary>.
b1900 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 52 .....Public.Shared.Function.ForR
b1920 65 61 64 4f 6e 6c 79 50 72 6f 70 65 72 74 79 28 42 79 56 61 6c 20 65 64 6d 53 65 74 20 41 73 20 eadOnlyProperty(ByVal.edmSet.As.
b1940 45 6e 74 69 74 79 53 65 74 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 EntitySet).As.String..........If
b1960 20 65 64 6d 53 65 74 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 .edmSet.Is.Nothing.Then.........
b1980 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 .....Return.Nothing..........End
b19a0 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 .If............Return.GetAccessi
b19c0 62 69 6c 69 74 79 28 65 64 6d 53 65 74 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 bility(edmSet,.GETTER_ACCESS)...
b19e0 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ...End.Function........'''.<summ
b1a00 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 ary>......'''.Gets.the.accessibi
b1a20 6c 69 74 79 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 lity.that.should.be.applied.at.t
b1a40 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 20 66 6f 72 20 61 20 57 72 69 74 65 2d 4f 6e he.property.level.for.a.Write-On
b1a60 6c 79 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 67 65 6e 65 72 ly.property.being......'''.gener
b1a80 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d 4d 65 6d 62 65 72 ated.from.the.provided.EdmMember
b1aa0 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c 74 73 20 74 6f 20 .......'''......'''.defaults.to.
b1ac0 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 66 6f 75 6e 64 public.if.no.annotation.is.found
b1ae0 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 .......'''.</summary>......Publi
b1b00 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 57 72 69 74 65 4f 6e 6c 79 50 72 c.Shared.Function.ForWriteOnlyPr
b1b20 6f 70 65 72 74 79 28 42 79 56 61 6c 20 6d 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 operty(ByVal.member.As.EdmMember
b1b40 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 ).As.String..........If.member.I
b1b60 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 s.Nothing.Then..............Retu
b1b80 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 rn.Nothing..........End.If......
b1ba0 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 6d 65 ......Return.GetAccessibility(me
b1bc0 6d 62 65 72 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 mber,.SETTER_ACCESS)......End.Fu
b1be0 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 nction........'''.<summary>.....
b1c00 20 27 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 .'''.Gets.the.accessibility.that
b1c20 20 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 67 65 74 20 6c 65 .should.be.applied.at.the.get.le
b1c40 76 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 vel.for.a.property.being......''
b1c60 27 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 '.generated.from.the.provided.Ed
b1c80 6d 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 mMember.......'''......'''.defau
b1ca0 6c 74 73 20 74 6f 20 65 6d 70 74 79 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 lts.to.empty.if.no.annotation.is
b1cc0 20 66 6f 75 6e 64 20 6f 72 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 .found.or.the.accessibility.is.t
b1ce0 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a he.same.as.the.property.level...
b1d00 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 ....'''.</summary>......Public.S
b1d20 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 47 65 74 74 65 72 28 42 79 56 61 6c 20 6d hared.Function.ForGetter(ByVal.m
b1d40 65 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 ember.As.EdmMember).As.String...
b1d60 20 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e .......If.member.Is.Nothing.Then
b1d80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 ..............Return.Nothing....
b1da0 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 74 ......End.If............Dim.gett
b1dc0 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 erAccess.As.String.=.Nothing....
b1de0 20 20 20 20 20 20 44 69 6d 20 73 65 74 74 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 ......Dim.setterAccess.As.String
b1e00 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 70 65 72 74 79 .=.Nothing..........Dim.property
b1e20 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 Access.As.String.=.Nothing......
b1e40 20 20 20 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 ....CalculatePropertyAccessibili
b1e60 74 79 28 6d 65 6d 62 65 72 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 67 65 74 74 65 ty(member,.propertyAccess,.gette
b1e80 72 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 73 29 0d 0a 20 20 20 20 20 20 20 20 rAccess,.setterAccess)..........
b1ea0 52 65 74 75 72 6e 20 67 65 74 74 65 72 41 63 63 65 73 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e Return.getterAccess......End.Fun
b1ec0 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ction........'''.<summary>......
b1ee0 27 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 '''.Gets.the.accessibility.that.
b1f00 73 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 61 74 20 74 68 65 20 73 65 74 20 6c 65 76 should.be.applied.at.the.set.lev
b1f20 65 6c 20 66 6f 72 20 61 20 70 72 6f 70 65 72 74 79 20 62 65 69 6e 67 0d 0a 20 20 20 20 27 27 27 el.for.a.property.being......'''
b1f40 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 64 6d .generated.from.the.provided.Edm
b1f60 4d 65 6d 62 65 72 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 66 61 75 6c Member.......'''......'''.defaul
b1f80 74 73 20 74 6f 20 65 6d 70 74 79 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f 6e 20 69 73 20 ts.to.empty.if.no.annotation.is.
b1fa0 66 6f 75 6e 64 20 6f 72 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 69 73 20 74 68 found.or.the.accessibility.is.th
b1fc0 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 70 72 6f 70 65 72 74 79 20 6c 65 76 65 6c 2e 0d 0a 20 e.same.as.the.property.level....
b1fe0 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 ...'''.</summary>......Public.Sh
b2000 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 53 65 74 74 65 72 28 42 79 56 61 6c 20 6d 65 ared.Function.ForSetter(ByVal.me
b2020 6d 62 65 72 20 41 73 20 45 64 6d 4d 65 6d 62 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 mber.As.EdmMember).As.String....
b2040 20 20 20 20 20 20 49 66 20 6d 65 6d 62 65 72 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d ......If.member.Is.Nothing.Then.
b2060 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 .............Return.Nothing.....
b2080 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 74 65 .....End.If............Dim.gette
b20a0 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 rAccess.As.String.=.Nothing.....
b20c0 20 20 20 20 20 44 69 6d 20 73 65 74 74 65 72 41 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 .....Dim.setterAccess.As.String.
b20e0 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 70 65 72 74 79 41 =.Nothing..........Dim.propertyA
b2100 63 63 65 73 73 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 ccess.As.String.=.Nothing.......
b2120 20 20 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 ...CalculatePropertyAccessibilit
b2140 79 28 6d 65 6d 62 65 72 2c 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 2c 20 67 65 74 74 65 72 y(member,.propertyAccess,.getter
b2160 41 63 63 65 73 73 2c 20 73 65 74 74 65 72 41 63 63 65 73 73 29 0d 0a 20 20 20 20 20 20 20 20 52 Access,.setterAccess)..........R
b2180 65 74 75 72 6e 20 73 65 74 74 65 72 41 63 63 65 73 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 eturn.setterAccess......End.Func
b21a0 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 tion........'''.<summary>......'
b21c0 27 27 20 47 65 74 73 20 74 68 65 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 74 68 61 74 20 73 ''.Gets.the.accessibility.that.s
b21e0 68 6f 75 6c 64 20 62 65 20 61 70 70 6c 69 65 64 20 74 6f 20 61 20 6d 65 74 68 6f 64 20 62 65 69 hould.be.applied.to.a.method.bei
b2200 6e 67 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 45 ng.generated.from.the.provided.E
b2220 64 6d 46 75 6e 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 27 27 27 0d 0a 20 20 20 20 27 27 27 20 64 65 dmFunction.......'''......'''.de
b2240 66 61 75 6c 74 73 20 74 6f 20 70 75 62 6c 69 63 20 69 66 20 6e 6f 20 61 6e 6e 6f 74 61 74 69 6f faults.to.public.if.no.annotatio
b2260 6e 20 69 73 20 66 6f 75 6e 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d n.is.found.......'''.</summary>.
b2280 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 46 6f 72 4d .....Public.Shared.Function.ForM
b22a0 65 74 68 6f 64 28 42 79 56 61 6c 20 65 64 6d 46 75 6e 63 74 69 6f 6e 20 41 73 20 45 64 6d 46 75 ethod(ByVal.edmFunction.As.EdmFu
b22c0 6e 63 74 69 6f 6e 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 64 nction).As.String..........If.ed
b22e0 6d 46 75 6e 63 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 mFunction.Is.Nothing.Then.......
b2300 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 .......Return.Nothing..........E
b2320 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 47 65 74 41 63 63 65 73 nd.If............Return.GetAcces
b2340 73 69 62 69 6c 69 74 79 28 65 64 6d 46 75 6e 63 74 69 6f 6e 2c 20 4d 45 54 48 4f 44 5f 41 43 43 sibility(edmFunction,.METHOD_ACC
b2360 45 53 53 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 ESS)......End.Function........Pr
b2380 69 76 61 74 65 20 53 68 61 72 65 64 20 53 75 62 20 43 61 6c 63 75 6c 61 74 65 50 72 6f 70 65 72 ivate.Shared.Sub.CalculateProper
b23a0 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 42 79 56 61 6c 20 69 74 65 6d 20 41 73 20 4d 65 tyAccessibility(ByVal.item.As.Me
b23c0 74 61 64 61 74 61 49 74 65 6d 2c 20 42 79 52 65 66 20 70 72 6f 70 65 72 74 79 41 63 63 65 73 73 tadataItem,.ByRef.propertyAccess
b23e0 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 67 65 74 74 65 72 41 ibility.As.String,.ByRef.getterA
b2400 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 52 65 66 20 73 65 ccessibility.As.String,.ByRef.se
b2420 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 tterAccessibility.As.String)....
b2440 20 20 20 20 20 20 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 47 65 74 41 ......getterAccessibility.=.GetA
b2460 63 63 65 73 73 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 47 45 54 54 45 52 5f 41 43 43 45 53 53 ccessibility(item,.GETTER_ACCESS
b2480 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 67 65 74 74 65 72 52 61 6e 6b 20 41 73 20 49 6e 74 )..........Dim.getterRank.As.Int
b24a0 65 67 65 72 20 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 eger.=.AccessibilityRankIdLookup
b24c0 28 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 (getterAccessibility)...........
b24e0 20 73 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 47 65 74 41 63 63 65 73 73 .setterAccessibility.=.GetAccess
b2500 69 62 69 6c 69 74 79 28 69 74 65 6d 2c 20 53 45 54 54 45 52 5f 41 43 43 45 53 53 29 0d 0a 20 20 ibility(item,.SETTER_ACCESS)....
b2520 20 20 20 20 20 20 44 69 6d 20 73 65 74 74 65 72 52 61 6e 6b 20 41 73 20 49 6e 74 65 67 65 72 20 ......Dim.setterRank.As.Integer.
b2540 3d 20 41 63 63 65 73 73 69 62 69 6c 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 28 73 65 74 74 =.AccessibilityRankIdLookup(sett
b2560 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 erAccessibility)............Dim.
b2580 70 72 6f 70 65 72 74 79 52 61 6e 6b 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 4d 61 74 68 2e 4d propertyRank.As.Integer.=.Math.M
b25a0 61 78 28 67 65 74 74 65 72 52 61 6e 6b 2c 20 73 65 74 74 65 72 52 61 6e 6b 29 0d 0a 20 20 20 20 ax(getterRank,.setterRank)......
b25c0 20 20 20 20 49 66 20 73 65 74 74 65 72 52 61 6e 6b 20 3d 20 70 72 6f 70 65 72 74 79 52 61 6e 6b ....If.setterRank.=.propertyRank
b25e0 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 74 65 72 41 63 63 65 73 73 69 .Then..............setterAccessi
b2600 62 69 6c 69 74 79 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 0d 0a 20 20 20 20 20 20 20 20 45 bility.=.String.Empty..........E
b2620 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 67 65 74 74 65 72 52 61 6e 6b 20 3d nd.If............If.getterRank.=
b2640 20 70 72 6f 70 65 72 74 79 52 61 6e 6b 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .propertyRank.Then..............
b2660 67 65 74 74 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 53 74 72 69 6e 67 2e 45 6d 70 getterAccessibility.=.String.Emp
b2680 74 79 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 ty..........End.If............pr
b26a0 6f 70 65 72 74 79 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 63 63 65 73 73 69 62 69 6c opertyAccessibility.=.Accessibil
b26c0 69 74 79 52 61 6e 6b 49 64 4c 6f 6f 6b 75 70 2e 57 68 65 72 65 28 46 75 6e 63 74 69 6f 6e 28 76 ityRankIdLookup.Where(Function(v
b26e0 29 20 76 2e 56 61 6c 75 65 20 3d 20 70 72 6f 70 65 72 74 79 52 61 6e 6b 29 2e 53 65 6c 65 63 74 ).v.Value.=.propertyRank).Select
b2700 28 46 75 6e 63 74 69 6f 6e 28 76 29 20 76 2e 4b 65 79 29 2e 53 69 6e 67 6c 65 28 29 0d 0a 20 20 (Function(v).v.Key).Single()....
b2720 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 68 61 72 65 64 20 ..End.Sub........Private.Shared.
b2740 46 75 6e 63 74 69 6f 6e 20 47 65 74 41 63 63 65 73 73 69 62 69 6c 69 74 79 28 42 79 56 61 6c 20 Function.GetAccessibility(ByVal.
b2760 69 74 65 6d 20 41 73 20 4d 65 74 61 64 61 74 61 49 74 65 6d 2c 20 42 79 56 61 6c 20 6e 61 6d 65 item.As.MetadataItem,.ByVal.name
b2780 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 44 .As.String).As.String..........D
b27a0 69 6d 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 69 6e 67 20 3d 20 4e 6f 74 im.accessibility.As.String.=.Not
b27c0 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 4d 65 74 61 64 61 74 61 54 6f 6f 6c 73 2e 54 hing..........If.MetadataTools.T
b27e0 72 79 47 65 74 53 74 72 69 6e 67 4d 65 74 61 64 61 74 61 50 72 6f 70 65 72 74 79 53 65 74 74 69 ryGetStringMetadataPropertySetti
b2800 6e 67 28 69 74 65 6d 2c 20 6e 61 6d 65 2c 20 61 63 63 65 73 73 69 62 69 6c 69 74 79 29 20 54 68 ng(item,.name,.accessibility).Th
b2820 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 61 6e 73 6c 61 74 65 en..............Return.Translate
b2840 55 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 54 6f 43 53 68 61 72 70 41 63 63 65 73 73 69 UserAccessibilityToCSharpAccessi
b2860 62 69 6c 69 74 79 28 61 63 63 65 73 73 69 62 69 6c 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 45 bility(accessibility)..........E
b2880 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 50 75 62 6c 69 63 22 nd.If............Return."Public"
b28a0 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 ......End.Function........Privat
b28c0 65 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 54 72 61 6e 73 6c 61 74 65 55 73 65 72 41 e.Shared.Function.TranslateUserA
b28e0 63 63 65 73 73 69 62 69 6c 69 74 79 54 6f 43 53 68 61 72 70 41 63 63 65 73 73 69 62 69 6c 69 74 ccessibilityToCSharpAccessibilit
b2900 79 28 42 79 56 61 6c 20 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 41 73 20 53 74 72 y(ByVal.userAccessibility.As.Str
b2920 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 49 66 20 75 73 65 72 41 ing).As.String..........If.userA
b2940 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 43 43 45 53 53 5f 50 52 4f 54 45 43 54 45 44 20 ccessibility.=.ACCESS_PROTECTED.
b2960 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 50 72 6f 74 65 63 Then..............Return."Protec
b2980 74 65 64 22 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 49 66 20 75 73 65 72 41 63 63 65 73 73 69 ted"..........ElseIf.userAccessi
b29a0 62 69 6c 69 74 79 20 3d 20 41 43 43 45 53 53 5f 49 4e 54 45 52 4e 41 4c 20 54 68 65 6e 0d 0a 20 bility.=.ACCESS_INTERNAL.Then...
b29c0 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 46 72 69 65 6e 64 22 0d 0a 20 20 20 20 ...........Return."Friend"......
b29e0 20 20 20 20 45 6c 73 65 49 66 20 75 73 65 72 41 63 63 65 73 73 69 62 69 6c 69 74 79 20 3d 20 41 ....ElseIf.userAccessibility.=.A
b2a00 43 43 45 53 53 5f 50 52 49 56 41 54 45 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 CCESS_PRIVATE.Then..............
b2a20 52 65 74 75 72 6e 20 22 50 72 69 76 61 74 65 22 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a Return."Private"..........Else..
b2a40 20 20 20 20 20 20 20 20 20 20 20 20 27 20 64 65 66 61 75 6c 74 20 74 6f 20 70 75 62 6c 69 63 0d ............'.default.to.public.
b2a60 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 22 50 75 62 6c 69 63 22 0d 0a 20 20 .............Return."Public"....
b2a80 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a ......End.If......End.Function..
b2aa0 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 ..End.Class....'''.<summary>..''
b2ac0 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 73 6f 75 72 63 '.Responsible.for.creating.sourc
b2ae0 65 20 63 6f 64 65 20 72 65 67 69 6f 6e 73 20 69 6e 20 63 6f 64 65 20 77 68 65 6e 20 74 68 65 20 e.code.regions.in.code.when.the.
b2b00 6c 6f 6f 70 20 69 6e 73 69 64 65 0d 0a 27 27 27 20 61 63 74 75 61 6c 6c 79 20 70 72 6f 64 75 63 loop.inside..'''.actually.produc
b2b20 65 73 20 73 6f 6d 65 74 68 69 6e 67 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 es.something...'''.</summary>..P
b2b40 75 62 6c 69 63 20 43 6c 61 73 73 20 43 6f 64 65 52 65 67 69 6f 6e 0d 0a 20 20 20 20 50 72 69 76 ublic.Class.CodeRegion......Priv
b2b60 61 74 65 20 43 6f 6e 73 74 20 53 54 41 4e 44 41 52 44 5f 49 4e 44 45 4e 54 5f 4c 45 4e 47 54 48 ate.Const.STANDARD_INDENT_LENGTH
b2b80 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 34 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 .As.Integer.=.4........Private.R
b2ba0 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 eadOnly._textTransformation.As.D
b2bc0 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 50 72 ynamicTextTransformation......Pr
b2be0 69 76 61 74 65 20 5f 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 41 73 20 49 6e 74 ivate._beforeRegionLength.As.Int
b2c00 65 67 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 eger......Private._emptyRegionLe
b2c20 6e 67 74 68 20 41 73 20 49 6e 74 65 67 65 72 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 5f 72 65 ngth.As.Integer......Private._re
b2c40 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 2d 31 0d gionIndentLevel.As.Integer.=.-1.
b2c60 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e .......'''.<summary>......'''.In
b2c80 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 43 6f 64 65 52 65 67 69 6f 6e 20 69 6e 73 74 61 6e 63 65 itializes.an.CodeRegion.instance
b2ca0 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d .with.the......'''.TextTransform
b2cc0 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 20 74 68 61 74 20 ation.(T4.generated.class).that.
b2ce0 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 3c 2f is.currently.running......'''.</
b2d00 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 summary>......Public.Sub.New(ByV
b2d20 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 al.textTransformation.As.Object)
b2d40 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 ..........If.textTransformation.
b2d60 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 Is.Nothing.Then..............Thr
b2d80 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 74 65 ow.New.ArgumentNullException("te
b2da0 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 xtTransformation")..........End.
b2dc0 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f If............_textTransformatio
b2de0 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 n.=.DynamicTextTransformation.Cr
b2e00 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e eate(textTransformation)......En
b2e20 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 d.Sub........'''.<summary>......
b2e40 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 43 6f 64 65 52 65 67 69 6f 6e 20 69 6e '''.Initializes.an.CodeRegion.in
b2e60 73 74 61 6e 63 65 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 stance.with.the......'''.TextTra
b2e80 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 6c 61 73 73 29 nsformation.(T4.generated.class)
b2ea0 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 2c 0d 0a 20 20 20 .that.is.currently.running,.....
b2ec0 20 27 27 27 20 61 6e 64 20 74 68 65 20 69 6e 64 65 6e 74 20 6c 65 76 65 6c 20 74 6f 20 73 74 61 .'''.and.the.indent.level.to.sta
b2ee0 72 74 20 74 68 65 20 66 69 72 73 74 20 72 65 67 69 6f 6e 20 61 74 2e 0d 0a 20 20 20 20 27 27 27 rt.the.first.region.at.......'''
b2f00 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 .</summary>......Public.Sub.New(
b2f20 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 ByVal.textTransformation.As.Obje
b2f40 63 74 2c 20 42 79 56 61 6c 20 66 69 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e ct,.ByVal.firstIndentLevel.As.In
b2f60 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 4e 65 77 28 74 65 78 74 54 72 61 6e 73 teger)..........Me.New(textTrans
b2f80 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 66 69 72 73 74 49 6e 64 65 formation)..........If.firstInde
b2fa0 6e 74 4c 65 76 65 6c 20 3c 20 30 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 ntLevel.<.0.Then..............Th
b2fc0 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 66 69 72 73 74 row.New.ArgumentException("first
b2fe0 49 6e 64 65 6e 74 4c 65 76 65 6c 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d IndentLevel")..........End.If...
b3000 0a 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 3d 20 66 69 ........._regionIndentLevel.=.fi
b3020 72 73 74 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2d 20 31 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d rstIndentLevel.-.1......End.Sub.
b3040 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 53 74 .......'''.<summary>......'''.St
b3060 61 72 74 73 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 0d 0a 20 arts.the.begining.of.a.region...
b3080 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 ...'''.</summary>......Public.Su
b30a0 62 20 42 65 67 69 6e 28 42 79 56 61 6c 20 72 65 67 69 6f 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 b.Begin(ByVal.regionName.As.Stri
b30c0 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 72 65 67 69 6f 6e 4e 61 6d 65 20 49 73 20 4e 6f ng)..........If.regionName.Is.No
b30e0 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 thing.Then..............Throw.Ne
b3100 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 72 65 67 69 6f 6e 4e w.ArgumentNullException("regionN
b3120 61 6d 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 ame")..........End.If...........
b3140 20 42 65 67 69 6e 28 72 65 67 69 6f 6e 4e 61 6d 65 2c 20 31 29 0d 0a 20 20 20 20 45 6e 64 20 53 .Begin(regionName,.1)......End.S
b3160 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 ub........'''.<summary>......'''
b3180 20 53 74 61 72 74 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 61 20 72 65 67 69 6f 6e 2c .Start.the.begining.of.a.region,
b31a0 20 69 6e 64 65 6e 74 65 64 0d 0a 20 20 20 20 27 27 27 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f .indented......'''.the.numbers.o
b31c0 66 20 6c 65 76 65 6c 73 20 73 70 65 63 69 66 69 65 64 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 f.levels.specified......'''.</su
b31e0 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 42 65 67 69 6e 28 42 79 56 mmary>......Public.Sub.Begin(ByV
b3200 61 6c 20 72 65 67 69 6f 6e 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6c al.regionName.As.String,.ByVal.l
b3220 65 76 65 6c 73 54 6f 49 6e 63 72 65 61 73 65 49 6e 64 65 6e 74 20 41 73 20 49 6e 74 65 67 65 72 evelsToIncreaseIndent.As.Integer
b3240 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 72 65 67 69 6f 6e 4e 61 6d 65 20 49 73 20 4e 6f 74 68 )..........If.regionName.Is.Noth
b3260 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 ing.Then..............Throw.New.
b3280 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 72 65 67 69 6f 6e 4e 61 6d ArgumentNullException("regionNam
b32a0 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f e")..........End.If............_
b32c0 62 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 beforeRegionLength.=._textTransf
b32e0 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c ormation.GenerationEnvironment.L
b3300 65 6e 67 74 68 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 ength.........._regionIndentLeve
b3320 6c 20 2b 3d 20 6c 65 76 65 6c 73 54 6f 49 6e 63 72 65 61 73 65 49 6e 64 65 6e 74 0d 0a 20 20 20 l.+=.levelsToIncreaseIndent.....
b3340 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 47 ....._textTransformation.Write(G
b3360 65 74 49 6e 64 65 6e 74 28 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 29 29 0d 0a 20 etIndent(_regionIndentLevel))...
b3380 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 ......._textTransformation.Write
b33a0 4c 69 6e 65 28 22 23 52 65 67 69 6f 6e 20 22 22 22 20 2b 20 72 65 67 69 6f 6e 4e 61 6d 65 20 2b Line("#Region.""".+.regionName.+
b33c0 20 22 22 22 22 29 0d 0a 20 20 20 20 20 20 20 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c 65 6e 67 ."""").........._emptyRegionLeng
b33e0 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 61 74 th.=._textTransformation.Generat
b3400 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 0d 0a 20 20 20 20 45 6e 64 20 53 ionEnvironment.Length......End.S
b3420 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 ub........'''.<summary>......'''
b3440 20 45 6e 64 73 20 61 20 72 65 67 69 6f 6e 2c 20 6f 72 20 74 6f 74 61 6c 79 20 72 65 6d 6f 76 65 .Ends.a.region,.or.totaly.remove
b3460 73 20 69 74 20 69 66 20 6e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 27 27 27 20 77 61 73 20 67 65 6e s.it.if.nothing......'''.was.gen
b3480 65 72 74 65 64 20 73 69 6e 63 65 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f 66 20 74 68 65 20 erted.since.the.begining.of.the.
b34a0 72 65 67 69 6f 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 region.......'''.</summary>.....
b34c0 20 50 75 62 6c 69 63 20 53 75 62 20 5b 45 6e 64 5d 28 29 0d 0a 20 20 20 20 20 20 20 20 5b 45 6e .Public.Sub.[End]()..........[En
b34e0 64 5d 28 31 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 d](1)......End.Sub........'''.<s
b3500 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 45 6e 64 73 20 61 20 72 65 67 69 6f 6e 2c 20 ummary>......'''.Ends.a.region,.
b3520 6f 72 20 74 6f 74 61 6c 79 20 72 65 6d 6f 76 65 73 20 69 74 20 69 66 20 6e 6f 74 68 69 6e 67 0d or.totaly.removes.it.if.nothing.
b3540 0a 20 20 20 20 27 27 27 20 77 61 73 20 67 65 6e 65 72 74 65 64 20 73 69 6e 63 65 20 74 68 65 20 .....'''.was.generted.since.the.
b3560 62 65 67 69 6e 69 6e 67 20 6f 66 20 74 68 65 20 72 65 67 69 6f 6e 2c 20 61 6c 73 6f 20 6f 75 74 begining.of.the.region,.also.out
b3580 64 65 6e 74 73 0d 0a 20 20 20 20 27 27 27 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 6c 65 76 dents......'''.the.number.of.lev
b35a0 65 6c 73 20 73 70 65 63 69 66 69 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 els.specified.......'''.</summar
b35c0 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 5b 45 6e 64 5d 28 42 79 56 61 6c 20 6c y>......Public.Sub.[End](ByVal.l
b35e0 65 76 65 6c 73 54 6f 44 65 63 72 65 61 73 65 20 41 73 20 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 evelsToDecrease.As.Integer).....
b3600 20 20 20 20 20 44 69 6d 20 69 6e 64 65 6e 74 4c 65 76 65 6c 20 41 73 20 49 6e 74 65 67 65 72 20 .....Dim.indentLevel.As.Integer.
b3620 3d 20 5f 72 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 0d 0a 20 20 20 20 20 20 20 20 5f 72 =._regionIndentLevel.........._r
b3640 65 67 69 6f 6e 49 6e 64 65 6e 74 4c 65 76 65 6c 20 2d 3d 20 6c 65 76 65 6c 73 54 6f 44 65 63 72 egionIndentLevel.-=.levelsToDecr
b3660 65 61 73 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 5f 65 6d 70 74 79 52 65 67 69 6f 6e 4c ease............If._emptyRegionL
b3680 65 6e 67 74 68 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 ength.=._textTransformation.Gene
b36a0 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 54 68 65 6e 0d 0a 20 rationEnvironment.Length.Then...
b36c0 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 ..........._textTransformation.G
b36e0 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 20 5f 62 enerationEnvironment.Length.=._b
b3700 65 66 6f 72 65 52 65 67 69 6f 6e 4c 65 6e 67 74 68 0d 0a 20 20 20 20 20 20 20 20 45 6c 73 65 0d eforeRegionLength..........Else.
b3720 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e ............._textTransformation
b3740 2e 57 72 69 74 65 4c 69 6e 65 28 53 74 72 69 6e 67 2e 45 6d 70 74 79 29 0d 0a 20 20 20 20 20 20 .WriteLine(String.Empty)........
b3760 20 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 28 ......_textTransformation.Write(
b3780 47 65 74 49 6e 64 65 6e 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 29 29 0d 0a 20 20 20 20 20 20 20 GetIndent(indentLevel)).........
b37a0 20 20 20 20 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 ....._textTransformation.WriteLi
b37c0 6e 65 28 22 23 45 6e 64 20 52 65 67 69 6f 6e 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f ne("#End.Region").............._
b37e0 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 57 72 69 74 65 4c 69 6e 65 28 53 74 72 textTransformation.WriteLine(Str
b3800 69 6e 67 2e 45 6d 70 74 79 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 ing.Empty)..........End.If......
b3820 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 End.Sub........'''.<summary>....
b3840 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 6c 65 ..'''.Gets.the.current.indent.le
b3860 76 65 6c 20 74 68 61 74 20 74 68 65 20 6e 65 78 74 20 65 6e 64 20 72 65 67 69 6f 6e 20 73 74 61 vel.that.the.next.end.region.sta
b3880 74 65 6d 65 6e 74 20 77 69 6c 6c 20 62 65 20 77 72 69 74 74 65 6e 0d 0a 20 20 20 20 27 27 27 20 tement.will.be.written......'''.
b38a0 61 74 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c at......'''.</summary>......Publ
b38c0 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 43 75 72 72 65 6e 74 49 6e 64 65 ic.ReadOnly.Property.CurrentInde
b38e0 6e 74 4c 65 76 65 6c 28 29 20 41 73 20 49 6e 74 65 67 65 72 0d 0a 20 20 20 20 20 20 20 20 47 65 ntLevel().As.Integer..........Ge
b3900 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 72 65 67 69 6f 6e 49 6e 64 t..............Return._regionInd
b3920 65 6e 74 4c 65 76 65 6c 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 entLevel..........End.Get......E
b3940 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e nd.Property........'''.<summary>
b3960 0d 0a 20 20 20 20 27 27 27 20 47 65 74 20 61 20 73 74 72 69 6e 67 20 6f 66 20 73 70 61 63 65 73 ......'''.Get.a.string.of.spaces
b3980 20 65 71 75 69 76 65 6c 65 6e 74 20 74 6f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 69 6e 64 .equivelent.to.the.number.of.ind
b39a0 65 6e 74 73 0d 0a 20 20 20 20 27 27 27 20 64 65 73 69 72 65 64 2e 0d 0a 20 20 20 20 27 27 27 20 ents......'''.desired.......'''.
b39c0 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 </summary>......Public.Shared.Fu
b39e0 6e 63 74 69 6f 6e 20 47 65 74 49 6e 64 65 6e 74 28 42 79 56 61 6c 20 69 6e 64 65 6e 74 4c 65 76 nction.GetIndent(ByVal.indentLev
b3a00 65 6c 20 41 73 20 49 6e 74 65 67 65 72 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 el.As.Integer).As.String........
b3a20 20 20 49 66 20 69 6e 64 65 6e 74 4c 65 76 65 6c 20 3c 20 30 20 54 68 65 6e 0d 0a 20 20 20 20 20 ..If.indentLevel.<.0.Then.......
b3a40 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 .......Throw.New.ArgumentExcepti
b3a60 6f 6e 28 22 69 6e 64 65 6e 74 4c 65 76 65 6c 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 on("indentLevel")..........End.I
b3a80 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 53 74 72 69 6e 67 2e 45 6d 70 74 79 f............Return.String.Empty
b3aa0 2e 50 61 64 4c 65 66 74 28 69 6e 64 65 6e 74 4c 65 76 65 6c 20 2a 20 53 54 41 4e 44 41 52 44 5f .PadLeft(indentLevel.*.STANDARD_
b3ac0 49 4e 44 45 4e 54 5f 4c 45 4e 47 54 48 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e INDENT_LENGTH)......End.Function
b3ae0 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a ..End.Class......'''.<summary>..
b3b00 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 63 6f 6c 6c 65 63 74 69 6e 67 20 74 '''.Responsible.for.collecting.t
b3b20 6f 67 65 74 68 65 72 20 74 68 65 20 61 63 74 75 61 6c 20 6d 65 74 68 6f 64 20 70 61 72 61 6d 65 ogether.the.actual.method.parame
b3b40 74 65 72 73 0d 0a 27 27 27 20 61 6e 64 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 74 68 61 ters..'''.and.the.parameters.tha
b3b60 74 20 6e 65 65 64 20 74 6f 20 62 65 20 73 65 6e 74 20 74 6f 20 74 68 65 20 45 78 65 63 75 74 65 t.need.to.be.sent.to.the.Execute
b3b80 20 6d 65 74 68 6f 64 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 .method...'''.</summary>..Public
b3ba0 20 43 6c 61 73 73 20 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 0d 0a .Class.FunctionImportParameter..
b3bc0 50 72 69 76 61 74 65 20 5f 53 6f 75 72 63 65 20 41 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d Private._Source.As.FunctionParam
b3be0 65 74 65 72 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 53 6f 75 72 63 65 eter......Public.Property.Source
b3c00 28 29 20 41 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 0d 0a 20 20 20 20 20 20 20 ().As.FunctionParameter.........
b3c20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 53 6f 75 72 63 65 .Get..............Return._Source
b3c40 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 ..........End.Get..........Set(B
b3c60 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 29 yVal.value.As.FunctionParameter)
b3c80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 53 6f 75 72 63 65 20 3d 20 76 61 6c 75 65 0d 0a 20 .............._Source.=.value...
b3ca0 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 .......End.Set......End.Property
b3cc0 0d 0a 50 72 69 76 61 74 65 20 5f 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e ..Private._RawFunctionParameterN
b3ce0 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 ame.As.String......Public.Proper
b3d00 74 79 20 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 20 41 73 ty.RawFunctionParameterName().As
b3d20 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 .String..........Get............
b3d40 20 20 52 65 74 75 72 6e 20 5f 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 ..Return._RawFunctionParameterNa
b3d60 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 me..........End.Get..........Set
b3d80 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 (ByVal.value.As.String).........
b3da0 20 20 20 20 20 5f 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d ....._RawFunctionParameterName.=
b3dc0 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 .value..........End.Set......End
b3de0 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 .Property..Private._FunctionPara
b3e00 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 meterName.As.String......Public.
b3e20 50 72 6f 70 65 72 74 79 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 Property.FunctionParameterName()
b3e40 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 .As.String..........Get.........
b3e60 20 20 20 20 20 52 65 74 75 72 6e 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 .....Return._FunctionParameterNa
b3e80 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 me..........End.Get..........Set
b3ea0 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 (ByVal.value.As.String).........
b3ec0 20 20 20 20 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 76 61 ....._FunctionParameterName.=.va
b3ee0 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 lue..........End.Set......End.Pr
b3f00 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 operty..Private._FunctionParamet
b3f20 65 72 54 79 70 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f erType.As.String......Public.Pro
b3f40 70 65 72 74 79 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 28 29 20 41 73 perty.FunctionParameterType().As
b3f60 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 .String..........Get............
b3f80 20 20 52 65 74 75 72 6e 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 0d ..Return._FunctionParameterType.
b3fa0 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 .........End.Get..........Set(By
b3fc0 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 Val.value.As.String)............
b3fe0 20 20 5f 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 65 20 3d 20 76 61 6c 75 65 .._FunctionParameterType.=.value
b4000 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 ..........End.Set......End.Prope
b4020 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 20 rty..Private._LocalVariableName.
b4040 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4c As.String......Public.Property.L
b4060 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 ocalVariableName().As.String....
b4080 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 4c ......Get..............Return._L
b40a0 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 ocalVariableName..........End.Ge
b40c0 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 t..........Set(ByVal.value.As.St
b40e0 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 4c 6f 63 61 6c 56 61 72 69 61 62 6c ring).............._LocalVariabl
b4100 65 4e 61 6d 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a eName.=.value..........End.Set..
b4120 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 52 61 77 43 6c ....End.Property..Private._RawCl
b4140 72 54 79 70 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 rTypeName.As.String......Public.
b4160 50 72 6f 70 65 72 74 79 20 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 28 29 20 41 73 20 53 74 72 Property.RawClrTypeName().As.Str
b4180 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 ing..........Get..............Re
b41a0 74 75 72 6e 20 5f 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e turn._RawClrTypeName..........En
b41c0 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 d.Get..........Set(ByVal.value.A
b41e0 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 52 61 77 43 6c 72 54 79 s.String).............._RawClrTy
b4200 70 65 4e 61 6d 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d peName.=.value..........End.Set.
b4220 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 45 78 65 63 .....End.Property..Private._Exec
b4240 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 uteParameterName.As.String......
b4260 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 Public.Property.ExecuteParameter
b4280 4e 61 6d 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 Name().As.String..........Get...
b42a0 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 45 78 65 63 75 74 65 50 61 72 61 6d 65 ...........Return._ExecuteParame
b42c0 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 terName..........End.Get........
b42e0 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 ..Set(ByVal.value.As.String)....
b4300 20 20 20 20 20 20 20 20 20 20 5f 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 .........._ExecuteParameterName.
b4320 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e =.value..........End.Set......En
b4340 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 45 73 71 6c 50 61 72 61 6d 65 74 d.Property..Private._EsqlParamet
b4360 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f erName.As.String......Public.Pro
b4380 70 65 72 74 79 20 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 28 29 20 41 73 20 53 74 72 perty.EsqlParameterName().As.Str
b43a0 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 ing..........Get..............Re
b43c0 74 75 72 6e 20 5f 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 turn._EsqlParameterName.........
b43e0 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 .End.Get..........Set(ByVal.valu
b4400 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 45 73 71 6c 50 e.As.String).............._EsqlP
b4420 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e arameterName.=.value..........En
b4440 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 d.Set......End.Property..Private
b4460 20 5f 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 20 41 73 20 42 6f 6f 6c 65 61 6e 0d ._NeedsLocalVariable.As.Boolean.
b4480 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4e 65 65 64 73 4c 6f 63 61 6c 56 .....Public.Property.NeedsLocalV
b44a0 61 72 69 61 62 6c 65 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 47 65 ariable().As.Boolean..........Ge
b44c0 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f 4e 65 65 64 73 4c 6f 63 61 t..............Return._NeedsLoca
b44e0 6c 56 61 72 69 61 62 6c 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 lVariable..........End.Get......
b4500 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 42 6f 6f 6c 65 61 6e 29 0d ....Set(ByVal.value.As.Boolean).
b4520 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 ............._NeedsLocalVariable
b4540 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 .=.value..........End.Set......E
b4560 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 50 72 69 76 61 74 65 20 5f 49 73 4e 75 6c 6c 61 62 6c 65 nd.Property..Private._IsNullable
b4580 4f 66 54 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 OfT.As.Boolean......Public.Prope
b45a0 72 74 79 20 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 28 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a rty.IsNullableOfT().As.Boolean..
b45c0 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 ........Get..............Return.
b45e0 5f 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d _IsNullableOfT..........End.Get.
b4600 0a 20 20 20 20 20 20 20 20 53 65 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 42 6f 6f 6c .........Set(ByVal.value.As.Bool
b4620 65 61 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 49 73 4e 75 6c 6c 61 62 6c 65 4f 66 54 ean).............._IsNullableOfT
b4640 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 .=.value..........End.Set......E
b4660 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 nd.Property..........'''.<summar
b4680 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 65 61 74 65 73 20 61 20 73 65 74 20 6f 66 20 46 75 6e y>......'''.Creates.a.set.of.Fun
b46a0 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 6f 62 6a 65 63 74 73 20 66 72 6f ctionImportParameter.objects.fro
b46c0 6d 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 m.the.parameters.passed.in......
b46e0 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 .'''.</summary>......Public.Shar
b4700 65 64 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 28 42 79 56 61 6c 20 70 61 72 61 6d 65 74 ed.Function.Create(ByVal.paramet
b4720 65 72 73 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 75 6e 63 74 69 6f 6e 50 61 ers.As.IEnumerable(Of.FunctionPa
b4740 72 61 6d 65 74 65 72 29 2c 20 42 79 56 61 6c 20 63 6f 64 65 20 41 73 20 43 6f 64 65 47 65 6e 65 rameter),.ByVal.code.As.CodeGene
b4760 72 61 74 69 6f 6e 54 6f 6f 6c 73 2c 20 42 79 56 61 6c 20 65 66 20 41 73 20 4d 65 74 61 64 61 74 rationTools,.ByVal.ef.As.Metadat
b4780 61 54 6f 6f 6c 73 29 20 41 73 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 46 75 6e 63 74 69 aTools).As.IEnumerable(Of.Functi
b47a0 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 70 onImportParameter)..........If.p
b47c0 61 72 61 6d 65 74 65 72 73 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 arameters.Is.Nothing.Then.......
b47e0 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 .......Throw.New.ArgumentNullExc
b4800 65 70 74 69 6f 6e 28 22 70 61 72 61 6d 65 74 65 72 73 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e eption("parameters")..........En
b4820 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 63 6f 64 65 20 49 73 20 4e 6f 74 68 69 d.If............If.code.Is.Nothi
b4840 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 ng.Then..............Throw.New.A
b4860 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 63 6f 64 65 22 29 0d 0a 20 20 rgumentNullException("code")....
b4880 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 65 66 20 49 73 ......End.If............If.ef.Is
b48a0 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 .Nothing.Then..............Throw
b48c0 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 65 66 22 29 .New.ArgumentNullException("ef")
b48e0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 ..........End.If............Dim.
b4900 75 6e 69 71 75 65 20 41 73 20 4e 65 77 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 unique.As.New.UniqueIdentifierSe
b4920 72 76 69 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 69 6d 70 6f 72 74 50 61 72 61 6d rvice()..........Dim.importParam
b4940 65 74 65 72 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 46 75 6e 63 74 69 6f 6e 49 6d 70 eters.As.New.List(Of.FunctionImp
b4960 6f 72 74 50 61 72 61 6d 65 74 65 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 ortParameter)()..........For.Eac
b4980 68 20 70 61 72 61 6d 65 74 65 72 20 41 73 20 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 h.parameter.As.FunctionParameter
b49a0 20 49 6e 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 .In.parameters..............Dim.
b49c0 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 41 73 20 4e 65 77 20 46 75 6e 63 74 69 6f 6e 49 importParameter.As.New.FunctionI
b49e0 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d mportParameter()..............im
b4a00 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 53 6f 75 72 63 65 20 3d 20 70 61 72 61 6d 65 74 65 72 portParameter.Source.=.parameter
b4a20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 52 61 ..............importParameter.Ra
b4a40 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 75 6e 69 71 75 65 2e wFunctionParameterName.=.unique.
b4a60 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 63 6f 64 65 2e 43 61 6d 65 6c 43 61 73 65 28 AdjustIdentifier(code.CamelCase(
b4a80 70 61 72 61 6d 65 74 65 72 2e 4e 61 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d parameter.Name))..............im
b4aa0 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e portParameter.FunctionParameterN
b4ac0 61 6d 65 20 3d 20 63 6f 64 65 2e 45 73 63 61 70 65 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 ame.=.code.Escape(importParamete
b4ae0 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 29 0d 0a 20 20 20 r.RawFunctionParameterName).....
b4b00 20 20 20 20 20 20 20 20 20 49 66 20 70 61 72 61 6d 65 74 65 72 2e 4d 6f 64 65 20 3d 20 50 61 72 .........If.parameter.Mode.=.Par
b4b20 61 6d 65 74 65 72 4d 6f 64 65 2e 49 6e 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ameterMode.In.Then..............
b4b40 20 20 20 20 44 69 6d 20 74 79 70 65 55 73 61 67 65 20 41 73 20 54 79 70 65 55 73 61 67 65 20 3d ....Dim.typeUsage.As.TypeUsage.=
b4b60 20 70 61 72 61 6d 65 74 65 72 2e 54 79 70 65 55 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 20 20 .parameter.TypeUsage............
b4b80 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c ......importParameter.NeedsLocal
b4ba0 56 61 72 69 61 62 6c 65 20 3d 20 54 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Variable.=.True.................
b4bc0 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 .importParameter.FunctionParamet
b4be0 65 72 54 79 70 65 20 3d 20 63 6f 64 65 2e 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 erType.=.code.GetTypeName(typeUs
b4c00 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 age)..................importPara
b4c20 6d 65 74 65 72 2e 45 73 71 6c 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 70 61 72 61 6d 65 meter.EsqlParameterName.=.parame
b4c40 74 65 72 2e 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 63 6c ter.Name..................Dim.cl
b4c60 72 54 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 65 66 2e 55 6e 64 65 72 6c 79 69 6e 67 43 6c 72 rType.As.Type.=.ef.UnderlyingClr
b4c80 54 79 70 65 28 70 61 72 61 6d 65 74 65 72 2e 54 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 Type(parameter.TypeUsage.EdmType
b4ca0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 )..................importParamet
b4cc0 65 72 2e 52 61 77 43 6c 72 54 79 70 65 4e 61 6d 65 20 3d 20 49 66 28 54 79 70 65 4f 66 20 74 79 er.RawClrTypeName.=.If(TypeOf.ty
b4ce0 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 20 49 73 20 45 6e 75 6d 54 79 70 65 2c 20 63 6f 64 peUsage.EdmType.Is.EnumType,.cod
b4d00 65 2e 47 65 74 54 79 70 65 4e 61 6d 65 28 74 79 70 65 55 73 61 67 65 2e 45 64 6d 54 79 70 65 29 e.GetTypeName(typeUsage.EdmType)
b4d20 2c 20 63 6f 64 65 2e 45 73 63 61 70 65 28 63 6c 72 54 79 70 65 29 29 0d 0a 20 20 20 20 20 20 20 ,.code.Escape(clrType)).........
b4d40 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 49 73 4e 75 6c 6c 61 .........importParameter.IsNulla
b4d60 62 6c 65 4f 66 54 20 3d 20 63 6c 72 54 79 70 65 2e 49 73 56 61 6c 75 65 54 79 70 65 0d 0a 20 20 bleOfT.=.clrType.IsValueType....
b4d80 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........Else..................
b4da0 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 importParameter.NeedsLocalVariab
b4dc0 6c 65 20 3d 20 46 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f le.=.False..................impo
b4de0 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 54 79 70 rtParameter.FunctionParameterTyp
b4e00 65 20 3d 20 22 4f 62 6a 65 63 74 50 61 72 61 6d 65 74 65 72 22 0d 0a 20 20 20 20 20 20 20 20 20 e.=."ObjectParameter"...........
b4e20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 45 78 65 63 75 74 65 50 61 .......importParameter.ExecutePa
b4e40 72 61 6d 65 74 65 72 4e 61 6d 65 20 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 46 75 rameterName.=.importParameter.Fu
b4e60 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nctionParameterName.............
b4e80 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 61 6d .End.If..............importParam
b4ea0 65 74 65 72 73 2e 41 64 64 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 29 0d 0a 20 20 20 20 eters.Add(importParameter)......
b4ec0 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 20 77 65 20 73 61 76 65 20 74 68 ....Next............'.we.save.th
b4ee0 65 20 6c 6f 63 61 6c 20 70 61 72 61 6d 65 74 65 72 20 75 6e 69 71 75 69 66 69 63 61 74 69 6f 6e e.local.parameter.uniquification
b4f00 20 66 6f 72 20 61 20 73 65 63 6f 6e 64 20 70 61 73 73 20 74 6f 20 6d 61 6b 65 20 74 68 65 20 76 .for.a.second.pass.to.make.the.v
b4f20 69 73 69 62 6c 65 20 70 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 27 20 61 73 20 isible.parameters..........'.as.
b4f40 70 72 65 74 74 79 20 61 6e 64 20 73 65 6e 73 69 62 6c 65 20 61 73 20 70 6f 73 73 69 62 6c 65 0d pretty.and.sensible.as.possible.
b4f60 0a 20 20 20 20 20 20 20 20 46 6f 72 20 69 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 30 20 54 6f .........For.i.As.Integer.=.0.To
b4f80 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 73 2e 43 6f 75 6e 74 20 2d 20 31 0d 0a 20 20 20 .importParameters.Count.-.1.....
b4fa0 20 20 20 20 20 20 20 20 20 44 69 6d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 41 73 20 .........Dim.importParameter.As.
b4fc0 46 75 6e 63 74 69 6f 6e 49 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 20 3d 20 69 6d 70 6f 72 74 FunctionImportParameter.=.import
b4fe0 50 61 72 61 6d 65 74 65 72 73 28 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 69 6d Parameters(i)..............If.im
b5000 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4e 65 65 64 73 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 portParameter.NeedsLocalVariable
b5020 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f 72 74 50 61 72 .Then..................importPar
b5040 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 4e 61 6d 65 20 3d 20 75 6e 69 71 75 ameter.LocalVariableName.=.uniqu
b5060 65 2e 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 e.AdjustIdentifier(importParamet
b5080 65 72 2e 52 61 77 46 75 6e 63 74 69 6f 6e 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 20 26 20 22 50 er.RawFunctionParameterName.&."P
b50a0 61 72 61 6d 65 74 65 72 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6d 70 6f arameter")..................impo
b50c0 72 74 50 61 72 61 6d 65 74 65 72 2e 45 78 65 63 75 74 65 50 61 72 61 6d 65 74 65 72 4e 61 6d 65 rtParameter.ExecuteParameterName
b50e0 20 3d 20 69 6d 70 6f 72 74 50 61 72 61 6d 65 74 65 72 2e 4c 6f 63 61 6c 56 61 72 69 61 62 6c 65 .=.importParameter.LocalVariable
b5100 4e 61 6d 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 Name..............End.If........
b5120 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 69 6d 70 6f 72 74 50 ..Next............Return.importP
b5140 61 72 61 6d 65 74 65 72 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 arameters......End.Function.....
b5160 20 20 20 27 0d 0a 20 20 20 20 27 20 43 6c 61 73 73 20 74 6f 20 63 72 65 61 74 65 20 75 6e 69 71 ...'......'.Class.to.create.uniq
b5180 75 65 20 76 61 72 69 61 62 6c 65 73 20 77 69 74 68 69 6e 20 74 68 65 20 73 61 6d 65 20 73 63 6f ue.variables.within.the.same.sco
b51a0 70 65 0d 0a 20 20 20 20 27 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 pe......'......Private.NotInheri
b51c0 74 61 62 6c 65 20 43 6c 61 73 73 20 55 6e 69 71 75 65 49 64 65 6e 74 69 66 69 65 72 53 65 72 76 table.Class.UniqueIdentifierServ
b51e0 69 63 65 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 6b ice..........Private.ReadOnly._k
b5200 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 20 41 73 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 nownIdentifiers.As.HashSet(Of.St
b5220 72 69 6e 67 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 ring)............Public.Sub.New(
b5240 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 ).............._knownIdentifiers
b5260 20 3d 20 4e 65 77 20 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 28 53 74 72 69 6e 67 .=.New.HashSet(Of.String)(String
b5280 43 6f 6d 70 61 72 65 72 2e 4f 72 64 69 6e 61 6c 49 67 6e 6f 72 65 43 61 73 65 29 0d 0a 20 20 20 Comparer.OrdinalIgnoreCase).....
b52a0 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d .....End.Sub............'''.<sum
b52c0 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 47 69 76 65 6e 20 61 6e 20 69 64 65 6e mary>..........'''.Given.an.iden
b52e0 74 69 66 69 65 72 2c 20 6d 61 6b 65 73 20 69 74 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 74 tifier,.makes.it.unique.within.t
b5300 68 65 20 73 63 6f 70 65 20 62 79 20 61 64 64 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 he.scope.by.adding..........'''.
b5320 61 20 73 75 66 66 69 78 20 28 31 2c 20 32 2c 20 33 2c 20 2e 2e 2e 29 2c 20 61 6e 64 20 72 65 74 a.suffix.(1,.2,.3,....),.and.ret
b5340 75 72 6e 73 20 74 68 65 20 61 64 6a 75 73 74 65 64 20 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 20 urns.the.adjusted.identifier....
b5360 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 .......'''.</summary>..........P
b5380 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 41 64 6a 75 73 74 49 64 65 6e 74 69 66 69 65 72 28 ublic.Function.AdjustIdentifier(
b53a0 42 79 56 61 6c 20 69 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 ByVal.identifier.As.String).As.S
b53c0 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 20 66 69 6e 64 20 61 20 75 6e 69 71 tring..............'.find.a.uniq
b53e0 75 65 20 6e 61 6d 65 20 62 79 20 61 64 64 69 6e 67 20 73 75 66 66 69 78 20 61 73 20 6e 65 63 65 ue.name.by.adding.suffix.as.nece
b5400 73 73 61 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6e 75 6d 62 65 72 4f 66 43 ssary..............Dim.numberOfC
b5420 6f 6e 66 6c 69 63 74 73 20 41 73 20 49 6e 74 65 67 65 72 20 3d 20 30 0d 0a 20 20 20 20 20 20 20 onflicts.As.Integer.=.0.........
b5440 20 20 20 20 20 44 69 6d 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 20 41 73 20 53 .....Dim.adjustedIdentifier.As.S
b5460 74 72 69 6e 67 20 3d 20 69 64 65 6e 74 69 66 69 65 72 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 tring.=.identifier..............
b5480 20 20 57 68 69 6c 65 20 4e 6f 74 20 5f 6b 6e 6f 77 6e 49 64 65 6e 74 69 66 69 65 72 73 2e 41 64 ..While.Not._knownIdentifiers.Ad
b54a0 64 28 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 d(adjustedIdentifier)...........
b54c0 20 20 20 20 20 20 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 74 73 20 2b 3d 20 31 0d 0a 20 .......numberOfConflicts.+=.1...
b54e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 64 6a 75 73 74 65 64 49 64 65 6e 74 69 66 69 65 ...............adjustedIdentifie
b5500 72 20 3d 20 69 64 65 6e 74 69 66 69 65 72 20 2b 20 6e 75 6d 62 65 72 4f 66 43 6f 6e 66 6c 69 63 r.=.identifier.+.numberOfConflic
b5520 74 73 2e 54 6f 53 74 72 69 6e 67 28 43 75 6c 74 75 72 65 49 6e 66 6f 2e 49 6e 76 61 72 69 61 6e ts.ToString(CultureInfo.Invarian
b5540 74 43 75 6c 74 75 72 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 57 68 69 6c 65 tCulture)..............End.While
b5560 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 61 64 6a 75 73 74 65 64 49 ................Return.adjustedI
b5580 64 65 6e 74 69 66 69 65 72 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d dentifier..........End.Function.
b55a0 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 .....End.Class..End.Class....'''
b55c0 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 .<summary>..'''.Responsible.for.
b55e0 6d 61 72 6b 69 6e 67 20 74 68 65 20 76 61 72 69 6f 75 73 20 73 65 63 74 69 6f 6e 73 20 6f 66 20 marking.the.various.sections.of.
b5600 74 68 65 20 67 65 6e 65 72 61 74 69 6f 6e 2c 0d 0a 27 27 27 20 73 6f 20 74 68 65 79 20 63 61 6e the.generation,..'''.so.they.can
b5620 20 62 65 20 73 70 6c 69 74 20 75 70 20 69 6e 74 6f 20 73 65 70 61 72 61 74 65 20 66 69 6c 65 73 .be.split.up.into.separate.files
b5640 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 45 ..'''.</summary>..Public.Class.E
b5660 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 ntityFrameworkTemplateFileManage
b5680 72 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 r......'''.<summary>......'''.Cr
b56a0 65 61 74 65 73 20 74 68 65 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c eates.the.VsEntityFrameworkTempl
b56c0 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 20 69 66 20 56 53 20 69 73 20 64 65 74 65 63 74 65 64 ateFileManager.if.VS.is.detected
b56e0 2c 20 6f 74 68 65 72 77 69 73 65 0d 0a 20 20 20 20 27 27 27 20 63 72 65 61 74 65 73 20 74 68 65 ,.otherwise......'''.creates.the
b5700 20 66 69 6c 65 20 73 79 73 74 65 6d 20 76 65 72 73 69 6f 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c .file.system.version.......'''.<
b5720 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e /summary>......Public.Shared.Fun
b5740 63 74 69 6f 6e 20 43 72 65 61 74 65 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d ction.Create(ByVal.textTransform
b5760 61 74 69 6f 6e 20 41 73 20 4f 62 6a 65 63 74 29 20 41 73 20 45 6e 74 69 74 79 46 72 61 6d 65 77 ation.As.Object).As.EntityFramew
b5780 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 20 20 20 20 orkTemplateFileManager..........
b57a0 44 69 6d 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 Dim.transformation.As.DynamicTex
b57c0 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 tTransformation.=.DynamicTextTra
b57e0 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d nsformation.Create(textTransform
b5800 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 68 6f 73 74 20 41 73 20 49 44 79 6e ation)..........Dim.host.As.IDyn
b5820 61 6d 69 63 48 6f 73 74 20 3d 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 0d 0a amicHost.=.transformation.Host..
b5840 0d 0a 20 20 20 20 20 20 20 20 23 49 66 20 4e 6f 74 20 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 ..........#If.Not.PREPROCESSED_T
b5860 45 4d 50 4c 41 54 45 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 68 6f 73 74 53 65 EMPLATE.Then..........Dim.hostSe
b5880 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 3d 20 68 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 rviceProvider.=.host.AsIServiceP
b58a0 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 68 6f 73 74 53 65 72 76 69 63 rovider()..........If.hostServic
b58c0 65 50 72 6f 76 69 64 65 72 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 eProvider.IsNot.Nothing.Then....
b58e0 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 64 74 65 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 68 ..........Dim.dte.=.DirectCast(h
b5900 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 2e 47 65 74 53 65 72 76 69 63 65 28 47 65 ostServiceProvider.GetService(Ge
b5920 74 54 79 70 65 28 45 6e 76 44 54 45 2e 44 54 45 29 29 2c 20 45 6e 76 44 54 45 2e 44 54 45 29 0d tType(EnvDTE.DTE)),.EnvDTE.DTE).
b5940 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 64 74 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e .............If.dte.IsNot.Nothin
b5960 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e g.Then..................Return.N
b5980 65 77 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 ew.VsEntityFrameworkTemplateFile
b59a0 4d 61 6e 61 67 65 72 28 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 Manager(transformation).........
b59c0 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 .....End.If..........End.If.....
b59e0 20 20 20 20 20 23 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 65 77 .....#End.If..........Return.New
b5a00 20 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 .EntityFrameworkTemplateFileMana
b5a20 67 65 72 28 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e ger(transformation)......End.Fun
b5a40 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 61 ction........Private.NotInherita
b5a60 62 6c 65 20 43 6c 61 73 73 20 42 6c 6f 63 6b 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 ble.Class.Block..........Public.
b5a80 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 Name.As.String..........Public.S
b5aa0 74 61 72 74 20 41 73 20 49 6e 74 65 67 65 72 2c 20 4c 65 6e 67 74 68 20 41 73 20 49 6e 74 65 67 tart.As.Integer,.Length.As.Integ
b5ac0 65 72 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 er......End.Class........Private
b5ae0 20 52 65 61 64 4f 6e 6c 79 20 66 69 6c 65 73 20 41 73 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 42 .ReadOnly.files.As.New.List(Of.B
b5b00 6c 6f 63 6b 29 28 29 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 66 6f lock)()......Private.ReadOnly.fo
b5b20 6f 74 65 72 20 41 73 20 4e 65 77 20 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 50 72 69 76 61 74 65 oter.As.New.Block()......Private
b5b40 20 52 65 61 64 4f 6e 6c 79 20 68 65 61 64 65 72 20 41 73 20 4e 65 77 20 42 6c 6f 63 6b 28 29 0d .ReadOnly.header.As.New.Block().
b5b60 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 74 65 78 74 54 72 61 6e 73 .....Private.ReadOnly._textTrans
b5b80 66 6f 72 6d 61 74 69 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 formation.As.DynamicTextTransfor
b5ba0 6d 61 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 mation........'.reference.to.the
b5bc0 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 53 74 72 69 6e 67 42 75 69 .GenerationEnvironment.StringBui
b5be0 6c 64 65 72 20 6f 6e 20 74 68 65 0d 0a 20 20 20 20 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d lder.on.the......'.TextTransform
b5c00 61 74 69 6f 6e 20 6f 62 6a 65 63 74 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e ation.object......Private.ReadOn
b5c20 6c 79 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 41 73 20 53 74 72 ly._generationEnvironment.As.Str
b5c40 69 6e 67 42 75 69 6c 64 65 72 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 63 75 72 72 ingBuilder........Private.m_curr
b5c60 65 6e 74 42 6c 6f 63 6b 20 41 73 20 42 6c 6f 63 6b 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 entBlock.As.Block........'''.<su
b5c80 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 49 6e 69 74 69 61 6c 69 7a 65 73 20 61 6e 20 45 mmary>......'''.Initializes.an.E
b5ca0 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 65 ntityFrameworkTemplateFileManage
b5cc0 72 20 49 6e 73 74 61 6e 63 65 20 20 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 27 27 27 20 54 65 r.Instance..with.the......'''.Te
b5ce0 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 28 54 34 20 67 65 6e 65 72 61 74 65 64 20 63 xtTransformation.(T4.generated.c
b5d00 6c 61 73 73 29 20 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 72 75 6e 6e 69 6e 67 0d lass).that.is.currently.running.
b5d20 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 .....'''.</summary>......Private
b5d40 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f .Sub.New(ByVal.textTransformatio
b5d60 6e 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 72 61 n.As.Object)..........If.textTra
b5d80 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 nsformation.Is.Nothing.Then.....
b5da0 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 .........Throw.New.ArgumentNullE
b5dc0 78 63 65 70 74 69 6f 6e 28 22 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 22 29 0d 0a xception("textTransformation")..
b5de0 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5f 74 65 78 74 54 ........End.If............_textT
b5e00 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3d 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 ransformation.=.DynamicTextTrans
b5e20 66 6f 72 6d 61 74 69 6f 6e 2e 43 72 65 61 74 65 28 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 formation.Create(textTransformat
b5e40 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e ion).........._generationEnviron
b5e60 6d 65 6e 74 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 47 65 6e 65 72 ment.=._textTransformation.Gener
b5e80 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d ationEnvironment......End.Sub...
b5ea0 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 4d 61 72 6b .....'''.<summary>......'''.Mark
b5ec0 73 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 6c 61 73 74 20 66 69 6c 65 20 69 66 20 74 68 s.the.end.of.the.last.file.if.th
b5ee0 65 72 65 20 77 61 73 20 6f 6e 65 2c 20 61 6e 64 20 73 74 61 72 74 73 20 61 20 6e 65 77 0d 0a 20 ere.was.one,.and.starts.a.new...
b5f00 20 20 20 27 27 27 20 61 6e 64 20 6d 61 72 6b 73 20 74 68 69 73 20 70 6f 69 6e 74 20 69 6e 20 67 ...'''.and.marks.this.point.in.g
b5f20 65 6e 65 72 61 74 69 6f 6e 20 61 73 20 61 20 6e 65 77 20 66 69 6c 65 2e 0d 0a 20 20 20 20 27 27 eneration.as.a.new.file.......''
b5f40 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 53 74 61 '.</summary>......Public.Sub.Sta
b5f60 72 74 4e 65 77 46 69 6c 65 28 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 0d rtNewFile(ByVal.name.As.String).
b5f80 0a 20 20 20 20 20 20 20 20 49 66 20 6e 61 6d 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e .........If.name.Is.Nothing.Then
b5fa0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 ..............Throw.New.Argument
b5fc0 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6e 61 6d 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 NullException("name")..........E
b5fe0 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 nd.If............CurrentBlock.=.
b6000 4e 65 77 20 42 6c 6f 63 6b 28 29 20 57 69 74 68 20 7b 20 2e 4e 61 6d 65 20 3d 20 6e 61 6d 65 20 New.Block().With.{..Name.=.name.
b6020 7d 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 }......End.Sub........Public.Sub
b6040 20 53 74 61 72 74 46 6f 6f 74 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 43 75 72 72 65 6e 74 42 .StartFooter()..........CurrentB
b6060 6c 6f 63 6b 20 3d 20 66 6f 6f 74 65 72 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 lock.=.footer......End.Sub......
b6080 20 20 50 75 62 6c 69 63 20 53 75 62 20 53 74 61 72 74 48 65 61 64 65 72 28 29 0d 0a 20 20 20 20 ..Public.Sub.StartHeader()......
b60a0 20 20 20 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 68 65 61 64 65 72 0d 0a 20 20 20 20 45 ....CurrentBlock.=.header......E
b60c0 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 45 6e 64 42 6c 6f 63 nd.Sub........Public.Sub.EndBloc
b60e0 6b 28 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 49 73 20 k()..........If.CurrentBlock.Is.
b6100 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 78 69 74 20 53 Nothing.Then..............Exit.S
b6120 75 62 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 43 75 ub..........End.If............Cu
b6140 72 72 65 6e 74 42 6c 6f 63 6b 2e 4c 65 6e 67 74 68 20 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 rrentBlock.Length.=._generationE
b6160 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 2d 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b nvironment.Length.-.CurrentBlock
b6180 2e 53 74 61 72 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 43 75 72 72 65 6e 74 42 6c 6f 63 .Start............If.CurrentBloc
b61a0 6b 20 49 73 4e 6f 74 20 68 65 61 64 65 72 20 41 6e 64 41 6c 73 6f 20 43 75 72 72 65 6e 74 42 6c k.IsNot.header.AndAlso.CurrentBl
b61c0 6f 63 6b 20 49 73 4e 6f 74 20 66 6f 6f 74 65 72 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 ock.IsNot.footer.Then...........
b61e0 20 20 20 66 69 6c 65 73 2e 41 64 64 28 43 75 72 72 65 6e 74 42 6c 6f 63 6b 29 0d 0a 20 20 20 20 ...files.Add(CurrentBlock)......
b6200 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 42 ....End.If............m_currentB
b6220 6c 6f 63 6b 20 3d 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 lock.=.Nothing......End.Sub.....
b6240 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 50 72 6f 64 75 63 ...'''.<summary>......'''.Produc
b6260 65 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6f 75 74 70 75 74 20 66 69 6c 65 73 2e 0d 0a 20 20 e.the.template.output.files.....
b6280 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 ..'''.</summary>......Public.Ove
b62a0 72 72 69 64 61 62 6c 65 20 46 75 6e 63 74 69 6f 6e 20 50 72 6f 63 65 73 73 28 4f 70 74 69 6f 6e rridable.Function.Process(Option
b62c0 61 6c 20 73 70 6c 69 74 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 54 72 75 65 29 20 41 73 20 49 al.split.As.Boolean.=.True).As.I
b62e0 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 44 Enumerable(Of.String)..........D
b6300 69 6d 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 20 41 73 20 4c 69 73 74 28 4f 66 im.generatedFileNames.As.List(Of
b6320 20 53 74 72 69 6e 67 29 20 3d 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 53 74 72 69 6e 67 29 28 29 .String).=.New.List(Of.String)()
b6340 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 66 20 73 70 6c 69 74 20 54 68 65 6e 0d 0a 20 20 20 20 20 ............If.split.Then.......
b6360 20 20 20 20 20 20 20 45 6e 64 42 6c 6f 63 6b 28 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .......EndBlock()...............
b6380 20 44 69 6d 20 68 65 61 64 65 72 54 65 78 74 20 41 73 20 53 74 72 69 6e 67 20 3d 20 5f 67 65 6e .Dim.headerText.As.String.=._gen
b63a0 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 68 65 61 64 erationEnvironment.ToString(head
b63c0 65 72 2e 53 74 61 72 74 2c 20 68 65 61 64 65 72 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 er.Start,.header.Length)........
b63e0 20 20 20 20 20 20 44 69 6d 20 66 6f 6f 74 65 72 54 65 78 74 20 41 73 20 53 74 72 69 6e 67 20 3d ......Dim.footerText.As.String.=
b6400 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 54 6f 53 74 72 69 6e 67 ._generationEnvironment.ToString
b6420 28 66 6f 6f 74 65 72 2e 53 74 61 72 74 2c 20 66 6f 6f 74 65 72 2e 4c 65 6e 67 74 68 29 0d 0a 20 (footer.Start,.footer.Length)...
b6440 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6f 75 74 70 75 74 50 61 74 68 20 41 73 20 53 74 72 ...........Dim.outputPath.As.Str
b6460 69 6e 67 20 3d 20 50 61 74 68 2e 47 65 74 44 69 72 65 63 74 6f 72 79 4e 61 6d 65 28 5f 74 65 78 ing.=.Path.GetDirectoryName(_tex
b6480 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c tTransformation.Host.TemplateFil
b64a0 65 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 73 2e 52 65 76 65 72 73 65 28 e)................files.Reverse(
b64c0 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 62 6c 6f 63 6b 20 )................For.Each.block.
b64e0 41 73 20 42 6c 6f 63 6b 20 49 6e 20 66 69 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 As.Block.In.files...............
b6500 20 20 20 44 69 6d 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 50 61 74 68 ...Dim.fileName.As.String.=.Path
b6520 2e 43 6f 6d 62 69 6e 65 28 6f 75 74 70 75 74 50 61 74 68 2c 20 62 6c 6f 63 6b 2e 4e 61 6d 65 29 .Combine(outputPath,.block.Name)
b6540 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 63 6f 6e 74 65 6e 74 20 3d 20 ..................Dim.content.=.
b6560 68 65 61 64 65 72 54 65 78 74 20 2b 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d headerText.+._generationEnvironm
b6580 65 6e 74 2e 54 6f 53 74 72 69 6e 67 28 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e ent.ToString(block.Start,.block.
b65a0 4c 65 6e 67 74 68 29 20 2b 20 66 6f 6f 74 65 72 54 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 Length).+.footerText............
b65c0 20 20 20 20 20 20 20 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 2e 41 64 64 28 66 ........generatedFileNames.Add(f
b65e0 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 ileName)..................Create
b6600 46 69 6c 65 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 File(fileName,.content).........
b6620 20 20 20 20 20 20 20 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e ........._generationEnvironment.
b6640 52 65 6d 6f 76 65 28 62 6c 6f 63 6b 2e 53 74 61 72 74 2c 20 62 6c 6f 63 6b 2e 4c 65 6e 67 74 68 Remove(block.Start,.block.Length
b6660 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 )..............Next..........End
b6680 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 67 65 6e 65 72 61 74 65 64 46 .If............Return.generatedF
b66a0 69 6c 65 4e 61 6d 65 73 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 ileNames......End.Function......
b66c0 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 72 69 64 61 62 6c 65 20 53 75 62 20 43 72 65 61 ..Protected.Overridable.Sub.Crea
b66e0 74 65 46 69 6c 65 28 42 79 56 61 6c 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c teFile(ByVal.fileName.As.String,
b6700 20 42 79 56 61 6c 20 63 6f 6e 74 65 6e 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 .ByVal.content.As.String).......
b6720 20 20 20 49 66 20 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 66 69 6c ...If.IsFileContentDifferent(fil
b6740 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 eName,.content).Then............
b6760 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f ..File.WriteAllText(fileName,.co
b6780 6e 74 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 45 6e 64 20 ntent)..........End.If......End.
b67a0 53 75 62 0d 0a 0d 0a 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 46 75 6e 63 74 69 6f 6e 20 49 73 Sub........Protected.Function.Is
b67c0 46 69 6c 65 43 6f 6e 74 65 6e 74 44 69 66 66 65 72 65 6e 74 28 42 79 56 61 6c 20 66 69 6c 65 4e FileContentDifferent(ByVal.fileN
b67e0 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6e 65 77 43 6f 6e 74 65 6e 74 20 ame.As.String,.ByVal.newContent.
b6800 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 42 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 20 20 20 20 52 As.String).As.Boolean..........R
b6820 65 74 75 72 6e 20 4e 6f 74 20 28 46 69 6c 65 2e 45 78 69 73 74 73 28 66 69 6c 65 4e 61 6d 65 29 eturn.Not.(File.Exists(fileName)
b6840 20 41 6e 64 41 6c 73 6f 20 46 69 6c 65 2e 52 65 61 64 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 .AndAlso.File.ReadAllText(fileNa
b6860 6d 65 29 20 3d 20 6e 65 77 43 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 me).=.newContent)......End.Funct
b6880 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 50 72 6f 70 65 72 74 79 20 43 75 72 72 ion........Private.Property.Curr
b68a0 65 6e 74 42 6c 6f 63 6b 28 29 20 41 73 20 42 6c 6f 63 6b 0d 0a 20 20 20 20 20 20 20 20 47 65 74 entBlock().As.Block..........Get
b68c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 63 75 72 72 65 6e 74 42 6c ..............Return.m_currentBl
b68e0 6f 63 6b 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 53 65 ock..........End.Get..........Se
b6900 74 28 42 79 56 61 6c 20 76 61 6c 75 65 20 41 73 20 42 6c 6f 63 6b 29 0d 0a 20 20 20 20 20 20 20 t(ByVal.value.As.Block).........
b6920 20 20 20 20 20 49 66 20 43 75 72 72 65 6e 74 42 6c 6f 63 6b 20 49 73 4e 6f 74 20 4e 6f 74 68 69 .....If.CurrentBlock.IsNot.Nothi
b6940 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 42 6c 6f 63 ng.Then..................EndBloc
b6960 6b 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 k()..............End.If.........
b6980 20 20 20 20 20 20 20 49 66 20 76 61 6c 75 65 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 .......If.value.IsNot.Nothing.Th
b69a0 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 2e 53 74 61 72 74 20 en..................value.Start.
b69c0 3d 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 0d =._generationEnvironment.Length.
b69e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 .............End.If.............
b6a00 20 20 20 6d 5f 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 ...m_currentBlock.=.value.......
b6a20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a ...End.Set......End.Property....
b6a40 20 20 20 20 23 49 66 20 4e 6f 74 20 50 52 45 50 52 4f 43 45 53 53 45 44 5f 54 45 4d 50 4c 41 54 ....#If.Not.PREPROCESSED_TEMPLAT
b6a60 45 20 54 68 65 6e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 4e 6f 74 49 6e 68 65 72 69 74 61 62 E.Then......Private.NotInheritab
b6a80 6c 65 20 43 6c 61 73 73 20 56 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 le.Class.VsEntityFrameworkTempla
b6aa0 74 65 46 69 6c 65 4d 61 6e 61 67 65 72 0d 0a 20 20 20 20 20 20 20 20 49 6e 68 65 72 69 74 73 20 teFileManager..........Inherits.
b6ac0 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 67 EntityFrameworkTemplateFileManag
b6ae0 65 72 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a er..........Private.templateProj
b6b00 65 63 74 49 74 65 6d 20 41 73 20 45 6e 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 0d 0a 20 ectItem.As.EnvDTE.ProjectItem...
b6b20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 64 74 65 20 41 73 20 45 6e 76 44 54 45 2e 44 54 45 .......Private.dte.As.EnvDTE.DTE
b6b40 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e ..........Private.checkOutAction
b6b60 20 41 73 20 41 63 74 69 6f 6e 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 50 .As.Action(Of.String)..........P
b6b80 72 69 76 61 74 65 20 70 72 6f 6a 65 63 74 53 79 6e 63 41 63 74 69 6f 6e 20 41 73 20 41 63 74 69 rivate.projectSyncAction.As.Acti
b6ba0 6f 6e 28 4f 66 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 29 0d 0a 0d on(Of.IEnumerable(Of.String))...
b6bc0 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 .........'''.<summary>..........
b6be0 27 27 27 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 56 '''.Creates.an.instance.of.the.V
b6c00 73 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 6b 54 65 6d 70 6c 61 74 65 46 69 6c 65 4d 61 6e 61 sEntityFrameworkTemplateFileMana
b6c20 67 65 72 20 63 6c 61 73 73 20 77 69 74 68 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 ger.class.with.the.IDynamicHost.
b6c40 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e instance..........'''.</summary>
b6c60 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 74 ..........Public.Sub.New(ByVal.t
b6c80 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 extTemplating.As.Object)........
b6ca0 20 20 20 20 20 20 4d 79 42 61 73 65 2e 4e 65 77 28 74 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 29 ......MyBase.New(textTemplating)
b6cc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f ..............Dim.hostServicePro
b6ce0 76 69 64 65 72 20 3d 20 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 vider.=._textTransformation.Host
b6d00 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 .AsIServiceProvider()...........
b6d20 20 20 20 49 66 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 49 73 20 4e 6f 74 ...If.hostServiceProvider.Is.Not
b6d40 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 hing.Then..................Throw
b6d60 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c .New.ArgumentNullException("Coul
b6d80 64 20 6e 6f 74 20 6f 62 74 61 69 6e 20 68 6f 73 74 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 d.not.obtain.hostServiceProvider
b6da0 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 ")..............End.If..........
b6dc0 20 20 20 20 20 20 64 74 65 20 3d 20 44 69 72 65 63 74 43 61 73 74 28 68 6f 73 74 53 65 72 76 69 ......dte.=.DirectCast(hostServi
b6de0 63 65 50 72 6f 76 69 64 65 72 2e 47 65 74 53 65 72 76 69 63 65 28 47 65 74 54 79 70 65 28 45 6e ceProvider.GetService(GetType(En
b6e00 76 44 54 45 2e 44 54 45 29 29 2c 20 45 6e 76 44 54 45 2e 44 54 45 29 0d 0a 20 20 20 20 20 20 20 vDTE.DTE)),.EnvDTE.DTE).........
b6e20 20 20 20 20 20 49 66 20 64 74 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 .....If.dte.Is.Nothing.Then.....
b6e40 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e .............Throw.New.ArgumentN
b6e60 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 6f 62 74 61 69 6e 20 44 ullException("Could.not.obtain.D
b6e80 54 45 20 66 72 6f 6d 20 68 6f 73 74 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 TE.from.host")..............End.
b6ea0 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 If................templateProjec
b6ec0 74 49 74 65 6d 20 3d 20 64 74 65 2e 53 6f 6c 75 74 69 6f 6e 2e 46 69 6e 64 50 72 6f 6a 65 63 74 tItem.=.dte.Solution.FindProject
b6ee0 49 74 65 6d 28 5f 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 48 6f 73 74 2e 54 65 Item(_textTransformation.Host.Te
b6f00 6d 70 6c 61 74 65 46 69 6c 65 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 68 65 63 6b mplateFile)................check
b6f20 4f 75 74 41 63 74 69 6f 6e 20 3d 20 46 75 6e 63 74 69 6f 6e 28 66 69 6c 65 4e 61 6d 65 29 20 64 OutAction.=.Function(fileName).d
b6f40 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 2e 43 68 65 63 6b 4f 75 74 49 74 65 6d 28 66 69 te.SourceControl.CheckOutItem(fi
b6f60 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 79 6e 63 leName)..............projectSync
b6f80 41 63 74 69 6f 6e 20 3d 20 53 75 62 28 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 29 20 50 72 6f 6a Action.=.Sub(keepFileNames).Proj
b6fa0 65 63 74 53 79 6e 63 28 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2c 20 6b 65 65 ectSync(templateProjectItem,.kee
b6fc0 70 46 69 6c 65 4e 61 6d 65 73 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a pFileNames)..........End.Sub....
b6fe0 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 ........Public.Overloads.Overrid
b7000 65 73 20 46 75 6e 63 74 69 6f 6e 20 50 72 6f 63 65 73 73 28 4f 70 74 69 6f 6e 61 6c 20 73 70 6c es.Function.Process(Optional.spl
b7020 69 74 20 41 73 20 42 6f 6f 6c 65 61 6e 20 3d 20 54 72 75 65 29 20 41 73 20 49 45 6e 75 6d 65 72 it.As.Boolean.=.True).As.IEnumer
b7040 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 able(Of.String)..............If.
b7060 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 templateProjectItem.ProjectItems
b7080 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Is.Nothing.Then................
b70a0 20 20 52 65 74 75 72 6e 20 4e 65 77 20 4c 69 73 74 28 4f 66 20 53 74 72 69 6e 67 29 0d 0a 20 20 ..Return.New.List(Of.String)....
b70c0 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..........End.If................
b70e0 44 69 6d 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 73 20 41 73 20 49 45 6e 75 6d 65 Dim.generatedFileNames.As.IEnume
b7100 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 20 3d 20 4d 79 42 61 73 65 2e 50 72 6f 63 65 73 rable(Of.String).=.MyBase.Proces
b7120 73 28 73 70 6c 69 74 29 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 6f 6a 65 63 74 53 s(split)................projectS
b7140 79 6e 63 41 63 74 69 6f 6e 2e 45 6e 64 49 6e 76 6f 6b 65 28 70 72 6f 6a 65 63 74 53 79 6e 63 41 yncAction.EndInvoke(projectSyncA
b7160 63 74 69 6f 6e 2e 42 65 67 69 6e 49 6e 76 6f 6b 65 28 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e ction.BeginInvoke(generatedFileN
b7180 61 6d 65 73 2c 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f 74 68 69 6e 67 29 29 0d 0a 0d 0a 20 20 20 20 ames,.Nothing,.Nothing))........
b71a0 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 67 65 6e 65 72 61 74 65 64 46 69 6c 65 4e 61 6d 65 ........Return.generatedFileName
b71c0 73 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 s..........End.Function.........
b71e0 20 20 20 50 72 6f 74 65 63 74 65 64 20 4f 76 65 72 6c 6f 61 64 73 20 4f 76 65 72 72 69 64 65 73 ...Protected.Overloads.Overrides
b7200 20 53 75 62 20 43 72 65 61 74 65 46 69 6c 65 28 42 79 56 61 6c 20 66 69 6c 65 4e 61 6d 65 20 41 .Sub.CreateFile(ByVal.fileName.A
b7220 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 6f 6e 74 65 6e 74 20 41 73 20 53 74 72 69 6e s.String,.ByVal.content.As.Strin
b7240 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 49 73 46 69 6c 65 43 6f 6e 74 65 6e 74 g)..............If.IsFileContent
b7260 44 69 66 66 65 72 65 6e 74 28 66 69 6c 65 4e 61 6d 65 2c 20 63 6f 6e 74 65 6e 74 29 20 54 68 65 Different(fileName,.content).The
b7280 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 68 65 63 6b 6f 75 74 46 69 6c 65 49 n..................CheckoutFileI
b72a0 66 52 65 71 75 69 72 65 64 28 66 69 6c 65 4e 61 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 fRequired(fileName).............
b72c0 20 20 20 20 20 46 69 6c 65 2e 57 72 69 74 65 41 6c 6c 54 65 78 74 28 66 69 6c 65 4e 61 6d 65 2c .....File.WriteAllText(fileName,
b72e0 20 63 6f 6e 74 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 .content)..............End.If...
b7300 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 .......End.Sub............Privat
b7320 65 20 53 68 61 72 65 64 20 53 75 62 20 50 72 6f 6a 65 63 74 53 79 6e 63 28 42 79 56 61 6c 20 74 e.Shared.Sub.ProjectSync(ByVal.t
b7340 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 20 41 73 20 45 6e 76 44 54 45 2e 50 72 6f emplateProjectItem.As.EnvDTE.Pro
b7360 6a 65 63 74 49 74 65 6d 2c 20 42 79 56 61 6c 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 20 41 73 jectItem,.ByVal.keepFileNames.As
b7380 20 49 45 6e 75 6d 65 72 61 62 6c 65 28 4f 66 20 53 74 72 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 .IEnumerable(Of.String))........
b73a0 20 20 20 20 20 20 44 69 6d 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 53 65 74 20 3d 20 4e 65 77 20 ......Dim.keepFileNameSet.=.New.
b73c0 48 61 73 68 53 65 74 28 4f 66 20 53 74 72 69 6e 67 29 28 6b 65 65 70 46 69 6c 65 4e 61 6d 65 73 HashSet(Of.String)(keepFileNames
b73e0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 20 )..............Dim.projectFiles.
b7400 3d 20 4e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 45 6e 76 44 =.New.Dictionary(Of.String,.EnvD
b7420 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 TE.ProjectItem)()..............D
b7440 69 6d 20 6f 72 69 67 69 6e 61 6c 4f 75 74 70 75 74 20 3d 20 50 61 74 68 2e 47 65 74 46 69 6c 65 im.originalOutput.=.Path.GetFile
b7460 4e 61 6d 65 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 74 65 6d 70 6c 61 74 65 50 72 6f NameWithoutExtension(templatePro
b7480 6a 65 63 74 49 74 65 6d 2e 46 69 6c 65 4e 61 6d 65 73 28 30 29 29 0d 0a 0d 0a 20 20 20 20 20 20 jectItem.FileNames(0))..........
b74a0 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 72 6f 6a 65 63 74 49 74 65 6d 20 41 73 20 45 6e ......For.Each.projectItem.As.En
b74c0 76 44 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 20 49 6e 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a vDTE.ProjectItem.In.templateProj
b74e0 65 63 74 49 74 65 6d 2e 50 72 6f 6a 65 63 74 49 74 65 6d 73 0d 0a 20 20 20 20 20 20 20 20 20 20 ectItem.ProjectItems............
b7500 20 20 20 20 20 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 2e 41 64 64 28 70 72 6f 6a 65 63 74 49 74 ......projectFiles.Add(projectIt
b7520 65 6d 2e 46 69 6c 65 4e 61 6d 65 73 28 30 29 2c 20 70 72 6f 6a 65 63 74 49 74 65 6d 29 0d 0a 20 em.FileNames(0),.projectItem)...
b7540 20 20 20 20 20 20 20 20 20 20 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 ...........Next................'
b7560 20 52 65 6d 6f 76 65 20 75 6e 75 73 65 64 20 69 74 65 6d 73 20 66 72 6f 6d 20 74 68 65 20 70 72 .Remove.unused.items.from.the.pr
b7580 6f 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 70 61 69 72 oject..............For.Each.pair
b75a0 20 41 73 20 4b 65 79 56 61 6c 75 65 50 61 69 72 28 4f 66 20 53 74 72 69 6e 67 2c 20 45 6e 76 44 .As.KeyValuePair(Of.String,.EnvD
b75c0 54 45 2e 50 72 6f 6a 65 63 74 49 74 65 6d 29 20 49 6e 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 0d TE.ProjectItem).In.projectFiles.
b75e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4e 6f 74 20 6b 65 65 70 46 69 6c 65 .................If.Not.keepFile
b7600 4e 61 6d 65 73 2e 43 6f 6e 74 61 69 6e 73 28 70 61 69 72 2e 4b 65 79 29 20 5f 0d 0a 20 20 20 20 Names.Contains(pair.Key)._......
b7620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 6e 64 41 6c 73 6f 20 4e 6f 74 20 28 50 61 74 68 2e ..............AndAlso.Not.(Path.
b7640 47 65 74 46 69 6c 65 4e 61 6d 65 57 69 74 68 6f 75 74 45 78 74 65 6e 73 69 6f 6e 28 70 61 69 72 GetFileNameWithoutExtension(pair
b7660 2e 4b 65 79 29 20 2b 20 22 2e 22 29 2e 53 74 61 72 74 73 57 69 74 68 28 6f 72 69 67 69 6e 61 6c .Key).+.".").StartsWith(original
b7680 4f 75 74 70 75 74 20 2b 20 22 2e 22 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Output.+.".").Then..............
b76a0 20 20 20 20 20 20 20 20 70 61 69 72 2e 56 61 6c 75 65 2e 44 65 6c 65 74 65 28 29 0d 0a 20 20 20 ........pair.Value.Delete().....
b76c0 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .............End.If.............
b76e0 20 4e 65 78 74 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 20 41 64 64 20 6d 69 73 73 69 .Next................'.Add.missi
b7700 6e 67 20 66 69 6c 65 73 20 74 6f 20 74 68 65 20 70 72 6f 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 ng.files.to.the.project.........
b7720 20 20 20 20 20 46 6f 72 20 45 61 63 68 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 .....For.Each.fileName.As.String
b7740 20 49 6e 20 6b 65 65 70 46 69 6c 65 4e 61 6d 65 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .In.keepFileNameSet.............
b7760 20 20 20 20 20 49 66 20 4e 6f 74 20 70 72 6f 6a 65 63 74 46 69 6c 65 73 2e 43 6f 6e 74 61 69 6e .....If.Not.projectFiles.Contain
b7780 73 4b 65 79 28 66 69 6c 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 sKey(fileName).Then.............
b77a0 20 20 20 20 20 20 20 20 20 74 65 6d 70 6c 61 74 65 50 72 6f 6a 65 63 74 49 74 65 6d 2e 50 72 6f .........templateProjectItem.Pro
b77c0 6a 65 63 74 49 74 65 6d 73 2e 41 64 64 46 72 6f 6d 46 69 6c 65 28 66 69 6c 65 4e 61 6d 65 29 0d jectItems.AddFromFile(fileName).
b77e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 .................End.If.........
b7800 20 20 20 20 20 4e 65 78 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 .....Next..........End.Sub......
b7820 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 43 68 65 63 6b 6f 75 74 46 69 6c 65 49 66 ......Private.Sub.CheckoutFileIf
b7840 52 65 71 75 69 72 65 64 28 42 79 56 61 6c 20 66 69 6c 65 4e 61 6d 65 20 41 73 20 53 74 72 69 6e Required(ByVal.fileName.As.Strin
b7860 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e g)..............If.dte.SourceCon
b7880 74 72 6f 6c 20 49 73 20 4e 6f 74 68 69 6e 67 20 4f 72 45 6c 73 65 20 4e 6f 74 20 64 74 65 2e 53 trol.Is.Nothing.OrElse.Not.dte.S
b78a0 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 2e 49 73 49 74 65 6d 55 6e 64 65 72 53 43 43 28 66 69 6c 65 ourceControl.IsItemUnderSCC(file
b78c0 4e 61 6d 65 29 20 4f 72 45 6c 73 65 20 64 74 65 2e 53 6f 75 72 63 65 43 6f 6e 74 72 6f 6c 2e 49 Name).OrElse.dte.SourceControl.I
b78e0 73 49 74 65 6d 43 68 65 63 6b 65 64 4f 75 74 28 66 69 6c 65 4e 61 6d 65 29 20 54 68 65 6e 0d 0a sItemCheckedOut(fileName).Then..
b7900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 78 69 74 20 53 75 62 0d 0a 20 20 20 20 20 20 ................Exit.Sub........
b7920 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 20 72 75 ......End.If................'.ru
b7940 6e 20 6f 6e 20 77 6f 72 6b 65 72 20 74 68 72 65 61 64 20 74 6f 20 70 72 65 76 65 6e 74 20 54 34 n.on.worker.thread.to.prevent.T4
b7960 20 63 61 6c 6c 69 6e 67 20 62 61 63 6b 20 69 6e 74 6f 20 56 53 0d 0a 20 20 20 20 20 20 20 20 20 .calling.back.into.VS...........
b7980 20 20 20 63 68 65 63 6b 4f 75 74 41 63 74 69 6f 6e 2e 45 6e 64 49 6e 76 6f 6b 65 28 63 68 65 63 ...checkOutAction.EndInvoke(chec
b79a0 6b 4f 75 74 41 63 74 69 6f 6e 2e 42 65 67 69 6e 49 6e 76 6f 6b 65 28 66 69 6c 65 4e 61 6d 65 2c kOutAction.BeginInvoke(fileName,
b79c0 20 4e 6f 74 68 69 6e 67 2c 20 4e 6f 74 68 69 6e 67 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 .Nothing,.Nothing))..........End
b79e0 20 53 75 62 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 20 20 20 20 23 45 6e 64 20 49 66 .Sub......End.Class......#End.If
b7a00 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 ..End.Class....'''.<summary>..''
b7a20 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 63 72 65 61 74 69 6e 67 20 61 6e 20 69 6e 73 74 61 6e '.Responsible.creating.an.instan
b7a40 63 65 20 74 68 61 74 20 63 61 6e 20 62 65 20 70 61 73 73 65 64 0d 0a 27 27 27 20 74 6f 20 68 65 ce.that.can.be.passed..'''.to.he
b7a60 6c 70 65 72 20 63 6c 61 73 73 65 73 20 74 68 61 74 20 6e 65 65 64 20 74 6f 20 61 63 63 65 73 73 lper.classes.that.need.to.access
b7a80 20 74 68 65 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 27 27 27 20 6d 65 6d .the.TextTransformation..'''.mem
b7aa0 62 65 72 73 2e 20 49 74 20 61 63 63 65 73 73 65 73 20 6d 65 6d 62 65 72 20 62 79 20 6e 61 6d 65 bers..It.accesses.member.by.name
b7ac0 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 72 61 74 68 65 72 20 74 68 61 6e 0d 0a 27 27 27 20 .and.signature.rather.than..'''.
b7ae0 62 79 20 74 79 70 65 2e 20 54 68 69 73 20 69 73 20 6e 65 63 65 73 73 61 72 79 20 77 68 65 6e 20 by.type..This.is.necessary.when.
b7b00 74 68 65 0d 0a 27 27 27 20 74 65 6d 70 6c 61 74 65 20 69 73 20 62 65 69 6e 67 20 75 73 65 64 20 the..'''.template.is.being.used.
b7b20 69 6e 20 50 72 65 70 72 6f 63 65 73 73 65 64 20 6d 6f 64 65 0d 0a 27 27 27 20 61 6e 64 20 74 68 in.Preprocessed.mode..'''.and.th
b7b40 65 72 65 20 69 73 20 6e 6f 20 63 6f 6d 6d 6f 6e 20 6b 6e 6f 77 6e 20 74 79 70 65 20 74 68 61 74 ere.is.no.common.known.type.that
b7b60 20 63 61 6e 20 62 65 0d 0a 27 27 27 20 70 61 73 73 65 64 20 69 6e 73 74 65 61 64 0d 0a 27 27 27 .can.be..'''.passed.instead..'''
b7b80 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 44 79 6e 61 6d 69 .</summary>..Public.Class.Dynami
b7ba0 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 50 72 69 76 61 74 65 cTextTransformation......Private
b7bc0 20 5f 69 6e 73 74 61 6e 63 65 20 41 73 20 4f 62 6a 65 63 74 0d 0a 20 20 20 20 50 72 69 76 61 74 ._instance.As.Object......Privat
b7be0 65 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 41 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a e._dynamicHost.As.IDynamicHost..
b7c00 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 77 72 69 74 65 20 41 73 ......Private.ReadOnly._write.As
b7c20 20 4d 65 74 68 6f 64 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c .MethodInfo......Private.ReadOnl
b7c40 79 20 5f 77 72 69 74 65 4c 69 6e 65 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 0d 0a 20 20 20 20 y._writeLine.As.MethodInfo......
b7c60 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 Private.ReadOnly._generationEnvi
b7c80 72 6f 6e 6d 65 6e 74 20 41 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 ronment.As.PropertyInfo......Pri
b7ca0 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 65 72 72 6f 72 73 20 41 73 20 50 72 6f 70 65 72 74 vate.ReadOnly._errors.As.Propert
b7cc0 79 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 68 6f 73 yInfo......Private.ReadOnly._hos
b7ce0 74 20 41 73 20 50 72 6f 70 65 72 74 79 49 6e 66 6f 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 t.As.PropertyInfo........'''.<su
b7d00 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 mmary>......'''.Creates.an.insta
b7d20 6e 63 65 20 6f 66 20 74 68 65 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 nce.of.the.DynamicTextTransforma
b7d40 74 69 6f 6e 20 63 6c 61 73 73 20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 69 6e 0d tion.class.around.the.passed.in.
b7d60 0a 20 20 20 20 27 27 27 20 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 68 61 70 .....'''.TextTransformation.shap
b7d80 70 65 64 20 69 6e 73 74 61 6e 63 65 20 70 61 73 73 65 64 20 69 6e 2c 20 6f 72 20 69 66 20 74 68 ped.instance.passed.in,.or.if.th
b7da0 65 20 70 61 73 73 65 64 20 69 6e 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 27 27 27 20 61 6c e.passed.in.instance......'''.al
b7dc0 72 65 61 64 79 20 69 73 20 61 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 ready.is.a.DynamicTextTransforma
b7de0 74 69 6f 6e 2c 20 69 74 20 63 61 73 74 73 20 69 74 20 61 6e 64 20 73 65 6e 64 73 20 69 74 20 62 tion,.it.casts.it.and.sends.it.b
b7e00 61 63 6b 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 ack.......'''.</summary>......Pu
b7e20 62 6c 69 63 20 53 68 61 72 65 64 20 46 75 6e 63 74 69 6f 6e 20 43 72 65 61 74 65 28 42 79 56 61 blic.Shared.Function.Create(ByVa
b7e40 6c 20 69 6e 73 74 61 6e 63 65 20 41 73 20 4f 62 6a 65 63 74 29 20 41 73 20 44 79 6e 61 6d 69 63 l.instance.As.Object).As.Dynamic
b7e60 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 49 66 20 69 TextTransformation..........If.i
b7e80 6e 73 74 61 6e 63 65 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 nstance.Is.Nothing.Then.........
b7ea0 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 .....Throw.New.ArgumentNullExcep
b7ec0 74 69 6f 6e 28 22 69 6e 73 74 61 6e 63 65 22 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 tion("instance")..........End.If
b7ee0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 ............Dim.textTransformati
b7f00 6f 6e 20 41 73 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 on.As.DynamicTextTransformation.
b7f20 3d 20 54 72 79 43 61 73 74 28 69 6e 73 74 61 6e 63 65 2c 20 44 79 6e 61 6d 69 63 54 65 78 74 54 =.TryCast(instance,.DynamicTextT
b7f40 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 ransformation)..........If.textT
b7f60 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 49 73 4e 6f 74 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e ransformation.IsNot.Nothing.Then
b7f80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 74 65 78 74 54 72 61 6e 73 66 6f ..............Return.textTransfo
b7fa0 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 0d 0a 20 20 20 20 20 rmation..........End.If.........
b7fc0 20 20 20 52 65 74 75 72 6e 20 4e 65 77 20 44 79 6e 61 6d 69 63 54 65 78 74 54 72 61 6e 73 66 6f ...Return.New.DynamicTextTransfo
b7fe0 72 6d 61 74 69 6f 6e 28 69 6e 73 74 61 6e 63 65 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 rmation(instance)......End.Funct
b8000 69 6f 6e 0d 0a 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c ion........Private.Sub.New(ByVal
b8020 20 69 6e 73 74 61 6e 63 65 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 5f 69 .instance.As.Object).........._i
b8040 6e 73 74 61 6e 63 65 20 3d 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 nstance.=.instance..........Dim.
b8060 74 79 70 65 20 41 73 20 54 79 70 65 20 3d 20 5f 69 6e 73 74 61 6e 63 65 2e 47 65 74 54 79 70 65 type.As.Type.=._instance.GetType
b8080 28 29 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 20 3d 20 74 79 70 65 2e 47 65 74 4d 65 74 ().........._write.=.type.GetMet
b80a0 68 6f 64 28 22 57 72 69 74 65 22 2c 20 4e 65 77 20 54 79 70 65 28 29 20 7b 47 65 74 54 79 70 65 hod("Write",.New.Type().{GetType
b80c0 28 53 74 72 69 6e 67 29 7d 29 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 4c 69 6e 65 20 3d (String)}).........._writeLine.=
b80e0 20 74 79 70 65 2e 47 65 74 4d 65 74 68 6f 64 28 22 57 72 69 74 65 4c 69 6e 65 22 2c 20 4e 65 77 .type.GetMethod("WriteLine",.New
b8100 20 54 79 70 65 28 29 20 7b 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 7d 29 0d 0a 20 20 20 20 .Type().{GetType(String)})......
b8120 20 20 20 20 5f 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 74 79 70 ...._generationEnvironment.=.typ
b8140 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e e.GetProperty("GenerationEnviron
b8160 6d 65 6e 74 22 2c 20 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 49 6e 73 74 61 6e 63 65 20 4f 72 20 ment",.BindingFlags.Instance.Or.
b8180 42 69 6e 64 69 6e 67 46 6c 61 67 73 2e 4e 6f 6e 50 75 62 6c 69 63 29 0d 0a 20 20 20 20 20 20 20 BindingFlags.NonPublic).........
b81a0 20 5f 68 6f 73 74 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 79 28 22 48 6f 73 74 22 ._host.=.type.GetProperty("Host"
b81c0 29 0d 0a 20 20 20 20 20 20 20 20 5f 65 72 72 6f 72 73 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f ).........._errors.=.type.GetPro
b81e0 70 65 72 74 79 28 22 45 72 72 6f 72 73 22 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a perty("Errors")......End.Sub....
b8200 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 47 65 74 73 20 ....'''.<summary>......'''.Gets.
b8220 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 the.value.of.the.wrapped.TextTra
b8240 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 47 65 6e 65 72 61 74 69 6f 6e nformation.instance's.Generation
b8260 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 70 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 27 27 27 20 3c 2f Environment.property......'''.</
b8280 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 summary>......Public.ReadOnly.Pr
b82a0 6f 70 65 72 74 79 20 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 28 29 20 41 operty.GenerationEnvironment().A
b82c0 73 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 s.StringBuilder..........Get....
b82e0 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 5f 67 65 6e ..........Return.DirectCast(_gen
b8300 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 erationEnvironment.GetValue(_ins
b8320 74 61 6e 63 65 2c 20 4e 6f 74 68 69 6e 67 29 2c 20 53 74 72 69 6e 67 42 75 69 6c 64 65 72 29 0d tance,.Nothing),.StringBuilder).
b8340 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 .........End.Get......End.Proper
b8360 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 ty........'''.<summary>......'''
b8380 20 47 65 74 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 61 70 70 65 64 20 54 .Gets.the.value.of.the.wrapped.T
b83a0 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 45 72 72 6f extTranformation.instance's.Erro
b83c0 72 73 20 70 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d rs.property......'''.</summary>.
b83e0 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 45 72 .....Public.ReadOnly.Property.Er
b8400 72 6f 72 73 28 29 20 41 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 rors().As.System.CodeDom.Compile
b8420 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 r.CompilerErrorCollection.......
b8440 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 ...Get..............Return.Direc
b8460 74 43 61 73 74 28 5f 65 72 72 6f 72 73 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 tCast(_errors.GetValue(_instance
b8480 2c 20 4e 6f 74 68 69 6e 67 29 2c 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 ,.Nothing),.System.CodeDom.Compi
b84a0 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 29 0d 0a 20 20 ler.CompilerErrorCollection)....
b84c0 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d ......End.Get......End.Property.
b84e0 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 61 .......'''.<summary>......'''.Ca
b8500 6c 6c 73 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f lls.the.wrapped.TextTranformatio
b8520 6e 20 69 6e 73 74 61 6e 63 65 27 73 20 57 72 69 74 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 n.instance's.Write.method.......
b8540 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 57 '''.</summary>......Public.Sub.W
b8560 72 69 74 65 28 42 79 56 61 6c 20 74 65 78 74 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 rite(ByVal.text.As.String)......
b8580 20 20 20 20 5f 77 72 69 74 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 65 77 ...._write.Invoke(_instance,.New
b85a0 20 4f 62 6a 65 63 74 28 29 20 7b 74 65 78 74 7d 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a .Object().{text})......End.Sub..
b85c0 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 43 61 6c ......'''.<summary>......'''.Cal
b85e0 6c 73 20 74 68 65 20 77 72 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e ls.the.wrapped.TextTranformation
b8600 20 69 6e 73 74 61 6e 63 65 27 73 20 57 72 69 74 65 4c 69 6e 65 20 6d 65 74 68 6f 64 2e 0d 0a 20 .instance's.WriteLine.method....
b8620 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 ...'''.</summary>......Public.Su
b8640 62 20 57 72 69 74 65 4c 69 6e 65 28 42 79 56 61 6c 20 74 65 78 74 20 41 73 20 53 74 72 69 6e 67 b.WriteLine(ByVal.text.As.String
b8660 29 0d 0a 20 20 20 20 20 20 20 20 5f 77 72 69 74 65 4c 69 6e 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e ).........._writeLine.Invoke(_in
b8680 73 74 61 6e 63 65 2c 20 4e 65 77 20 4f 62 6a 65 63 74 28 29 20 7b 74 65 78 74 7d 29 0d 0a 20 20 stance,.New.Object().{text})....
b86a0 20 20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a ..End.Sub........'''.<summary>..
b86c0 20 20 20 20 27 27 27 20 47 65 74 73 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 77 72 ....'''.Gets.the.value.of.the.wr
b86e0 61 70 70 65 64 20 54 65 78 74 54 72 61 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 apped.TextTranformation.instance
b8700 27 73 20 48 6f 73 74 20 70 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 27 27 27 20 69 66 20 61 76 61 's.Host.property......'''.if.ava
b8720 69 6c 61 62 6c 65 20 28 73 68 6f 77 73 20 75 70 20 77 68 65 6e 20 68 6f 73 74 73 70 65 63 69 66 ilable.(shows.up.when.hostspecif
b8740 69 63 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 ic.is.set.to.true.in.the.templat
b8760 65 20 64 69 72 65 63 74 69 76 65 29 20 61 6e 64 20 72 65 74 75 72 6e 73 0d 0a 20 20 20 20 27 27 e.directive).and.returns......''
b8780 27 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e '.the.appropriate.implementation
b87a0 20 6f 66 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d .of.IDynamicHost......'''.</summ
b87c0 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 ary>......Public.ReadOnly.Proper
b87e0 74 79 20 48 6f 73 74 28 29 20 41 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 20 ty.Host().As.IDynamicHost.......
b8800 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 5f 64 79 6e 61 6d 69 63 48 ...Get..............If._dynamicH
b8820 6f 73 74 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ost.Is.Nothing.Then.............
b8840 20 20 20 20 20 49 66 20 5f 68 6f 73 74 20 49 73 20 4e 6f 74 68 69 6e 67 20 54 68 65 6e 0d 0a 20 .....If._host.Is.Nothing.Then...
b8860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 64 79 6e 61 6d 69 63 48 6f 73 74 20 ..................._dynamicHost.
b8880 3d 20 4e 65 77 20 4e 75 6c 6c 48 6f 73 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.New.NullHost()................
b88a0 20 20 45 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 5f 64 79 6e ..Else......................_dyn
b88c0 61 6d 69 63 48 6f 73 74 20 3d 20 4e 65 77 20 44 79 6e 61 6d 69 63 48 6f 73 74 28 5f 68 6f 73 74 amicHost.=.New.DynamicHost(_host
b88e0 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 6f 74 68 69 6e 67 29 29 0d 0a .GetValue(_instance,.Nothing))..
b8900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 ................End.If..........
b8920 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 5f ....End.If..............Return._
b8940 64 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 dynamicHost..........End.Get....
b8960 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 0d 0a 27 ..End.Property..End.Class......'
b8980 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 ''.<summary>..'''.Reponsible.for
b89a0 20 61 62 73 74 72 61 63 74 69 6e 67 20 74 68 65 20 75 73 65 20 6f 66 20 48 6f 73 74 20 62 65 74 .abstracting.the.use.of.Host.bet
b89c0 77 65 65 6e 20 74 69 6d 65 73 0d 0a 27 27 27 20 77 68 65 6e 20 69 74 20 69 73 20 61 76 61 69 6c ween.times..'''.when.it.is.avail
b89e0 61 62 6c 65 20 61 6e 64 20 6e 6f 74 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 able.and.not..'''.</summary>..Pu
b8a00 62 6c 69 63 20 49 6e 74 65 72 66 61 63 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 blic.Interface.IDynamicHost.....
b8a20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 .'''.<summary>......'''.An.abstr
b8a40 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 acted.call.to.Microsoft.VisualSt
b8a60 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 udio.TextTemplating.ITextTemplat
b8a80 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 ingEngineHost.ResolveParameterVa
b8aa0 6c 75 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 46 75 6e lue......'''.</summary>......Fun
b8ac0 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 42 79 56 61 ction.ResolveParameterValue(ByVa
b8ae0 6c 20 69 64 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 l.id.As.String,.ByVal.name.As.St
b8b00 72 69 6e 67 2c 20 42 79 56 61 6c 20 6f 74 68 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 ring,.ByVal.otherName.As.String)
b8b20 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d .As.String........'''.<summary>.
b8b40 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d .....'''.An.abstracted.call.to.M
b8b60 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 icrosoft.VisualStudio.TextTempla
b8b80 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 ting.ITextTemplatingEngineHost.R
b8ba0 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a esolvePath......'''.</summary>..
b8bc0 20 20 20 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 50 61 74 68 28 42 79 56 61 6c 20 70 ....Function.ResolvePath(ByVal.p
b8be0 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 ath.As.String).As.String........
b8c00 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 '''.<summary>......'''.An.abstra
b8c20 63 74 65 64 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 cted.call.to.Microsoft.VisualStu
b8c40 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 dio.TextTemplating.ITextTemplati
b8c60 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 27 ngEngineHost.TemplateFile......'
b8c80 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 ''.</summary>......ReadOnly.Prop
b8ca0 65 72 74 79 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d erty.TemplateFile().As.String...
b8cc0 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 .....'''.<summary>......'''.Retu
b8ce0 72 6e 73 20 74 68 65 20 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e rns.the.Host.instance.cast.as.an
b8d00 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d .IServiceProvider......'''.</sum
b8d20 6d 61 72 79 3e 0d 0a 20 20 20 20 46 75 6e 63 74 69 6f 6e 20 41 73 49 53 65 72 76 69 63 65 50 72 mary>......Function.AsIServicePr
b8d40 6f 76 69 64 65 72 28 29 20 41 73 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 45 6e ovider().As.IServiceProvider..En
b8d60 64 20 49 6e 74 65 72 66 61 63 65 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 d.Interface....'''.<summary>..''
b8d80 27 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 69 6e 67 20 74 68 '.Reponsible.for.implementing.th
b8da0 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 20 61 73 20 61 20 64 79 6e 61 6d 69 63 0d 0a 27 27 27 e.IDynamicHost.as.a.dynamic..'''
b8dc0 20 73 68 61 70 65 20 77 72 61 70 70 65 72 20 6f 76 65 72 20 74 68 65 20 4d 69 63 72 6f 73 6f 66 .shape.wrapper.over.the.Microsof
b8de0 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 t.VisualStudio.TextTemplating.IT
b8e00 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 69 6e 74 65 72 66 61 63 extTemplatingEngineHost.interfac
b8e20 65 0d 0a 27 27 27 20 72 61 74 68 65 72 20 74 68 61 6e 20 74 79 70 65 20 64 65 70 65 6e 64 65 6e e..'''.rather.than.type.dependen
b8e40 74 20 77 72 61 70 70 65 72 2e 20 57 65 20 64 6f 6e 27 74 20 75 73 65 20 74 68 65 0d 0a 27 27 27 t.wrapper..We.don't.use.the..'''
b8e60 20 69 6e 74 65 72 66 61 63 65 20 74 79 70 65 20 73 6f 20 74 68 61 74 20 74 68 65 20 63 6f 64 65 .interface.type.so.that.the.code
b8e80 20 63 61 6e 20 62 65 20 72 75 6e 20 69 6e 20 70 72 65 70 72 6f 63 65 73 73 65 64 20 6d 6f 64 65 .can.be.run.in.preprocessed.mode
b8ea0 0d 0a 27 27 27 20 6f 6e 20 61 20 2e 6e 65 74 20 66 72 61 6d 65 77 6f 72 6b 20 6f 6e 6c 79 20 69 ..'''.on.a..net.framework.only.i
b8ec0 6e 73 74 61 6c 6c 65 64 20 6d 61 63 68 69 6e 65 2e 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 nstalled.machine...'''.</summary
b8ee0 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 >..Public.Class.DynamicHost.....
b8f00 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d 0a 20 20 20 20 50 72 .Implements.IDynamicHost......Pr
b8f20 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 69 6e 73 74 61 6e 63 65 20 41 73 20 4f 62 6a 65 ivate.ReadOnly._instance.As.Obje
b8f40 63 74 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 72 65 73 6f 6c 76 ct......Private.ReadOnly._resolv
b8f60 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 0d 0a 20 eParameterValue.As.MethodInfo...
b8f80 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 4f 6e 6c 79 20 5f 72 65 73 6f 6c 76 65 50 61 74 68 ...Private.ReadOnly._resolvePath
b8fa0 20 41 73 20 4d 65 74 68 6f 64 49 6e 66 6f 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 52 65 61 64 .As.MethodInfo......Private.Read
b8fc0 4f 6e 6c 79 20 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 20 41 73 20 50 72 6f 70 65 72 74 79 49 6e Only._templateFile.As.PropertyIn
b8fe0 66 6f 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 fo........'''.<summary>......'''
b9000 20 43 72 65 61 74 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 44 79 6e 61 .Creates.an.instance.of.the.Dyna
b9020 6d 69 63 48 6f 73 74 20 63 6c 61 73 73 20 61 72 6f 75 6e 64 20 74 68 65 20 70 61 73 73 65 64 20 micHost.class.around.the.passed.
b9040 69 6e 0d 0a 20 20 20 20 27 27 27 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 in......'''.Microsoft.VisualStud
b9060 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e io.TextTemplating.ITextTemplatin
b9080 67 45 6e 67 69 6e 65 48 6f 73 74 20 73 68 61 70 70 65 64 20 69 6e 73 74 61 6e 63 65 20 70 61 73 gEngineHost.shapped.instance.pas
b90a0 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 sed.in.......'''.</summary>.....
b90c0 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 69 6e 73 74 61 6e 63 65 20 41 .Public.Sub.New(ByVal.instance.A
b90e0 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 5f 69 6e 73 74 61 6e 63 65 20 3d 20 69 s.Object).........._instance.=.i
b9100 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 20 20 20 20 44 69 6d 20 74 79 70 65 20 41 73 20 54 79 70 nstance..........Dim.type.As.Typ
b9120 65 20 3d 20 5f 69 6e 73 74 61 6e 63 65 2e 47 65 74 54 79 70 65 28 29 0d 0a 20 20 20 20 20 20 20 e.=._instance.GetType().........
b9140 20 5f 72 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 20 3d 20 74 79 70 65 2e 47 ._resolveParameterValue.=.type.G
b9160 65 74 4d 65 74 68 6f 64 28 22 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 22 etMethod("ResolveParameterValue"
b9180 2c 20 4e 65 77 20 54 79 70 65 28 29 20 7b 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 2c 20 47 ,.New.Type().{GetType(String),.G
b91a0 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 2c 20 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 7d etType(String),.GetType(String)}
b91c0 29 0d 0a 20 20 20 20 20 20 20 20 5f 72 65 73 6f 6c 76 65 50 61 74 68 20 3d 20 74 79 70 65 2e 47 ).........._resolvePath.=.type.G
b91e0 65 74 4d 65 74 68 6f 64 28 22 52 65 73 6f 6c 76 65 50 61 74 68 22 2c 20 4e 65 77 20 54 79 70 65 etMethod("ResolvePath",.New.Type
b9200 28 29 20 7b 47 65 74 54 79 70 65 28 53 74 72 69 6e 67 29 7d 29 0d 0a 0d 0a 20 20 20 20 20 20 20 ().{GetType(String)})...........
b9220 20 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 20 3d 20 74 79 70 65 2e 47 65 74 50 72 6f 70 65 72 74 ._templateFile.=.type.GetPropert
b9240 79 28 22 54 65 6d 70 6c 61 74 65 46 69 6c 65 22 29 0d 0a 20 20 20 20 45 6e 64 20 53 75 62 0d 0a y("TemplateFile")......End.Sub..
b9260 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 20 63 ......'''.<summary>......'''.A.c
b9280 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 all.to.Microsoft.VisualStudio.Te
b92a0 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 xtTemplating.ITextTemplatingEngi
b92c0 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 neHost.ResolveParameterValue....
b92e0 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e ..'''.</summary>......Public.Fun
b9300 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 42 79 56 61 ction.ResolveParameterValue(ByVa
b9320 6c 20 69 64 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 l.id.As.String,.ByVal.name.As.St
b9340 72 69 6e 67 2c 20 42 79 56 61 6c 20 6f 74 68 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 ring,.ByVal.otherName.As.String)
b9360 20 41 73 20 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f .As.String.Implements.IDynamicHo
b9380 73 74 2e 52 65 73 6f 6c 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 st.ResolveParameterValue........
b93a0 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 61 73 74 28 5f 72 65 73 6f 6c 76 65 50 61 72 61 ..Return.DirectCast(_resolvePara
b93c0 6d 65 74 65 72 56 61 6c 75 65 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 65 2c 20 4e 65 77 meterValue.Invoke(_instance,.New
b93e0 20 4f 62 6a 65 63 74 28 29 20 7b 69 64 2c 20 6e 61 6d 65 2c 20 6f 74 68 65 72 4e 61 6d 65 7d 29 .Object().{id,.name,.otherName})
b9400 2c 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 ,.String)......End.Function.....
b9420 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 20 63 61 6c 6c ...'''.<summary>......'''.A.call
b9440 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 .to.Microsoft.VisualStudio.TextT
b9460 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 emplating.ITextTemplatingEngineH
b9480 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 ost.ResolvePath......'''.</summa
b94a0 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 ry>......Public.Function.Resolve
b94c0 50 61 74 68 28 42 79 56 61 6c 20 70 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 Path(ByVal.path.As.String).As.St
b94e0 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 ring.Implements.IDynamicHost.Res
b9500 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 olvePath..........Return.DirectC
b9520 61 73 74 28 5f 72 65 73 6f 6c 76 65 50 61 74 68 2e 49 6e 76 6f 6b 65 28 5f 69 6e 73 74 61 6e 63 ast(_resolvePath.Invoke(_instanc
b9540 65 2c 20 4e 65 77 20 4f 62 6a 65 63 74 28 29 20 7b 70 61 74 68 7d 29 2c 20 53 74 72 69 6e 67 29 e,.New.Object().{path}),.String)
b9560 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 ......End.Function........'''.<s
b9580 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f ummary>......'''.A.call.to.Micro
b95a0 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 soft.VisualStudio.TextTemplating
b95c0 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 6d 70 6c .ITextTemplatingEngineHost.Templ
b95e0 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ateFile......'''.</summary>.....
b9600 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 54 65 6d 70 6c 61 .Public.ReadOnly.Property.Templa
b9620 74 65 46 69 6c 65 28 29 20 41 73 20 53 74 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 teFile().As.String.Implements.ID
b9640 79 6e 61 6d 69 63 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 20 20 20 ynamicHost.TemplateFile.........
b9660 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 44 69 72 65 63 74 43 .Get..............Return.DirectC
b9680 61 73 74 28 5f 74 65 6d 70 6c 61 74 65 46 69 6c 65 2e 47 65 74 56 61 6c 75 65 28 5f 69 6e 73 74 ast(_templateFile.GetValue(_inst
b96a0 61 6e 63 65 2c 20 4e 6f 74 68 69 6e 67 29 2c 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 ance,.Nothing),.String).........
b96c0 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 .End.Get......End.Property......
b96e0 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 ..'''.<summary>......'''.Returns
b9700 20 74 68 65 20 48 6f 73 74 20 69 6e 73 74 61 6e 63 65 20 63 61 73 74 20 61 73 20 61 6e 20 49 53 .the.Host.instance.cast.as.an.IS
b9720 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 erviceProvider......'''.</summar
b9740 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 41 73 49 53 65 72 76 69 y>......Public.Function.AsIServi
b9760 63 65 50 72 6f 76 69 64 65 72 28 29 20 41 73 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 ceProvider().As.IServiceProvider
b9780 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 41 73 49 53 65 72 76 .Implements.IDynamicHost.AsIServ
b97a0 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 54 72 79 43 iceProvider..........Return.TryC
b97c0 61 73 74 28 5f 69 6e 73 74 61 6e 63 65 2c 20 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 29 ast(_instance,.IServiceProvider)
b97e0 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d ......End.Function..End.Class...
b9800 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 27 27 27 20 52 65 70 6f 6e 73 69 62 6c 65 20 66 .'''.<summary>..'''.Reponsible.f
b9820 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 69 6e 67 20 74 68 65 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 or.implementing.the.IDynamicHost
b9840 20 77 68 65 6e 20 74 68 65 0d 0a 27 27 27 20 48 6f 73 74 20 70 72 6f 70 65 72 74 79 20 69 73 20 .when.the..'''.Host.property.is.
b9860 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 74 68 65 20 54 65 78 74 54 65 6d 70 6c 61 74 not.available.on.the.TextTemplat
b9880 69 6e 67 20 74 79 70 65 2e 20 54 68 65 20 48 6f 73 74 0d 0a 27 27 27 20 70 72 6f 70 65 72 74 79 ing.type..The.Host..'''.property
b98a0 20 6f 6e 6c 79 20 65 78 69 73 74 73 20 77 68 65 6e 20 74 68 65 20 68 6f 73 74 73 70 65 63 69 66 .only.exists.when.the.hostspecif
b98c0 69 63 20 61 74 74 72 69 62 75 74 65 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 0d 0a 27 27 ic.attribute.of.the.template..''
b98e0 27 20 64 69 72 65 63 74 69 76 65 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2e 0d 0a 27 27 27 '.directive.is.set.to.true...'''
b9900 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 43 6c 61 73 73 20 4e 75 6c 6c 48 6f .</summary>..Public.Class.NullHo
b9920 73 74 0d 0a 20 20 20 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 0d st......Implements.IDynamicHost.
b9940 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 .....'''.<summary>......'''.An.a
b9960 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 bstraction.of.the.call.to.Micros
b9980 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e oft.VisualStudio.TextTemplating.
b99a0 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 ITextTemplatingEngineHost.Resolv
b99c0 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 27 27 27 20 74 68 61 74 20 73 69 eParameterValue......'''.that.si
b99e0 6d 70 6c 79 20 72 65 74 75 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d mply.retuns.null.......'''.</sum
b9a00 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c mary>......Public.Function.Resol
b9a20 76 65 50 61 72 61 6d 65 74 65 72 56 61 6c 75 65 28 42 79 56 61 6c 20 69 64 20 41 73 20 53 74 72 veParameterValue(ByVal.id.As.Str
b9a40 69 6e 67 2c 20 42 79 56 61 6c 20 6e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c ing,.ByVal.name.As.String,.ByVal
b9a60 20 6f 74 68 65 72 4e 61 6d 65 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 72 69 6e 67 20 .otherName.As.String).As.String.
b9a80 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 6f 6c 76 65 50 Implements.IDynamicHost.ResolveP
b9aa0 61 72 61 6d 65 74 65 72 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4e 6f arameterValue..........Return.No
b9ac0 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 thing......End.Function........'
b9ae0 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 ''.<summary>......'''.An.abstrac
b9b00 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 tion.of.the.call.to.Microsoft.Vi
b9b20 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 sualStudio.TextTemplating.ITextT
b9b40 65 6d 70 6c 61 74 69 6e 67 45 6e 67 69 6e 65 48 6f 73 74 20 52 65 73 6f 6c 76 65 50 61 74 68 0d emplatingEngineHost.ResolvePath.
b9b60 0a 20 20 20 20 27 27 27 20 74 68 61 74 20 73 69 6d 70 6c 79 20 72 65 74 75 6e 73 20 74 68 65 20 .....'''.that.simply.retuns.the.
b9b80 70 61 74 68 20 70 61 73 73 65 64 20 69 6e 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 path.passed.in.......'''.</summa
b9ba0 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 52 65 73 6f 6c 76 65 ry>......Public.Function.Resolve
b9bc0 50 61 74 68 28 42 79 56 61 6c 20 70 61 74 68 20 41 73 20 53 74 72 69 6e 67 29 20 41 73 20 53 74 Path(ByVal.path.As.String).As.St
b9be0 72 69 6e 67 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 52 65 73 ring.Implements.IDynamicHost.Res
b9c00 6f 6c 76 65 50 61 74 68 0d 0a 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 70 61 74 68 0d 0a 20 olvePath..........Return.path...
b9c20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d 6d ...End.Function........'''.<summ
b9c40 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 41 6e 20 61 62 73 74 72 61 63 74 69 6f 6e 20 6f 66 20 ary>......'''.An.abstraction.of.
b9c60 74 68 65 20 63 61 6c 6c 20 74 6f 20 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 the.call.to.Microsoft.VisualStud
b9c80 69 6f 2e 54 65 78 74 54 65 6d 70 6c 61 74 69 6e 67 2e 49 54 65 78 74 54 65 6d 70 6c 61 74 69 6e io.TextTemplating.ITextTemplatin
b9ca0 67 45 6e 67 69 6e 65 48 6f 73 74 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 0d 0a 20 20 20 20 27 27 gEngineHost.TemplateFile......''
b9cc0 27 20 74 68 61 74 20 72 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 20 20 27 27 27 20 3c 2f '.that.returns.null.......'''.</
b9ce0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 summary>......Public.ReadOnly.Pr
b9d00 6f 70 65 72 74 79 20 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 29 20 41 73 20 53 74 72 69 6e 67 20 operty.TemplateFile().As.String.
b9d20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d 69 63 48 6f 73 74 2e 54 65 6d 70 6c 61 74 65 Implements.IDynamicHost.Template
b9d40 46 69 6c 65 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 File..........Get..............R
b9d60 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a eturn.Nothing..........End.Get..
b9d80 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 0d 0a 20 20 20 20 27 27 27 20 3c 73 75 6d ....End.Property........'''.<sum
b9da0 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 20 52 65 74 75 72 6e 73 20 6e 75 6c 6c 2e 0d 0a 20 20 mary>......'''.Returns.null.....
b9dc0 20 20 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e ..'''.</summary>......Public.Fun
b9de0 63 74 69 6f 6e 20 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 28 29 20 41 73 20 49 53 ction.AsIServiceProvider().As.IS
b9e00 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 20 49 6d 70 6c 65 6d 65 6e 74 73 20 49 44 79 6e 61 6d erviceProvider.Implements.IDynam
b9e20 69 63 48 6f 73 74 2e 41 73 49 53 65 72 76 69 63 65 50 72 6f 76 69 64 65 72 0d 0a 20 20 20 20 20 icHost.AsIServiceProvider.......
b9e40 20 20 20 52 65 74 75 72 6e 20 4e 6f 74 68 69 6e 67 0d 0a 20 20 20 20 45 6e 64 20 46 75 6e 63 74 ...Return.Nothing......End.Funct
b9e60 69 6f 6e 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a 27 27 27 20 3c 73 75 6d 6d 61 72 79 3e 0d ion..End.Class....'''.<summary>.
b9e80 0a 27 27 27 20 52 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 65 6e 63 61 70 73 75 6c 61 74 69 .'''.Responsible.for.encapsulati
b9ea0 6e 67 20 74 68 65 20 63 6f 6e 73 74 61 6e 74 73 20 64 65 66 69 6e 65 64 20 69 6e 20 4d 65 74 61 ng.the.constants.defined.in.Meta
b9ec0 64 61 74 61 0d 0a 27 27 27 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 50 75 62 6c 69 63 20 4e 6f 74 data..'''.</summary>..Public.Not
b9ee0 49 6e 68 65 72 69 74 61 62 6c 65 20 43 6c 61 73 73 20 4d 65 74 61 64 61 74 61 43 6f 6e 73 74 61 Inheritable.Class.MetadataConsta
b9f00 6e 74 73 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 53 75 62 20 4e 65 77 28 29 0d 0a 20 20 20 20 nts......Private.Sub.New()......
b9f20 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 43 53 44 4c End.Sub........Public.Const.CSDL
b9f40 5f 45 58 54 45 4e 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 2e 63 73 64 6c 22 0d 0a _EXTENSION.As.String.=.".csdl"..
b9f60 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 43 53 44 4c 5f 45 44 4d 58 5f 53 45 43 ......Public.Const.CSDL_EDMX_SEC
b9f80 54 49 4f 4e 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 43 6f 6e 63 65 70 74 75 61 TION_NAME.As.String.=."Conceptua
b9fa0 6c 4d 6f 64 65 6c 73 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 43 53 44 4c 5f lModels"......Public.Const.CSDL_
b9fc0 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 53 ROOT_ELEMENT_NAME.As.String.=."S
b9fe0 63 68 65 6d 61 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 45 44 4d 5f 41 4e 4e chema"......Public.Const.EDM_ANN
ba000 4f 54 41 54 49 4f 4e 5f 30 39 5f 30 32 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 68 74 74 70 3a OTATION_09_02.As.String.=."http:
ba020 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 //schemas.microsoft.com/ado/2009
ba040 2f 30 32 2f 65 64 6d 2f 61 6e 6e 6f 74 61 74 69 6f 6e 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 /02/edm/annotation"........Publi
ba060 63 20 43 6f 6e 73 74 20 53 53 44 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 c.Const.SSDL_EXTENSION.As.String
ba080 20 3d 20 22 2e 73 73 64 6c 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 53 .=.".ssdl"........Public.Const.S
ba0a0 53 44 4c 5f 45 44 4d 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 SDL_EDMX_SECTION_NAME.As.String.
ba0c0 3d 20 22 53 74 6f 72 61 67 65 4d 6f 64 65 6c 73 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f =."StorageModels"......Public.Co
ba0e0 6e 73 74 20 53 53 44 4c 5f 52 4f 4f 54 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 41 73 20 53 74 nst.SSDL_ROOT_ELEMENT_NAME.As.St
ba100 72 69 6e 67 20 3d 20 22 53 63 68 65 6d 61 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f ring.=."Schema"........Public.Co
ba120 6e 73 74 20 4d 53 4c 5f 45 58 54 45 4e 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 2e nst.MSL_EXTENSION.As.String.=.".
ba140 6d 73 6c 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 4d 53 4c 5f 45 44 4d msl"........Public.Const.MSL_EDM
ba160 58 5f 53 45 43 54 49 4f 4e 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 4d 61 70 70 X_SECTION_NAME.As.String.=."Mapp
ba180 69 6e 67 73 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 4d 53 4c 5f 52 4f 4f 54 ings"......Public.Const.MSL_ROOT
ba1a0 5f 45 4c 45 4d 45 4e 54 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 4d 61 70 70 69 _ELEMENT_NAME.As.String.=."Mappi
ba1c0 6e 67 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 54 54 5f 54 45 4d 50 4c ng"........Public.Const.TT_TEMPL
ba1e0 41 54 45 5f 4e 41 4d 45 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 54 65 6d 70 6c 61 74 65 4e 61 ATE_NAME.As.String.=."TemplateNa
ba200 6d 65 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 54 54 5f 54 45 4d 50 4c 41 54 me"......Public.Const.TT_TEMPLAT
ba220 45 5f 56 45 52 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 54 65 6d 70 6c 61 74 65 56 E_VERSION.As.String.=."TemplateV
ba240 65 72 73 69 6f 6e 22 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 54 54 5f 4d 49 4e ersion"......Public.Const.TT_MIN
ba260 49 4d 55 4d 5f 45 4e 54 49 54 59 5f 46 52 41 4d 45 57 4f 52 4b 5f 56 45 52 53 49 4f 4e 20 41 73 IMUM_ENTITY_FRAMEWORK_VERSION.As
ba280 20 53 74 72 69 6e 67 20 3d 20 22 4d 69 6e 69 6d 75 6d 45 6e 74 69 74 79 46 72 61 6d 65 77 6f 72 .String.=."MinimumEntityFramewor
ba2a0 6b 56 65 72 73 69 6f 6e 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 43 6f 6e 73 74 20 44 45 kVersion"........Public.Const.DE
ba2c0 46 41 55 4c 54 5f 54 45 4d 50 4c 41 54 45 5f 56 45 52 53 49 4f 4e 20 41 73 20 53 74 72 69 6e 67 FAULT_TEMPLATE_VERSION.As.String
ba2e0 20 3d 20 22 34 2e 30 22 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 52 65 .=."4.0"........Public.Shared.Re
ba300 61 64 4f 6e 6c 79 20 56 31 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 41 73 20 4e 65 adOnly.V1_SCHEMA_CONSTANTS.As.Ne
ba320 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 w.SchemaConstants(.........."htt
ba340 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 p://schemas.microsoft.com/ado/20
ba360 30 37 2f 30 36 2f 65 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 07/06/edmx",.........."http://sc
ba380 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f hemas.microsoft.com/ado/2006/04/
ba3a0 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d edm",.........."http://schemas.m
ba3c0 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 36 2f 30 34 2f 65 64 6d 2f 73 73 64 icrosoft.com/ado/2006/04/edm/ssd
ba3e0 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 75 72 6e 3a 73 63 68 65 6d 61 73 2d 6d 69 63 72 6f 73 l",.........."urn:schemas-micros
ba400 6f 66 74 2d 63 6f 6d 3a 77 69 6e 64 6f 77 73 3a 73 74 6f 72 61 67 65 3a 6d 61 70 70 69 6e 67 3a oft-com:windows:storage:mapping:
ba420 43 53 22 2c 0d 0a 20 20 20 20 20 20 20 20 4e 65 77 20 56 65 72 73 69 6f 6e 28 22 33 2e 35 22 29 CS",..........New.Version("3.5")
ba440 29 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 52 65 61 64 4f 6e 6c 79 20 )........Public.Shared.ReadOnly.
ba460 56 32 5f 53 43 48 45 4d 41 5f 43 4f 4e 53 54 41 4e 54 53 20 41 73 20 4e 65 77 20 53 63 68 65 6d V2_SCHEMA_CONSTANTS.As.New.Schem
ba480 61 43 6f 6e 73 74 61 6e 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 aConstants(.........."http://sch
ba4a0 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 31 30 2f 65 emas.microsoft.com/ado/2008/10/e
ba4c0 64 6d 78 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d dmx",.........."http://schemas.m
ba4e0 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 30 39 2f 65 64 6d 22 2c 0d 0a icrosoft.com/ado/2008/09/edm",..
ba500 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 ........"http://schemas.microsof
ba520 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 30 32 2f 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 t.com/ado/2009/02/edm/ssdl",....
ba540 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e ......"http://schemas.microsoft.
ba560 63 6f 6d 2f 61 64 6f 2f 32 30 30 38 2f 30 39 2f 6d 61 70 70 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 com/ado/2008/09/mapping/cs",....
ba580 20 20 20 20 20 20 4e 65 77 20 56 65 72 73 69 6f 6e 28 22 34 2e 30 22 29 29 0d 0a 0d 0a 20 20 20 ......New.Version("4.0")).......
ba5a0 20 50 75 62 6c 69 63 20 53 68 61 72 65 64 20 52 65 61 64 4f 6e 6c 79 20 56 33 5f 53 43 48 45 4d .Public.Shared.ReadOnly.V3_SCHEM
ba5c0 41 5f 43 4f 4e 53 54 41 4e 54 53 20 41 73 20 4e 65 77 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e A_CONSTANTS.As.New.SchemaConstan
ba5e0 74 73 28 0d 0a 20 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 ts(.........."http://schemas.mic
ba600 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 78 22 2c 0d 0a 20 rosoft.com/ado/2009/11/edmx",...
ba620 20 20 20 20 20 20 20 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 ......."http://schemas.microsoft
ba640 2e 63 6f 6d 2f 61 64 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 22 2c 0d 0a 20 20 20 20 20 20 20 20 .com/ado/2009/11/edm",..........
ba660 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 "http://schemas.microsoft.com/ad
ba680 6f 2f 32 30 30 39 2f 31 31 2f 65 64 6d 2f 73 73 64 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 22 68 o/2009/11/edm/ssdl",.........."h
ba6a0 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 61 64 6f 2f ttp://schemas.microsoft.com/ado/
ba6c0 32 30 30 39 2f 31 31 2f 6d 61 70 70 69 6e 67 2f 63 73 22 2c 0d 0a 20 20 20 20 20 20 20 20 4e 65 2009/11/mapping/cs",..........Ne
ba6e0 77 20 56 65 72 73 69 6f 6e 28 22 35 2e 30 22 29 29 0d 0a 45 6e 64 20 43 6c 61 73 73 0d 0a 0d 0a w.Version("5.0"))..End.Class....
ba700 50 75 62 6c 69 63 20 53 74 72 75 63 74 75 72 65 20 53 63 68 65 6d 61 43 6f 6e 73 74 61 6e 74 73 Public.Structure.SchemaConstants
ba720 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 4e 65 77 28 42 79 56 61 6c 20 65 64 6d 78 4e ......Public.Sub.New(ByVal.edmxN
ba740 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 63 73 64 6c 4e 61 amespace.As.String,.ByVal.csdlNa
ba760 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 73 73 64 6c 4e 61 6d mespace.As.String,.ByVal.ssdlNam
ba780 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6d 73 6c 4e 61 6d 65 73 espace.As.String,.ByVal.mslNames
ba7a0 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 2c 20 42 79 56 61 6c 20 6d 69 6e 69 6d 75 6d 54 65 6d pace.As.String,.ByVal.minimumTem
ba7c0 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 41 73 20 56 65 72 73 69 6f 6e 29 0d 0a 20 20 20 20 20 20 plateVersion.As.Version)........
ba7e0 20 20 4d 65 2e 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 3d 20 65 64 6d 78 4e 61 6d 65 73 70 61 ..Me.EdmxNamespace.=.edmxNamespa
ba800 63 65 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 63 ce..........Me.CsdlNamespace.=.c
ba820 73 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 4d 65 2e 53 73 64 6c 4e 61 6d sdlNamespace..........Me.SsdlNam
ba840 65 73 70 61 63 65 20 3d 20 73 73 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 espace.=.ssdlNamespace..........
ba860 4d 65 2e 4d 73 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 6d 73 6c 4e 61 6d 65 73 70 61 63 65 0d 0a Me.MslNamespace.=.mslNamespace..
ba880 20 20 20 20 20 20 20 20 4d 65 2e 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f ........Me.MinimumTemplateVersio
ba8a0 6e 20 3d 20 6d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 n.=.minimumTemplateVersion......
ba8c0 45 6e 64 20 53 75 62 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 45 End.Sub........Public.Property.E
ba8e0 64 6d 78 4e 61 6d 65 73 70 61 63 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 dmxNamespace().As.String........
ba900 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 45 64 6d 78 ..Get..............Return.m_Edmx
ba920 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 Namespace..........End.Get......
ba940 20 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 45 ....Private.Set..............m_E
ba960 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e dmxNamespace.=.Value..........En
ba980 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 72 69 d.Set......End.Property......Pri
ba9a0 76 61 74 65 20 6d 5f 45 64 6d 78 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 0d 0a vate.m_EdmxNamespace.As.String..
ba9c0 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 43 73 64 6c 4e 61 6d 65 73 70 ......Public.Property.CsdlNamesp
ba9e0 61 63 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 ace().As.String..........Get....
baa00 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 43 73 64 6c 4e 61 6d 65 73 70 61 63 65 ..........Return.m_CsdlNamespace
baa20 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 ..........End.Get..........Priva
baa40 74 65 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 73 64 6c 4e 61 6d 65 73 70 te.Set..............m_CsdlNamesp
baa60 61 63 65 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 ace.=.Value..........End.Set....
baa80 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 43 73 ..End.Property......Private.m_Cs
baaa0 64 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 50 75 62 dlNamespace.As.String........Pub
baac0 6c 69 63 20 50 72 6f 70 65 72 74 79 20 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 28 29 20 41 73 20 lic.Property.SsdlNamespace().As.
baae0 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 String..........Get.............
bab00 20 52 65 74 75 72 6e 20 6d 5f 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 .Return.m_SsdlNamespace.........
bab20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 .End.Get..........Private.Set...
bab40 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 73 64 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 56 61 6c ...........m_SsdlNamespace.=.Val
bab60 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f ue..........End.Set......End.Pro
bab80 70 65 72 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 53 73 64 6c 4e 61 6d 65 73 70 61 perty......Private.m_SsdlNamespa
baba0 63 65 20 41 73 20 53 74 72 69 6e 67 0d 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 ce.As.String........Public.Prope
babc0 72 74 79 20 4d 73 6c 4e 61 6d 65 73 70 61 63 65 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 rty.MslNamespace().As.String....
babe0 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f ......Get..............Return.m_
bac00 4d 73 6c 4e 61 6d 65 73 70 61 63 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 MslNamespace..........End.Get...
bac20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .......Private.Set..............
bac40 6d 5f 4d 73 6c 4e 61 6d 65 73 70 61 63 65 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 m_MslNamespace.=.Value..........
bac60 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 End.Set......End.Property......P
bac80 72 69 76 61 74 65 20 6d 5f 4d 73 6c 4e 61 6d 65 73 70 61 63 65 20 41 73 20 53 74 72 69 6e 67 0d rivate.m_MslNamespace.As.String.
baca0 0a 0d 0a 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 4d 69 6e 69 6d 75 6d 54 65 .......Public.Property.MinimumTe
bacc0 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 28 29 20 41 73 20 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 mplateVersion().As.Version......
bace0 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6d 5f 4d 69 ....Get..............Return.m_Mi
bad00 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e nimumTemplateVersion..........En
bad20 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 53 65 74 0d 0a 20 20 20 20 d.Get..........Private.Set......
bad40 20 20 20 20 20 20 20 20 6d 5f 4d 69 6e 69 6d 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e ........m_MinimumTemplateVersion
bad60 20 3d 20 56 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 20 45 .=.Value..........End.Set......E
bad80 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 50 72 69 76 61 74 65 20 6d 5f 4d 69 6e 69 6d nd.Property......Private.m_Minim
bada0 75 6d 54 65 6d 70 6c 61 74 65 56 65 72 73 69 6f 6e 20 41 73 20 56 65 72 73 69 6f 6e 0d 0a 45 6e umTemplateVersion.As.Version..En
badc0 64 20 53 74 72 75 63 74 75 72 65 0d 0a 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a 20 20 20 d.Structure.......End.Class.....
bade0 20 23 52 65 67 69 6f 6e 20 22 42 61 73 65 20 63 6c 61 73 73 22 0d 0a 20 20 20 20 27 27 27 3c 73 .#Region."Base.class"......'''<s
bae00 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 27 27 27 42 61 73 65 20 63 6c 61 73 73 20 66 6f 72 20 74 ummary>......'''Base.class.for.t
bae20 68 69 73 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 27 27 27 3c 2f 73 75 6d his.transformation......'''</sum
bae40 6d 61 72 79 3e 0d 0a 20 20 20 20 3c 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f mary>......<Global.System.CodeDo
bae60 6d 2e 43 6f 6d 70 69 6c 65 72 2e 47 65 6e 65 72 61 74 65 64 43 6f 64 65 41 74 74 72 69 62 75 74 m.Compiler.GeneratedCodeAttribut
bae80 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 56 69 73 75 61 6c 53 74 75 64 69 6f 2e 54 65 78 74 54 65 e("Microsoft.VisualStudio.TextTe
baea0 6d 70 6c 61 74 69 6e 67 22 2c 20 22 31 31 2e 30 2e 30 2e 30 22 29 3e 20 20 5f 0d 0a 20 20 20 20 mplating",."11.0.0.0")>.._......
baec0 50 75 62 6c 69 63 20 43 6c 61 73 73 20 56 42 43 6f 64 65 47 65 6e 54 65 6d 70 6c 61 74 65 56 35 Public.Class.VBCodeGenTemplateV5
baee0 30 42 61 73 65 0d 0a 20 20 20 20 20 20 20 20 23 52 65 67 69 6f 6e 20 22 46 69 65 6c 64 73 22 0d 0Base..........#Region."Fields".
baf00 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 .........Private.generationEnvir
baf20 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 41 73 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 54 65 78 onmentField.As.Global.System.Tex
baf40 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 t.StringBuilder..........Private
baf60 20 65 72 72 6f 72 73 46 69 65 6c 64 20 41 73 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f .errorsField.As.Global.System.Co
baf80 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c deDom.Compiler.CompilerErrorColl
bafa0 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 69 6e 64 65 6e 74 4c 65 ection..........Private.indentLe
bafc0 6e 67 74 68 73 46 69 65 6c 64 20 41 73 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 6c 6c ngthsField.As.Global.System.Coll
bafe0 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 4c 69 73 74 28 4f 66 20 49 6e 74 65 67 65 72 29 ections.Generic.List(Of.Integer)
bb000 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 ..........Private.currentIndentF
bb020 69 65 6c 64 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 22 0d 0a 20 20 20 20 20 20 20 20 50 72 69 ield.As.String.=.""..........Pri
bb040 76 61 74 65 20 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 41 73 20 42 6f 6f 6c 65 61 6e 0d vate.endsWithNewline.As.Boolean.
bb060 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 73 65 73 73 69 6f 6e 46 69 65 6c 64 20 41 73 .........Private.sessionField.As
bb080 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 .Global.System.Collections.Gener
bb0a0 69 63 2e 49 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 4f 62 6a 65 63 74 ic.IDictionary(Of.String,.Object
bb0c0 29 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 )..........#End.Region..........
bb0e0 23 52 65 67 69 6f 6e 20 22 50 72 6f 70 65 72 74 69 65 73 22 0d 0a 20 20 20 20 20 20 20 20 27 27 #Region."Properties"..........''
bb100 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 54 68 65 20 73 74 72 69 6e '<summary>..........'''The.strin
bb120 67 20 62 75 69 6c 64 65 72 20 74 68 61 74 20 67 65 6e 65 72 61 74 69 6f 6e 2d 74 69 6d 65 20 63 g.builder.that.generation-time.c
bb140 6f 64 65 20 69 73 20 75 73 69 6e 67 20 74 6f 20 61 73 73 65 6d 62 6c 65 20 67 65 6e 65 72 61 74 ode.is.using.to.assemble.generat
bb160 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e ed.output..........'''</summary>
bb180 0d 0a 20 20 20 20 20 20 20 20 50 72 6f 74 65 63 74 65 64 20 50 72 6f 70 65 72 74 79 20 47 65 6e ..........Protected.Property.Gen
bb1a0 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 28 29 20 41 73 20 53 79 73 74 65 6d 2e 54 erationEnvironment().As.System.T
bb1c0 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 ext.StringBuilder..............G
bb1e0 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4d 65 2e 67 65 6e 65 72 et..................If.(Me.gener
bb200 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 49 73 20 4e 6f 74 68 69 6e 67 ationEnvironmentField.Is.Nothing
bb220 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 67 ).Then......................Me.g
bb240 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 20 3d 20 4e 65 77 20 enerationEnvironmentField.=.New.
bb260 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 54 65 78 74 2e 53 74 72 69 6e 67 42 75 69 6c 64 65 72 Global.System.Text.StringBuilder
bb280 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 ()..................End.If......
bb2a0 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 67 65 6e 65 72 61 74 69 6f 6e ............Return.Me.generation
bb2c0 45 6e 76 69 72 6f 6e 6d 65 6e 74 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e EnvironmentField..............En
bb2e0 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 0d 0a 20 20 20 20 20 20 20 20 d.Get..............Set..........
bb300 20 20 20 20 20 20 20 20 4d 65 2e 67 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 ........Me.generationEnvironment
bb320 46 69 65 6c 64 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 53 Field.=.value..............End.S
bb340 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 et..........End.Property........
bb360 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 54 68 65 20 65 ..'''<summary>..........'''The.e
bb380 72 72 6f 72 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 67 65 6e 65 72 61 74 69 rror.collection.for.the.generati
bb3a0 6f 6e 20 70 72 6f 63 65 73 73 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 on.process..........'''</summary
bb3c0 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 >..........Public.ReadOnly.Prope
bb3e0 72 74 79 20 45 72 72 6f 72 73 28 29 20 41 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 rty.Errors().As.System.CodeDom.C
bb400 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c 65 63 74 69 6f 6e 0d ompiler.CompilerErrorCollection.
bb420 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............Get................
bb440 20 20 49 66 20 28 4d 65 2e 65 72 72 6f 72 73 46 69 65 6c 64 20 49 73 20 4e 6f 74 68 69 6e 67 29 ..If.(Me.errorsField.Is.Nothing)
bb460 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 65 72 .Then......................Me.er
bb480 72 6f 72 73 46 69 65 6c 64 20 3d 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f rorsField.=.New.Global.System.Co
bb4a0 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 43 6f 6c 6c deDom.Compiler.CompilerErrorColl
bb4c0 65 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 ection()..................End.If
bb4e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 65 72 72 6f ..................Return.Me.erro
bb500 72 73 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 rsField..............End.Get....
bb520 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c ......End.Property..........'''<
bb540 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 41 20 6c 69 73 74 20 6f 66 20 74 summary>..........'''A.list.of.t
bb560 68 65 20 6c 65 6e 67 74 68 73 20 6f 66 20 65 61 63 68 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 he.lengths.of.each.indent.that.w
bb580 61 73 20 61 64 64 65 64 20 77 69 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 as.added.with.PushIndent........
bb5a0 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 ..'''</summary>..........Private
bb5c0 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 .ReadOnly.Property.indentLengths
bb5e0 28 29 20 41 73 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 ().As.System.Collections.Generic
bb600 2e 4c 69 73 74 28 4f 66 20 49 6e 74 65 67 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 .List(Of.Integer)..............G
bb620 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4d 65 2e 69 6e 64 65 6e et..................If.(Me.inden
bb640 74 4c 65 6e 67 74 68 73 46 69 65 6c 64 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a tLengthsField.Is.Nothing).Then..
bb660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e ....................Me.indentLen
bb680 67 74 68 73 46 69 65 6c 64 20 3d 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f gthsField.=.New.Global.System.Co
bb6a0 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 2e 4c 69 73 74 28 4f 66 20 49 6e 74 65 67 65 llections.Generic.List(Of.Intege
bb6c0 72 29 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 r)()..................End.If....
bb6e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 ..............Return.Me.indentLe
bb700 6e 67 74 68 73 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d ngthsField..............End.Get.
bb720 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 .........End.Property..........'
bb740 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 47 65 74 73 20 74 68 65 ''<summary>..........'''Gets.the
bb760 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 77 65 20 75 73 65 20 77 68 65 6e 20 61 64 64 69 .current.indent.we.use.when.addi
bb780 6e 67 20 6c 69 6e 65 73 20 74 6f 20 74 68 65 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 ng.lines.to.the.output..........
bb7a0 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 '''</summary>..........Public.Re
bb7c0 61 64 4f 6e 6c 79 20 50 72 6f 70 65 72 74 79 20 43 75 72 72 65 6e 74 49 6e 64 65 6e 74 28 29 20 adOnly.Property.CurrentIndent().
bb7e0 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 As.String..............Get......
bb800 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 ............Return.Me.currentInd
bb820 65 6e 74 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 entField..............End.Get...
bb840 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 27 27 27 .......End.Property..........'''
bb860 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 43 75 72 72 65 6e 74 20 74 72 <summary>..........'''Current.tr
bb880 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 65 73 73 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 ansformation.session..........''
bb8a0 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 '</summary>..........Public.Over
bb8c0 72 69 64 61 62 6c 65 20 50 72 6f 70 65 72 74 79 20 53 65 73 73 69 6f 6e 28 29 20 41 73 20 47 6c ridable.Property.Session().As.Gl
bb8e0 6f 62 61 6c 2e 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 2e obal.System.Collections.Generic.
bb900 49 44 69 63 74 69 6f 6e 61 72 79 28 4f 66 20 53 74 72 69 6e 67 2c 20 4f 62 6a 65 63 74 29 0d 0a IDictionary(Of.String,.Object)..
bb920 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............Get.................
bb940 20 52 65 74 75 72 6e 20 4d 65 2e 73 65 73 73 69 6f 6e 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 .Return.Me.sessionField.........
bb960 20 20 20 20 20 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 0d 0a 20 .....End.Get..............Set...
bb980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 73 65 73 73 69 6f 6e 46 69 65 6c 64 20 3d ...............Me.sessionField.=
bb9a0 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 0d 0a 20 20 20 .value..............End.Set.....
bb9c0 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 .....End.Property..........#End.
bb9e0 52 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 52 65 67 69 6f 6e 20 22 54 72 61 6e 73 66 6f Region..........#Region."Transfo
bba00 72 6d 2d 74 69 6d 65 20 68 65 6c 70 65 72 73 22 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 rm-time.helpers"..........'''<su
bba20 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 57 72 69 74 65 20 74 65 78 74 20 64 69 mmary>..........'''Write.text.di
bba40 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 6f 75 74 70 75 74 rectly.into.the.generated.output
bba60 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 ..........'''</summary>.........
bba80 20 50 75 62 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 20 57 72 69 74 65 28 42 79 56 61 .Public.Overloads.Sub.Write(ByVa
bbaa0 6c 20 74 65 78 74 54 6f 41 70 70 65 6e 64 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 l.textToAppend.As.String).......
bbac0 20 20 20 20 20 20 20 49 66 20 53 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 74 .......If.String.IsNullOrEmpty(t
bbae0 65 78 74 54 6f 41 70 70 65 6e 64 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 extToAppend).Then...............
bbb00 20 20 20 52 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 ...Return..............End.If...
bbb20 20 20 20 20 20 20 20 20 20 20 20 27 49 66 20 77 65 27 72 65 20 73 74 61 72 74 69 6e 67 20 6f 66 ...........'If.we're.starting.of
bbb40 66 2c 20 6f 72 20 69 66 20 74 68 65 20 70 72 65 76 69 6f 75 73 20 74 65 78 74 20 65 6e 64 65 64 f,.or.if.the.previous.text.ended
bbb60 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 77 .with.a.newline,..............'w
bbb80 65 20 68 61 76 65 20 74 6f 20 61 70 70 65 6e 64 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 e.have.to.append.the.current.ind
bbba0 65 6e 74 20 66 69 72 73 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 28 4d 65 2e ent.first...............If.((Me.
bbbc0 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4c 65 6e 67 74 68 20 3d 20 30 GenerationEnvironment.Length.=.0
bbbe0 29 20 20 5f 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 72 ).._..........................Or
bbc00 45 6c 73 65 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 29 20 54 68 65 6e 0d 0a 20 Else.Me.endsWithNewline).Then...
bbc20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 ...............Me.GenerationEnvi
bbc40 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 ronment.Append(Me.currentIndentF
bbc60 69 65 6c 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 65 6e 64 73 57 69 ield)..................Me.endsWi
bbc80 74 68 4e 65 77 6c 69 6e 65 20 3d 20 66 61 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 thNewline.=.false..............E
bbca0 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 43 68 65 63 6b 20 69 66 20 74 68 65 nd.If..............'Check.if.the
bbcc0 20 63 75 72 72 65 6e 74 20 74 65 78 74 20 65 6e 64 73 20 77 69 74 68 20 61 20 6e 65 77 6c 69 6e .current.text.ends.with.a.newlin
bbce0 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 45 e..............If.textToAppend.E
bbd00 6e 64 73 57 69 74 68 28 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e ndsWith(Global.System.Environmen
bbd20 74 2e 4e 65 77 4c 69 6e 65 2c 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 53 74 72 69 6e 67 43 t.NewLine,.Global.System.StringC
bbd40 6f 6d 70 61 72 69 73 6f 6e 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 29 20 54 68 65 6e 0d 0a omparison.CurrentCulture).Then..
bbd60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 ................Me.endsWithNewli
bbd80 6e 65 20 3d 20 74 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 ne.=.true..............End.If...
bbda0 20 20 20 20 20 20 20 20 20 20 20 27 54 68 69 73 20 69 73 20 61 6e 20 6f 70 74 69 6d 69 7a 61 74 ...........'This.is.an.optimizat
bbdc0 69 6f 6e 2e 20 49 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 64 65 6e 74 20 69 73 20 22 22 ion..If.the.current.indent.is.""
bbde0 2c 20 74 68 65 6e 20 77 65 20 64 6f 6e 27 74 20 68 61 76 65 20 74 6f 20 64 6f 20 61 6e 79 0d 0a ,.then.we.don't.have.to.do.any..
bbe00 20 20 20 20 20 20 20 20 20 20 20 20 27 6f 66 20 74 68 65 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 ............'of.the.more.complex
bbe20 20 73 74 75 66 66 20 66 75 72 74 68 65 72 20 64 6f 77 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 .stuff.further.down.............
bbe40 20 20 49 66 20 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 ..If.(Me.currentIndentField.Leng
bbe60 74 68 20 3d 20 30 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 th.=.0).Then..................Me
bbe80 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 .GenerationEnvironment.Append(te
bbea0 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 xtToAppend)..................Ret
bbec0 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 urn..............End.If.........
bbee0 20 20 20 20 20 27 45 76 65 72 79 77 68 65 72 65 20 74 68 65 72 65 20 69 73 20 61 20 6e 65 77 6c .....'Everywhere.there.is.a.newl
bbf00 69 6e 65 20 69 6e 20 74 68 65 20 74 65 78 74 2c 20 61 64 64 20 61 6e 20 69 6e 64 65 6e 74 20 61 ine.in.the.text,.add.an.indent.a
bbf20 66 74 65 72 20 69 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 54 6f 41 70 70 65 6e fter.it..............textToAppen
bbf40 64 20 3d 20 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 52 65 70 6c 61 63 65 28 47 6c 6f 62 61 6c 2e d.=.textToAppend.Replace(Global.
bbf60 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 2c 20 28 47 6c 6f System.Environment.NewLine,.(Glo
bbf80 62 61 6c 2e 53 79 73 74 65 6d 2e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 4e 65 77 4c 69 6e 65 20 2b bal.System.Environment.NewLine.+
bbfa0 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 29 29 0d 0a 20 20 20 20 20 20 .Me.currentIndentField))........
bbfc0 20 20 20 20 20 20 27 49 66 20 74 68 65 20 74 65 78 74 20 65 6e 64 73 20 77 69 74 68 20 61 20 6e ......'If.the.text.ends.with.a.n
bbfe0 65 77 6c 69 6e 65 2c 20 74 68 65 6e 20 77 65 20 73 68 6f 75 6c 64 20 73 74 72 69 70 20 6f 66 66 ewline,.then.we.should.strip.off
bc000 20 74 68 65 20 69 6e 64 65 6e 74 20 61 64 64 65 64 20 61 74 20 74 68 65 20 76 65 72 79 20 65 6e .the.indent.added.at.the.very.en
bc020 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 62 65 63 61 75 73 65 20 74 68 65 20 61 70 70 72 d..............'because.the.appr
bc040 6f 70 72 69 61 74 65 20 69 6e 64 65 6e 74 20 77 69 6c 6c 20 62 65 20 61 64 64 65 64 20 77 68 65 opriate.indent.will.be.added.whe
bc060 6e 20 74 68 65 20 6e 65 78 74 20 74 69 6d 65 20 57 72 69 74 65 28 29 20 69 73 20 63 61 6c 6c 65 n.the.next.time.Write().is.calle
bc080 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 d..............If.Me.endsWithNew
bc0a0 6c 69 6e 65 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 line.Then..................Me.Ge
bc0c0 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 28 74 65 78 74 54 nerationEnvironment.Append(textT
bc0e0 6f 41 70 70 65 6e 64 2c 20 30 2c 20 28 74 65 78 74 54 6f 41 70 70 65 6e 64 2e 4c 65 6e 67 74 68 oAppend,.0,.(textToAppend.Length
bc100 20 2d 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 29 .-.Me.currentIndentField.Length)
bc120 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 )..............Else.............
bc140 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 .....Me.GenerationEnvironment.Ap
bc160 70 65 6e 64 28 74 65 78 74 54 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 pend(textToAppend)..............
bc180 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 End.If..........End.Sub.........
bc1a0 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 57 72 69 74 65 20 .'''<summary>..........'''Write.
bc1c0 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 text.directly.into.the.generated
bc1e0 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a .output..........'''</summary>..
bc200 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 20 57 72 69 ........Public.Overloads.Sub.Wri
bc220 74 65 4c 69 6e 65 28 42 79 56 61 6c 20 74 65 78 74 54 6f 41 70 70 65 6e 64 20 41 73 20 53 74 72 teLine(ByVal.textToAppend.As.Str
bc240 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 28 74 65 78 74 54 ing)..............Me.Write(textT
bc260 6f 41 70 70 65 6e 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 47 65 6e 65 72 61 74 oAppend)..............Me.Generat
bc280 69 6f 6e 45 6e 76 69 72 6f 6e 6d 65 6e 74 2e 41 70 70 65 6e 64 4c 69 6e 65 0d 0a 20 20 20 20 20 ionEnvironment.AppendLine.......
bc2a0 20 20 20 20 20 20 20 4d 65 2e 65 6e 64 73 57 69 74 68 4e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 .......Me.endsWithNewline.=.true
bc2c0 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 ..........End.Sub..........'''<s
bc2e0 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 57 72 69 74 65 20 66 6f 72 6d 61 74 ummary>..........'''Write.format
bc300 74 65 64 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 ted.text.directly.into.the.gener
bc320 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 ated.output..........'''</summar
bc340 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 y>..........Public.Overloads.Sub
bc360 20 57 72 69 74 65 28 42 79 56 61 6c 20 66 6f 72 6d 61 74 20 41 73 20 53 74 72 69 6e 67 2c 20 3c .Write(ByVal.format.As.String,.<
bc380 53 79 73 74 65 6d 2e 50 61 72 61 6d 41 72 72 61 79 41 74 74 72 69 62 75 74 65 28 29 3e 20 42 79 System.ParamArrayAttribute()>.By
bc3a0 56 61 6c 20 61 72 67 73 28 29 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 20 20 20 20 Val.args().As.Object)...........
bc3c0 20 20 20 4d 65 2e 57 72 69 74 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 28 47 6c 6f 62 61 6c ...Me.Write(String.Format(Global
bc3e0 2e 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 .System.Globalization.CultureInf
bc400 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 66 6f 72 6d 61 74 2c 20 61 72 67 73 29 29 o.CurrentCulture,.format,.args))
bc420 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 ..........End.Sub..........'''<s
bc440 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 57 72 69 74 65 20 66 6f 72 6d 61 74 ummary>..........'''Write.format
bc460 74 65 64 20 74 65 78 74 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 67 65 6e 65 72 ted.text.directly.into.the.gener
bc480 61 74 65 64 20 6f 75 74 70 75 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 ated.output..........'''</summar
bc4a0 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 4f 76 65 72 6c 6f 61 64 73 20 53 75 62 y>..........Public.Overloads.Sub
bc4c0 20 57 72 69 74 65 4c 69 6e 65 28 42 79 56 61 6c 20 66 6f 72 6d 61 74 20 41 73 20 53 74 72 69 6e .WriteLine(ByVal.format.As.Strin
bc4e0 67 2c 20 3c 53 79 73 74 65 6d 2e 50 61 72 61 6d 41 72 72 61 79 41 74 74 72 69 62 75 74 65 28 29 g,.<System.ParamArrayAttribute()
bc500 3e 20 42 79 56 61 6c 20 61 72 67 73 28 29 20 41 73 20 4f 62 6a 65 63 74 29 0d 0a 20 20 20 20 20 >.ByVal.args().As.Object).......
bc520 20 20 20 20 20 20 20 4d 65 2e 57 72 69 74 65 4c 69 6e 65 28 53 74 72 69 6e 67 2e 46 6f 72 6d 61 .......Me.WriteLine(String.Forma
bc540 74 28 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 2e 43 75 t(Global.System.Globalization.Cu
bc560 6c 74 75 72 65 49 6e 66 6f 2e 43 75 72 72 65 6e 74 43 75 6c 74 75 72 65 2c 20 66 6f 72 6d 61 74 ltureInfo.CurrentCulture,.format
bc580 2c 20 61 72 67 73 29 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 ,.args))..........End.Sub.......
bc5a0 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 52 61 69 73 ...'''<summary>..........'''Rais
bc5c0 65 20 61 6e 20 65 72 72 6f 72 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 e.an.error..........'''</summary
bc5e0 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 5b 45 72 72 6f 72 5d 28 42 79 >..........Public.Sub.[Error](By
bc600 56 61 6c 20 6d 65 73 73 61 67 65 20 41 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 Val.message.As.String)..........
bc620 20 20 20 20 44 69 6d 20 5b 65 72 72 6f 72 5d 20 41 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f ....Dim.[error].As.System.CodeDo
bc640 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 20 3d 20 4e 65 77 20 47 m.Compiler.CompilerError.=.New.G
bc660 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f lobal.System.CodeDom.Compiler.Co
bc680 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 65 72 72 6f mpilerError()..............[erro
bc6a0 72 5d 2e 45 72 72 6f 72 54 65 78 74 20 3d 20 6d 65 73 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 r].ErrorText.=.message..........
bc6c0 20 20 20 20 4d 65 2e 45 72 72 6f 72 73 2e 41 64 64 28 5b 65 72 72 6f 72 5d 29 0d 0a 20 20 20 20 ....Me.Errors.Add([error])......
bc6e0 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 ....End.Sub..........'''<summary
bc700 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 52 61 69 73 65 20 61 20 77 61 72 6e 69 6e 67 0d 0a 20 >..........'''Raise.a.warning...
bc720 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 .......'''</summary>..........Pu
bc740 62 6c 69 63 20 53 75 62 20 57 61 72 6e 69 6e 67 28 42 79 56 61 6c 20 6d 65 73 73 61 67 65 20 41 blic.Sub.Warning(ByVal.message.A
bc760 73 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 5b 65 72 72 6f s.String)..............Dim.[erro
bc780 72 5d 20 41 73 20 53 79 73 74 65 6d 2e 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f r].As.System.CodeDom.Compiler.Co
bc7a0 6d 70 69 6c 65 72 45 72 72 6f 72 20 3d 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e mpilerError.=.New.Global.System.
bc7c0 43 6f 64 65 44 6f 6d 2e 43 6f 6d 70 69 6c 65 72 2e 43 6f 6d 70 69 6c 65 72 45 72 72 6f 72 28 29 CodeDom.Compiler.CompilerError()
bc7e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 65 72 72 6f 72 5d 2e 45 72 72 6f 72 54 65 78 74 20 ..............[error].ErrorText.
bc800 3d 20 6d 65 73 73 61 67 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 65 72 72 6f 72 5d 2e 49 =.message..............[error].I
bc820 73 57 61 72 6e 69 6e 67 20 3d 20 74 72 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e sWarning.=.true..............Me.
bc840 45 72 72 6f 72 73 2e 41 64 64 28 5b 65 72 72 6f 72 5d 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 Errors.Add([error])..........End
bc860 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 .Sub..........'''<summary>......
bc880 20 20 20 20 27 27 27 49 6e 63 72 65 61 73 65 20 74 68 65 20 69 6e 64 65 6e 74 0d 0a 20 20 20 20 ....'''Increase.the.indent......
bc8a0 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 ....'''</summary>..........Publi
bc8c0 63 20 53 75 62 20 50 75 73 68 49 6e 64 65 6e 74 28 42 79 56 61 6c 20 69 6e 64 65 6e 74 20 41 73 c.Sub.PushIndent(ByVal.indent.As
bc8e0 20 53 74 72 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 69 6e 64 65 6e 74 .String)..............If.(indent
bc900 20 3d 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.Nothing).Then................
bc920 20 20 54 68 72 6f 77 20 4e 65 77 20 47 6c 6f 62 61 6c 2e 53 79 73 74 65 6d 2e 41 72 67 75 6d 65 ..Throw.New.Global.System.Argume
bc940 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 69 6e 64 65 6e 74 22 29 0d 0a 20 20 20 20 20 ntNullException("indent").......
bc960 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 63 75 .......End.If..............Me.cu
bc980 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e rrentIndentField.=.(Me.currentIn
bc9a0 64 65 6e 74 46 69 65 6c 64 20 2b 20 69 6e 64 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 dentField.+.indent).............
bc9c0 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 41 64 64 28 69 6e 64 65 6e 74 2e 4c 65 6e .Me.indentLengths.Add(indent.Len
bc9e0 67 74 68 29 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 0d 0a 20 20 20 20 20 20 20 20 27 gth)..........End.Sub..........'
bca00 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 52 65 6d 6f 76 65 20 74 ''<summary>..........'''Remove.t
bca20 68 65 20 6c 61 73 74 20 69 6e 64 65 6e 74 20 74 68 61 74 20 77 61 73 20 61 64 64 65 64 20 77 69 he.last.indent.that.was.added.wi
bca40 74 68 20 50 75 73 68 49 6e 64 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d th.PushIndent..........'''</summ
bca60 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 74 69 6f 6e 20 50 6f ary>..........Public.Function.Po
bca80 70 49 6e 64 65 6e 74 28 29 20 41 73 20 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 pIndent().As.String.............
bcaa0 20 44 69 6d 20 72 65 74 75 72 6e 56 61 6c 75 65 20 41 73 20 53 74 72 69 6e 67 20 3d 20 22 22 0d .Dim.returnValue.As.String.=."".
bcac0 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 .............If.(Me.indentLength
bcae0 73 2e 43 6f 75 6e 74 20 3e 20 30 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 s.Count.>.0).Then...............
bcb00 20 20 20 44 69 6d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 20 41 73 20 49 6e 74 65 67 65 72 20 3d ...Dim.indentLength.As.Integer.=
bcb20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 28 28 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 .Me.indentLengths((Me.indentLeng
bcb40 74 68 73 2e 43 6f 75 6e 74 20 2d 20 31 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ths.Count.-.1)).................
bcb60 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 52 65 6d 6f 76 65 41 74 28 28 4d 65 2e 69 .Me.indentLengths.RemoveAt((Me.i
bcb80 6e 64 65 6e 74 4c 65 6e 67 74 68 73 2e 43 6f 75 6e 74 20 2d 20 31 29 29 0d 0a 20 20 20 20 20 20 ndentLengths.Count.-.1))........
bcba0 20 20 20 20 20 20 20 20 20 20 49 66 20 28 69 6e 64 65 6e 74 4c 65 6e 67 74 68 20 3e 20 30 29 20 ..........If.(indentLength.>.0).
bcbc0 54 68 65 6e 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 Then......................return
bcbe0 56 61 6c 75 65 20 3d 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 53 75 Value.=.Me.currentIndentField.Su
bcc00 62 73 74 72 69 6e 67 28 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c bstring((Me.currentIndentField.L
bcc20 65 6e 67 74 68 20 2d 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 ength.-.indentLength))..........
bcc40 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c ............Me.currentIndentFiel
bcc60 64 20 3d 20 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 52 65 6d 6f 76 65 d.=.Me.currentIndentField.Remove
bcc80 28 28 4d 65 2e 63 75 72 72 65 6e 74 49 6e 64 65 6e 74 46 69 65 6c 64 2e 4c 65 6e 67 74 68 20 2d ((Me.currentIndentField.Length.-
bcca0 20 69 6e 64 65 6e 74 4c 65 6e 67 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .indentLength)).................
bccc0 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 .End.If..............End.If.....
bcce0 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 72 65 74 75 72 6e 56 61 6c 75 65 0d 0a 20 20 20 .........Return.returnValue.....
bcd00 20 20 20 20 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 73 .....End.Function..........'''<s
bcd20 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 52 65 6d 6f 76 65 20 61 6e 79 20 69 ummary>..........'''Remove.any.i
bcd40 6e 64 65 6e 74 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 ndentation..........'''</summary
bcd60 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 53 75 62 20 43 6c 65 61 72 49 6e 64 65 6e >..........Public.Sub.ClearInden
bcd80 74 28 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 69 6e 64 65 6e 74 4c 65 6e 67 74 68 t()..............Me.indentLength
bcda0 73 2e 43 6c 65 61 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 63 75 72 72 65 6e 74 49 s.Clear..............Me.currentI
bcdc0 6e 64 65 6e 74 46 69 65 6c 64 20 3d 20 22 22 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 53 75 62 ndentField.=.""..........End.Sub
bcde0 0d 0a 20 20 20 20 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 23 ..........#End.Region..........#
bce00 52 65 67 69 6f 6e 20 22 54 6f 53 74 72 69 6e 67 20 48 65 6c 70 65 72 73 22 0d 0a 20 20 20 20 20 Region."ToString.Helpers".......
bce20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 55 74 69 6c ...'''<summary>..........'''Util
bce40 69 74 79 20 63 6c 61 73 73 20 74 6f 20 70 72 6f 64 75 63 65 20 63 75 6c 74 75 72 65 2d 6f 72 69 ity.class.to.produce.culture-ori
bce60 65 6e 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 61 6e 20 6f 62 6a 65 63 ented.representation.of.an.objec
bce80 74 20 61 73 20 61 20 73 74 72 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d t.as.a.string...........'''</sum
bcea0 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 43 6c 61 73 73 20 54 6f 53 74 mary>..........Public.Class.ToSt
bcec0 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ringInstanceHelper..............
bcee0 50 72 69 76 61 74 65 20 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 20 41 73 20 Private.formatProviderField..As.
bcf00 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 20 3d 20 47 6c 6f 62 61 6c 2e System.IFormatProvider.=.Global.
bcf20 53 79 73 74 65 6d 2e 47 6c 6f 62 61 6c 69 7a 61 74 69 6f 6e 2e 43 75 6c 74 75 72 65 49 6e 66 6f System.Globalization.CultureInfo
bcf40 2e 49 6e 76 61 72 69 61 6e 74 43 75 6c 74 75 72 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 .InvariantCulture..............'
bcf60 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 27 27 47 65 74 73 ''<summary>..............'''Gets
bcf80 20 6f 72 20 73 65 74 73 20 66 6f 72 6d 61 74 20 70 72 6f 76 69 64 65 72 20 74 6f 20 62 65 20 75 .or.sets.format.provider.to.be.u
bcfa0 73 65 64 20 62 79 20 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 20 6d 65 74 68 6f sed.by.ToStringWithCulture.metho
bcfc0 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 d...............'''</summary>...
bcfe0 20 20 20 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 50 72 6f 70 65 72 74 79 20 46 6f 72 6d 61 ...........Public.Property.Forma
bd000 74 50 72 6f 76 69 64 65 72 28 29 20 41 73 20 53 79 73 74 65 6d 2e 49 46 6f 72 6d 61 74 50 72 6f tProvider().As.System.IFormatPro
bd020 76 69 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 0d 0a 20 20 20 20 vider..................Get......
bd040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 66 6f 72 6d 61 74 ................Return.Me.format
bd060 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ProviderField...................
bd080 45 6e 64 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 0d 0a 20 20 End.Get..................Set....
bd0a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 4e 6f 74 20 28 76 61 6c 75 65 ..................If.(Not.(value
bd0c0 29 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ).Is.Nothing).Then..............
bd0e0 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 2e 66 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 ............Me.formatProviderFie
bd100 6c 64 20 20 3d 20 76 61 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ld..=.value.....................
bd120 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 53 65 74 .End.If..................End.Set
bd140 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 ..............End.Property......
bd160 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 ........'''<summary>............
bd180 20 20 27 27 27 54 68 69 73 20 69 73 20 63 61 6c 6c 65 64 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d ..'''This.is.called.from.the.com
bd1a0 70 69 6c 65 2f 72 75 6e 20 61 70 70 64 6f 6d 61 69 6e 20 74 6f 20 63 6f 6e 76 65 72 74 20 6f 62 pile/run.appdomain.to.convert.ob
bd1c0 6a 65 63 74 73 20 77 69 74 68 69 6e 20 61 6e 20 65 78 70 72 65 73 73 69 6f 6e 20 62 6c 6f 63 6b jects.within.an.expression.block
bd1e0 20 74 6f 20 61 20 73 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 .to.a.string..............'''</s
bd200 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 46 75 6e 63 ummary>..............Public.Func
bd220 74 69 6f 6e 20 54 6f 53 74 72 69 6e 67 57 69 74 68 43 75 6c 74 75 72 65 28 42 79 56 61 6c 20 6f tion.ToStringWithCulture(ByVal.o
bd240 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 20 41 73 20 4f 62 6a 65 63 74 29 20 41 73 20 53 74 72 bjectToConvert.As.Object).As.Str
bd260 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 28 6f 62 6a 65 63 74 54 ing..................If.(objectT
bd280 6f 43 6f 6e 76 65 72 74 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d 0a 20 20 20 20 20 oConvert.Is.Nothing).Then.......
bd2a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 72 6f 77 20 4e 65 77 20 47 6c 6f 62 61 6c 2e ...............Throw.New.Global.
bd2c0 53 79 73 74 65 6d 2e 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 22 6f 62 System.ArgumentNullException("ob
bd2e0 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 22 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 jectToConvert").................
bd300 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 74 20 41 .End.If..................Dim.t.A
bd320 73 20 53 79 73 74 65 6d 2e 54 79 70 65 20 3d 20 6f 62 6a 65 63 74 54 6f 43 6f 6e 76 65 72 74 2e s.System.Type.=.objectToConvert.
bd340 47 65 74 54 79 70 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 6d 20 6d 65 74 GetType..................Dim.met
bd360 68 6f 64 20 41 73 20 53 79 73 74 65 6d 2e 52 65 66 6c 65 63 74 69 6f 6e 2e 4d 65 74 68 6f 64 49 hod.As.System.Reflection.MethodI
bd380 6e 66 6f 20 3d 20 74 2e 47 65 74 4d 65 74 68 6f 64 28 22 54 6f 53 74 72 69 6e 67 22 2c 20 4e 65 nfo.=.t.GetMethod("ToString",.Ne
bd3a0 77 20 53 79 73 74 65 6d 2e 54 79 70 65 28 29 20 7b 47 65 74 54 79 70 65 28 53 79 73 74 65 6d 2e w.System.Type().{GetType(System.
bd3c0 49 46 6f 72 6d 61 74 50 72 6f 76 69 64 65 72 29 7d 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 IFormatProvider)})..............
bd3e0 20 20 20 20 49 66 20 28 6d 65 74 68 6f 64 20 49 73 20 4e 6f 74 68 69 6e 67 29 20 54 68 65 6e 0d ....If.(method.Is.Nothing).Then.
bd400 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 6f 62 6a 65 .....................Return.obje
bd420 63 74 54 6f 43 6f 6e 76 65 72 74 2e 54 6f 53 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 ctToConvert.ToString............
bd440 20 20 20 20 20 20 45 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 ......Else......................
bd460 52 65 74 75 72 6e 20 43 54 79 70 65 28 6d 65 74 68 6f 64 2e 49 6e 76 6f 6b 65 28 6f 62 6a 65 63 Return.CType(method.Invoke(objec
bd480 74 54 6f 43 6f 6e 76 65 72 74 2c 20 4e 65 77 20 4f 62 6a 65 63 74 28 29 20 7b 4d 65 2e 66 6f 72 tToConvert,.New.Object().{Me.for
bd4a0 6d 61 74 50 72 6f 76 69 64 65 72 46 69 65 6c 64 20 7d 29 2c 53 74 72 69 6e 67 29 0d 0a 20 20 20 matProviderField.}),String).....
bd4c0 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 20 49 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .............End.If.............
bd4e0 20 45 6e 64 20 46 75 6e 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 43 6c 61 73 73 .End.Function..........End.Class
bd500 0d 0a 20 20 20 20 20 20 20 20 50 72 69 76 61 74 65 20 74 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 ..........Private.toStringHelper
bd520 46 69 65 6c 64 20 41 73 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 20 Field.As.ToStringInstanceHelper.
bd540 3d 20 4e 65 77 20 54 6f 53 74 72 69 6e 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 28 29 0d 0a =.New.ToStringInstanceHelper()..
bd560 20 20 20 20 20 20 20 20 27 27 27 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 27 27 ........'''<summary>..........''
bd580 27 48 65 6c 70 65 72 20 74 6f 20 70 72 6f 64 75 63 65 20 63 75 6c 74 75 72 65 2d 6f 72 69 65 6e 'Helper.to.produce.culture-orien
bd5a0 74 65 64 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 61 6e 20 6f 62 6a 65 63 74 20 ted.representation.of.an.object.
bd5c0 61 73 20 61 20 73 74 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 27 27 27 3c 2f 73 75 6d 6d 61 72 as.a.string..........'''</summar
bd5e0 79 3e 0d 0a 20 20 20 20 20 20 20 20 50 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 20 50 72 6f 70 y>..........Public.ReadOnly.Prop
bd600 65 72 74 79 20 54 6f 53 74 72 69 6e 67 48 65 6c 70 65 72 28 29 20 41 73 20 54 6f 53 74 72 69 6e erty.ToStringHelper().As.ToStrin
bd620 67 49 6e 73 74 61 6e 63 65 48 65 6c 70 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 gInstanceHelper..............Get
bd640 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 74 75 72 6e 20 4d 65 2e 74 6f 53 74 ..................Return.Me.toSt
bd660 72 69 6e 67 48 65 6c 70 65 72 46 69 65 6c 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 64 ringHelperField..............End
bd680 20 47 65 74 0d 0a 20 20 20 20 20 20 20 20 45 6e 64 20 50 72 6f 70 65 72 74 79 0d 0a 20 20 20 20 .Get..........End.Property......
bd6a0 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 0d 0a 20 20 20 20 45 6e 64 20 43 6c 61 73 73 0d 0a ....#End.Region......End.Class..
bd6c0 20 20 20 20 23 45 6e 64 20 52 65 67 69 6f 6e 0d 0a 45 6e 64 20 4e 61 6d 65 73 70 61 63 65 0d 0a ....#End.Region..End.Namespace..
bd6e0 63 5f e2 00 a5 90 55 a0 10 07 8e e8 b8 7b 46 c3 f7 ac d4 0e 73 02 06 18 9a 7a b2 3a 5a f0 e7 f8 c_....U......{F.....s....z.:Z...
bd700 09 c0 a8 2c 67 ec 60 43 69 29 23 60 c4 b0 e0 41 43 cd ee a2 03 5d 18 d0 74 12 30 f5 ff 19 f5 f6 ...,g.`Ci)#`...AC....]..t.0.....
bd720 a3 61 a9 8a 60 65 92 24 f1 d6 a7 27 c8 45 ab 0b 88 4c c4 e7 aa 06 62 84 d2 a5 99 8e c0 fe f7 d4 .a..`e.$...'.E...L....b.........
bd740 e7 f0 c8 dd 28 f2 e7 58 60 1e 6d d2 4a fa 83 42 1e d0 0d 61 f9 e1 df 14 2a 42 d8 d4 bf c3 46 fa ....(..X`.m.J..B...a....*B....F.
bd760 0a 09 a9 27 ae d6 7b 1c 18 07 3e aa fa d9 70 ef fe dd b1 a6 c8 e5 19 b6 14 0c 69 a7 e1 9c 07 64 ...'..{...>...p...........i....d
bd780 0b 53 e0 52 4f 0f 95 f2 87 b6 cd b1 4f 31 9d bc 97 77 57 37 32 1d 85 22 45 3e f0 db 3e 47 c0 0f .S.RO.......O1...wW72.."E>..>G..
bd7a0 09 79 45 66 35 72 7b d3 49 ab b4 d3 a6 18 a4 b9 cf 9c da 63 53 3a 3b a7 a7 b6 ba 5c 16 9f 93 68 .yEf5r{.I..........cS:;....\...h
bd7c0 b8 d7 e6 63 35 e4 b2 cb aa 98 18 5c ed b6 79 d0 a3 7d e7 05 5d c3 a9 81 f8 ad 89 4b bb e0 d0 42 ...c5......\..y..}..]......K...B
bd7e0 08 f6 0b 00 00 00 00 00 00 00 00 00 22 f6 0b 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............"...................
bd800 00 00 00 00 00 00 00 00 14 f6 0b 00 00 00 00 00 00 00 00 00 00 00 5f 43 6f 72 44 6c 6c 4d 61 69 ......................_CorDllMai
bd820 6e 00 6d 73 63 6f 72 65 65 2e 64 6c 6c 00 00 00 00 00 ff 25 00 20 ce 60 3d 00 22 00 27 00 00 00 n.mscoree.dll......%...`=.".'...
bd840 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 ................................
bd860 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 ................................
bd880 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 ................................
bd8a0 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 ................................
bd8c0 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 ................................
bd8e0 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 ................................
bd900 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 ................................
bd920 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 ................................
bd940 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 ................................
bd960 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 ................................
bd980 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 ................................
bd9a0 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 ................................
bd9c0 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 ................................
bd9e0 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 ................................
bda00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 10 00 00 00 18 00 00 80 00 00 00 00 00 00 00 00 ................................
bda20 00 00 00 00 00 00 01 00 01 00 00 00 30 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ............0...................
bda40 00 00 00 00 48 00 00 00 58 00 0c 00 24 04 00 00 00 00 00 00 00 00 00 00 24 04 34 00 00 00 56 00 ....H...X...$...........$.4...V.
bda60 53 00 5f 00 56 00 45 00 52 00 53 00 49 00 4f 00 4e 00 5f 00 49 00 4e 00 46 00 4f 00 00 00 00 00 S._.V.E.R.S.I.O.N._.I.N.F.O.....
bda80 bd 04 ef fe 00 00 01 00 06 00 04 00 00 00 1f 04 06 00 04 00 00 00 1f 04 3f 00 00 00 00 00 00 00 ........................?.......
bdaa0 04 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 01 00 56 00 61 00 72 00 ....................D.....V.a.r.
bdac0 46 00 69 00 6c 00 65 00 49 00 6e 00 66 00 6f 00 00 00 00 00 24 00 04 00 00 00 54 00 72 00 61 00 F.i.l.e.I.n.f.o.....$.....T.r.a.
bdae0 6e 00 73 00 6c 00 61 00 74 00 69 00 6f 00 6e 00 00 00 00 00 00 00 b0 04 84 03 00 00 01 00 53 00 n.s.l.a.t.i.o.n...............S.
bdb00 74 00 72 00 69 00 6e 00 67 00 46 00 69 00 6c 00 65 00 49 00 6e 00 66 00 6f 00 00 00 60 03 00 00 t.r.i.n.g.F.i.l.e.I.n.f.o...`...
bdb20 01 00 30 00 30 00 30 00 30 00 30 00 34 00 62 00 30 00 00 00 54 00 1e 00 01 00 43 00 6f 00 6d 00 ..0.0.0.0.0.4.b.0...T.....C.o.m.
bdb40 6d 00 65 00 6e 00 74 00 73 00 00 00 53 00 79 00 73 00 74 00 65 00 6d 00 2e 00 44 00 61 00 74 00 m.e.n.t.s...S.y.s.t.e.m...D.a.t.
bdb60 61 00 2e 00 45 00 6e 00 74 00 69 00 74 00 79 00 2e 00 44 00 65 00 73 00 69 00 67 00 6e 00 2e 00 a...E.n.t.i.t.y...D.e.s.i.g.n...
bdb80 64 00 6c 00 6c 00 00 00 4c 00 16 00 01 00 43 00 6f 00 6d 00 70 00 61 00 6e 00 79 00 4e 00 61 00 d.l.l...L.....C.o.m.p.a.n.y.N.a.
bdba0 6d 00 65 00 00 00 00 00 4d 00 69 00 63 00 72 00 6f 00 73 00 6f 00 66 00 74 00 20 00 43 00 6f 00 m.e.....M.i.c.r.o.s.o.f.t...C.o.
bdbc0 72 00 70 00 6f 00 72 00 61 00 74 00 69 00 6f 00 6e 00 00 00 64 00 1e 00 01 00 46 00 69 00 6c 00 r.p.o.r.a.t.i.o.n...d.....F.i.l.
bdbe0 65 00 44 00 65 00 73 00 63 00 72 00 69 00 70 00 74 00 69 00 6f 00 6e 00 00 00 00 00 53 00 79 00 e.D.e.s.c.r.i.p.t.i.o.n.....S.y.
bdc00 73 00 74 00 65 00 6d 00 2e 00 44 00 61 00 74 00 61 00 2e 00 45 00 6e 00 74 00 69 00 74 00 79 00 s.t.e.m...D.a.t.a...E.n.t.i.t.y.
bdc20 2e 00 44 00 65 00 73 00 69 00 67 00 6e 00 2e 00 64 00 6c 00 6c 00 00 00 36 00 0b 00 01 00 46 00 ..D.e.s.i.g.n...d.l.l...6.....F.
bdc40 69 00 6c 00 65 00 56 00 65 00 72 00 73 00 69 00 6f 00 6e 00 00 00 00 00 34 00 2e 00 36 00 2e 00 i.l.e.V.e.r.s.i.o.n.....4...6...
bdc60 31 00 30 00 35 00 35 00 2e 00 30 00 00 00 00 00 5c 00 1e 00 01 00 49 00 6e 00 74 00 65 00 72 00 1.0.5.5...0.....\.....I.n.t.e.r.
bdc80 6e 00 61 00 6c 00 4e 00 61 00 6d 00 65 00 00 00 53 00 79 00 73 00 74 00 65 00 6d 00 2e 00 44 00 n.a.l.N.a.m.e...S.y.s.t.e.m...D.
bdca0 61 00 74 00 61 00 2e 00 45 00 6e 00 74 00 69 00 74 00 79 00 2e 00 44 00 65 00 73 00 69 00 67 00 a.t.a...E.n.t.i.t.y...D.e.s.i.g.
bdcc0 6e 00 2e 00 64 00 6c 00 6c 00 00 00 82 00 2f 00 01 00 4c 00 65 00 67 00 61 00 6c 00 43 00 6f 00 n...d.l.l...../...L.e.g.a.l.C.o.
bdce0 70 00 79 00 72 00 69 00 67 00 68 00 74 00 00 00 a9 00 20 00 4d 00 69 00 63 00 72 00 6f 00 73 00 p.y.r.i.g.h.t.......M.i.c.r.o.s.
bdd00 6f 00 66 00 74 00 20 00 43 00 6f 00 72 00 70 00 6f 00 72 00 61 00 74 00 69 00 6f 00 6e 00 2e 00 o.f.t...C.o.r.p.o.r.a.t.i.o.n...
bdd20 20 00 20 00 41 00 6c 00 6c 00 20 00 72 00 69 00 67 00 68 00 74 00 73 00 20 00 72 00 65 00 73 00 ....A.l.l...r.i.g.h.t.s...r.e.s.
bdd40 65 00 72 00 76 00 65 00 64 00 2e 00 00 00 00 00 64 00 1e 00 01 00 4f 00 72 00 69 00 67 00 69 00 e.r.v.e.d.......d.....O.r.i.g.i.
bdd60 6e 00 61 00 6c 00 46 00 69 00 6c 00 65 00 6e 00 61 00 6d 00 65 00 00 00 53 00 79 00 73 00 74 00 n.a.l.F.i.l.e.n.a.m.e...S.y.s.t.
bdd80 65 00 6d 00 2e 00 44 00 61 00 74 00 61 00 2e 00 45 00 6e 00 74 00 69 00 74 00 79 00 2e 00 44 00 e.m...D.a.t.a...E.n.t.i.t.y...D.
bdda0 65 00 73 00 69 00 67 00 6e 00 2e 00 64 00 6c 00 6c 00 00 00 54 00 1a 00 01 00 50 00 72 00 6f 00 e.s.i.g.n...d.l.l...T.....P.r.o.
bddc0 64 00 75 00 63 00 74 00 4e 00 61 00 6d 00 65 00 00 00 00 00 4d 00 69 00 63 00 72 00 6f 00 73 00 d.u.c.t.N.a.m.e.....M.i.c.r.o.s.
bdde0 6f 00 66 00 74 00 ae 00 20 00 2e 00 4e 00 45 00 54 00 20 00 46 00 72 00 61 00 6d 00 65 00 77 00 o.f.t.......N.E.T...F.r.a.m.e.w.
bde00 6f 00 72 00 6b 00 00 00 3a 00 0b 00 01 00 50 00 72 00 6f 00 64 00 75 00 63 00 74 00 56 00 65 00 o.r.k...:.....P.r.o.d.u.c.t.V.e.
bde20 72 00 73 00 69 00 6f 00 6e 00 00 00 34 00 2e 00 36 00 2e 00 31 00 30 00 35 00 35 00 2e 00 30 00 r.s.i.o.n...4...6...1.0.5.5...0.
bde40 00 00 00 00 38 00 08 00 01 00 41 00 73 00 73 00 65 00 6d 00 62 00 6c 00 79 00 20 00 56 00 65 00 ....8.....A.s.s.e.m.b.l.y...V.e.
bde60 72 00 73 00 69 00 6f 00 6e 00 00 00 34 00 2e 00 30 00 2e 00 30 00 2e 00 30 00 00 00 00 00 00 00 r.s.i.o.n...4...0...0...0.......
bde80 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 ................................
bdea0 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 ................................
bdec0 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 ................................
bdee0 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 ................................
bdf00 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 ................................
bdf20 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 ................................
bdf40 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 ................................
bdf60 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 ................................
bdf80 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 ................................
bdfa0 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 ................................
bdfc0 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 ................................
bdfe0 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 ................................
be000 00 f0 0b 00 0c 00 00 00 34 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........46......................
be020 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 ................................
be040 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 ................................
be060 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 ................................
be080 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 ................................
be0a0 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 ................................
be0c0 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 ................................
be0e0 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 ................................
be100 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 ................................
be120 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 ................................
be140 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 ................................
be160 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 ................................
be180 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 ................................
be1a0 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 ................................
be1c0 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 ................................
be1e0 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 ................................
be200 e0 3e 00 00 00 02 02 00 30 82 3e d2 06 09 2a 86 48 86 f7 0d 01 07 02 a0 82 3e c3 30 82 3e bf 02 .>......0.>...*.H........>.0.>..
be220 01 01 31 0b 30 09 06 05 2b 0e 03 02 1a 05 00 30 4c 06 0a 2b 06 01 04 01 82 37 02 01 04 a0 3e 30 ..1.0...+......0L..+.....7....>0
be240 3c 30 17 06 0a 2b 06 01 04 01 82 37 02 01 0f 30 09 03 01 00 a0 04 a2 02 80 00 30 21 30 09 06 05 <0...+.....7...0..........0!0...
be260 2b 0e 03 02 1a 05 00 04 14 8e 8d 90 38 b7 ca 2f 44 0b f5 c6 9e 25 ea a1 a6 c3 ce 7e ba a0 82 15 +...........8../D....%.....~....
be280 82 30 82 04 c3 30 82 03 ab a0 03 02 01 02 02 13 33 00 00 00 8f d7 76 15 b9 cd 45 8a 74 00 00 00 .0...0..........3.....v...E.t...
be2a0 00 00 8f 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 30 77 31 0b 30 09 06 03 55 04 06 13 02 55 ...0...*.H........0w1.0...U....U
be2c0 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 S1.0...U....Washington1.0...U...
be2e0 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 .Redmond1.0...U....Microsoft.Cor
be300 70 6f 72 61 74 69 6f 6e 31 21 30 1f 06 03 55 04 03 13 18 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d poration1!0...U....Microsoft.Tim
be320 65 2d 53 74 61 6d 70 20 50 43 41 30 1e 17 0d 31 35 31 30 30 37 31 38 31 34 30 35 5a 17 0d 31 37 e-Stamp.PCA0...151007181405Z..17
be340 30 31 30 37 31 38 31 34 30 35 5a 30 81 b3 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 0107181405Z0..1.0...U....US1.0..
be360 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f .U....Washington1.0...U....Redmo
be380 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 nd1.0...U....Microsoft.Corporati
be3a0 6f 6e 31 0d 30 0b 06 03 55 04 0b 13 04 4d 4f 50 52 31 27 30 25 06 03 55 04 0b 13 1e 6e 43 69 70 on1.0...U....MOPR1'0%..U....nCip
be3c0 68 65 72 20 44 53 45 20 45 53 4e 3a 46 35 32 38 2d 33 37 37 37 2d 38 41 37 36 31 25 30 23 06 03 her.DSE.ESN:F528-3777-8A761%0#..
be3e0 55 04 03 13 1c 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 53 65 72 76 69 63 U....Microsoft.Time-Stamp.Servic
be400 65 30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 e0.."0...*.H.............0......
be420 01 00 a4 97 08 bd 46 56 18 71 fe 69 e9 5e e6 92 92 76 a0 1c 0c c1 1f f8 c0 ca eb 31 80 a3 f3 14 ......FV.q.i.^...v.........1....
be440 5f c7 6d e4 02 d1 cb d2 85 31 4e 0d 1c 01 92 f3 f9 7c a1 ba 80 76 b2 34 f6 88 22 f9 be 39 72 89 _.m......1N......|...v.4.."..9r.
be460 0f 85 fe 05 4a 31 fd 17 19 c8 e1 f2 80 e4 3d 73 bf 3a 92 49 9b f6 0e 8f c3 3f 04 c0 06 7d 20 24 ....J1........=s.:.I.....?...}.$
be480 32 04 83 df 1e 5a b7 d3 7d 28 92 05 e2 22 b4 22 08 e3 16 2b 71 0c e6 2c d7 4e 84 ae dc f6 ce 1a 2....Z..}(..."."...+q..,.N......
be4a0 db de ef d9 8a 12 b2 be b2 c3 0b 22 d8 60 93 47 b9 5f eb 7f 43 42 9b d4 7b 05 1e 02 08 d2 e5 d8 ...........".`.G._..CB..{.......
be4c0 9f 4f 32 4e 63 a3 f5 cd a6 61 68 b7 b7 24 17 d0 68 3f d7 37 02 91 50 76 75 80 aa 59 1d 1e 81 29 .O2Nc....ah..$..h?.7..Pvu..Y...)
be4e0 f4 80 d5 0a f6 cb c4 88 1f a4 a7 8e 83 4f e6 0f e2 d5 22 4b 7b c0 45 bb 04 6e 91 d1 24 01 29 0f .............O...."K{.E..n..$.).
be500 32 58 b3 4d 55 a4 d2 22 83 0a ba b6 2b 82 6a 6f 84 c8 74 2e 9f b7 19 e5 2c b4 d0 ea 8d 74 1a 0a 2X.MU.."....+.jo..t.....,....t..
be520 2c df 02 03 01 00 01 a3 82 01 09 30 82 01 05 30 1d 06 03 55 1d 0e 04 16 04 14 40 82 80 68 62 72 ,..........0...0...U......@..hbr
be540 9e 60 20 06 98 df 1c 7a 76 a4 e0 c2 3b 87 30 1f 06 03 55 1d 23 04 18 30 16 80 14 23 34 f8 d9 52 .`.....zv...;.0...U.#..0...#4..R
be560 46 70 0a ed 40 fb 76 fb b3 2b b0 c3 35 b3 0f 30 54 06 03 55 1d 1f 04 4d 30 4b 30 49 a0 47 a0 45 Fp..@.v..+..5..0T..U...M0K0I.G.E
be580 86 43 68 74 74 70 3a 2f 2f 63 72 6c 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 .Chttp://crl.microsoft.com/pki/c
be5a0 72 6c 2f 70 72 6f 64 75 63 74 73 2f 4d 69 63 72 6f 73 6f 66 74 54 69 6d 65 53 74 61 6d 70 50 43 rl/products/MicrosoftTimeStampPC
be5c0 41 2e 63 72 6c 30 58 06 08 2b 06 01 05 05 07 01 01 04 4c 30 4a 30 48 06 08 2b 06 01 05 05 07 30 A.crl0X..+........L0J0H..+.....0
be5e0 02 86 3c 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f ..<http://www.microsoft.com/pki/
be600 63 65 72 74 73 2f 4d 69 63 72 6f 73 6f 66 74 54 69 6d 65 53 74 61 6d 70 50 43 41 2e 63 72 74 30 certs/MicrosoftTimeStampPCA.crt0
be620 13 06 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03 08 30 0d 06 09 2a 86 48 86 f7 0d 01 01 ...U.%..0...+.......0...*.H.....
be640 05 05 00 03 82 01 01 00 4b 2c b3 27 39 0f 6e 12 51 34 9e 1a 9b d3 fa 9e 1f a6 87 00 bb f9 6a cf ........K,.'9.n.Q4............j.
be660 2a 8f f1 41 99 41 11 8e 7e 3d 04 a9 ba 95 43 79 49 14 de 86 24 c2 42 c3 e7 aa 1e 13 8f a3 41 85 *..A.A..~=....CyI...$.B.......A.
be680 13 22 1c 68 7f 54 41 88 98 db 95 15 ca 25 a0 66 8f f6 3e bf ef 14 05 74 ee e5 e1 de 45 f0 2d eb .".h.TA......%.f..>....t....E.-.
be6a0 f7 a6 eb c4 1d af 89 db 02 af ba af e0 c4 68 98 70 75 76 fe 42 f4 10 b7 4b 7f b9 de 36 11 62 64 ..............h.puv.B...K...6.bd
be6c0 60 a8 1e e1 34 99 fe 65 51 21 80 96 13 f9 02 17 7e 9c ef 58 55 86 85 ec 7c 19 6e 3c 62 31 b1 a0 `...4..eQ!......~..XU...|.n<b1..
be6e0 b1 15 52 32 6c 62 12 bb fa 43 ec 89 98 fd 56 73 8d 45 43 b0 96 4b 31 6d 5d af 86 b5 89 96 34 b4 ..R2lb...C....Vs.EC..K1m].....4.
be700 d5 55 c5 75 3f 5e ee 39 be e1 b5 73 5a 72 a9 f7 f6 e1 35 fa cb 09 6b d9 a5 c1 3d d2 7c 76 12 3b .U.u?^.9...sZr....5...k...=.|v.;
be720 95 0d 7b 83 30 17 d6 dd c9 c4 88 55 cf 29 c4 d1 dd 3d b9 ca c3 71 ca 23 f8 56 ae 3a 72 69 ae a9 ..{.0......U.)...=...q.#.V.:ri..
be740 5f ff 42 6c 69 9d 94 db 30 82 04 ec 30 82 03 d4 a0 03 02 01 02 02 13 33 00 00 01 0a 2c 79 ae d7 _.Bli...0...0..........3....,y..
be760 79 7b a6 ac 00 01 00 00 01 0a 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 30 79 31 0b 30 09 06 y{........0...*.H........0y1.0..
be780 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 .U....US1.0...U....Washington1.0
be7a0 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 ...U....Redmond1.0...U....Micros
be7c0 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 23 30 21 06 03 55 04 03 13 1a 4d 69 63 72 6f 73 oft.Corporation1#0!..U....Micros
be7e0 6f 66 74 20 43 6f 64 65 20 53 69 67 6e 69 6e 67 20 50 43 41 30 1e 17 0d 31 35 30 36 30 34 31 37 oft.Code.Signing.PCA0...15060417
be800 34 32 34 35 5a 17 0d 31 36 30 39 30 34 31 37 34 32 34 35 5a 30 81 83 31 0b 30 09 06 03 55 04 06 4245Z..160904174245Z0..1.0...U..
be820 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 ..US1.0...U....Washington1.0...U
be840 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 ....Redmond1.0...U....Microsoft.
be860 43 6f 72 70 6f 72 61 74 69 6f 6e 31 0d 30 0b 06 03 55 04 0b 13 04 4d 4f 50 52 31 1e 30 1c 06 03 Corporation1.0...U....MOPR1.0...
be880 55 04 03 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 30 82 01 22 30 0d U....Microsoft.Corporation0.."0.
be8a0 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 01 00 92 fc 6f 36 bb ..*.H.............0..........o6.
be8c0 e1 03 b9 28 d6 46 d1 a2 61 ba a5 46 fb 63 16 3e 2e f9 47 d2 c7 ec ed c7 99 b1 26 51 75 bd da cc ...(.F..a..F.c.>..G.......&Qu...
be8e0 0f 06 14 11 a4 6c 19 9e c0 5f 4d 54 89 e4 4d 50 d8 8d cd a1 61 a5 77 13 9a 1c a7 ed 0d 74 f7 a7 .....l..._MT..MP....a.w......t..
be900 56 79 e8 28 f7 53 d2 b1 7a 63 e0 f5 94 97 b7 ec d9 47 f8 6c 3d f3 25 88 b3 bc 0a c5 04 a7 8e 7c Vy.(.S..zc.......G.l=.%........|
be920 85 48 76 1c 61 46 aa 19 c4 7a 62 8b c1 c2 35 aa fb 58 6f c5 63 0b 93 49 30 81 1b 7b df 7f 7c 4f .Hv.aF...zb...5..Xo.c..I0..{..|O
be940 b4 47 6d 5f 78 1c af b6 f7 96 13 52 ef b9 d1 4d 39 e5 73 de 48 4e 3c 14 aa 97 0d 39 cc 8b 51 e1 .Gm_x......R...M9.s.HN<....9..Q.
be960 5c d1 3b f0 8e 67 ea 30 60 a9 4d 5a 9d 43 bd db 23 ba c0 0f d7 4b 10 9d 9c 4d f0 51 a2 84 aa e4 \.;..g.0`.MZ.C..#....K...M.Q....
be980 9c a7 3d d6 a3 ef 0a 18 48 a8 fa b1 4e a5 98 0e 4b bf f0 14 f3 00 c8 b0 48 d6 5b fe 38 d7 89 11 ..=.....H...N...K.......H.[.8...
be9a0 2d 05 ba 43 02 4f 22 00 96 25 ad 7d 35 6e 84 68 ab 20 18 38 28 fe 1c a2 10 b1 a5 02 03 01 00 01 -..C.O"..%.}5n.h...8(...........
be9c0 a3 82 01 60 30 82 01 5c 30 13 06 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03 03 30 1d 06 ...`0..\0...U.%..0...+.......0..
be9e0 03 55 1d 0e 04 16 04 14 89 fe 0a 31 ea 26 cd e6 6d c7 91 91 b9 94 8c a2 18 61 37 34 30 51 06 03 .U.........1.&..m........a740Q..
bea00 55 1d 11 04 4a 30 48 a4 46 30 44 31 0d 30 0b 06 03 55 04 0b 13 04 4d 4f 50 52 31 33 30 31 06 03 U...J0H.F0D1.0...U....MOPR1301..
bea20 55 04 05 13 2a 33 31 35 39 35 2b 30 34 30 37 39 33 35 30 2d 31 36 66 61 2d 34 63 36 30 2d 62 36 U...*31595+04079350-16fa-4c60-b6
bea40 62 66 2d 39 64 32 62 31 63 64 30 35 39 38 34 30 1f 06 03 55 1d 23 04 18 30 16 80 14 cb 11 e8 ca bf-9d2b1cd059840...U.#..0.......
bea60 d2 b4 16 58 01 c9 37 2e 33 16 16 b9 4c 9a 0a 1f 30 56 06 03 55 1d 1f 04 4f 30 4d 30 4b a0 49 a0 ...X..7.3...L...0V..U...O0M0K.I.
bea80 47 86 45 68 74 74 70 3a 2f 2f 63 72 6c 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f G.Ehttp://crl.microsoft.com/pki/
beaa0 63 72 6c 2f 70 72 6f 64 75 63 74 73 2f 4d 69 63 43 6f 64 53 69 67 50 43 41 5f 30 38 2d 33 31 2d crl/products/MicCodSigPCA_08-31-
beac0 32 30 31 30 2e 63 72 6c 30 5a 06 08 2b 06 01 05 05 07 01 01 04 4e 30 4c 30 4a 06 08 2b 06 01 05 2010.crl0Z..+........N0L0J..+...
beae0 05 07 30 02 86 3e 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 ..0..>http://www.microsoft.com/p
beb00 6b 69 2f 63 65 72 74 73 2f 4d 69 63 43 6f 64 53 69 67 50 43 41 5f 30 38 2d 33 31 2d 32 30 31 30 ki/certs/MicCodSigPCA_08-31-2010
beb20 2e 63 72 74 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 03 82 01 01 00 a6 a8 53 91 df 3b 01 fe .crt0...*.H...............S..;..
beb40 61 5d 06 5a eb 66 f0 0c d8 f7 d9 84 d3 00 51 0e 10 d1 a4 d1 17 28 e7 8c 33 38 2b d8 43 c6 03 8b a].Z.f........Q......(..38+.C...
beb60 75 eb 33 92 f4 a9 e2 67 fd 02 db a5 1d 4e 43 45 5d 1b 49 e3 e0 4f 16 f0 7e 8f f0 88 11 ca 82 ad u.3....g.....NCE].I..O..~.......
beb80 a4 fb a6 a9 5f f5 97 60 c8 7b c4 bf 7c 9b 69 ed 1f 82 c1 f1 cd 8e 78 4b 62 f5 d7 0d 1c d7 53 12 ...._..`.{..|.i.......xKb.....S.
beba0 d6 96 52 ef 35 bd 19 8e a0 40 93 a1 0a a5 2d 16 9c c2 46 74 08 eb db f4 d8 a5 49 36 54 12 11 55 ..R.5....@....-...Ft......I6T..U
bebc0 03 b3 7b 16 fb 47 fe fb 68 fc c0 45 5c e2 3f 12 79 33 a2 ef 82 c5 de 40 19 07 ee 15 c5 0a 9b 59 ..{..G..h..E\.?.y3.....@.......Y
bebe0 05 41 a9 d0 97 9e 81 9e 03 5b fc 4a e3 1a 2e 05 ac 50 47 2f 8c fa 79 d8 1e 20 f8 05 fb 29 6b 18 .A.......[.J.....PG/..y......)k.
bec00 14 fa 72 04 b7 0b a7 9a 64 ec 11 5d 4f 45 49 8d 29 1a 2d fb d0 b6 09 53 5f 34 94 e0 16 c4 b9 ea ..r.....d..]OEI.).-....S_4......
bec20 73 35 e8 57 ef e1 eb 16 c3 18 c7 06 b3 3b cf 61 84 e2 b6 44 89 94 a3 86 30 82 05 bc 30 82 03 a4 s5.W.........;.a...D....0...0...
bec40 a0 03 02 01 02 02 0a 61 33 26 1a 00 00 00 00 00 31 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 .......a3&......10...*.H........
bec60 30 5f 31 13 30 11 06 0a 09 92 26 89 93 f2 2c 64 01 19 16 03 63 6f 6d 31 19 30 17 06 0a 09 92 26 0_1.0.....&...,d....com1.0.....&
bec80 89 93 f2 2c 64 01 19 16 09 6d 69 63 72 6f 73 6f 66 74 31 2d 30 2b 06 03 55 04 03 13 24 4d 69 63 ...,d....microsoft1-0+..U...$Mic
beca0 72 6f 73 6f 66 74 20 52 6f 6f 74 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 rosoft.Root.Certificate.Authorit
becc0 79 30 1e 17 0d 31 30 30 38 33 31 32 32 31 39 33 32 5a 17 0d 32 30 30 38 33 31 32 32 32 39 33 32 y0...100831221932Z..200831222932
bece0 5a 30 79 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 Z0y1.0...U....US1.0...U....Washi
bed00 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a ngton1.0...U....Redmond1.0...U..
bed20 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 23 30 21 06 03 55 04 03 ..Microsoft.Corporation1#0!..U..
bed40 13 1a 4d 69 63 72 6f 73 6f 66 74 20 43 6f 64 65 20 53 69 67 6e 69 6e 67 20 50 43 41 30 82 01 22 ..Microsoft.Code.Signing.PCA0.."
bed60 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 01 00 b2 72 59 0...*.H.............0.........rY
bed80 5c 19 30 64 bf 1d 9a 60 20 20 42 99 76 53 6c 3e 1b d6 6f cc cb f1 ea 6b fe 97 16 10 e0 df 3a 74 \.0d...`..B.vSl>..o....k......:t
beda0 83 1a b7 2f a0 32 ec ff de c2 42 4e 23 d5 72 00 db 35 57 0a 89 ca ae 20 49 f4 f0 68 ac 4d 4b 8d .../.2....BN#.r..5W.....I..h.MK.
bedc0 a5 bd 79 4b 71 9b 47 07 da fd 25 df 9d 75 88 cf aa 73 44 7f d7 81 db f3 bd f2 36 a4 c9 5c 45 dc ..yKq.G...%..u...sD.......6..\E.
bede0 af ad 3d e0 28 68 97 1a a7 a5 72 73 56 f1 17 94 e4 fd 35 94 72 a0 d6 76 5f 1e 77 45 83 85 38 16 ..=.(h....rsV.....5.r..v_.wE..8.
bee00 d0 73 5b 05 ba 67 52 8d a5 b2 69 2f da 19 0b fe 92 74 29 e2 76 2f 54 dd 14 30 59 f8 d2 8d 62 fd .s[..gR...i/.....t).v/T..0Y...b.
bee20 cb c9 5f 46 31 50 b9 27 13 e4 40 30 cf 72 29 10 28 22 c7 37 4e 3d a0 32 3d 90 cd a1 38 06 85 5c .._F1P.'..@0.r).(".7N=.2=...8..\
bee40 4e 56 82 28 2a 05 32 b7 4b d7 4f 63 e7 d2 2d 62 f1 45 3d e7 ac 08 00 f6 46 a1 9e d1 5b 8c 26 53 NV.(*.2.K.Oc..-b.E=.....F...[.&S
bee60 e8 7a aa 4a f2 46 cf 37 3c 38 9e b4 77 5c a5 17 9e 8d cb 11 8f 56 3c c1 ac 09 5f 03 d3 02 03 01 .z.J.F.7<8..w\.......V<..._.....
bee80 00 01 a3 82 01 5e 30 82 01 5a 30 0f 06 03 55 1d 13 01 01 ff 04 05 30 03 01 01 ff 30 1d 06 03 55 .....^0..Z0...U.......0....0...U
beea0 1d 0e 04 16 04 14 cb 11 e8 ca d2 b4 16 58 01 c9 37 2e 33 16 16 b9 4c 9a 0a 1f 30 0b 06 03 55 1d .............X..7.3...L...0...U.
beec0 0f 04 04 03 02 01 86 30 12 06 09 2b 06 01 04 01 82 37 15 01 04 05 02 03 01 00 01 30 23 06 09 2b .......0...+.....7.........0#..+
beee0 06 01 04 01 82 37 15 02 04 16 04 14 fd d1 31 4e d3 26 8a 95 e1 98 60 3b a8 31 6f a6 3c bc d8 2d .....7........1N.&....`;.1o.<..-
bef00 30 19 06 09 2b 06 01 04 01 82 37 14 02 04 0c 1e 0a 00 53 00 75 00 62 00 43 00 41 30 1f 06 03 55 0...+.....7.......S.u.b.C.A0...U
bef20 1d 23 04 18 30 16 80 14 0e ac 82 60 40 56 27 97 e5 25 13 fc 2a e1 0a 53 95 59 e4 a4 30 50 06 03 .#..0......`@V'..%..*..S.Y..0P..
bef40 55 1d 1f 04 49 30 47 30 45 a0 43 a0 41 86 3f 68 74 74 70 3a 2f 2f 63 72 6c 2e 6d 69 63 72 6f 73 U...I0G0E.C.A.?http://crl.micros
bef60 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 72 6c 2f 70 72 6f 64 75 63 74 73 2f 6d 69 63 72 6f 73 6f oft.com/pki/crl/products/microso
bef80 66 74 72 6f 6f 74 63 65 72 74 2e 63 72 6c 30 54 06 08 2b 06 01 05 05 07 01 01 04 48 30 46 30 44 ftrootcert.crl0T..+........H0F0D
befa0 06 08 2b 06 01 05 05 07 30 02 86 38 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 ..+.....0..8http://www.microsoft
befc0 2e 63 6f 6d 2f 70 6b 69 2f 63 65 72 74 73 2f 4d 69 63 72 6f 73 6f 66 74 52 6f 6f 74 43 65 72 74 .com/pki/certs/MicrosoftRootCert
befe0 2e 63 72 74 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 03 82 02 01 00 59 39 3e 7f 26 46 af eb .crt0...*.H.............Y9>.&F..
bf000 6f 40 b1 32 b5 6a eb 0e 2f 6e a8 49 f7 eb 5f 75 ed 4c 3b 2d d7 43 ad 0b fe cb e9 2d 31 a3 23 cc o@.2.j../n.I.._u.L;-.C.....-1.#.
bf020 7c 50 98 80 21 5d ac 3d 2f 4c ba a2 a8 56 9c e3 70 bb b8 b4 f8 79 b5 49 72 f7 3e ea 41 7f ca e1 |P..!].=/L...V..p....y.Ir.>.A...
bf040 0c 17 69 cb a5 9c 20 2d fa 0b 50 c4 56 cd 2d e3 4a d2 bc 70 e7 a8 0d a2 03 a5 56 e0 b8 8a 4b 57 ..i....-..P.V.-.J..p......V...KW
bf060 f2 95 42 9c f1 f3 ef ee e3 86 1f 34 3c b8 56 9a f0 53 23 85 2a a4 82 1c 93 e2 94 07 1d f2 e2 4e ..B........4<.V..S#.*..........N
bf080 f8 8c a1 ca e8 13 a5 91 4e c8 1b d2 8f 72 95 2a 71 6d 9b 1a f8 1c f0 53 d6 67 cc 22 ff 5c 1d cd ........N....r.*qm.....S.g.".\..
bf0a0 a2 8c bd 27 b2 79 63 56 44 a2 51 cd f9 e9 a3 58 56 dd 9b 02 45 44 2f 5f f4 da ae d4 82 32 6e fc ...'.ycVD.Q....XV...ED/_.....2n.
bf0c0 a4 95 13 e4 eb 69 e7 a9 a2 2c be c8 2b 10 0e 65 8e 99 db f5 a2 fa 12 26 09 65 38 94 f1 7a 1f 4a .....i...,..+..e.......&.e8..z.J
bf0e0 bb d1 e1 56 e8 d0 78 96 18 5c c9 35 16 5f dd 93 1d 49 8e 2d be ad 34 44 1c ee 10 15 1a 00 5d dd ...V..x..\.5._...I.-..4D......].
bf100 35 5b 21 ce 98 c7 09 ee 85 0e 8c 4f 6d 0e 13 4e 3d 7c 29 48 9c 72 d1 f3 6c ca c1 ec 70 a3 57 92 5[!........Om..N=|)H.r..l...p.W.
bf120 57 7d 94 8d a0 1b 48 03 5a f7 cf a3 67 0a 74 a5 36 ed 2d 2f 17 c8 e6 72 37 12 f4 6f b1 3c 67 82 W}....H.Z...g.t.6.-/...r7..o.<g.
bf140 f9 52 b2 8d 33 16 65 1e 0e 8a dd 10 de 64 f4 6f ce 46 d4 d3 17 e9 79 c4 04 b4 d3 fb 2c df 1f 8a .R..3.e......d.o.F....y.....,...
bf160 9e ac 0a fb 13 27 40 ad e4 f9 e1 a9 7f 46 bb 07 60 47 65 60 40 4e b0 42 ec 4e ed b3 76 79 d8 0a .....'@......F..`Ge`@N.B.N..vy..
bf180 34 09 6d 1c 80 31 1f e2 0e 54 dd e5 a1 fb e5 47 10 ad 64 98 ff 50 16 2e 7c bf 05 21 7a e2 95 41 4.m..1...T.....G..d..P..|..!z..A
bf1a0 27 69 c3 93 8f 95 c9 8d d8 9b 21 ae 0d 5c 9c f0 a2 ae 86 68 83 0c 6a 2d bb 76 6b 00 1d 96 ad f2 'i........!..\.....h..j-.vk.....
bf1c0 16 7b f6 16 83 24 b9 88 cf 6a a8 47 31 2f 9a dc e3 71 3d d7 00 7e 62 47 d1 ce 88 c9 b8 18 fa 0e .{...$...j.G1/...q=..~bG........
bf1e0 72 8d c1 a3 3d af 02 40 6a ff 69 9b 96 e2 10 a8 10 b4 37 50 08 d6 c3 3d 30 82 06 07 30 82 03 ef r...=..@j.i.......7P...=0...0...
bf200 a0 03 02 01 02 02 0a 61 16 68 34 00 00 00 00 00 1c 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 .......a.h4......0...*.H........
bf220 30 5f 31 13 30 11 06 0a 09 92 26 89 93 f2 2c 64 01 19 16 03 63 6f 6d 31 19 30 17 06 0a 09 92 26 0_1.0.....&...,d....com1.0.....&
bf240 89 93 f2 2c 64 01 19 16 09 6d 69 63 72 6f 73 6f 66 74 31 2d 30 2b 06 03 55 04 03 13 24 4d 69 63 ...,d....microsoft1-0+..U...$Mic
bf260 72 6f 73 6f 66 74 20 52 6f 6f 74 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 rosoft.Root.Certificate.Authorit
bf280 79 30 1e 17 0d 30 37 30 34 30 33 31 32 35 33 30 39 5a 17 0d 32 31 30 34 30 33 31 33 30 33 30 39 y0...070403125309Z..210403130309
bf2a0 5a 30 77 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 Z0w1.0...U....US1.0...U....Washi
bf2c0 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a ngton1.0...U....Redmond1.0...U..
bf2e0 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 21 30 1f 06 03 55 04 03 ..Microsoft.Corporation1!0...U..
bf300 13 18 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 50 43 41 30 82 01 22 30 0d ..Microsoft.Time-Stamp.PCA0.."0.
bf320 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 01 00 9f a1 6c b1 df ..*.H.............0..........l..
bf340 db 48 92 2a 7c 6b 2e 19 e1 bd e2 e3 c5 99 51 23 50 ad ce dd 18 4e 24 0f ee d1 a7 d1 4c ad 74 30 .H.*|k........Q#P....N$.....L.t0
bf360 20 11 eb 07 d5 54 95 15 49 94 1b 42 92 ae 98 5c 30 26 da 00 6b e8 7b bd ec 89 07 0f f7 0e 04 98 .....T..I..B...\0&..k.{.........
bf380 f0 89 cc 1f cb 33 24 87 9d f2 f4 67 1c 2c fc 7b e7 88 1d ea e7 4e a3 a1 c1 23 53 ca 8d fa 45 cf .....3$....g.,.{.....N...#S...E.
bf3a0 09 d0 5e af d0 b0 42 04 a2 f9 a6 6c 93 67 d7 28 dc 46 53 b0 86 d0 e5 28 46 2e 27 ac 86 4f 55 52 ..^...B....l.g.(.FS....(F.'..OUR
bf3c0 0c e4 03 2c fb 6a 90 90 30 6e 87 f3 59 30 9d fa 7e d6 97 b3 e8 21 97 7e f8 d2 13 f3 08 b7 53 6d ...,.j..0n..Y0..~....!.~......Sm
bf3e0 52 b4 45 90 9f 48 00 4a 47 66 11 27 29 66 a8 97 e4 d3 06 81 4a a2 f9 84 a7 11 47 14 09 82 9f 84 R.E..H.JGf.')f......J.....G.....
bf400 ed 55 78 fe 01 9a 1d 50 08 85 00 10 30 46 ed b7 de 23 46 bb c4 2d 54 9f af 1e 78 41 31 77 cc 9b .Ux....P....0F...#F..-T...xA1w..
bf420 df 3b 83 93 a1 61 02 b5 1d 0d b1 fc f7 9b b2 01 ce 22 4b 54 ff f9 05 c3 c2 20 0b 02 03 01 00 01 .;...a..........."KT............
bf440 a3 82 01 ab 30 82 01 a7 30 0f 06 03 55 1d 13 01 01 ff 04 05 30 03 01 01 ff 30 1d 06 03 55 1d 0e ....0...0...U.......0....0...U..
bf460 04 16 04 14 23 34 f8 d9 52 46 70 0a ed 40 fb 76 fb b3 2b b0 c3 35 b3 0f 30 0b 06 03 55 1d 0f 04 ....#4..RFp..@.v..+..5..0...U...
bf480 04 03 02 01 86 30 10 06 09 2b 06 01 04 01 82 37 15 01 04 03 02 01 00 30 81 98 06 03 55 1d 23 04 .....0...+.....7.......0....U.#.
bf4a0 81 90 30 81 8d 80 14 0e ac 82 60 40 56 27 97 e5 25 13 fc 2a e1 0a 53 95 59 e4 a4 a1 63 a4 61 30 ..0.......`@V'..%..*..S.Y...c.a0
bf4c0 5f 31 13 30 11 06 0a 09 92 26 89 93 f2 2c 64 01 19 16 03 63 6f 6d 31 19 30 17 06 0a 09 92 26 89 _1.0.....&...,d....com1.0.....&.
bf4e0 93 f2 2c 64 01 19 16 09 6d 69 63 72 6f 73 6f 66 74 31 2d 30 2b 06 03 55 04 03 13 24 4d 69 63 72 ..,d....microsoft1-0+..U...$Micr
bf500 6f 73 6f 66 74 20 52 6f 6f 74 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 osoft.Root.Certificate.Authority
bf520 82 10 79 ad 16 a1 4a a0 a5 ad 4c 73 58 f4 07 13 2e 65 30 50 06 03 55 1d 1f 04 49 30 47 30 45 a0 ..y...J...LsX....e0P..U...I0G0E.
bf540 43 a0 41 86 3f 68 74 74 70 3a 2f 2f 63 72 6c 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b C.A.?http://crl.microsoft.com/pk
bf560 69 2f 63 72 6c 2f 70 72 6f 64 75 63 74 73 2f 6d 69 63 72 6f 73 6f 66 74 72 6f 6f 74 63 65 72 74 i/crl/products/microsoftrootcert
bf580 2e 63 72 6c 30 54 06 08 2b 06 01 05 05 07 01 01 04 48 30 46 30 44 06 08 2b 06 01 05 05 07 30 02 .crl0T..+........H0F0D..+.....0.
bf5a0 86 38 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 .8http://www.microsoft.com/pki/c
bf5c0 65 72 74 73 2f 4d 69 63 72 6f 73 6f 66 74 52 6f 6f 74 43 65 72 74 2e 63 72 74 30 13 06 03 55 1d erts/MicrosoftRootCert.crt0...U.
bf5e0 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03 08 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 03 82 %..0...+.......0...*.H..........
bf600 02 01 00 10 97 8a c3 5c 03 44 36 dd e9 b4 ad 77 db ce 79 51 4d 01 b1 2e 74 71 5b 6d 0c 13 ab ce .......\.D6....w..yQM...tq[m....
bf620 be 7b 8f b8 2e d4 12 a2 8c 6d 62 b8 57 02 cb 4e 20 13 50 99 dd 7a 40 e2 57 bb af 58 9a 1c e1 1d .{.......mb.W..N..P..z@.W..X....
bf640 01 86 ac bb 78 f2 8b d0 ec 3b 01 ee e2 be 8f 0a 05 c8 8d 48 e2 f0 53 15 dd 4f ab 92 e4 e7 8d 6a ....x....;.........H..S..O.....j
bf660 d5 80 c1 e6 94 f2 06 2f 85 03 e9 91 2a 24 22 70 fb f6 fc e4 78 99 2e 0d f7 07 e2 70 bc 18 4e 9d ......./....*$"p....x......p..N.
bf680 8e 6b 0a 72 95 b8 a1 39 9c 67 2d c5 51 0e ea 62 5c 3f 16 98 8b 20 3f e2 07 1a 32 f9 cc 31 4a 76 .k.r...9.g-.Q..b\?....?...2..1Jv
bf6a0 31 3d 2b 72 0b c8 ea 70 3d ff 85 0a 13 df c2 0a 61 8e f0 d7 b8 17 eb 4e 8b 7f c5 35 2b 5e a3 bf 1=+r...p=.......a......N...5+^..
bf6c0 eb bc 7d 0b 42 7b d4 53 72 21 ee 30 ca bb 78 65 5c 5b 01 17 0a 14 0e d2 da 14 98 f5 3c b9 66 58 ..}.B{.Sr!.0..xe\[..........<.fX
bf6e0 b3 2d 2f e7 f9 85 86 cc 51 56 e8 9d 70 94 6c ac 39 4c d4 f6 79 bf aa 18 7a 62 29 ef a2 9b 29 34 .-/.....QV..p.l.9L..y...zb)...)4
bf700 06 77 1a 62 c9 3d 1e 6d 1f 82 f0 0b c7 2c bb cf 43 b3 e5 f9 ec 7d b5 e3 a4 a8 74 35 b8 4e c5 71 .w.b.=.m.....,..C....}....t5.N.q
bf720 23 12 26 76 0b 3c 52 8c 71 5a 46 43 14 bc b3 b3 b0 4d 67 c8 9f 42 ff 80 79 21 80 9e 15 30 66 e8 #.&v.<R.qZFC.....Mg..B..y!...0f.
bf740 42 12 5e 1a c8 9e 22 21 d0 43 e9 2b e9 bb f4 48 cc 2c d4 d8 32 80 4c 26 2a 48 24 5f 5a ea 56 ef B.^..."!.C.+...H.,..2.L&*H$_Z.V.
bf760 a6 de 99 9d ca 3a 6f bd 81 27 74 06 11 ee 76 21 bf 9b 82 c1 27 54 b6 b1 6a 3d 89 a1 76 61 b4 6e .....:o..'t...v!....'T..j=..va.n
bf780 a1 13 a6 bf aa 47 f0 12 6f fd 8a 32 6c b2 fe df 51 c8 8c 23 c9 66 bd 9d 1d 87 12 64 02 3d 2d af .....G..o..2l...Q..#.f.....d.=-.
bf7a0 59 8f b8 e4 21 e5 b5 b0 ca 63 b4 78 54 05 d4 41 2e 50 ac 94 b0 a5 78 ab b3 a0 96 75 1a d9 92 87 Y...!....c.xT..A.P....x....u....
bf7c0 13 75 22 2f 32 a8 08 6e a0 5b 8c 25 bf a0 ef 84 ca 21 d6 eb 1e 4f c9 9a ee 49 e0 f7 01 65 6f 89 .u"/2..n.[.%.....!...O...I...eo.
bf7e0 0b 7d c8 69 c8 e6 6e ea a7 97 ce 31 29 ff 0e c5 5b 5c d8 4d 1b a1 d8 fa 2f 9e 3f 2e 55 16 6b c9 .}.i..n....1)...[\.M..../.?.U.k.
bf800 13 a3 fd 31 82 28 d7 30 82 28 d3 02 01 01 30 81 90 30 79 31 0b 30 09 06 03 55 04 06 13 02 55 53 ...1.(.0.(....0..0y1.0...U....US
bf820 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 1.0...U....Washington1.0...U....
bf840 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 Redmond1.0...U....Microsoft.Corp
bf860 6f 72 61 74 69 6f 6e 31 23 30 21 06 03 55 04 03 13 1a 4d 69 63 72 6f 73 6f 66 74 20 43 6f 64 65 oration1#0!..U....Microsoft.Code
bf880 20 53 69 67 6e 69 6e 67 20 50 43 41 02 13 33 00 00 01 0a 2c 79 ae d7 79 7b a6 ac 00 01 00 00 01 .Signing.PCA..3....,y..y{.......
bf8a0 0a 30 09 06 05 2b 0e 03 02 1a 05 00 a0 81 c6 30 19 06 09 2a 86 48 86 f7 0d 01 09 03 31 0c 06 0a .0...+.........0...*.H......1...
bf8c0 2b 06 01 04 01 82 37 02 01 04 30 1c 06 0a 2b 06 01 04 01 82 37 02 01 0b 31 0e 30 0c 06 0a 2b 06 +.....7...0...+.....7...1.0...+.
bf8e0 01 04 01 82 37 02 01 15 30 23 06 09 2a 86 48 86 f7 0d 01 09 04 31 16 04 14 51 70 cc 51 7d dd 42 ....7...0#..*.H......1...Qp.Q}.B
bf900 23 04 4e 7a 84 78 92 f0 a7 7e 08 21 29 30 66 06 0a 2b 06 01 04 01 82 37 02 01 0c 31 58 30 56 a0 #.Nz.x...~.!)0f..+.....7...1X0V.
bf920 3c 80 3a 00 53 00 79 00 73 00 74 00 65 00 6d 00 2e 00 44 00 61 00 74 00 61 00 2e 00 45 00 6e 00 <.:.S.y.s.t.e.m...D.a.t.a...E.n.
bf940 74 00 69 00 74 00 79 00 2e 00 44 00 65 00 73 00 69 00 67 00 6e 00 2e 00 64 00 6c 00 6c a1 16 80 t.i.t.y...D.e.s.i.g.n...d.l.l...
bf960 14 68 74 74 70 3a 2f 2f 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 30 0d 06 09 2a 86 48 86 f7 0d 01 .http://microsoft.com0...*.H....
bf980 01 01 05 00 04 82 01 00 23 4b 26 05 3a ae ee 23 7c f8 55 f9 02 7b a5 67 c6 1d 87 51 1f 8a c9 7d ........#K&.:..#|.U..{.g...Q...}
bf9a0 30 e4 cc e0 e7 a3 38 fc d4 e0 fd e5 6a 77 35 7a 40 ac 14 5e e5 58 8c 5d 26 b4 c2 e5 d3 d6 d4 1e 0.....8.....jw5z@..^.X.]&.......
bf9c0 d6 2f f2 18 36 38 85 60 b1 ed d1 de 30 19 94 23 43 2e 66 c4 21 77 d7 8c 45 2b 05 38 e2 c3 da 4c ./..68.`....0..#C.f.!w..E+.8...L
bf9e0 4c c9 19 22 ff d1 c0 30 cd a0 66 58 b3 9a 4b 28 0a db eb 29 e4 a9 bc e7 93 8a fc bf bf 6a ea bb L.."...0..fX..K(...).........j..
bfa00 6c 50 49 1b e4 30 6a b2 78 3c 21 4e 27 2a e6 4d 5a df 86 a7 e2 70 8e 87 e8 10 37 99 ee ee df 58 lPI..0j.x<!N'*.MZ....p....7....X
bfa20 cf 1c 95 63 f3 d1 9d 8f 26 b6 94 4d 16 ea c8 d4 12 d4 23 d6 10 cb fe 06 38 bf fb 72 29 db 4c 84 ...c....&..M......#.....8..r).L.
bfa40 84 15 d5 6d 19 5a cf 9b cc d0 ef 22 8b 4a fe 65 a7 53 00 3e 65 9e d9 cb 87 1b a5 1c 8d a4 19 05 ...m.Z.....".J.e.S.>e...........
bfa60 6e da f4 1b 36 fb c1 79 a6 a2 3e 93 c1 dd 26 b7 f9 7e 5a aa cd 60 c5 99 c8 43 e9 1d 40 a5 a9 20 n...6..y..>...&..~Z..`...C..@...
bfa80 33 37 c0 1d 33 00 58 0a a1 82 26 52 30 82 02 24 06 09 2a 86 48 86 f7 0d 01 09 06 31 82 02 15 30 37..3.X...&R0..$..*.H......1...0
bfaa0 82 02 11 02 01 01 30 81 8e 30 77 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 ......0..0w1.0...U....US1.0...U.
bfac0 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 ...Washington1.0...U....Redmond1
bfae0 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 .0...U....Microsoft.Corporation1
bfb00 21 30 1f 06 03 55 04 03 13 18 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 50 !0...U....Microsoft.Time-Stamp.P
bfb20 43 41 02 13 33 00 00 00 8f d7 76 15 b9 cd 45 8a 74 00 00 00 00 00 8f 30 09 06 05 2b 0e 03 02 1a CA..3.....v...E.t......0...+....
bfb40 05 00 a0 5d 30 18 06 09 2a 86 48 86 f7 0d 01 09 03 31 0b 06 09 2a 86 48 86 f7 0d 01 07 01 30 1c ...]0...*.H......1...*.H......0.
bfb60 06 09 2a 86 48 86 f7 0d 01 09 05 31 0f 17 0d 31 35 31 31 30 36 30 34 32 34 33 31 5a 30 23 06 09 ..*.H......1...151106042431Z0#..
bfb80 2a 86 48 86 f7 0d 01 09 04 31 16 04 14 53 19 0d aa 8e 2e 37 7a a3 52 7a 64 e6 2a de ad 8b 95 c8 *.H......1...S.....7z.Rzd.*.....
bfba0 da 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 04 82 01 00 2b 0a c2 bc 11 f7 c0 e5 a9 f9 9e 10 .0...*.H............+...........
bfbc0 36 bf 55 81 5c 8a 70 72 02 17 ed d6 a9 ef 3a 93 31 a0 29 38 d4 f3 ea 7a 42 4f de 49 55 99 14 d7 6.U.\.pr......:.1.)8...zBO.IU...
bfbe0 e5 dc 4b e3 ea c2 57 fd 54 72 3a f9 8f a4 61 fc c6 20 d2 ca f5 66 2d 77 c4 d8 79 c0 49 e6 b5 1f ..K...W.Tr:...a......f-w..y.I...
bfc00 b8 00 65 31 63 dd 5d a8 ea 2b 26 5a 49 61 4b c6 9c a9 1f c8 52 64 f2 63 7b fe fb cc c9 65 11 f5 ..e1c.]..+&ZIaK.....Rd.c{....e..
bfc20 22 a1 8c 2a 5b 87 ee 39 26 12 83 c2 9e 3b 4d 82 dd 7f 3f ad 16 7a 66 e5 44 f4 f3 c9 ae 2f ac aa "..*[..9&....;M...?..zf.D..../..
bfc40 4d 50 3a 9f df 19 91 2e ff 28 10 f1 0f 35 ea cf 2f ad 2e ff a9 22 e9 f1 50 90 05 1a c6 0b 12 8d MP:......(...5../...."..P.......
bfc60 31 01 92 1a 9c 04 fe 13 ab 29 b8 30 2d 3a 3d 60 2b 81 db 07 cc 6e a2 40 b6 c9 08 e0 83 1b d9 6c 1........).0-:=`+....n.@.......l
bfc80 4a cf ee 70 c8 f8 8e 7f d0 59 82 de bc 37 34 5d 3e f7 43 b7 64 33 25 2a 6f 57 99 2a 0f 15 ef dc J..p.....Y...74]>.C.d3%*oW.*....
bfca0 e9 1d 7a 12 e8 bf 38 23 00 db 42 18 ed 9f 73 5b 26 2e 10 ed 30 82 24 26 06 0a 2b 06 01 04 01 82 ..z...8#..B...s[&...0.$&..+.....
bfcc0 37 02 04 01 31 82 24 16 30 82 24 12 06 09 2a 86 48 86 f7 0d 01 07 02 a0 82 24 03 30 82 23 ff 02 7...1.$.0.$...*.H........$.0.#..
bfce0 01 01 31 0f 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 30 5c 06 0a 2b 06 01 04 01 82 37 02 01 ..1.0...`.H.e......0\..+.....7..
bfd00 04 a0 4e 30 4c 30 17 06 0a 2b 06 01 04 01 82 37 02 01 0f 30 09 03 01 00 a0 04 a2 02 80 00 30 31 ..N0L0...+.....7...0..........01
bfd20 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 2f d7 65 ca 99 e5 4c 08 37 46 d8 ce 1d 78 7b 0...`.H.e......../.e...L.7F...x{
bfd40 27 2e fc 4d 5b c7 d0 6a 17 57 b6 6f 01 66 ef ac 79 a0 82 0d 92 30 82 06 10 30 82 03 f8 a0 03 02 '..M[..j.W.o.f..y....0...0......
bfd60 01 02 02 13 33 00 00 00 38 8d 23 6d 16 27 a3 26 e0 00 00 00 00 00 38 30 0d 06 09 2a 86 48 86 f7 ....3...8.#m.'.&......80...*.H..
bfd80 0d 01 01 0b 05 00 30 7e 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a ......0~1.0...U....US1.0...U....
bfda0 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c Washington1.0...U....Redmond1.0.
bfdc0 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 28 30 26 ..U....Microsoft.Corporation1(0&
bfde0 06 03 55 04 03 13 1f 4d 69 63 72 6f 73 6f 66 74 20 43 6f 64 65 20 53 69 67 6e 69 6e 67 20 50 43 ..U....Microsoft.Code.Signing.PC
bfe00 41 20 32 30 31 31 30 1e 17 0d 31 34 31 30 30 31 31 38 31 31 31 36 5a 17 0d 31 36 30 31 30 31 31 A.20110...141001181116Z..1601011
bfe20 38 31 31 31 36 5a 30 81 83 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 81116Z0..1.0...U....US1.0...U...
bfe40 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 .Washington1.0...U....Redmond1.0
bfe60 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 0d 30 ...U....Microsoft.Corporation1.0
bfe80 0b 06 03 55 04 0b 13 04 4d 4f 50 52 31 1e 30 1c 06 03 55 04 03 13 15 4d 69 63 72 6f 73 6f 66 74 ...U....MOPR1.0...U....Microsoft
bfea0 20 43 6f 72 70 6f 72 61 74 69 6f 6e 30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 .Corporation0.."0...*.H.........
bfec0 82 01 0f 00 30 82 01 0a 02 82 01 01 00 c2 de d6 cf e2 b7 7f 11 65 ff b3 63 a9 f3 72 b9 f1 24 eb ....0................e..c..r..$.
bfee0 5f a4 1c b2 44 59 eb 6f 9c fb 70 db 65 69 9a ab 90 31 5e ff de 2b 64 11 f5 ed 6c e9 00 21 82 c3 _...DY.o..p.ei...1^..+d...l..!..
bff00 90 cc 82 19 a3 e3 99 63 65 8a bd d3 d5 fb 20 a3 e0 19 7f b8 8d 3c 6a fe c8 12 8d e5 d3 39 ef 4d .......ce............<j......9.M
bff20 4e 3e 86 96 4c 11 b1 11 84 9b 27 98 88 3b 2d d4 7d 18 f3 05 e0 ad 4b 04 3e 43 75 19 e6 46 c4 8c N>..L.....'..;-.}.....K.>Cu..F..
bff40 9d db 89 d8 24 87 be f4 47 27 bf 6d 8d dc 78 b9 c3 65 a1 6f 37 ea bc 71 a6 9d ac 8e 8f 8d 88 91 ....$...G'.m..x..e.o7..q........
bff60 7e a8 37 25 d9 81 24 a9 88 f4 63 46 ea bb 20 c9 01 2f d8 8e 0c d9 d9 ed e0 36 fb 64 68 4d fc 42 ~.7%..$...cF...../.......6.dhM.B
bff80 2f 91 20 a9 08 9a 28 4a 47 a8 f0 fe d9 b2 7a fd d8 e8 38 01 bc 81 45 ab 3a e8 1a 2a dd 39 83 3f /.....(JG.....z...8...E.:..*.9.?
bffa0 07 db d8 e1 8f fc 39 2c 36 9e 01 9f ef 68 77 c8 78 6f 3e f8 20 ff 96 1a 10 be f1 aa d0 61 9e a8 ......9,6....hw.xo>..........a..
bffc0 9a 84 bf 3e ae af ca 0a 59 e5 8d 8b 05 02 03 01 00 01 a3 82 01 7f 30 82 01 7b 30 1f 06 03 55 1d ...>....Y.............0..{0...U.
bffe0 25 04 18 30 16 06 08 2b 06 01 05 05 07 03 03 06 0a 2b 06 01 04 01 82 37 4c 08 01 30 1d 06 03 55 %..0...+.........+.....7L..0...U
c0000 1d 0e 04 16 04 14 c6 f1 ca 18 12 0b 24 a5 45 f5 82 e4 75 25 d0 2f 30 d7 62 73 30 51 06 03 55 1d ............$.E...u%./0.bs0Q..U.
c0020 11 04 4a 30 48 a4 46 30 44 31 0d 30 0b 06 03 55 04 0b 13 04 4d 4f 50 52 31 33 30 31 06 03 55 04 ..J0H.F0D1.0...U....MOPR1301..U.
c0040 05 13 2a 33 31 36 34 32 2b 63 32 32 63 39 39 33 36 2d 62 33 63 37 2d 34 32 37 31 2d 61 34 62 64 ..*31642+c22c9936-b3c7-4271-a4bd
c0060 2d 66 65 30 33 66 61 37 32 63 33 66 30 30 1f 06 03 55 1d 23 04 18 30 16 80 14 48 6e 64 e5 50 05 -fe03fa72c3f00...U.#..0...Hnd.P.
c0080 d3 82 aa 17 37 37 22 b5 6d a8 ca 75 02 95 30 54 06 03 55 1d 1f 04 4d 30 4b 30 49 a0 47 a0 45 86 ....77".m..u..0T..U...M0K0I.G.E.
c00a0 43 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 6f 70 73 Chttp://www.microsoft.com/pkiops
c00c0 2f 63 72 6c 2f 4d 69 63 43 6f 64 53 69 67 50 43 41 32 30 31 31 5f 32 30 31 31 2d 30 37 2d 30 38 /crl/MicCodSigPCA2011_2011-07-08
c00e0 2e 63 72 6c 30 61 06 08 2b 06 01 05 05 07 01 01 04 55 30 53 30 51 06 08 2b 06 01 05 05 07 30 02 .crl0a..+........U0S0Q..+.....0.
c0100 86 45 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 6f 70 .Ehttp://www.microsoft.com/pkiop
c0120 73 2f 63 65 72 74 73 2f 4d 69 63 43 6f 64 53 69 67 50 43 41 32 30 31 31 5f 32 30 31 31 2d 30 37 s/certs/MicCodSigPCA2011_2011-07
c0140 2d 30 38 2e 63 72 74 30 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0d 06 09 2a 86 48 86 f7 0d 01 -08.crt0...U.......0.0...*.H....
c0160 01 0b 05 00 03 82 02 01 00 9e 72 6e a8 ba b6 35 1a 8d 84 b0 3a 95 37 e2 34 cd 7b ec cf 53 e4 ee ..........rn...5....:.7.4.{..S..
c0180 ab c6 18 31 16 33 7b 4f 22 fe 93 75 56 47 4d 74 6b 99 87 5c 2e 74 88 70 a5 46 6f b4 9c 1b 98 59 ...1.3{O"..uVGMtk..\.t.p.Fo....Y
c01a0 12 4d 34 be d0 dc 75 b3 5d 0c 33 d6 d8 05 f6 35 1b 7e 89 48 c1 e5 89 a5 2d 3a 37 27 47 1e ee 68 .M4...u.].3....5.~.H....-:7'G..h
c01c0 d3 68 5a 46 a2 ac 85 fb ff d0 e8 e8 d5 60 55 e7 44 6b 4d cf bd de a5 dc bb d5 7a 8b d3 e3 48 c7 .hZF.........`U.DkM.......z...H.
c01e0 46 7b 75 98 73 f9 c3 c8 ec 88 10 0b f7 2a 2d 13 78 12 8f fe 6b a8 98 5e 1c 49 ce 3a a6 34 96 62 F{u.s........*-.x...k..^.I.:.4.b
c0200 db ee e6 e3 0c d9 1b 63 c7 fa 18 61 ec b9 00 08 ab e4 cc 7c 12 a5 b6 a6 bd 65 60 0e 1d 33 59 38 .......c...a.......|.....e`..3Y8
c0220 df 16 e1 32 5c 7e d0 7b 12 07 81 b4 7e b8 a9 5d db 44 ff 66 4c 9e 40 26 a9 4c fe 4e 89 3f 96 d1 ...2\~.{....~..].D.fL.@&.L.N.?..
c0240 6c c5 d8 ae cb 26 66 e1 bf 65 e3 f7 bb 63 fa a8 6d 29 2a 1d 27 ca 4e 27 ca b6 f1 4c ea e6 a7 6d l....&f..e...c..m)*.'.N'...L...m
c0260 0a b0 91 2e c3 84 7d 72 80 b1 f8 3e 0e 60 d9 cc bb 1b 80 90 4f 8b 11 88 5e 77 08 bb e3 8a ab 7f ......}r...>.`......O...^w......
c0280 6f 09 3e 2b ac 67 c1 47 ed b2 a8 5d 7a 3c b0 05 f5 60 8a d5 46 f0 56 5c f2 a7 2b b0 2e 11 16 af o.>+.g.G...]z<...`..F.V\..+.....
c02a0 e2 91 d2 df 28 ad e6 d5 95 3f f8 b8 f5 6b ff 02 e7 b9 db cd bc fd b3 40 c0 71 ae 46 9d 8c 6e e4 ....(....?...k.........@.q.F..n.
c02c0 f6 05 5d ec ee 00 27 83 c8 46 7b e6 c2 3a e1 ef 1c bb f7 a1 37 46 e5 86 ab 97 ae 75 7a 76 ee 9e ..]...'..F{..:......7F.....uzv..
c02e0 4b 3b 06 ca 1f a8 5c ac 8d 15 39 21 e6 bd e1 c2 77 99 a1 f7 24 f1 d9 38 1e 4c 0b f9 ee ff 91 6d K;....\...9!....w...$..8.L.....m
c0300 b4 8a 4a 17 88 28 63 d8 50 63 5c e7 aa fb 55 8b c4 41 83 37 03 40 01 70 63 9f b8 b0 f9 68 47 5f ..J..(c.Pc\...U..A.7.@.pc....hG_
c0320 a2 72 8b 09 53 0e 3f bb 8d 42 a0 13 39 4b c2 41 83 2f 30 f8 5b 26 f8 1f b9 2d 4e 79 0c bb ec 7a .r..S.?..B..9K.A./0.[&...-Ny...z
c0340 5d 9f 37 6a d9 48 ad 76 9d 2f e9 be 6c 36 58 1a d5 92 fc ec df f3 b1 5e 32 14 a9 13 13 f5 29 93 ].7j.H.v./..l6X........^2.....).
c0360 f5 c9 38 16 d7 35 e7 6b 38 30 82 07 7a 30 82 05 62 a0 03 02 01 02 02 0a 61 0e 90 d2 00 00 00 00 ..8..5.k80..z0..b.......a.......
c0380 00 03 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 81 88 31 0b 30 09 06 03 55 04 06 13 02 55 ..0...*.H........0..1.0...U....U
c03a0 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 S1.0...U....Washington1.0...U...
c03c0 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 .Redmond1.0...U....Microsoft.Cor
c03e0 70 6f 72 61 74 69 6f 6e 31 32 30 30 06 03 55 04 03 13 29 4d 69 63 72 6f 73 6f 66 74 20 52 6f 6f poration1200..U...)Microsoft.Roo
c0400 74 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 32 30 31 31 30 1e 17 0d t.Certificate.Authority.20110...
c0420 31 31 30 37 30 38 32 30 35 39 30 39 5a 17 0d 32 36 30 37 30 38 32 31 30 39 30 39 5a 30 7e 31 0b 110708205909Z..260708210909Z0~1.
c0440 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 0...U....US1.0...U....Washington
c0460 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 1.0...U....Redmond1.0...U....Mic
c0480 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 28 30 26 06 03 55 04 03 13 1f 4d 69 63 rosoft.Corporation1(0&..U....Mic
c04a0 72 6f 73 6f 66 74 20 43 6f 64 65 20 53 69 67 6e 69 6e 67 20 50 43 41 20 32 30 31 31 30 82 02 22 rosoft.Code.Signing.PCA.20110.."
c04c0 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 02 0f 00 30 82 02 0a 02 82 02 01 00 ab f0 fa 0...*.H.............0...........
c04e0 72 10 1c 2e ad d8 6e aa 82 10 4d 34 ba f2 b6 58 21 9f 42 1b 2a 6b e9 5a 50 aa b8 06 38 1a 04 49 r.....n...M4...X!.B.*k.ZP...8..I
c0500 ba 7f c3 0c 1e dd 37 6b c6 12 d8 0b f0 38 c2 99 06 b0 c8 39 d5 01 14 31 42 d3 89 0d 79 64 87 7e ......7k.....8.....9...1B...yd.~
c0520 94 60 24 6c af 9e 49 9c e9 68 5e d2 df 9b 53 b2 0a 2c c3 af d9 a9 2b ae 7a 09 af d7 96 59 ca 60 .`$l..I..h^...S..,....+.z....Y.`
c0540 1a 05 e9 66 76 e8 32 52 26 12 2f e7 ab 08 50 cf b3 44 b7 5d d8 c4 2e 03 75 ab 68 f3 cb 6d f3 3a ...fv.2R&./...P..D.]....u.h..m.:
c0560 5c a1 16 f4 46 ba e0 38 64 ac 6e 64 35 78 a6 a0 63 0f 2d d3 40 93 f8 e3 de 07 0d d5 5c 79 a5 49 \...F..8d.nd5x..c.-.@.......\y.I
c0580 29 e7 0d be a0 13 77 be 94 3d ef fb e3 2b 5a 10 1f 4d 56 28 a2 7a 72 e0 12 3a b7 49 5e d8 ed ed ).....w..=...+Z..MV(.zr..:.I^...
c05a0 43 91 83 d9 7b b2 7b 86 1b d9 3e b1 8c 5d e8 89 4f 84 1a f2 a1 2f 59 e4 90 3b 2d ae 33 58 c5 b7 C...{.{...>..]..O..../Y..;-.3X..
c05c0 3e fe 32 d3 b3 03 3d b1 b2 af 92 38 7e d2 9d 80 2c f5 4e 56 91 21 35 25 c3 39 6e 64 7f 53 ba 9c >.2...=....8~...,.NV.!5%.9nd.S..
c05e0 0f ad 19 23 84 cb f4 ba 03 86 8d f7 5f f0 d0 52 bf 8c 94 87 bc c0 21 74 25 5f 18 28 b6 cc 27 28 ...#........_..R......!t%_.(..'(
c0600 38 25 98 39 4a 36 cf 7c b1 92 ae 1c 23 a7 a9 66 ec 61 1f 6a e1 28 49 9d 5f 88 e2 25 5d d3 21 4b 8%.9J6.|....#..f.a.j.(I._..%].!K
c0620 3e 52 c4 b5 57 3f 24 03 f0 d1 7a 5b 2f d5 23 e3 70 5d 0f 51 46 77 b3 f8 00 e1 bc ac 02 82 5f db >R..W?$...z[/.#.p].QFw........_.
c0640 c0 15 b3 bd 1b d4 55 4b e7 39 a1 0f e9 23 49 bc 18 b8 44 7c 45 e4 c1 c3 72 7a e0 72 e7 24 df bf ......UK.9...#I...D|E...rz.r.$..
c0660 46 99 c5 ef c2 1c 57 db 83 8d ec 4d 49 30 a7 ab 8e df ec 5b 9f af fc dd b0 66 e2 c1 97 81 7b ed F.....W....MI0.....[.....f....{.
c0680 d6 ed 4b e7 49 29 a7 13 28 a6 a7 7d 67 80 e6 8a 62 78 5f b2 2f 84 d7 57 9c 5c bf 77 28 28 f1 ed ..K.I)..(..}g...bx_./..W.\.w((..
c06a0 6d c3 28 8f 2c 8f 40 37 4f c1 e1 85 44 89 c4 09 4c c5 d4 a5 43 2f 74 95 f7 6e f8 78 20 58 2c 13 m.(.,.@7O...D...L...C/t..n.x.X,.
c06c0 5d 60 95 9a 3e 4f 33 84 da b0 88 17 de 9e 4e f4 96 b0 bc 46 a0 6c 98 d2 e0 d6 88 8c 0b 02 03 01 ]`..>O3.......N....F.l..........
c06e0 00 01 a3 82 01 ed 30 82 01 e9 30 10 06 09 2b 06 01 04 01 82 37 15 01 04 03 02 01 00 30 1d 06 03 ......0...0...+.....7.......0...
c0700 55 1d 0e 04 16 04 14 48 6e 64 e5 50 05 d3 82 aa 17 37 37 22 b5 6d a8 ca 75 02 95 30 19 06 09 2b U......Hnd.P.....77".m..u..0...+
c0720 06 01 04 01 82 37 14 02 04 0c 1e 0a 00 53 00 75 00 62 00 43 00 41 30 0b 06 03 55 1d 0f 04 04 03 .....7.......S.u.b.C.A0...U.....
c0740 02 01 86 30 0f 06 03 55 1d 13 01 01 ff 04 05 30 03 01 01 ff 30 1f 06 03 55 1d 23 04 18 30 16 80 ...0...U.......0....0...U.#..0..
c0760 14 72 2d 3a 02 31 90 43 b9 14 05 4e e1 ea a7 c7 31 d1 23 89 34 30 5a 06 03 55 1d 1f 04 53 30 51 .r-:.1.C...N....1.#.40Z..U...S0Q
c0780 30 4f a0 4d a0 4b 86 49 68 74 74 70 3a 2f 2f 63 72 6c 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 0O.M.K.Ihttp://crl.microsoft.com
c07a0 2f 70 6b 69 2f 63 72 6c 2f 70 72 6f 64 75 63 74 73 2f 4d 69 63 52 6f 6f 43 65 72 41 75 74 32 30 /pki/crl/products/MicRooCerAut20
c07c0 31 31 5f 32 30 31 31 5f 30 33 5f 32 32 2e 63 72 6c 30 5e 06 08 2b 06 01 05 05 07 01 01 04 52 30 11_2011_03_22.crl0^..+........R0
c07e0 50 30 4e 06 08 2b 06 01 05 05 07 30 02 86 42 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 P0N..+.....0..Bhttp://www.micros
c0800 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 65 72 74 73 2f 4d 69 63 52 6f 6f 43 65 72 41 75 74 32 30 oft.com/pki/certs/MicRooCerAut20
c0820 31 31 5f 32 30 31 31 5f 30 33 5f 32 32 2e 63 72 74 30 81 9f 06 03 55 1d 20 04 81 97 30 81 94 30 11_2011_03_22.crt0....U.....0..0
c0840 81 91 06 09 2b 06 01 04 01 82 37 2e 03 30 81 83 30 3f 06 08 2b 06 01 05 05 07 02 01 16 33 68 74 ....+.....7..0..0?..+........3ht
c0860 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 6f 70 73 2f 64 6f tp://www.microsoft.com/pkiops/do
c0880 63 73 2f 70 72 69 6d 61 72 79 63 70 73 2e 68 74 6d 30 40 06 08 2b 06 01 05 05 07 02 02 30 34 1e cs/primarycps.htm0@..+.......04.
c08a0 32 20 1d 00 4c 00 65 00 67 00 61 00 6c 00 5f 00 70 00 6f 00 6c 00 69 00 63 00 79 00 5f 00 73 00 2...L.e.g.a.l._.p.o.l.i.c.y._.s.
c08c0 74 00 61 00 74 00 65 00 6d 00 65 00 6e 00 74 00 2e 20 1d 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b t.a.t.e.m.e.n.t....0...*.H......
c08e0 05 00 03 82 02 01 00 67 f2 86 a5 98 e0 54 79 1a 2e d3 d8 74 67 22 9b 0b 96 11 e1 63 92 99 42 96 .......g.....Ty....tg".....c..B.
c0900 7d d2 79 0c 90 c1 65 5f 2e 2c 3e f8 c3 72 d1 6d 83 fe be 3f e8 0a ca 3b bf 47 a9 a3 f3 69 db 63 }.y...e_.,>..r.m...?...;.G...i.c
c0920 bf 22 35 a5 97 5d 65 84 90 7d 8b 46 50 55 d8 0c 92 7c d2 1a 4b 1c f3 3c 42 8b 52 d0 b0 fd 6b e3 ."5..]e..}.FPU...|..K..<B.R...k.
c0940 3e 07 2e 29 9b e6 3d 1b a5 d4 b5 1d 77 94 39 e2 e9 64 c9 44 3d 78 7a 23 f3 13 7d a6 90 74 83 8d >..)..=.....w.9..d.D=xz#..}..t..
c0960 f4 cb 26 02 46 2a c2 8a 10 bb a4 a9 05 0c 9b ed 68 fa 68 2e 95 a0 2a 3f 2a 6b 58 49 63 1f 09 69 ..&.F*..........h.h...*?*kXIc..i
c0980 6e 5a 98 96 e4 83 f4 c0 8f f3 46 2b de fc 3b d0 bd 35 ef 6e 25 ae e5 af 27 ed d0 dd f3 0e af 99 nZ........F+..;..5.n%...'.......
c09a0 28 97 98 4d 0e 3d 0b f2 08 89 d6 1f c3 32 18 e2 f0 c5 2d ce 5b 9e b4 49 39 0a c6 0a c2 c6 ad ae (..M.=.......2....-.[..I9.......
c09c0 e5 b2 d9 db 15 88 51 45 58 38 32 71 27 1a 7f b1 f4 27 f8 de 2c 3a 20 69 98 b2 59 89 68 6e 6f a7 ......QEX82q'....'..,:.i..Y.hno.
c09e0 b7 74 c3 40 05 06 a6 01 2a 28 3e 82 3f 13 4d 66 0b c0 b3 4d f5 e1 8f 7f 1c 6f 15 7d 45 a7 76 e5 .t.@....*(>.?.Mf...M.....o.}E.v.
c0a00 40 2a 65 a3 c3 5d 52 62 86 c3 1d 63 36 97 86 df da f3 f8 f2 16 a1 9a 27 e1 cd a5 97 d0 ee 5d 63 @*e..]Rb...c6..........'......]c
c0a20 41 e3 5b 07 9c 87 3e 06 77 06 d1 06 b1 75 1f 14 be 61 61 b5 f0 dc c6 1b 04 be df 41 c7 0e 28 ee A.[...>.w....u...aa........A..(.
c0a40 de 65 2f ec 97 f6 a1 5c 96 d8 00 d6 a1 46 bd 59 f3 97 a5 09 4b 48 10 99 80 1f d0 00 29 c5 b1 9b .e/....\.....F.Y....KH......)...
c0a60 a5 3f 45 77 1e 35 c6 d2 a2 a2 9f 7a 7a 22 fa 48 95 1f ab fb 47 23 80 f5 9e f8 bf 6b b7 4b 97 e2 .?Ew.5.....zz".H....G#.....k.K..
c0a80 eb 75 78 1a ec ea 37 99 79 18 4b ff d6 b3 23 68 75 e6 af fa fc 8b eb 0b 80 ea 69 3b af fc 30 ed .ux...7.y.K...#hu.........i;..0.
c0aa0 04 4c 8e df df 75 6d 63 91 3d d1 9d 56 4e 4f bf 80 57 22 a1 78 11 32 21 7a ef 41 0a b1 3f fb a8 .L...umc.=..VNO..W".x.2!z.A..?..
c0ac0 cc a4 5d c1 a1 88 9b 57 71 56 4e 48 45 c0 42 c9 9b 76 5b 0a 80 48 6b fd 79 9f c1 bd 6d 6d 6a c9 ..]....WqVNHE.B..v[..Hk.y...mmj.
c0ae0 52 73 13 0d 7a 50 cd 31 82 15 f3 30 82 15 ef 02 01 01 30 81 95 30 7e 31 0b 30 09 06 03 55 04 06 Rs..zP.1...0......0..0~1.0...U..
c0b00 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 ..US1.0...U....Washington1.0...U
c0b20 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 ....Redmond1.0...U....Microsoft.
c0b40 43 6f 72 70 6f 72 61 74 69 6f 6e 31 28 30 26 06 03 55 04 03 13 1f 4d 69 63 72 6f 73 6f 66 74 20 Corporation1(0&..U....Microsoft.
c0b60 43 6f 64 65 20 53 69 67 6e 69 6e 67 20 50 43 41 20 32 30 31 31 02 13 33 00 00 00 38 8d 23 6d 16 Code.Signing.PCA.2011..3...8.#m.
c0b80 27 a3 26 e0 00 00 00 00 00 38 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 a0 81 e5 30 11 06 0a '.&......80...`.H.e.........0...
c0ba0 2a 86 48 86 f7 0d 01 09 19 04 31 03 02 01 01 30 19 06 09 2a 86 48 86 f7 0d 01 09 03 31 0c 06 0a *.H.......1....0...*.H......1...
c0bc0 2b 06 01 04 01 82 37 02 01 04 30 1c 06 0a 2b 06 01 04 01 82 37 02 01 0b 31 0e 30 0c 06 0a 2b 06 +.....7...0...+.....7...1.0...+.
c0be0 01 04 01 82 37 02 01 15 30 2f 06 09 2a 86 48 86 f7 0d 01 09 04 31 22 04 20 b3 94 b2 67 49 4b be ....7...0/..*.H......1".....gIK.
c0c00 ea e6 de bb 48 c6 fd 48 da d1 f1 fc 07 8f d7 b1 34 70 45 37 12 26 09 b0 a5 30 66 06 0a 2b 06 01 ....H..H........4pE7.&...0f..+..
c0c20 04 01 82 37 02 01 0c 31 58 30 56 a0 3c 80 3a 00 53 00 79 00 73 00 74 00 65 00 6d 00 2e 00 44 00 ...7...1X0V.<.:.S.y.s.t.e.m...D.
c0c40 61 00 74 00 61 00 2e 00 45 00 6e 00 74 00 69 00 74 00 79 00 2e 00 44 00 65 00 73 00 69 00 67 00 a.t.a...E.n.t.i.t.y...D.e.s.i.g.
c0c60 6e 00 2e 00 64 00 6c 00 6c a1 16 80 14 68 74 74 70 3a 2f 2f 6d 69 63 72 6f 73 6f 66 74 2e 63 6f n...d.l.l....http://microsoft.co
c0c80 6d 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 04 82 01 00 24 41 8f 83 58 f1 ec 02 d3 a7 c2 00 m0...*.H............$A..X.......
c0ca0 1d ff 5f c1 45 2d 4f 15 ce 9e bc e2 15 f1 81 55 6e ea d8 8c 78 3a c8 7f 95 27 dd e6 be 77 e7 bd .._.E-O........Un...x:...'...w..
c0cc0 25 02 7e d3 f5 68 e3 71 f3 24 c3 1b 99 9b 76 61 f4 34 a7 c6 5d 22 d9 13 17 4e 05 f7 b9 84 60 56 %.~..h.q.$....va.4..]"...N....`V
c0ce0 eb af 6a a1 9c 68 bd d7 e2 f6 4f 57 c2 0d fa f2 af 26 23 b7 00 76 9e f5 c4 70 99 d0 ad 96 bf 2b ..j..h....OW.....&#..v...p.....+
c0d00 c7 3e a1 b5 ed 5b 16 b6 d4 90 94 90 75 71 87 02 09 88 f1 1f 0f 7d b0 d2 28 7c 6a d6 d5 5d ff 5b .>...[......uq.......}..(|j..].[
c0d20 bd 8e e3 ed e2 6e ef fb 0e e9 ad 5f 36 03 cb c4 22 fc 28 5c dc 63 cf 05 c9 34 e3 e1 e7 fb 04 42 .....n....._6...".(\.c...4.....B
c0d40 66 3a c2 69 39 e4 a3 63 41 48 00 fc e4 8c a4 86 ca 42 72 b3 77 29 8d d5 32 54 e2 e4 a1 5b 7d ff f:.i9..cAH.......Br.w)..2T...[}.
c0d60 19 12 0f 17 c4 bc 62 d6 b4 ab d1 88 f9 bf c1 7e a8 f4 bb 74 ab 9b b9 45 f0 f0 48 4d f2 29 94 89 ......b........~...t...E..HM.)..
c0d80 4b 45 dc 53 c7 d2 52 46 0d c0 a8 21 36 b5 ff 48 1d b2 24 b3 a1 82 13 46 30 82 13 42 06 0a 2b 06 KE.S..RF...!6..H..$....F0..B..+.
c0da0 01 04 01 82 37 03 03 01 31 82 13 32 30 82 13 2e 06 09 2a 86 48 86 f7 0d 01 07 02 a0 82 13 1f 30 ....7...1..20.....*.H..........0
c0dc0 82 13 1b 02 01 03 31 0f 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 30 82 01 3a 06 0b 2a 86 48 ......1.0...`.H.e......0..:..*.H
c0de0 86 f7 0d 01 09 10 01 04 a0 82 01 29 04 82 01 25 30 82 01 21 02 01 01 06 0a 2b 06 01 04 01 84 59 ...........)...%0..!.....+.....Y
c0e00 0a 03 01 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 b6 8e 68 c0 ab 05 71 d9 34 0b ...010...`.H.e..........h...q.4.
c0e20 9b f1 0f fc f5 7d 12 49 7e 04 d7 af fe 58 18 b5 5c bd 8a a5 6a 84 02 06 56 2a 3e dd b6 fd 18 13 .....}.I~....X..\...j...V*>.....
c0e40 32 30 31 35 31 31 30 36 30 34 32 34 33 32 2e 31 37 31 5a 30 04 80 02 01 f4 a0 81 b9 a4 81 b6 30 20151106042432.171Z0...........0
c0e60 81 b3 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e ..1.0...U....US1.0...U....Washin
c0e80 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 gton1.0...U....Redmond1.0...U...
c0ea0 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 0d 30 0b 06 03 55 04 0b 13 .Microsoft.Corporation1.0...U...
c0ec0 04 4d 4f 50 52 31 27 30 25 06 03 55 04 0b 13 1e 6e 43 69 70 68 65 72 20 44 53 45 20 45 53 4e 3a .MOPR1'0%..U....nCipher.DSE.ESN:
c0ee0 31 34 38 43 2d 43 34 42 39 2d 32 30 36 36 31 25 30 23 06 03 55 04 03 13 1c 4d 69 63 72 6f 73 6f 148C-C4B9-20661%0#..U....Microso
c0f00 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 53 65 72 76 69 63 65 a0 82 0e cc 30 82 06 71 30 82 04 ft.Time-Stamp.Service....0..q0..
c0f20 59 a0 03 02 01 02 02 0a 61 09 81 2a 00 00 00 00 00 02 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 Y.......a..*......0...*.H.......
c0f40 00 30 81 88 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 .0..1.0...U....US1.0...U....Wash
c0f60 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 ington1.0...U....Redmond1.0...U.
c0f80 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 32 30 30 06 03 55 04 ...Microsoft.Corporation1200..U.
c0fa0 03 13 29 4d 69 63 72 6f 73 6f 66 74 20 52 6f 6f 74 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 ..)Microsoft.Root.Certificate.Au
c0fc0 74 68 6f 72 69 74 79 20 32 30 31 30 30 1e 17 0d 31 30 30 37 30 31 32 31 33 36 35 35 5a 17 0d 32 thority.20100...100701213655Z..2
c0fe0 35 30 37 30 31 32 31 34 36 35 35 5a 30 7c 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 50701214655Z0|1.0...U....US1.0..
c1000 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f .U....Washington1.0...U....Redmo
c1020 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 nd1.0...U....Microsoft.Corporati
c1040 6f 6e 31 26 30 24 06 03 55 04 03 13 1d 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d on1&0$..U....Microsoft.Time-Stam
c1060 70 20 50 43 41 20 32 30 31 30 30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 p.PCA.20100.."0...*.H...........
c1080 0f 00 30 82 01 0a 02 82 01 01 00 a9 1d 0d bc 77 11 8a 3a 20 ec fc 13 97 f5 fa 7f 69 94 6b 74 54 ..0............w..:........i.ktT
c10a0 10 d5 a5 0a 00 82 85 fb ed 7c 68 4b 2c 5f c5 c3 e5 61 c2 76 b7 3e 66 2b 5b f0 15 53 27 04 31 1f .........|hK,_...a.v.>f+[..S'.1.
c10c0 41 1b 1a 95 1d ce 09 13 8e 7c 61 30 59 b1 30 44 0f f1 60 88 84 54 43 0c d7 4d b8 38 08 b3 42 dd A........|a0Y.0D..`..TC..M.8..B.
c10e0 93 ac d6 73 30 57 26 82 a3 45 0d d0 ea f5 47 81 cd bf 24 60 32 58 60 46 f2 58 47 86 32 84 1e 74 ...s0W&..E....G...$`2X`F.XG.2..t
c1100 61 67 91 5f 81 54 b1 cf 93 4c 92 c1 c4 a6 5d d1 61 13 6e 28 c6 1a f9 86 80 bb df 61 fc 46 c1 27 ag._.T...L....].a.n(.......a.F.'
c1120 1d 24 67 12 72 1a 21 8a af 4b 64 89 50 62 b1 5d fd 77 1f 3d f0 57 75 ac bd 8a 42 4d 40 51 d1 0f .$g.r.!..Kd.Pb.].w.=.Wu...BM@Q..
c1140 9c 06 3e 67 7f f5 66 c0 03 96 44 7e ef d0 4b fd 6e e5 9a ca b1 a8 f2 7a 2a 0a 31 f0 da 4e 06 91 ..>g..f...D~..K.n......z*.1..N..
c1160 b6 88 08 35 e8 78 1c b0 e9 99 cd 3c e7 2f 44 ba a7 f4 dc 64 bd a4 01 c1 20 09 93 78 cd fc bc c0 ...5.x.....<./D....d.......x....
c1180 c9 44 5d 5e 16 9c 01 05 4f 22 4d 02 03 01 00 01 a3 82 01 e6 30 82 01 e2 30 10 06 09 2b 06 01 04 .D]^....O"M.........0...0...+...
c11a0 01 82 37 15 01 04 03 02 01 00 30 1d 06 03 55 1d 0e 04 16 04 14 d5 63 3a 5c 8a 31 90 f3 43 7b 7c ..7.......0...U.......c:\.1..C{|
c11c0 46 1b c5 33 68 5a 85 6d 55 30 19 06 09 2b 06 01 04 01 82 37 14 02 04 0c 1e 0a 00 53 00 75 00 62 F..3hZ.mU0...+.....7.......S.u.b
c11e0 00 43 00 41 30 0b 06 03 55 1d 0f 04 04 03 02 01 86 30 0f 06 03 55 1d 13 01 01 ff 04 05 30 03 01 .C.A0...U........0...U.......0..
c1200 01 ff 30 1f 06 03 55 1d 23 04 18 30 16 80 14 d5 f6 56 cb 8f e8 a2 5c 62 68 d1 3d 94 90 5b d7 ce ..0...U.#..0.....V....\bh.=..[..
c1220 9a 18 c4 30 56 06 03 55 1d 1f 04 4f 30 4d 30 4b a0 49 a0 47 86 45 68 74 74 70 3a 2f 2f 63 72 6c ...0V..U...O0M0K.I.G.Ehttp://crl
c1240 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 72 6c 2f 70 72 6f 64 75 63 74 73 2f .microsoft.com/pki/crl/products/
c1260 4d 69 63 52 6f 6f 43 65 72 41 75 74 5f 32 30 31 30 2d 30 36 2d 32 33 2e 63 72 6c 30 5a 06 08 2b MicRooCerAut_2010-06-23.crl0Z..+
c1280 06 01 05 05 07 01 01 04 4e 30 4c 30 4a 06 08 2b 06 01 05 05 07 30 02 86 3e 68 74 74 70 3a 2f 2f ........N0L0J..+.....0..>http://
c12a0 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 65 72 74 73 2f 4d 69 63 52 www.microsoft.com/pki/certs/MicR
c12c0 6f 6f 43 65 72 41 75 74 5f 32 30 31 30 2d 30 36 2d 32 33 2e 63 72 74 30 81 a0 06 03 55 1d 20 01 ooCerAut_2010-06-23.crt0....U...
c12e0 01 ff 04 81 95 30 81 92 30 81 8f 06 09 2b 06 01 04 01 82 37 2e 03 30 81 81 30 3d 06 08 2b 06 01 .....0..0....+.....7..0..0=..+..
c1300 05 05 07 02 01 16 31 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f ......1http://www.microsoft.com/
c1320 50 4b 49 2f 64 6f 63 73 2f 43 50 53 2f 64 65 66 61 75 6c 74 2e 68 74 6d 30 40 06 08 2b 06 01 05 PKI/docs/CPS/default.htm0@..+...
c1340 05 07 02 02 30 34 1e 32 20 1d 00 4c 00 65 00 67 00 61 00 6c 00 5f 00 50 00 6f 00 6c 00 69 00 63 ....04.2...L.e.g.a.l._.P.o.l.i.c
c1360 00 79 00 5f 00 53 00 74 00 61 00 74 00 65 00 6d 00 65 00 6e 00 74 00 2e 20 1d 30 0d 06 09 2a 86 .y._.S.t.a.t.e.m.e.n.t....0...*.
c1380 48 86 f7 0d 01 01 0b 05 00 03 82 02 01 00 07 e6 88 51 0d e2 c6 e0 98 3f 81 71 03 3d 9d a3 a1 21 H................Q.....?.q.=...!
c13a0 6f b3 eb a6 cc f5 31 be cf 05 e2 a9 fe fa 57 6d 19 30 b3 c2 c5 66 c9 6a df f5 e7 f0 78 bd c7 a8 o.....1.......Wm.0...f.j....x...
c13c0 9e 25 e3 f9 bc ed 6b 54 57 08 2b 51 82 44 12 fb b9 53 8c cc f4 60 12 8a 76 cc 40 40 41 9b dc 5c .%....kTW.+Q.D...S...`..v.@@A..\
c13e0 17 ff 5c f9 5e 17 35 98 24 56 4b 74 ef 42 10 c8 af bf 7f c6 7f f2 37 7d 5a 3f 1c f2 99 79 4a 91 ..\.^.5.$VKt.B........7}Z?...yJ.
c1400 52 00 af 38 0f 17 f5 2f 79 81 65 d9 a9 b5 6b e4 c7 ce f6 ca 7a 00 6f 4b 30 44 24 22 3c cf ed 03 R..8.../y.e...k.....z.oK0D$"<...
c1420 a5 96 8f 59 29 bc b6 fd 04 e1 70 9f 32 4a 27 fd 55 af 2f fe b6 e5 8e 33 bb 62 5f 9a db 57 40 e9 ...Y).....p.2J'.U./....3.b_..W@.
c1440 f1 ce 99 66 90 8c ff 6a 62 7f dd c5 4a 0b 91 26 e2 39 ec 19 4a 71 63 9d 7b 21 6d c3 9c a3 a2 3c ...f...jb...J..&.9..Jqc.{!m....<
c1460 fa 7f 7d 96 6a 90 78 a6 6d d2 e1 9c f9 1d fc 38 d8 94 f4 c6 a5 0a 96 86 a4 bd 9e 1a ae 04 42 83 ..}.j.x.m......8..............B.
c1480 b8 b5 80 9b 22 38 20 b5 25 e5 64 ec f7 f4 bf 7e 63 59 25 0f 7a 2e 39 57 76 a2 71 aa 06 8a 0f 89 ...."8..%.d....~cY%.z.9Wv.q.....
c14a0 16 ba 61 a7 11 cb 9a d8 0e 47 9a 80 c5 d0 cd a7 d0 ef 7d 83 f0 e1 3b 71 09 df 5d 74 98 22 08 61 ..a......G........}...;q..]t.".a
c14c0 da b0 50 1e 6f bd f1 e1 00 df e7 31 07 a4 93 3a f7 65 47 78 e8 f8 a8 48 ab f7 de 72 7e 61 6b 6f ..P.o......1...:.eGx...H...r~ako
c14e0 77 a9 81 cb a7 09 ac 39 bb ec c6 cb d8 82 b4 72 cd 1d f4 b8 85 01 1e 80 fb 1b 89 2a 54 39 b2 5b w......9.......r...........*T9.[
c1500 da c8 0d 55 99 7a 87 73 3b 08 e6 98 2d ea 8d e0 33 2e 12 29 f5 c0 2f 54 27 21 f7 c8 ac 4e da 28 ...U.z.s;...-...3..)../T'!...N.(
c1520 b8 b1 a9 db 96 b2 a7 42 a2 c9 cf 19 41 4d e0 86 f9 2a 9a a3 11 66 30 d3 bb 74 32 4b df 63 7b f5 .......B....AM...*...f0..t2K.c{.
c1540 99 8a 2f 1b c7 21 af 59 b5 ae dc 44 3c 97 50 71 d7 a1 d2 c5 55 e3 69 de 57 c1 d1 de 30 c0 fd cc ../..!.Y...D<.Pq....U.i.W...0...
c1560 e6 4d fb 0d bf 5d 4f e9 9d 1e 19 38 2f bc cf 58 05 2e ef 0d a0 50 35 da ef 09 27 1c d5 b3 7e 35 .M...]O....8/..X.....P5...'...~5
c1580 1e 08 ba da 36 db d3 5f 8f de 74 88 49 12 30 82 04 da 30 82 03 c2 a0 03 02 01 02 02 13 33 00 00 ....6.._..t.I.0...0..........3..
c15a0 00 70 d0 ff a4 3b d2 74 d4 21 00 00 00 00 00 70 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 .p...;.t.!.....p0...*.H........0
c15c0 7c 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 |1.0...U....US1.0...U....Washing
c15e0 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 ton1.0...U....Redmond1.0...U....
c1600 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 26 30 24 06 03 55 04 03 13 1d Microsoft.Corporation1&0$..U....
c1620 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 50 43 41 20 32 30 31 30 30 1e 17 Microsoft.Time-Stamp.PCA.20100..
c1640 0d 31 35 31 30 30 37 31 38 31 37 33 37 5a 17 0d 31 37 30 31 30 37 31 38 31 37 33 37 5a 30 81 b3 .151007181737Z..170107181737Z0..
c1660 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 1.0...U....US1.0...U....Washingt
c1680 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d on1.0...U....Redmond1.0...U....M
c16a0 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 0d 30 0b 06 03 55 04 0b 13 04 4d icrosoft.Corporation1.0...U....M
c16c0 4f 50 52 31 27 30 25 06 03 55 04 0b 13 1e 6e 43 69 70 68 65 72 20 44 53 45 20 45 53 4e 3a 31 34 OPR1'0%..U....nCipher.DSE.ESN:14
c16e0 38 43 2d 43 34 42 39 2d 32 30 36 36 31 25 30 23 06 03 55 04 03 13 1c 4d 69 63 72 6f 73 6f 66 74 8C-C4B9-20661%0#..U....Microsoft
c1700 20 54 69 6d 65 2d 53 74 61 6d 70 20 53 65 72 76 69 63 65 30 82 01 22 30 0d 06 09 2a 86 48 86 f7 .Time-Stamp.Service0.."0...*.H..
c1720 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 01 00 c3 69 bc 9c 1d 90 e6 a1 c2 bd e2 7b ...........0.........i.........{
c1740 48 4d 0d 3b 75 7f 2a d4 35 75 a9 cd b2 fc f8 9a 1c 29 31 37 ed 3f 9f 50 10 93 38 c1 4e 3f 27 ea HM.;u.*.5u.......)17.?.P..8.N?'.
c1760 c2 e0 15 d3 62 8a a8 48 ac 8e 19 54 ce c3 7d fa 8b 66 0a b5 c2 8f 1c 6f 6a c9 74 f5 9e 53 57 d7 ....b..H...T..}..f.....oj.t..SW.
c1780 cd a5 32 f0 54 50 2f 69 a1 ef 63 13 85 56 2d 56 57 26 36 29 25 14 93 70 15 b4 64 8e 77 4f 3a fd ..2.TP/i..c..V-VW&6)%..p..d.wO:.
c17a0 e8 c1 2e 50 3e 84 70 f7 47 e8 0f be ce d9 00 98 a9 49 d0 58 c8 d6 43 99 2d cf 48 40 4f 5b 81 40 ...P>.p.G........I.X..C.-.H@O[.@
c17c0 79 5d d5 9e 70 c9 38 83 2f 69 d7 af 91 b6 2c 2a cf 80 6c 50 f4 fd f4 b2 ef 18 12 83 3c 48 c9 f1 y]..p.8./i....,*..lP........<H..
c17e0 8a de 7e 48 c6 d8 0c c5 d3 a3 9f 10 24 5b b4 00 f1 42 fc 57 23 02 08 0d 3a 52 dd c5 e7 8f 9c 78 ..~H........$[...B.W#...:R.....x
c1800 ee f7 52 a3 cc 73 b5 fe c5 86 a6 2a ef 19 7e 7d a1 ff 98 45 f9 6d 6a 9e 08 09 9a 58 78 9c c3 bf ..R..s.....*..~}...E.mj....Xx...
c1820 b3 bc 16 45 ea 65 89 fa 35 39 f4 d2 2c c0 db f3 a1 71 e6 ad 02 03 01 00 01 a3 82 01 1b 30 82 01 ...E.e..59..,....q...........0..
c1840 17 30 1d 06 03 55 1d 0e 04 16 04 14 9b 36 c7 68 fd 8d 7e 04 dd 7a a2 16 3e 03 bd 87 a7 8e 90 d4 .0...U.......6.h..~..z..>.......
c1860 30 1f 06 03 55 1d 23 04 18 30 16 80 14 d5 63 3a 5c 8a 31 90 f3 43 7b 7c 46 1b c5 33 68 5a 85 6d 0...U.#..0....c:\.1..C{|F..3hZ.m
c1880 55 30 56 06 03 55 1d 1f 04 4f 30 4d 30 4b a0 49 a0 47 86 45 68 74 74 70 3a 2f 2f 63 72 6c 2e 6d U0V..U...O0M0K.I.G.Ehttp://crl.m
c18a0 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 72 6c 2f 70 72 6f 64 75 63 74 73 2f 4d 69 icrosoft.com/pki/crl/products/Mi
c18c0 63 54 69 6d 53 74 61 50 43 41 5f 32 30 31 30 2d 30 37 2d 30 31 2e 63 72 6c 30 5a 06 08 2b 06 01 cTimStaPCA_2010-07-01.crl0Z..+..
c18e0 05 05 07 01 01 04 4e 30 4c 30 4a 06 08 2b 06 01 05 05 07 30 02 86 3e 68 74 74 70 3a 2f 2f 77 77 ......N0L0J..+.....0..>http://ww
c1900 77 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 70 6b 69 2f 63 65 72 74 73 2f 4d 69 63 54 69 6d w.microsoft.com/pki/certs/MicTim
c1920 53 74 61 50 43 41 5f 32 30 31 30 2d 30 37 2d 30 31 2e 63 72 74 30 0c 06 03 55 1d 13 01 01 ff 04 StaPCA_2010-07-01.crt0...U......
c1940 02 30 00 30 13 06 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07 03 08 30 0d 06 09 2a 86 48 86 .0.0...U.%..0...+.......0...*.H.
c1960 f7 0d 01 01 0b 05 00 03 82 01 01 00 2b 13 ff 74 0b f4 99 6d 4b 48 93 68 e1 df 5f 55 96 4b 33 d1 ............+..t...mKH.h.._U.K3.
c1980 db 3f 2a 21 e0 e3 4b 3e 6d dd 03 97 99 ef a3 a8 23 7c e1 21 2d 3e bc 11 b1 bb 44 a8 4a 3d 2a 9a .?*!..K>m.......#|.!->....D.J=*.
c19a0 4f 69 0b da 40 b6 e6 32 d2 e1 9b 00 38 99 88 80 93 76 a8 2f 46 06 26 6e 9a 32 6c 3d 4f 04 0f 85 Oi..@..2....8....v./F.&n.2l=O...
c19c0 85 a8 b7 25 b3 98 7c 22 37 22 92 83 95 6c fa 48 b4 be ed ba 4a e1 ec d7 87 26 c2 34 31 b3 cf ff ...%..|"7"...l.H....J....&.41...
c19e0 3b 8b 96 cc d7 03 0d b2 07 c4 70 a1 a0 37 76 06 20 8b 82 ba 40 8b 83 aa 01 ea 4d b5 9b ff ec a6 ;.........p..7v.....@.....M.....
c1a00 d1 20 3a 9a 97 fe 72 74 de 7b 80 7d 3e b3 29 a0 96 4d a2 99 e3 72 fb 28 53 54 df 4e ad b0 fb 86 ..:...rt.{.}>.)..M...r.(ST.N....
c1a20 e8 dc 26 24 19 be b2 fa 8d c0 bf e6 f5 77 59 a6 b1 41 0f cb b0 9b 49 48 1e 94 9b 0b 3f 39 78 67 ..&$.........wY..A....IH....?9xg
c1a40 ba 7f 2a e6 1a 64 e7 6c e7 f7 92 50 ce f9 aa 9e b9 ad fc 83 81 4c ee 47 b7 87 d2 15 54 f4 d4 d0 ..*..d.l...P.........L.G....T...
c1a60 3e b6 ab 6d 79 e6 e6 9f 07 a1 45 cf a1 82 03 75 30 82 02 5d 02 01 01 30 81 e3 a1 81 b9 a4 81 b6 >..my.....E....u0..]...0........
c1a80 30 81 b3 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 0..1.0...U....US1.0...U....Washi
c1aa0 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a ngton1.0...U....Redmond1.0...U..
c1ac0 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 0d 30 0b 06 03 55 04 0b ..Microsoft.Corporation1.0...U..
c1ae0 13 04 4d 4f 50 52 31 27 30 25 06 03 55 04 0b 13 1e 6e 43 69 70 68 65 72 20 44 53 45 20 45 53 4e ..MOPR1'0%..U....nCipher.DSE.ESN
c1b00 3a 31 34 38 43 2d 43 34 42 39 2d 32 30 36 36 31 25 30 23 06 03 55 04 03 13 1c 4d 69 63 72 6f 73 :148C-C4B9-20661%0#..U....Micros
c1b20 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 53 65 72 76 69 63 65 a2 25 0a 01 01 30 09 06 05 2b oft.Time-Stamp.Service.%...0...+
c1b40 0e 03 02 1a 05 00 03 15 00 18 32 91 5e be 5f 14 b2 86 9f 49 9d 08 ac 22 a7 a6 0c f7 cf a0 81 c2 ..........2.^._....I..."........
c1b60 30 81 bf a4 81 bc 30 81 b9 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0.....0..1.0...U....US1.0...U...
c1b80 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 .Washington1.0...U....Redmond1.0
c1ba0 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 0d 30 ...U....Microsoft.Corporation1.0
c1bc0 0b 06 03 55 04 0b 13 04 4d 4f 50 52 31 27 30 25 06 03 55 04 0b 13 1e 6e 43 69 70 68 65 72 20 4e ...U....MOPR1'0%..U....nCipher.N
c1be0 54 53 20 45 53 4e 3a 34 44 45 39 2d 30 43 35 45 2d 33 45 30 39 31 2b 30 29 06 03 55 04 03 13 22 TS.ESN:4DE9-0C5E-3E091+0)..U..."
c1c00 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 20 53 6f 75 72 63 65 20 4d 61 73 74 65 72 20 43 6c 6f Microsoft.Time.Source.Master.Clo
c1c20 63 6b 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 02 05 00 d9 e6 09 16 30 22 18 0f 32 30 31 35 ck0...*.H...............0"..2015
c1c40 31 31 30 35 31 36 35 37 35 38 5a 18 0f 32 30 31 35 31 31 30 36 31 36 35 37 35 38 5a 30 73 30 39 1105165758Z..20151106165758Z0s09
c1c60 06 0a 2b 06 01 04 01 84 59 0a 04 01 31 2b 30 29 30 0a 02 05 00 d9 e6 09 16 02 01 00 30 06 02 01 ..+.....Y...1+0)0...........0...
c1c80 00 02 01 2a 30 07 02 01 00 02 02 19 af 30 0a 02 05 00 d9 e7 5a 96 02 01 00 30 36 06 0a 2b 06 01 ...*0........0......Z....06..+..
c1ca0 04 01 84 59 0a 04 02 31 28 30 26 30 0c 06 0a 2b 06 01 04 01 84 59 0a 03 01 a0 0a 30 08 02 01 00 ...Y...1(0&0...+.....Y.....0....
c1cc0 02 03 07 a1 20 a1 0a 30 08 02 01 00 02 03 07 a1 20 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 05 00 .......0.........0...*.H........
c1ce0 03 82 01 01 00 63 a2 ed 27 ed ee 80 8a 08 00 8b 16 7e 26 ed ed 18 2b 6d 5e ff fa f8 5c 9b b8 5f .....c..'........~&...+m^...\.._
c1d00 0b 82 63 01 43 26 89 c2 58 68 72 97 fa 92 7b 68 dd 03 6c 19 69 bd 30 22 5d 04 ab e5 99 6d 3e 57 ..c.C&..Xhr...{h..l.i.0"]....m>W
c1d20 6f 7e 16 11 f1 83 88 e6 60 3a a5 c3 ec e3 a7 75 7c e9 29 0e 50 c9 e9 ab 50 ce 61 ae da f4 b7 92 o~......`:.....u|.).P...P.a.....
c1d40 64 b5 ad 96 72 4f a7 36 90 bc 9b 45 3b 20 aa db 27 34 21 1f dc ae 3b 8f 69 92 d9 f9 c2 b3 55 d9 d...rO.6...E;...'4!...;.i.....U.
c1d60 8b 26 05 8a 1b 78 9d 3b 9b 31 e6 5f cd 66 8c 9e 5c 9c cc 44 31 25 8b 7d 79 ab e1 97 b6 a6 4a 47 .&...x.;.1._.f..\..D1%.}y.....JG
c1d80 a7 1c a3 02 b0 71 66 c6 7a 52 6e 9e 02 03 ea 7a 6f 90 39 c0 bf 26 23 2a 37 be f1 ec b5 94 d7 c2 .....qf.zRn....zo.9..&#*7.......
c1da0 7f a7 4c 76 45 99 b3 8a 21 3f 51 1d 04 d1 05 6a e1 16 8f bf b3 aa 63 95 d2 29 dc cf b6 6a 7d 5a ..LvE...!?Q....j......c..)...j}Z
c1dc0 99 31 8c 6c d6 60 f3 a2 89 f0 16 4d 3b df f7 f2 f0 7c 8d 94 e9 08 76 f4 0b d7 27 ab 25 50 29 88 .1.l.`.....M;....|....v...'.%P).
c1de0 51 ab 65 32 a6 31 82 02 f5 30 82 02 f1 02 01 01 30 81 93 30 7c 31 0b 30 09 06 03 55 04 06 13 02 Q.e2.1...0......0..0|1.0...U....
c1e00 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 US1.0...U....Washington1.0...U..
c1e20 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f ..Redmond1.0...U....Microsoft.Co
c1e40 72 70 6f 72 61 74 69 6f 6e 31 26 30 24 06 03 55 04 03 13 1d 4d 69 63 72 6f 73 6f 66 74 20 54 69 rporation1&0$..U....Microsoft.Ti
c1e60 6d 65 2d 53 74 61 6d 70 20 50 43 41 20 32 30 31 30 02 13 33 00 00 00 70 d0 ff a4 3b d2 74 d4 21 me-Stamp.PCA.2010..3...p...;.t.!
c1e80 00 00 00 00 00 70 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 a0 82 01 32 30 1a 06 09 2a 86 48 .....p0...`.H.e.........20...*.H
c1ea0 86 f7 0d 01 09 03 31 0d 06 0b 2a 86 48 86 f7 0d 01 09 10 01 04 30 2f 06 09 2a 86 48 86 f7 0d 01 ......1...*.H........0/..*.H....
c1ec0 09 04 31 22 04 20 e8 4d e3 df f7 0e 1a 8e 71 95 8b f8 51 b7 bb 9d 10 08 58 26 17 d1 4f 77 3f ef ..1"...M......q...Q.....X&..Ow?.
c1ee0 5a 42 58 6f e0 93 30 81 e2 06 0b 2a 86 48 86 f7 0d 01 09 10 02 0c 31 81 d2 30 81 cf 30 81 cc 30 ZBXo..0....*.H........1..0..0..0
c1f00 81 b1 04 14 18 32 91 5e be 5f 14 b2 86 9f 49 9d 08 ac 22 a7 a6 0c f7 cf 30 81 98 30 81 80 a4 7e .....2.^._....I...".....0..0...~
c1f20 30 7c 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 57 61 73 68 69 6e 0|1.0...U....US1.0...U....Washin
c1f40 67 74 6f 6e 31 10 30 0e 06 03 55 04 07 13 07 52 65 64 6d 6f 6e 64 31 1e 30 1c 06 03 55 04 0a 13 gton1.0...U....Redmond1.0...U...
c1f60 15 4d 69 63 72 6f 73 6f 66 74 20 43 6f 72 70 6f 72 61 74 69 6f 6e 31 26 30 24 06 03 55 04 03 13 .Microsoft.Corporation1&0$..U...
c1f80 1d 4d 69 63 72 6f 73 6f 66 74 20 54 69 6d 65 2d 53 74 61 6d 70 20 50 43 41 20 32 30 31 30 02 13 .Microsoft.Time-Stamp.PCA.2010..
c1fa0 33 00 00 00 70 d0 ff a4 3b d2 74 d4 21 00 00 00 00 00 70 30 16 04 14 54 01 fb 32 77 01 e5 a7 24 3...p...;.t.!.....p0...T..2w...$
c1fc0 b6 6d 90 2b 5d e8 a0 dc 56 a5 a9 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 04 82 01 00 2e 50 .m.+]...V..0...*.H.............P
c1fe0 63 8f fb 21 34 4c 89 e5 40 dc 0c 33 95 57 b2 62 20 79 89 d4 59 c4 5d 45 0b c6 cf e0 9d 34 6d a4 c..!4L..@..3.W.b.y..Y.]E.....4m.
c2000 80 f7 95 c8 6e 22 ff f4 e1 bb f3 8e 78 3d 7d ac 37 36 1b 08 a3 57 20 cc 7b 9e 55 41 f0 45 18 c3 ....n"......x=}.76...W..{.UA.E..
c2020 14 07 a9 b9 fa 65 c2 17 92 cd d5 cb 74 50 83 eb 61 09 76 78 b1 13 ce e8 4c 66 6f 2e 50 4f ad d9 .....e......tP..a.vx....Lfo.PO..
c2040 13 bb 08 33 81 c7 86 4f 6f 8d a1 2b f9 57 64 2d 97 ce af cf 13 74 aa aa bc 76 b7 26 29 88 f0 0f ...3...Oo..+.Wd-.....t...v.&)...
c2060 5b 1b d7 ba e8 64 77 a9 ba fc 77 33 06 b6 df 2b 8d f3 ab 13 da d4 df e8 08 4b a0 b3 75 1a ec ac [....dw...w3...+.........K..u...
c2080 92 0a dc 4a bb 58 6f 37 37 c6 75 4b fa fe 33 95 80 11 f7 b8 58 3a ce 49 ec 54 06 72 46 01 a7 0f ...J.Xo77.uK..3.....X:.I.T.rF...
c20a0 45 ad dd 73 77 39 71 81 6b cd ee 92 79 6b ba c6 38 32 d0 18 6f a6 1f b4 39 2e 28 03 f3 03 09 ea E..sw9q.k...yk..82..o...9.(.....
c20c0 34 04 d6 2b bb 51 36 ef a0 f1 79 5a c8 67 89 62 b2 97 8c 69 75 4d 28 9e 78 aa 8d 4c 7a 6e 00 00 4..+.Q6...yZ.g.b...iuM(.x..Lzn..