This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Commit a2d7a2b
committed
Make sure only one instance of a service is created
IVSServices and ITeamExplorerServices have methods that depend on types
from specific versions of TeamFoundation. Unfortunately, because the
class itself doesn't depend on any TeamFoundation types, it can be
happily instantiated by the runtime, which means that there would be two
instances of each of these MEF exports floating around, which of course
silently crashes the MEF loading of any other types that depend on these
services in their constructors.
We need to make sure that any service exported by these
TeamFoundation-specific projects have fields/properties/constructors
that depend on TeamFoundation types, so that they will not be
instantiated if the VS they're running on is a different version.1 parent 4be2364 commit a2d7a2b
File tree
2 files changed
+23
-7
lines changed- src/GitHub.TeamFoundation.14/Services
2 files changed
+23
-7
lines changedLines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | | - | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
30 | | - | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
36 | | - | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
42 | | - | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
48 | | - | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | | - | |
60 | | - | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| |||
0 commit comments