当前位置: 首页>>代码示例>>C#>>正文


C# ProjectInfo类代码示例

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


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

示例1: PropertiesForm

		public PropertiesForm(ProfilerProjectMode mode)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			projectMode = ProfilerProjectMode.CreateProject;

			project = new ProjectInfo( ProjectType.File );
			this.Mode = mode;
			if (mode == ProfilerProjectMode.CreateProject)
			{
				List<string> files=SerializationHandler.GetRecentlyUsed();
				foreach (string file in files.GetRange(0,Math.Min(files.Count,5)))
				{
					LinkLabel label=new LinkLabel();
					label.AutoSize = true;
					label.Text=file;
					label.Click += delegate
					{
						ProfilerForm.form.Project = SerializationHandler.OpenProjectInfo(label.Text);
						Close();
					};
					recentProjects.Controls.Add(label);

				}
			}
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:32,代码来源:OptionsForm.cs

示例2: ProjectMetadata

 public ProjectMetadata(ProjectInfo projectInfo)
 {
     if (projectInfo == null)
         throw new ArgumentNullException("projectInfo");
     m_projectInfo = projectInfo;
     Init();
 }
开发者ID:MishaUliutin,项目名称:RemoveUnusedRef,代码行数:7,代码来源:ProjectMetadata.cs

示例3: GetProjectInfo

 public ProjectInfo GetProjectInfo()
 {
     var referenceProjectItems =
         from item in m_project.Items
         where item is ReferenceProjectItem
         select item as ReferenceProjectItem;
     var references =
         new List<ProjectReference>(referenceProjectItems.Count());
     referenceProjectItems.
         ForEach(item => references.Add(
             new ProjectReference
             {
                 Aliases = item.Aliases,
                 Name = item.Name,
                 Location = item.FileName,
                 Version = item.Version,
                 Culture = item.Culture,
                 PublicKeyToken = item.PublicKeyToken
             }));
     var projectInfo = new ProjectInfo
     {
         Name = m_project.Name,
         Configuration = m_project.ActiveConfiguration,
         Platform = m_project.ActivePlatform,
         OutputAssemblyPath = m_project.OutputAssemblyFullPath,
         Type = Guid.Parse(m_project.TypeGuid),
         References = references
     };
     return projectInfo;
 }
开发者ID:MishaUliutin,项目名称:RemoveUnusedRef,代码行数:30,代码来源:ShellProxy.cs

示例4: CreateUnusedReferencesList

 private IList<ProjectReference> CreateUnusedReferencesList(ProjectInfo projectInfo)
 {
     var references =
         from item in projectInfo.References
         where !item.Name.Equals(MsCorLib, StringComparison.InvariantCultureIgnoreCase) &&
             !item.Name.Equals(SystemCore, StringComparison.InvariantCultureIgnoreCase)
         select item;
     return references.ToList();
 }
开发者ID:MishaUliutin,项目名称:RemoveUnusedRef,代码行数:9,代码来源:UnusedReferencesAudit.cs

示例5: ProjectProvider

		public ProjectProvider (ProjectInfo pinfo) : base (null) {
			AddTarget ("name", pinfo.Name);
			AddTarget ("version", pinfo.Version);
			AddTarget ("compat_code", pinfo.CompatCode);

			// Alias to line up better with how it's declared
			// in the buildfile. (Need the underscore version so
			// we can reference it in .bundles)

			AddTarget ("compat-code", pinfo.CompatCode);
		}
开发者ID:emtees,项目名称:old-code,代码行数:11,代码来源:ProjectProvider.cs

示例6: Create

 public static ProjectAssemblyResolver Create(ProjectInfo projectInfo)
 {
     if (projectInfo == null)
         throw new ArgumentNullException("projectInfo");
     var assemblyResolver = new ProjectAssemblyResolver(projectInfo);
     assemblyResolver.AddSearchDirectory(Path.GetDirectoryName(projectInfo.OutputAssemblyPath));
     //assemblyResolver.AddSearchDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
     foreach (var path in GetLocations(projectInfo.References))
     {
         assemblyResolver.AddSearchDirectory(path);
     }
     return assemblyResolver;
 }
开发者ID:MishaUliutin,项目名称:RemoveUnusedRef,代码行数:13,代码来源:ProjectAssemblyResolver.cs

