OLD | NEW |
| (Empty) |
1 /// Copyright (c) Microsoft Corporation. All rights reserved. | |
2 | |
3 using System; | |
4 using System.Diagnostics; | |
5 using System.Diagnostics.CodeAnalysis; | |
6 using System.Runtime.InteropServices; | |
7 using EnvDTE; | |
8 using VSLangProj; | |
9 | |
10 namespace Microsoft.VisualStudio.Project.Automation | |
11 { | |
12 /// <summary> | |
13 /// Represents an automation friendly version of a language-specific pro
ject. | |
14 /// </summary> | |
15 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCor
rectly", MessageId = "OAVS")] | |
16 [ComVisible(true), CLSCompliant(false)] | |
17 public class OAVSProject : VSProject | |
18 { | |
19 #region fields | |
20 private ProjectNode project; | |
21 private OAVSProjectEvents events; | |
22 #endregion | |
23 | |
24 #region ctors | |
25 public OAVSProject(ProjectNode project) | |
26 { | |
27 this.project = project; | |
28 } | |
29 #endregion | |
30 | |
31 #region VSProject Members | |
32 | |
33 public virtual ProjectItem AddWebReference(string bstrUrl) | |
34 { | |
35 throw new NotImplementedException(); | |
36 } | |
37 | |
38 public virtual BuildManager BuildManager | |
39 { | |
40 get | |
41 { | |
42 return new OABuildManager(this.project); | |
43 } | |
44 } | |
45 | |
46 public virtual void CopyProject(string bstrDestFolder, string bs
trDestUNCPath, prjCopyProjectOption copyProjectOption, string bstrUsername, stri
ng bstrPassword) | |
47 { | |
48 throw new NotImplementedException(); | |
49 } | |
50 | |
51 public virtual ProjectItem CreateWebReferencesFolder() | |
52 { | |
53 throw new NotImplementedException(); | |
54 } | |
55 | |
56 public virtual DTE DTE | |
57 { | |
58 get | |
59 { | |
60 return (EnvDTE.DTE)this.project.Site.GetService(
typeof(EnvDTE.DTE)); | |
61 } | |
62 } | |
63 | |
64 public virtual VSProjectEvents Events | |
65 { | |
66 get | |
67 { | |
68 if(events == null) | |
69 events = new OAVSProjectEvents(this); | |
70 return events; | |
71 } | |
72 } | |
73 | |
74 public virtual void Exec(prjExecCommand command, int bSuppressUI
, object varIn, out object pVarOut) | |
75 { | |
76 throw new NotImplementedException(); ; | |
77 } | |
78 | |
79 public virtual void GenerateKeyPairFiles(string strPublicPrivate
File, string strPublicOnlyFile) | |
80 { | |
81 throw new NotImplementedException(); ; | |
82 } | |
83 | |
84 public virtual string GetUniqueFilename(object pDispatch, string
bstrRoot, string bstrDesiredExt) | |
85 { | |
86 throw new NotImplementedException(); ; | |
87 } | |
88 | |
89 public virtual Imports Imports | |
90 { | |
91 get | |
92 { | |
93 throw new NotImplementedException(); | |
94 } | |
95 } | |
96 | |
97 public virtual EnvDTE.Project Project | |
98 { | |
99 get | |
100 { | |
101 return this.project.GetAutomationObject() as Env
DTE.Project; | |
102 } | |
103 } | |
104 | |
105 public virtual References References | |
106 { | |
107 get | |
108 { | |
109 ReferenceContainerNode references = project.GetR
eferenceContainer() as ReferenceContainerNode; | |
110 if(null == references) | |
111 { | |
112 return null; | |
113 } | |
114 return references.Object as References; | |
115 } | |
116 } | |
117 | |
118 public virtual void Refresh() | |
119 { | |
120 throw new NotImplementedException(); | |
121 } | |
122 | |
123 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Desi
gn", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] | |
124 public virtual string TemplatePath | |
125 { | |
126 get | |
127 { | |
128 throw new NotImplementedException(); | |
129 } | |
130 } | |
131 | |
132 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Desi
gn", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] | |
133 public virtual ProjectItem WebReferencesFolder | |
134 { | |
135 get | |
136 { | |
137 throw new NotImplementedException(); | |
138 } | |
139 } | |
140 | |
141 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Desi
gn", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] | |
142 public virtual bool WorkOffline | |
143 { | |
144 get | |
145 { | |
146 throw new NotImplementedException(); | |
147 } | |
148 set | |
149 { | |
150 throw new NotImplementedException(); | |
151 } | |
152 } | |
153 | |
154 #endregion | |
155 } | |
156 | |
157 /// <summary> | |
158 /// Provides access to language-specific project events | |
159 /// </summary> | |
160 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCor
rectly", MessageId = "OAVS")] | |
161 [ComVisible(true), CLSCompliant(false)] | |
162 public class OAVSProjectEvents : VSProjectEvents | |
163 { | |
164 #region fields | |
165 private OAVSProject vsProject; | |
166 #endregion | |
167 | |
168 #region ctors | |
169 public OAVSProjectEvents(OAVSProject vsProject) | |
170 { | |
171 this.vsProject = vsProject; | |
172 } | |
173 #endregion | |
174 | |
175 #region VSProjectEvents Members | |
176 | |
177 public virtual BuildManagerEvents BuildManagerEvents | |
178 { | |
179 get | |
180 { | |
181 return vsProject.BuildManager as BuildManagerEve
nts; | |
182 } | |
183 } | |
184 | |
185 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Desi
gn", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] | |
186 public virtual ImportsEvents ImportsEvents | |
187 { | |
188 get | |
189 { | |
190 throw new NotImplementedException(); | |
191 } | |
192 } | |
193 | |
194 public virtual ReferencesEvents ReferencesEvents | |
195 { | |
196 get | |
197 { | |
198 return vsProject.References as ReferencesEvents; | |
199 } | |
200 } | |
201 | |
202 #endregion | |
203 } | |
204 | |
205 } | |
OLD | NEW |