• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Project.ProjectNode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.VisualStudio.Project.ProjectNode的典型用法代码示例。如果您正苦于以下问题:C# ProjectNode类的具体用法?C# ProjectNode怎么用?C# ProjectNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProjectNode类属于Microsoft.VisualStudio.Project命名空间,在下文中一共展示了ProjectNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LocalizableProperties

        public LocalizableProperties(ProjectNode projectManager)
        {
            if (projectManager == null)
                throw new ArgumentNullException("projectManager");

            _projectManager = projectManager;
        }
开发者ID:tunnelvisionlabs,项目名称:MPFProj10,代码行数:7,代码来源:LocalizableProperties.cs


示例2: ProjectReferenceNode

        public ProjectReferenceNode(ProjectNode root, ProjectElement element)
            : base(root, element)
        {
            this.referencedProjectRelativePath = this.ItemNode.GetMetadata(ProjectFileConstants.Include);
            Debug.Assert(!String.IsNullOrEmpty(this.referencedProjectRelativePath), "Could not retrive referenced project path form project file");

            string guidString = this.ItemNode.GetMetadata(ProjectFileConstants.Project);

            // Continue even if project setttings cannot be read.
            try
            {
                this.referencedProjectGuid = new Guid(guidString);

                this.buildDependency = new BuildDependency(this.ProjectMgr, this.referencedProjectGuid);
                this.ProjectMgr.AddBuildDependency(this.buildDependency);
            }
            finally
            {
                Debug.Assert(this.referencedProjectGuid != Guid.Empty, "Could not retrive referenced project guidproject file");

                this.referencedProjectName = this.ItemNode.GetMetadata(ProjectFileConstants.Name);

                Debug.Assert(!String.IsNullOrEmpty(this.referencedProjectName), "Could not retrive referenced project name form project file");
            }

            Uri uri = new Uri(this.ProjectMgr.BaseURI.Uri, this.referencedProjectRelativePath);

            if(uri != null)
            {
                this.referencedProjectFullPath = Microsoft.VisualStudio.Shell.Url.Unescape(uri.LocalPath, true);
            }
        }
开发者ID:Rfvgyhn,项目名称:Boo-Plugin,代码行数:32,代码来源:ProjectReferenceNode.cs


示例3: ProjectElement

        /// <summary>
        /// Constructor to create a new MSBuild.BuildItem 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 ProjectElement(ProjectNode project, string itemPath, string itemType)
        {
            if(project == null)
            {
                throw new ArgumentNullException("project");
            }

            if(String.IsNullOrEmpty(itemPath))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "itemPath");
            }

            if(String.IsNullOrEmpty(itemType))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "itemType");
            }

            this.itemProject = project;

            // create and add the item to the project

            this.item = project.BuildProject.AddNewItem(itemType, Microsoft.Build.BuildEngine.Utilities.Escape(itemPath));
            this.itemProject.SetProjectFileDirty(true);
            this.RefreshProperties();
        }
开发者ID:vestild,项目名称:nemerle,代码行数:30,代码来源:ProjectElement.cs


示例4: NemerleFileNode

        public NemerleFileNode(ProjectNode root, ProjectElement element, bool isNonMemberItem)
            : base(root, element)
        {
            IsNonMemberItem = isNonMemberItem;

            _selectionChangedListener =
                    new SelectionElementValueChangedListener(
                            new ServiceProvider((IOleServiceProvider)root.GetService(typeof(IOleServiceProvider))), root);

            _selectionChangedListener.Init();

            //((FileNodeProperties)NodeProperties).OnCustomToolChanged		  += OnCustomToolChanged;
            //((FileNodeProperties)NodeProperties).OnCustomToolNameSpaceChanged += OnCustomToolNameSpaceChanged;

            // HasDesigner property is not virtual, so we have to set it up in the ctor.
            InferHasDesignerFromSubType();

            var url = this.Url;
            var ext = Path.GetExtension(url);

            //if (ext.Equals(".resx", StringComparison.InvariantCultureIgnoreCase))
            //{
            //  // TODO: ”далить это дело, так как теперь оповещени¤ должны быть реализованы в Engine.
            //  url = Path.GetFullPath(this.Url);
            //  var path = Path.GetDirectoryName(url);
            //  var name = Path.GetFileName(url);
            //  _watcher = new FileSystemWatcher(path, name);
            //  _watcher.NotifyFilter = NotifyFilters.LastWrite;
            //  _watcher.Changed += watcher_Changed;
            //  _watcher.EnableRaisingEvents = true;
            //}
        }
开发者ID:vestild,项目名称:nemerle,代码行数:32,代码来源:NemerleFileNode.cs


