本文整理汇总了C#中MonoDevelop.Projects.ProjectCreateInformation类的典型用法代码示例。如果您正苦于以下问题:C# ProjectCreateInformation类的具体用法?C# ProjectCreateInformation怎么用?C# ProjectCreateInformation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectCreateInformation类属于MonoDevelop.Projects命名空间,在下文中一共展示了ProjectCreateInformation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CreateEveryProjectTemplate
public void CreateEveryProjectTemplate ()
{
var builder = new StringBuilder ();
foreach (var template in ProjectTemplate.ProjectTemplates) {
if (template.Name.Contains ("Gtk#"))
continue;
try {
try { Directory.Delete (TempDir, true); } catch { }
var cinfo = new ProjectCreateInformation {
ProjectBasePath = TempDir,
ProjectName = "ProjectName",
SolutionName = "SolutionName",
SolutionPath = TempDir
};
template.CreateWorkspaceItem (cinfo);
} catch {
builder.AppendFormat ("Could not create a project from the template '{0} / {1}'", template.Category, template.Name);
builder.AppendLine ();
}
}
if (builder.Length > 0)
Assert.Fail (builder.ToString ());
}
开发者ID:LogosBible,项目名称:monodevelop,代码行数:25,代码来源:ProjectTemplateTests.cs
示例2: CreateSingleFileProject
public Project CreateSingleFileProject (string sourceFile)
{
ProjectCreateInformation info = new ProjectCreateInformation ();
info.ProjectName = Path.GetFileNameWithoutExtension (sourceFile);
info.CombinePath = Path.GetDirectoryName (sourceFile);
info.ProjectBasePath = Path.GetDirectoryName (sourceFile);
string language = string.Empty;
switch (Path.GetExtension (sourceFile))
{
case ".c":
language = "C";
break;
case ".cpp":
language = "CPP";
break;
case ".cxx":
language = "CPP";
break;
}
if (language.Length > 0) {
Project project = new CProject (info, null, language);
project.ProjectFiles.Add (new ProjectFile (sourceFile));
return project;
}
return null;
}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:30,代码来源:CProjectBinding.cs
示例3: GetDefaultTargetPlatform
protected override string GetDefaultTargetPlatform (ProjectCreateInformation projectCreateInfo)
{
if (CompileTarget == CompileTarget.Library)
return string.Empty;
// Guess a good default platform for the project
if (projectCreateInfo.ParentFolder != null && projectCreateInfo.ParentFolder.ParentSolution != null) {
ItemConfiguration conf = projectCreateInfo.ParentFolder.ParentSolution.GetConfiguration (projectCreateInfo.ActiveConfiguration);
if (conf != null)
return conf.Platform;
else {
string curName, curPlatform, bestPlatform = null;
string sconf = projectCreateInfo.ActiveConfiguration.ToString ();
ItemConfiguration.ParseConfigurationId (sconf, out curName, out curPlatform);
foreach (ItemConfiguration ic in projectCreateInfo.ParentFolder.ParentSolution.Configurations) {
if (ic.Platform == curPlatform)
return curPlatform;
if (ic.Name == curName)
bestPlatform = ic.Platform;
}
if (bestPlatform != null)
return bestPlatform;
}
}
return Services.ProjectService.DefaultPlatformTarget;
}
开发者ID:nieve,项目名称:monodevelop,代码行数:26,代码来源:DotNetAssemblyProject.cs
示例4: CreatePackagingProjectFromTemplate
public async Task CreatePackagingProjectFromTemplate ()
{
string templateId = "MonoDevelop.Packaging.Project";
var template = ProjectTemplate.ProjectTemplates.FirstOrDefault (t => t.Id == templateId);
var dir = Util.CreateTmpDir (template.Id);
var cinfo = new ProjectCreateInformation {
ProjectBasePath = dir,
ProjectName = "ProjectName",
SolutionName = "SolutionName",
SolutionPath = dir
};
var workspaceItem = template.CreateWorkspaceItem (cinfo);
string solutionFileName = Path.Combine (dir, "SolutionName.sln");
await workspaceItem.SaveAsync (solutionFileName, Util.GetMonitor ());
string projectFileName = Path.Combine (dir, "ProjectName.nuproj");
var project = await MSBuildProject.LoadAsync (projectFileName);
// First element is NuGet.Packaging.props
var import = project.GetAllObjects ().FirstOrDefault () as MSBuildImport;
Assert.AreEqual (import.Project, @"$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.props");
// NuGet.Packaging.targets exists.
import = project.Imports.LastOrDefault () as MSBuildImport;
Assert.AreEqual (import.Project, @"$(NuGetAuthoringPath)\NuGet.Packaging.Authoring.targets");
int count = project.Imports.Count ();
import = project.Imports.Skip (count - 2).FirstOrDefault ();
Assert.AreEqual (import.Project, @"$(MSBuildBinPath)\Microsoft.Common.targets");
}
开发者ID:PlayScriptRedux,项目名称:monodevelop,代码行数:31,代码来源:ProjectTemplateTests.cs
示例5: CreateEveryProjectTemplate
public void CreateEveryProjectTemplate()
{
var builder = new StringBuilder ();
foreach (var template in ProjectTemplate.ProjectTemplates) {
if (template.Name.Contains ("Gtk#"))
continue;
try {
var dir = Util.CreateTmpDir (template.Id);
var cinfo = new ProjectCreateInformation {
ProjectBasePath = dir,
ProjectName = "ProjectName",
SolutionName = "SolutionName",
SolutionPath = dir
};
template.CreateWorkspaceItem (cinfo);
} catch (Exception ex) {
builder.AppendFormat (
"Could not create a project from the template '{0} / {1}': {2}",
template.Category, template.Name, ex
);
builder.AppendLine ();
builder.AppendLine ();
builder.AppendLine (ex.ToString ());
builder.AppendLine ();
}
}
if (builder.Length > 0)
Assert.Fail (builder.ToString ());
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:30,代码来源:ProjectTemplateTests.cs
示例6: OnInitializeFromTemplate
protected override void OnInitializeFromTemplate (ProjectCreateInformation projectCreateInfo, System.Xml.XmlElement template)
{
base.OnInitializeFromTemplate (projectCreateInfo, template);
// Support more options when creating a VB.NET project:
// 1) support adding vb imports
var assemblyProject = Project;
if (assemblyProject != null) {
var imports = template.GetAttribute ("VBImports");
if (imports != null) {
try {
var importType = Type.GetType ("MonoDevelop.VBNetBinding.Import, MonoDevelop.VBNetBinding");
if (importType != null) {
var importReferences = imports.Split (new [] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var elem in importReferences) {
// use reflection to avoid hard ref
var import = Activator.CreateInstance (importType, elem.Trim ());
assemblyProject.Items.Add ((ProjectItem)import);
}
}
} catch {
// ignore
}
}
}
}
开发者ID:picoe,项目名称:Eto,代码行数:27,代码来源:VBDotNetProjectExtension.cs
示例7: PythonProject
public PythonProject (string languageName,
ProjectCreateInformation info,
XmlElement projectOptions)
{
PythonConfiguration defaultConfig;
string binPath;
if (!String.Equals (s_ProjectType, languageName)) {
throw new ArgumentException ("Not Python Project");
}
if (info != null) {
binPath = info.BinPath;
this.Name = info.ProjectName;
}
else {
binPath = ".";
}
// Setup our Debug configuration
defaultConfig = CreateConfiguration ("Debug") as PythonConfiguration;
this.Configurations.Add (defaultConfig);
// Setup our Release configuration
defaultConfig = CreateConfiguration ("Release") as PythonConfiguration;
defaultConfig.Optimize = true;
this.Configurations.Add (defaultConfig);
// Setup proper paths for all configurations
foreach (PythonConfiguration config in this.Configurations) {
config.OutputDirectory = Path.Combine (binPath, config.Name);
}
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:33,代码来源:PythonProject.cs
示例8: MonobjcProject
/// <summary>
/// Initializes a new instance of the <see cref = "MonobjcProject" /> class.
/// </summary>
/// <param name = "language">The language.</param>
/// <param name = "info">The info.</param>
/// <param name = "projectOptions">The project options.</param>
public MonobjcProject (String language, ProjectCreateInformation info, XmlElement projectOptions) : base(language, info, projectOptions)
{
IDELogger.Log ("MonobjcProject::ctor3");
this.ApplicationType = GetNodeValue (projectOptions, "MacOSApplicationType", MonobjcProjectType.CocoaApplication);
this.ApplicationCategory = GetNodeValue (projectOptions, "MacOSApplicationCategory", String.Empty);
this.BundleId = GetNodeValue (projectOptions, "BundleId", "net.monobjc.application.Test");
this.BundleVersion = GetNodeValue (projectOptions, "BundleVersion", "1.0");
this.MainNibFile = GetNodeValue (projectOptions, "MainNibFile", null);
this.BundleIcon = GetNodeValue (projectOptions, "BundleIcon", null);
this.TargetOSVersion = GetNodeValue (projectOptions, "MacOSVersion", MacOSVersion.MacOS106);
this.Signing = Boolean.Parse (GetNodeValue (projectOptions, "Signing", "false"));
this.SigningIdentity = GetNodeValue (projectOptions, "SigningIdentity", String.Empty);
this.UseEntitlements = Boolean.Parse (GetNodeValue (projectOptions, "UseEntitlements", "false"));
this.OSFrameworks = GetNodeValue (projectOptions, "MacOSFrameworks", String.Empty);
this.TargetOSArch = GetNodeValue (projectOptions, "MacOSArch", MacOSArchitecture.X86);
this.EmbeddedFrameworks = GetNodeValue (projectOptions, "EmbeddedFrameworks", String.Empty);
this.AdditionalAssemblies = GetNodeValue (projectOptions, "AdditionalAssemblies", String.Empty);
this.ExcludedAssemblies = GetNodeValue (projectOptions, "ExcludedAssemblies", String.Empty);
this.AdditionalLibraries = GetNodeValue (projectOptions, "AdditionalLibraries", String.Empty);
this.Archive = Boolean.Parse (GetNodeValue (projectOptions, "Archive", "false"));
this.ArchiveIdentity = GetNodeValue (projectOptions, "ArchiveIdentity", String.Empty);
this.DevelopmentRegion = GetNodeValue (projectOptions, "MacOSDevelopmentRegion", "en");
this.CombineArtwork = Boolean.Parse (GetNodeValue (projectOptions, "CombineArtwork", "false"));
this.Initialize ();
}
开发者ID:Monobjc,项目名称:monobjc-monodevelop,代码行数:36,代码来源:MonobjcProject.cs
示例9: HaxeProject
public HaxeProject(ProjectCreateInformation info, XmlElement projectOptions)
: base()
{
if (projectOptions.Attributes ["TargetHXMLFile"] != null)
{
TargetHXMLFile = GetOptionAttribute (info, projectOptions, "TargetHXMLFile");
}
if (projectOptions.Attributes ["AdditionalArguments"] != null)
{
AdditionalArguments = GetOptionAttribute (info, projectOptions, "AdditionalArguments");
}
HaxeProjectConfiguration configuration;
configuration = (HaxeProjectConfiguration)CreateConfiguration ("Debug");
configuration.DebugMode = true;
//configuration.Platform = target;
Configurations.Add (configuration);
configuration = (HaxeProjectConfiguration)CreateConfiguration ("Release");
configuration.DebugMode = false;
//configuration.Platform = target;
Configurations.Add (configuration);
}
开发者ID:rynti,项目名称:md-haxebinding,代码行数:29,代码来源:HaxeProject.cs
示例10: OnInitializeFromTemplate
protected override void OnInitializeFromTemplate (ProjectCreateInformation projectCreateInfo, XmlElement template)
{
base.OnInitializeFromTemplate (projectCreateInfo, template);
if (template.GetAttribute ("HideGettingStarted")?.ToLower () == "true")
Project.UserProperties.SetValue ("HideGettingStarted", true);
else
showGettingStartedOnce = true;
}
开发者ID:kdubau,项目名称:monodevelop,代码行数:8,代码来源:GettingStartedProjectExtension.cs
示例11: RubyProject
public RubyProject(ProjectCreateInformation info,
XmlElement projectOptions, string language)
{
if (info != null) {
Name = info.ProjectName;
}
Configurations.Add (CreateConfiguration ("Default"));
}
开发者ID:nover,项目名称:rubybinding,代码行数:8,代码来源:RubyProject.cs
示例12: OpenFLProject
public OpenFLProject(ProjectCreateInformation info, XmlElement projectOptions)
: base()
{
if (projectOptions.Attributes ["TargetProjectXMLFile"] != null)
{
TargetProjectXMLFile = GetOptionAttribute (info, projectOptions, "TargetProjectXMLFile");
}
if (projectOptions.Attributes ["AdditionalArguments"] != null)
{
AdditionalArguments = GetOptionAttribute (info, projectOptions, "AdditionalArguments");
}
OpenFLProjectConfiguration configuration;
string[] targets = new string[] { "Android", "BlackBerry", "Flash", "HTML5", "iOS", "Linux", "Mac", "webOS", "Windows" };
foreach (string target in targets)
{
configuration = (OpenFLProjectConfiguration)CreateConfiguration ("Debug");
configuration.DebugMode = true;
configuration.Platform = target;
if (target == "iOS")
{
configuration.AdditionalArguments = "-simulator";
}
Configurations.Add (configuration);
}
foreach (string target in targets)
{
configuration = (OpenFLProjectConfiguration)CreateConfiguration ("Release");
configuration.DebugMode = false;
configuration.Platform = target;
if (target == "iOS")
{
configuration.AdditionalArguments = "-simulator";
}
Configurations.Add (configuration);
}
}
开发者ID:ThomasMadappattu,项目名称:md-haxebinding,代码行数:57,代码来源:OpenFLProject.cs
示例13: ProjectCreateInformation
public ProjectCreateInformation (ProjectCreateInformation projectCreateInformation)
{
projectName = projectCreateInformation.ProjectName;
solutionName = projectCreateInformation.SolutionName;
solutionPath = projectCreateInformation.SolutionPath;
projectBasePath = projectCreateInformation.ProjectBasePath;
ParentFolder = projectCreateInformation.ParentFolder;
ActiveConfiguration = projectCreateInformation.ActiveConfiguration;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:9,代码来源:ProjectCreateInformation.cs
示例14: IodineProject
public IodineProject(ProjectCreateInformation info, XmlElement projectOptions)
: this()
{
if (info != null) {
this.Name = info.ProjectName;
}
IodineConfiguration releaseConfig = CreateConfiguration ("Release") as IodineConfiguration;
Configurations.Add (releaseConfig);
}
开发者ID:IodineLang,项目名称:IodineBindings,代码行数:9,代码来源:IodineProject.cs
示例15: CreateSingleFileProject
public Project CreateSingleFileProject (string sourceFile)
{
ProjectCreateInformation info = new ProjectCreateInformation ();
info.ProjectName = Path.GetFileNameWithoutExtension (sourceFile);
info.SolutionPath = Path.GetDirectoryName (sourceFile);
info.ProjectBasePath = Path.GetDirectoryName (sourceFile);
PythonProject project = new PythonProject (m_Language, info, null);
project.Files.Add (new ProjectFile (sourceFile));
return project;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:11,代码来源:PythonProjectBinding.cs
示例16: MonoMacProject
public MonoMacProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
: base (languageName, info, projectOptions)
{
Init ();
/* TODO
var mainNibAtt = projectOptions.Attributes ["MainNibFile"];
if (mainNibAtt != null) {
this.mainNibFile = mainNibAtt.InnerText;
}
*/
}
开发者ID:Poiros,项目名称:monodevelop,代码行数:11,代码来源:MonoMacProject.cs
示例17: GoldProject
/// <summary>
/// Initializes a new instance of the <see cref="GoldAddin.GoldProject"/> class.
/// </summary>
/// <remarks>this constructor is invoked when a new project is created in the IDE</remarks>
public GoldProject(ProjectCreateInformation info, XmlElement projectOptions)
{
init ();
//a project will not build unless at least 1 configuration is set
var config = (GoldProjectConfiguration)(CreateConfiguration ("Release"));
config.DebugMode = false;
config.OutputFormat = GrammarTableFormat.CompiledGrammarTable;
config.GrammarTableName = info.ProjectName;
config.OutputDirectory = info.BinPath;
Configurations.Add(config);
}
开发者ID:rwbloc,项目名称:gold-addin,代码行数:16,代码来源:GoldProject.cs
示例18: PythonProject
public PythonProject (ProjectCreateInformation info, XmlElement projectOptions)
{
if (info != null) {
Name = info.ProjectName;
Configurations.Add (CreateConfiguration ("Debug"));
Configurations.Add (CreateConfiguration ("Release"));
foreach (PythonCompilerParameters parameter in Configurations) {
parameter.OutputDirectory = Path.Combine (info.BinPath, parameter.Name);
parameter.OutputAssembly = Name;
}
}
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:PythonProject.cs
示例19: CucumberProject
public CucumberProject(ProjectCreateInformation info,
XmlElement projectOptions)
{
if (info != null) {
Name = info.ProjectName;
}
CucumberProjectConfiguration configuration =
(CucumberProjectConfiguration)CreateConfiguration ("Default");
Configurations.Add (configuration);
}
开发者ID:ItsVeryWindy,项目名称:Mono-Cucumber,代码行数:12,代码来源:CucumberProject.cs
示例20: CreateSingleFileProject
public Project CreateSingleFileProject(string sourceFile)
{
var info = new ProjectCreateInformation () {
ProjectName = Path.GetFileNameWithoutExtension (sourceFile),
SolutionPath = Path.GetDirectoryName (sourceFile),
ProjectBasePath = Path.GetDirectoryName (sourceFile),
};
Project project = new CucumberProject (info, null);
project.Files.Add (new ProjectFile (sourceFile));
return project;
}
开发者ID:ItsVeryWindy,项目名称:Mono-Cucumber,代码行数:12,代码来源:CucumberProjectBinding.cs
注:本文中的MonoDevelop.Projects.ProjectCreateInformation类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论