本文整理匯總了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);
}
}