OLD | NEW |
| (Empty) |
1 /// Copyright (c) Microsoft Corporation. All rights reserved. | |
2 | |
3 using System; | |
4 using System.Diagnostics.CodeAnalysis; | |
5 using System.Runtime.InteropServices; | |
6 using VSLangProj; | |
7 | |
8 namespace Microsoft.VisualStudio.Project.Automation | |
9 { | |
10 /// <summary> | |
11 /// Represents the automation equivalent of ReferenceNode | |
12 /// </summary> | |
13 /// <typeparam name="RefType"></typeparam> | |
14 [SuppressMessage("Microsoft.Naming", "CA1715:IdentifiersShouldHaveCorrec
tPrefix", MessageId = "T")] | |
15 [ComVisible(true)] | |
16 public abstract class OAReferenceBase<RefType> : Reference | |
17 where RefType : ReferenceNode | |
18 { | |
19 #region fields | |
20 private RefType referenceNode; | |
21 #endregion | |
22 | |
23 #region ctors | |
24 protected OAReferenceBase(RefType referenceNode) | |
25 { | |
26 this.referenceNode = referenceNode; | |
27 } | |
28 #endregion | |
29 | |
30 #region properties | |
31 protected RefType BaseReferenceNode | |
32 { | |
33 get { return referenceNode; } | |
34 } | |
35 #endregion | |
36 | |
37 #region Reference Members | |
38 public virtual int BuildNumber | |
39 { | |
40 get { return 0; } | |
41 } | |
42 | |
43 public virtual References Collection | |
44 { | |
45 get | |
46 { | |
47 return BaseReferenceNode.Parent.Object as Refere
nces; | |
48 } | |
49 } | |
50 | |
51 public virtual EnvDTE.Project ContainingProject | |
52 { | |
53 get | |
54 { | |
55 return BaseReferenceNode.ProjectMgr.GetAutomatio
nObject() as EnvDTE.Project; | |
56 } | |
57 } | |
58 | |
59 public virtual bool CopyLocal | |
60 { | |
61 get | |
62 { | |
63 throw new NotImplementedException(); | |
64 } | |
65 set | |
66 { | |
67 throw new NotImplementedException(); | |
68 } | |
69 } | |
70 | |
71 public virtual string Culture | |
72 { | |
73 get { throw new NotImplementedException(); } | |
74 } | |
75 | |
76 public virtual EnvDTE.DTE DTE | |
77 { | |
78 get | |
79 { | |
80 return BaseReferenceNode.ProjectMgr.Site.GetServ
ice(typeof(EnvDTE.DTE)) as EnvDTE.DTE; | |
81 } | |
82 } | |
83 | |
84 public virtual string Description | |
85 { | |
86 get | |
87 { | |
88 return this.Name; | |
89 } | |
90 } | |
91 | |
92 public virtual string ExtenderCATID | |
93 { | |
94 get { throw new NotImplementedException(); } | |
95 } | |
96 | |
97 public virtual object ExtenderNames | |
98 { | |
99 get { throw new NotImplementedException(); } | |
100 } | |
101 | |
102 public virtual string Identity | |
103 { | |
104 get { throw new NotImplementedException(); } | |
105 } | |
106 | |
107 public virtual int MajorVersion | |
108 { | |
109 get { return 0; } | |
110 } | |
111 | |
112 public virtual int MinorVersion | |
113 { | |
114 get { return 0; } | |
115 } | |
116 | |
117 public virtual string Name | |
118 { | |
119 get { throw new NotImplementedException(); } | |
120 } | |
121 | |
122 public virtual string Path | |
123 { | |
124 get | |
125 { | |
126 return BaseReferenceNode.Url; | |
127 } | |
128 } | |
129 | |
130 public virtual string PublicKeyToken | |
131 { | |
132 get { throw new NotImplementedException(); } | |
133 } | |
134 | |
135 public virtual void Remove() | |
136 { | |
137 BaseReferenceNode.Remove(false); | |
138 } | |
139 | |
140 public virtual int RevisionNumber | |
141 { | |
142 get { return 0; } | |
143 } | |
144 | |
145 public virtual EnvDTE.Project SourceProject | |
146 { | |
147 get { return null; } | |
148 } | |
149 | |
150 public virtual bool StrongName | |
151 { | |
152 get { return false; } | |
153 } | |
154 | |
155 public virtual prjReferenceType Type | |
156 { | |
157 get { throw new NotImplementedException(); } | |
158 } | |
159 | |
160 public virtual string Version | |
161 { | |
162 get { return new Version().ToString(); } | |
163 } | |
164 | |
165 public virtual object get_Extender(string ExtenderName) | |
166 { | |
167 throw new NotImplementedException(); | |
168 } | |
169 #endregion | |
170 } | |
171 } | |
OLD | NEW |