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 Microsoft.VisualStudio; | |
7 using Microsoft.VisualStudio.Shell.Interop; | |
8 | |
9 namespace Microsoft.VisualStudio.Project.Automation | |
10 { | |
11 [SuppressMessage("Microsoft.Interoperability", "CA1405:ComVisibleTypeBas
eTypesShouldBeComVisible")] | |
12 [ComVisible(true), CLSCompliant(false)] | |
13 public class OANestedProjectItem : OAProjectItem<NestedProjectNode> | |
14 { | |
15 #region fields | |
16 EnvDTE.Project nestedProject; | |
17 #endregion | |
18 | |
19 #region ctors | |
20 public OANestedProjectItem(OAProject project, NestedProjectNode
node) | |
21 : base(project, node) | |
22 { | |
23 object nestedproject = null; | |
24 if(ErrorHandler.Succeeded(node.NestedHierarchy.GetProper
ty(VSConstants.VSITEMID_ROOT, (int)__VSHPROPID.VSHPROPID_ExtObject, out nestedpr
oject))) | |
25 { | |
26 this.nestedProject = nestedproject as EnvDTE.Pro
ject; | |
27 } | |
28 } | |
29 | |
30 #endregion | |
31 | |
32 #region overridden methods | |
33 /// <summary> | |
34 /// Returns the collection of project items defined in the neste
d project | |
35 /// </summary> | |
36 public override EnvDTE.ProjectItems ProjectItems | |
37 { | |
38 get | |
39 { | |
40 if(this.nestedProject != null) | |
41 { | |
42 return this.nestedProject.ProjectItems; | |
43 } | |
44 return null; | |
45 } | |
46 } | |
47 | |
48 /// <summary> | |
49 /// Returns the nested project. | |
50 /// </summary> | |
51 public override EnvDTE.Project SubProject | |
52 { | |
53 get | |
54 { | |
55 return this.nestedProject; | |
56 } | |
57 } | |
58 #endregion | |
59 } | |
60 } | |
OLD | NEW |