本文整理汇总了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);
}
}
}
示例2: ProjectMetadata
public ProjectMetadata(ProjectInfo projectInfo)
{
if (projectInfo == null)
throw new ArgumentNullException("projectInfo");
m_projectInfo = projectInfo;
Init();
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
示例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 "));
}
示例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();
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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");
}
示例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;
}