示例7: ProjectInfo_Serialization_InvalidFileName

        public void ProjectInfo_Serialization_InvalidFileName()
        {
            // 0. Setup
            ProjectInfo pi = new ProjectInfo();

            // 1a. Missing file name - save
            AssertException.Expects<ArgumentNullException>(() => pi.Save(null));
            AssertException.Expects<ArgumentNullException>(() => pi.Save(string.Empty));
            AssertException.Expects<ArgumentNullException>(() => pi.Save("\r\t "));

            // 1b. Missing file name - load
            AssertException.Expects<ArgumentNullException>(() => ProjectInfo.Load(null));
            AssertException.Expects<ArgumentNullException>(() => ProjectInfo.Load(string.Empty));
            AssertException.Expects<ArgumentNullException>(() => ProjectInfo.Load("\r\t "));
        }
开发者ID:BrightLight,项目名称:sonar-msbuild-runner,代码行数:15,代码来源:ProjectInfoTests.cs

示例8: Create

 public static UnusedReferencesAudit Create(ProjectInfo projectInfo)
 {
     if (projectInfo == null)
         throw new ArgumentNullException("projectInfo");
     switch (projectInfo.Type.ToString("D"))
     {
         case CSharpProjectTypeString:
             return new CSharpProjectAudit(projectInfo);
         case VBasicProjectTypeString:
             return new VBasicProjectAudit(projectInfo);
         case CppCliProjectTypeString:
             return new CppCliProjectAudit(projectInfo);
         default:
             throw new NotImplementedException();
     }
 }
开发者ID:MishaUliutin,项目名称:RemoveUnusedRef,代码行数:16,代码来源:UnusedReferencesAuditFactory.cs

示例9: getValue

 public static List<ProjectInfo> getValue(string sql)
 {
     List<ProjectInfo> list = new List<ProjectInfo>();
     OleDbDataReader odr = DBHelper.GetReader(sql);
     while (odr.Read())
     {
         ProjectInfo pi = new ProjectInfo();
         pi.ProjectID = Convert.ToInt32(odr["ProjectID"]);
         pi.ProjectName = odr["ProjectName"].ToString();
         pi.Province = odr["Province"].ToString();
         pi.Remarks = odr["remarks"].ToString();
         list.Add(pi);
     }
     odr.Close();
     return list;
 }
开发者ID:aifang,项目名称:ExceptionsCollectionSystem,代码行数:16,代码来源:ProjectService.cs

示例10: NemerleContainedLanguage

        public NemerleContainedLanguage(IVsTextBufferCoordinator bufferCoordinator, NemerleIntellisenseProvider intellisenseProject, uint itemId, IVsHierarchy pHierarchy)
        {
            if (null == bufferCoordinator)
            {
                throw new ArgumentNullException("bufferCoordinator");
            }
            if (null == intellisenseProject)
            {
                throw new ArgumentNullException("intellisenseProject");
            }
            _hierarchy = pHierarchy;

            object projectItem = null;
            pHierarchy.GetProperty(itemId, (int)__VSHPROPID.VSHPROPID_ExtObject, out projectItem);

            _projectItem = projectItem as EnvDTE.ProjectItem;

            EnvDTE.Property prop = _projectItem.Properties.Item("FullPath");
            if (prop != null)
                _filePath = prop.Value as string;

            var project = _projectItem.ContainingProject as NemerleOAProject;
            if(project != null)
            {
                _projectInfo = ((NemerleProjectNode)project.Project).ProjectInfo;
            }

            _typeResolutionService = null;
            DynamicTypeService typeService = LanguageService.GetService(typeof(DynamicTypeService)) as DynamicTypeService;
            if (typeService != null)
                _typeResolutionService = typeService.GetTypeResolutionService(this._hierarchy);

            this.bufferCoordinator = bufferCoordinator;
            this.intellisenseProject = intellisenseProject;
            this.itemId = itemId;

            // Make sure that the secondary buffer uses the IronPython language service.
            IVsTextLines buffer;
            ErrorHandler.ThrowOnFailure(bufferCoordinator.GetSecondaryBuffer(out buffer));

            Guid languageGuid;
            this.GetLanguageServiceID(out languageGuid);
            ErrorHandler.ThrowOnFailure(buffer.SetLanguageServiceID(ref languageGuid));

            _documentClosingEventHandler = new _dispDocumentEvents_DocumentClosingEventHandler(OnDocumentClosing);
        }
开发者ID:vestild,项目名称:nemerle,代码行数:46,代码来源:NemerleContainedLanguage.cs