示例5: ComReferenceNode

        public ComReferenceNode(ProjectNode root, VSCOMPONENTSELECTORDATA selectorData)
            : base(root)
        {
            if(root == null)
            {
                throw new ArgumentNullException("root");
            }
            if(selectorData.type == VSCOMPONENTTYPE.VSCOMPONENTTYPE_Project
                || selectorData.type == VSCOMPONENTTYPE.VSCOMPONENTTYPE_ComPlus)
            {
                throw new ArgumentException("SelectorData cannot be of type VSCOMPONENTTYPE.VSCOMPONENTTYPE_Project or VSCOMPONENTTYPE.VSCOMPONENTTYPE_ComPlus", "selectorData");
            }

            // Initialize private state
            this.typeName = selectorData.bstrTitle;
            this.typeGuid = selectorData.guidTypeLibrary;
            this.majorVersionNumber = selectorData.wTypeLibraryMajorVersion.ToString(CultureInfo.InvariantCulture);
            this.minorVersionNumber = selectorData.wTypeLibraryMinorVersion.ToString(CultureInfo.InvariantCulture);
            this.lcid = selectorData.lcidTypeLibrary.ToString(CultureInfo.InvariantCulture);

            // Check to see if the COM object actually exists.
            this.SetInstalledFilePath();
            // If the value cannot be set throw.
            if(String.IsNullOrEmpty(this.installedFilePath))
            {
                throw new InvalidOperationException();
            }
        }
开发者ID:TerabyteX,项目名称:main,代码行数:28,代码来源:ComReferenceNode.cs


示例6: AssemblyReferenceNode

        /// <summary>
        /// Constructor for the AssemblyReferenceNode
        /// </summary>
        public AssemblyReferenceNode(ProjectNode root, string assemblyPath)
            : base(root)
        {
            // Validate the input parameters.
            if(null == root)
            {
                throw new ArgumentNullException("root");
            }
            if(string.IsNullOrEmpty(assemblyPath))
            {
                throw new ArgumentNullException("assemblyPath");
            }

            this.InitializeFileChangeEvents();

            // The assemblyPath variable can be an actual path on disk or a generic assembly name.
            if(File.Exists(assemblyPath))
            {
                // The assemblyPath parameter is an actual file on disk; try to load it.
                this.assemblyName = System.Reflection.AssemblyName.GetAssemblyName(assemblyPath);
                this.assemblyPath = assemblyPath;

                // We register with listeningto chnages onteh path here. The rest of teh cases will call into resolving the assembly and registration is done there.
                this.fileChangeListener.ObserveItem(this.assemblyPath);
            }
            else
            {
                // The file does not exist on disk. This can be because the file / path is not
                // correct or because this is not a path, but an assembly name.
                // Try to resolve the reference as an assembly name.
                this.CreateFromAssemblyName(new System.Reflection.AssemblyName(assemblyPath));
            }
        }
开发者ID:vestild,项目名称:nemerle,代码行数:36,代码来源:AssemblyReferenceNode.cs


示例7: BooFileNode

 public BooFileNode(ProjectNode root, ProjectElement e)
     : base(root, e)
 {
     results = new CompileResults(() => Url, GetCompilerInput, ()=>GlobalServices.LanguageService.GetLanguagePreferences().TabSize);
     languageService = (BooLanguageService)GetService(typeof(BooLanguageService));
     hidden = true;
 }
开发者ID:pshiryaev,项目名称:Boo-Plugin,代码行数:7,代码来源:BooFileNode.cs


示例8: XSharpFileNode

 /// <summary>
 /// Initializes a new instance of the <see cref="XSharpFileNode"/> class.
 /// </summary>
 /// <param name="root">The project node.</param>
 /// <param name="e">The project element node.</param>
 internal XSharpFileNode(ProjectNode root, ProjectElement e)
     : base(root, e)
 {
     //
     this.UpdateHasDesigner();
     this.UpdateItemType();
 }
开发者ID:X-Sharp,项目名称:XSharpPublic,代码行数:12,代码来源:XSharpFileNode.cs


示例9: IsProjectOpened

 private static bool IsProjectOpened(ProjectNode project)
 {
     if(null == projectOpened)
     {
         projectOpened = typeof(VisualStudio.Project.ProjectNode).GetField("projectOpened", BindingFlags.Instance | BindingFlags.NonPublic);
     }
     return (bool)projectOpened.GetValue(project);
 }
开发者ID:ldematte,项目名称:BlenXVSP,代码行数:8,代码来源:ProjectEventsTest.cs


示例10: 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)
 {
     if(this.ProjectMgr.NodeHasDesigner(this.ItemNode.GetMetadata(ProjectFileConstants.Include)))
     {
         this.HasDesigner = true;
     }
 }
开发者ID:ldematte,项目名称:BlenXVSP,代码行数:13,代码来源:FileNode.cs


示例11: NemerleFolderNode

        public NemerleFolderNode(ProjectNode root, string directoryPath, ProjectElement element, bool isNonMemberItem)
            : base(root, directoryPath, element)
        {
            IsNonMemberItem = isNonMemberItem;

            // Folders do not participate in SCC.
            ExcludeNodeFromScc = true;
        }
开发者ID:vestild,项目名称:nemerle,代码行数:8,代码来源:NemerleFolderNode.cs


