本文整理汇总了C#中Microsoft.VisualStudioTools.Project.ProjectNode类的典型用法代码示例。如果您正苦于以下问题:C# ProjectNode类的具体用法?C# ProjectNode怎么用?C# ProjectNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectNode类属于Microsoft.VisualStudioTools.Project命名空间,在下文中一共展示了ProjectNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VirtualProjectElement
/// <summary>
/// Constructor to Wrap an existing MSBuild.ProjectItem
/// Only have internal constructors as the only one who should be creating
/// such object is the project itself (see Project.CreateFileNode()).
/// </summary>
/// <param name="project">Project that owns this item</param>
/// <param name="existingItem">an MSBuild.ProjectItem; can be null if virtualFolder is true</param>
/// <param name="virtualFolder">Is this item virtual (such as reference folder)</param>
internal VirtualProjectElement(ProjectNode project, string path = null)
: base(project)
{
_virtualProperties = new Dictionary<string, string>();
if(path != null)
Rename(path);
}
示例2: WebPiReferenceNode
internal WebPiReferenceNode(ProjectNode root, ProjectElement element, string filename, string productId, string friendlyName)
: base(root, element) {
Utilities.ArgumentNotNullOrEmpty("filename", filename);
_feed = filename;
_productId = productId;
_friendlyName = friendlyName;
}
示例3: Output
/// <summary>
/// Constructor for IVSOutput2 implementation
/// </summary>
/// <param name="projectManager">Project that produce this output</param>
/// <param name="outputAssembly">MSBuild generated item corresponding to the output assembly (by default, these would be of type MainAssembly</param>
public Output(ProjectNode projectManager, ProjectItemInstance outputAssembly)
{
Utilities.ArgumentNotNull("projectManager", projectManager);
project = projectManager;
output = outputAssembly;
}
示例4: MsBuildProjectElement
/// <summary>
/// Constructor to Wrap an existing MSBuild.ProjectItem
/// Only have internal constructors as the only one who should be creating
/// such object is the project itself (see Project.CreateFileNode()).
/// </summary>
/// <param name="project">Project that owns this item</param>
/// <param name="existingItem">an MSBuild.ProjectItem; can be null if virtualFolder is true</param>
/// <param name="virtualFolder">Is this item virtual (such as reference folder)</param>
internal MsBuildProjectElement(ProjectNode project, MSBuild.ProjectItem existingItem)
: base(project) {
Utilities.ArgumentNotNull("existingItem", existingItem);
// Keep a reference to project and item
_item = existingItem;
}
示例5: MsBuildProjectElement
private string _url; // cached Url
/// <summary>
/// Constructor to create a new MSBuild.ProjectItem and add it to the project
/// Only have internal constructors as the only one who should be creating
/// such object is the project itself (see Project.CreateFileNode()).
/// </summary>
internal MsBuildProjectElement(ProjectNode project, string itemPath, string itemType)
: base(project) {
Utilities.ArgumentNotNullOrEmpty("itemPath", itemPath);
Utilities.ArgumentNotNullOrEmpty("itemType", itemType);
// create and add the item to the project
_item = project.BuildProject.AddItem(itemType, Microsoft.Build.Evaluation.ProjectCollection.Escape(itemPath))[0];
_url = base.Url;
}
示例6: OutputGroup
/// <summary>
/// Constructor for IVSOutputGroup2 implementation
/// </summary>
/// <param name="outputName">Name of the output group. See VS_OUTPUTGROUP_CNAME_Build in vsshell.idl for the list of standard values</param>
/// <param name="msBuildTargetName">MSBuild target name</param>
/// <param name="projectManager">Project that produce this output</param>
/// <param name="configuration">Configuration that produce this output</param>
public OutputGroup(string outputName, string msBuildTargetName, ProjectNode projectManager, ProjectConfig configuration) {
Utilities.ArgumentNotNull("outputName", outputName);
Utilities.ArgumentNotNull("msBuildTargetName", msBuildTargetName);
Utilities.ArgumentNotNull("projectManager", projectManager);
Utilities.ArgumentNotNull("configuration", configuration);
_name = outputName;
_targetName = msBuildTargetName;
_project = projectManager;
_projectCfg = configuration;
}
示例7: UserProjectConfig
public UserProjectConfig(ProjectNode node)
{
string userConfigPath = node.Url + ".user";
try
{
LoadMsBuildProject(userConfigPath);
}
catch (InvalidProjectFileException)
{
File.WriteAllText(userConfigPath, emptyUserConfig);
LoadMsBuildProject(userConfigPath);
}
this.proj = node;
}
示例8: ReferenceNode
/// <summary>
/// constructor for the ReferenceNode
/// </summary>
protected ReferenceNode(ProjectNode root, ProjectElement element)
: base(root, element) {
this.ExcludeNodeFromScc = true;
}
示例9: FolderAddition
public FolderAddition(ProjectNode project, string newFolderPath, string sourceFolder, DropEffect dropEffect, Addition[] additions) {
Project = project;
NewFolderPath = newFolderPath;
SourceFolder = sourceFolder;
Additions = additions;
DropEffect = dropEffect;
}
示例10: ProjectReferenceFileAdder
public ProjectReferenceFileAdder(ProjectNode project, HierarchyNode targetNode, string[] projectReferences, bool mouseDropping, DropEffect dropEffect) {
Utilities.ArgumentNotNull("targetNode", targetNode);
Utilities.ArgumentNotNull("project", project);
Utilities.ArgumentNotNull("projectReferences", projectReferences);
TargetNode = targetNode;
Project = project;
ProjectReferences = projectReferences;
MouseDropping = mouseDropping;
DropEffect = dropEffect;
}
示例11: OverwriteFileAddition
public OverwriteFileAddition(ProjectNode project, string targetFolder, DropEffect dropEffect, string sourceMoniker, string newFileName, IVsProject sourceHierarchy)
: base(project, targetFolder, dropEffect, sourceMoniker, newFileName, sourceHierarchy) {
}
示例12: ProjectDesignerDocumentManager
public ProjectDesignerDocumentManager(ProjectNode node)
: base(node) {
}
示例13: ReferenceContainerNode
internal ReferenceContainerNode(ProjectNode root)
: base(root) {
this.ExcludeNodeFromScc = true;
}
示例14: FileNode
/// <summary>
/// Constructor for the FileNode
/// </summary>
/// <param name="root">Root of the hierarchy</param>
/// <param name="e">Associated project element</param>
public FileNode(ProjectNode root, ProjectElement element)
: base(root, element) {
UpdateCaption();
}
示例15: ProjectConfig
internal ProjectConfig(ProjectNode project, string configuration) {
this.project = project;
if (configuration.Contains("|")) { // If configuration is in the form "<Configuration>|<Platform>"
string[] configStrArray = configuration.Split('|');
if (2 == configStrArray.Length) {
this.configName = configStrArray[0];
this.platformName = configStrArray[1];
}
else {
throw new Exception(string.Format(CultureInfo.InvariantCulture, "Invalid configuration format: {0}", configuration));
}
}
else { // If configuration is in the form "<Configuration>"
this.configName = configuration;
}
var flavoredCfgProvider = ProjectMgr.GetOuterInterface<IVsProjectFlavorCfgProvider>();
Utilities.ArgumentNotNull("flavoredCfgProvider", flavoredCfgProvider);
ErrorHandler.ThrowOnFailure(flavoredCfgProvider.CreateProjectFlavorCfg(this, out flavoredCfg));
Utilities.ArgumentNotNull("flavoredCfg", flavoredCfg);
// if the flavored object support XML fragment, initialize it
IPersistXMLFragment persistXML = flavoredCfg as IPersistXMLFragment;
if (null != persistXML) {
this.project.LoadXmlFragment(persistXML, configName, platformName);
}
}