示例11: ProjectInfo_Serialization_SaveAndReload

        public void ProjectInfo_Serialization_SaveAndReload()
        {
            // 0. Setup
            string testFolder = TestUtils.CreateTestSpecificFolder(this.TestContext);

            Guid projectGuid = Guid.NewGuid();

            ProjectInfo originalProjectInfo = new ProjectInfo();
            originalProjectInfo.FullPath = "c:\\fullPath\\project.proj";
            originalProjectInfo.ProjectLanguage = "a language";
            originalProjectInfo.ProjectType = ProjectType.Product;
            originalProjectInfo.ProjectGuid = projectGuid;
            originalProjectInfo.ProjectName = "MyProject";

            string fileName = Path.Combine(testFolder, "ProjectInfo1.xml");

            SaveAndReloadProjectInfo(originalProjectInfo, fileName);
        }
开发者ID:BrightLight,项目名称:sonar-msbuild-runner,代码行数:18,代码来源:ProjectInfoTests.cs

示例12: Open

        public static void Open(ProjectInfo project)
        {
            foreach (var view in IdeApp.Workbench.Documents)
            {
                var sourceDoc = view.GetContent<SourceControlExplorerView>();
                if (sourceDoc != null)
                {
                    sourceDoc.Load(project.Collection);
                    sourceDoc.ExpandPath(VersionControlPath.RootFolder + project.Name);
                    view.Window.SelectWindow();
                    return;
                }
            }

            var sourceControlExplorerView = new SourceControlExplorerView();
            sourceControlExplorerView.Load(project.Collection);
            sourceControlExplorerView.ExpandPath(VersionControlPath.RootFolder + project.Name);
            IdeApp.Workbench.OpenDocument(sourceControlExplorerView, true);
        }
开发者ID:Indomitable,项目名称:monodevelop-tfs-addin,代码行数:19,代码来源:SourceControlExplorerView.cs

示例13: GetResult

			public override object GetResult(out int level)
			{
				level = 1;
				ProjectInfo project = new ProjectInfo();
				NProf.form.Project = project;
				Profiler profiler = new Profiler();
				//project.ApplicationName = @"D:\Meta\0.2\bin\Debug\Meta.exe";
				//project.Arguments = "-test";
				project.ApplicationName = Path.Combine(NProfDirectory, @"TestProfilee\bin\Debug\TestProfilee.exe");

				run = project.CreateRun(profiler);
				run.profiler.Completed += new EventHandler(profiler_Completed);
				run.Start();

				while (result == null)
				{
					Thread.Sleep(100);
				}
				return result;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:20,代码来源:Test.cs

示例14: AddProject

        public ActionResult AddProject( [DataSourceRequest] DataSourceRequest request,ProjectInfoModel model)
        {
            ProjectInfo project = new ProjectInfo();
            var getSatusId = _projects.GetstatusName(model.StatusName);
            if(ModelState.IsValid)
            {
                project.Id = model.Id;
                project.PM = model.PM;
                project.Project = model.Project;
                project.ProjectComment = model.ProjectComment;
                project.statusId = getSatusId.Id;
                project.percentage = model.percentage;
                _projects.CreateProjects(project);
                TempData["success"] = "Edited Succefully";
            }
            else
            {
                TempData["fail"] = " Not Edited Succefully";
            }

            return RedirectToAction("ProjectOnDisplay", "AdminProject");
        }
开发者ID:Oluyide,项目名称:ABUFORM,代码行数:22,代码来源:AdminProjectController.cs

示例15: NemerleErrorTask

        public NemerleErrorTask(ProjectInfo projectInfo, CompilerMessage compilerMessage)
        {
            ErrorHelper.ThrowIsNull(projectInfo,     "projectInfo");
            ErrorHelper.ThrowIsNull(compilerMessage, "compilerMessage");

            ProjectInfo     = projectInfo;
            CompilerMessage = compilerMessage;

            var loc = compilerMessage.Location;

            if (loc.FileIndex != 0)
            {
                var span = Utils.SpanFromLocation(loc);
                Document = loc.File;
                Line     = span.iStartLine;
                Column   = span.iStartIndex;
            }

            Text = compilerMessage.Msg;

            switch (compilerMessage.Kind)
            {
                case MessageKind.Error:
                    Priority = TaskPriority.High;
                    ErrorCategory = TaskErrorCategory.Error;
                    break;
                case MessageKind.Warning:
                    Priority = TaskPriority.Normal;
                    ErrorCategory = TaskErrorCategory.Warning;
                    break;
                default:
                    Priority = TaskPriority.Low;
                    ErrorCategory = TaskErrorCategory.Message;
                    break;
            }

            Category = TaskCategory.BuildCompile;
            HierarchyItem = projectInfo.ProjectNode.InteropSafeHierarchy;
        }
开发者ID:vestild,项目名称:nemerle,代码行数:39,代码来源:NemerleErrorTask.cs


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