示例12: AvailableFileBuildActionConverter

        public AvailableFileBuildActionConverter(ProjectNode projectNode)
            : base(typeof(prjBuildAction))
        {
            if (projectNode == null)
                throw new ArgumentNullException("projectNode");

            _projectManager = projectNode;
        }
开发者ID:tunnelvisionlabs,项目名称:MPFProj10,代码行数:8,代码来源:AvailableFileBuildActionConverter.cs


示例13: JarReferenceNode

        public JarReferenceNode(ProjectNode root, string fileName)
            : base(root)
        {
            Contract.Requires<ArgumentNullException>(root != null, "root");
            Contract.Requires<ArgumentNullException>(fileName != null, "fileName");
            Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(fileName));

            _projectRelativeFilePath = fileName;
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:9,代码来源:JarReferenceNode.cs


示例14: 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)
        {
            if(projectManager == null)
                throw new ArgumentNullException("projectManager");
            if(outputAssembly == null)
                throw new ArgumentNullException("outputAssembly");

            project = projectManager;
            output = outputAssembly;
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:15,代码来源:Output.cs


示例15: FolderNode

        /// <summary>
        /// Constructor for the FolderNode
        /// </summary>
        /// <param name="root">Root node of the hierarchy</param>
        /// <param name="relativePath">relative path from root i.e.: "NewFolder1\\NewFolder2\\NewFolder3</param>
        /// <param name="element">Associated project element</param>
        public FolderNode(ProjectNode root, string relativePath, ProjectElement element)
            : base(root, element)
        {
            if (relativePath == null)
            {
                throw new ArgumentNullException("relativePath");
            }

            this.VirtualNodeName = relativePath.TrimEnd('\\');
        }
开发者ID:TerabyteX,项目名称:main,代码行数:16,代码来源:FolderNode.cs


示例16: Get

        public static string Get(ProjectNode projectNode)
        {
            var connectionString = projectNode.CurrentConfig.GetPropertyValue(Constants.EventStore.ConnectionString);
            if (String.IsNullOrWhiteSpace(connectionString))
                throw new EventStoreConnectionException(
                    "Unable to connect to the EventStore. Connection string is not specified.",
                    HttpStatusCode.ServiceUnavailable);

            return Get(connectionString);
        }
开发者ID:AlexeyRaga,项目名称:esvstools,代码行数:10,代码来源:EventStoreAddress.cs


示例17: NemerleMacroAssemblyReferenceNode

 /// <summary>
 /// Constructor for the AssemblyReferenceNode
 /// </summary>
 public NemerleMacroAssemblyReferenceNode(ProjectNode root, string assemblyPath)
     : base(root, assemblyPath)
 {
     // AssemblyReferenceNode is useless without 'resolvedAssemblyName' field set.
     // The only way to set the 'AssemblyReferenceNode.resolvedAssemblyName' field
     // is a call to ResolveReference(), wich is redundant, since the assemly
     // was loaded by its path. ;)
     //
     ResolveReference();
 }
开发者ID:vestild,项目名称:nemerle,代码行数:13,代码来源:NemerleMacroAssemblyReferenceNode.cs


示例18: JarReferenceNode

        public JarReferenceNode(ProjectNode root, ProjectElement element)
            : base(root, element)
        {
            if (root == null)
                throw new ArgumentNullException("root");
            if (element == null)
                throw new ArgumentNullException("element");

            _projectRelativeFilePath = element.Item.EvaluatedInclude;
            ProjectManager.ItemIdMap.UpdateCanonicalName(this);
        }
开发者ID:modulexcite,项目名称:DartVS,代码行数:11,代码来源:JarReferenceNode.cs


示例19: JavaFolderNode

        public JavaFolderNode(ProjectNode root, string relativePath, ProjectElement element)
            : base(root, relativePath, element)
        {
            Contract.Requires(root != null);
            Contract.Requires(relativePath != null);
            Contract.Requires(element != null);

            if (element.IsVirtual)
            {
                string buildAction = element.GetMetadata(ProjectFileConstants.BuildAction);
                if (buildAction == ProjectFileConstants.Folder)
                    this.IsNonmemberItem = false;
            }
        }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:14,代码来源:JavaFolderNode.cs


示例20: Initialize

		public virtual void Initialize(ProjectNode projectNode)
		{
			if (projectNode == null)
			{
				throw new ArgumentNullException("projectNode");
			}

			if (projectNode.CallMSBuild("GetFrameworkPaths") != MSBuildResult.Successful)
			{
				throw new InvalidOperationException("Build of GetFrameworkPaths failed.");
			}

			this.rarInputs = new RarInputs(projectNode.CurrentConfig);
		}
开发者ID:Zino2201,项目名称:Cosmos,代码行数:14,代码来源:DesignTimeAssemblyResolution.cs



注:本文中的Microsoft.VisualStudio.Project.ProjectNode类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Shell.ErrorListProvider类代码示例发布时间:2022-05-26
下一篇:
C# Project.ProjectElement类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap