本文整理汇总了C#中MonoDevelop.Projects.DotNetProject类的典型用法代码示例。如果您正苦于以下问题:C# DotNetProject类的具体用法?C# DotNetProject怎么用?C# DotNetProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DotNetProject类属于MonoDevelop.Projects命名空间,在下文中一共展示了DotNetProject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CheckConfigurationMappings
static void CheckConfigurationMappings(DotNetProject project, string currentConfig)
{
var projConfig = (DotNetProjectConfiguration)project.GetConfiguration (IdeApp.Workspace.ActiveConfiguration);
if (project.GetConfigurations ().Contains (currentConfig) && projConfig.Name != currentConfig)
LogIssue (project, "configuration", currentConfig, projConfig.Name);
if (currentConfig.IndexOf ("Debug", StringComparison.OrdinalIgnoreCase) != -1)
return;
// Fixup entries for release configs.
var debugEntry = project.ParentSolution
.GetConfiguration (new SolutionConfigurationSelector (currentConfig.Replace ("Release", "Debug")))
.GetEntryForItem (project);
if (debugEntry == null)
return;
IdeApp.Workspace.ActiveConfigurationId = currentConfig;
var entry = project.ParentSolution.GetConfiguration (IdeApp.Workspace.ActiveConfiguration).GetEntryForItem (project);
entry.Build = debugEntry.Build;
entry.Deploy = debugEntry.Deploy;
var newConfig = debugEntry.ItemConfiguration.Replace ("Debug", "Release");
if (project.GetConfigurations ().Any (config => config == newConfig))
entry.ItemConfiguration = newConfig;
else {
LogIssue (project, "configuration", newConfig, "Missing");
entry.ItemConfiguration = debugEntry.ItemConfiguration;
}
}
开发者ID:Therzok,项目名称:ConfigurationValidator,代码行数:30,代码来源:ConfigurationValidator.cs
示例2: GetProjectInfo
public NSObjectProjectInfo GetProjectInfo (DotNetProject project, IAssembly lookinAssembly = null)
{
var dom = TypeSystemService.GetProjectContentWrapper (project);
project.ReferenceAddedToProject += HandleDomReferencesUpdated;
project.ReferenceRemovedFromProject += HandleDomReferencesUpdated;
return GetProjectInfo (dom, lookinAssembly);
}
开发者ID:sparek,项目名称:monodevelop,代码行数:7,代码来源:NSObjectInfoService.cs
示例3: LoadConfigData
public void LoadConfigData (ProjectConfigurationPropertyPanel dlg)
{
configuration = (DotNetProjectConfiguration) dlg.CurrentConfiguration;
project = (DotNetProject) dlg.ConfiguredProject;
compilerParameters = (JavaCompilerParameters) configuration.CompilationParameters;
compileTargetCombo.Active = (int) configuration.CompileTarget;
if (compilerParameters.Compiler == JavaCompiler.Javac)
compilerJavacButton.Active = true;
else
compilerGcjButton.Active = true;
enableOptimizationCheckButton.Active = compilerParameters.Optimize;
generateDebugInformationCheckButton.Active = configuration.DebugMode;
deprecationCheckButton.Active = compilerParameters.Deprecation;
generateWarningsCheckButton.Active = compilerParameters.GenWarnings;
warningsAsErrorsCheckButton.Active = !configuration.RunWithWarnings;
compilerEntry.Text = compilerParameters.CompilerPath;
classPathEntry.Text = compilerParameters.ClassPath;
mainClassEntry.Text = compilerParameters.MainClass;
symbolsEntry.Text = compilerParameters.DefineSymbols;
OnCompilerToggled (null, null);
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:ProjectConfigurationPropertyPanel.cs
示例4: AddControllerDialog
public AddControllerDialog (DotNetProject project)
{
Build ();
var ext = project.GetService<AspNetAppProjectFlavor> ();
provider = project.LanguageBinding.GetCodeDomProvider ();
loadedTemplateList = ext.GetCodeTemplates ("AddController");
bool foundEmptyTemplate = false;
int templateIndex = 0;
foreach (string file in loadedTemplateList) {
string name = System.IO.Path.GetFileNameWithoutExtension (file);
templateCombo.AppendText (name);
if (!foundEmptyTemplate) {
if (name == "Empty") {
templateCombo.Active = templateIndex;
foundEmptyTemplate = true;
} else
templateIndex++;
}
}
if (!foundEmptyTemplate)
throw new Exception ("The Empty.tt template is missing.");
nameEntry.Text = "Controller";
nameEntry.Position = 0;
Validate ();
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:29,代码来源:AddControllerDialog.cs
示例5: AddViewDialog
public AddViewDialog (DotNetProject project)
{
this.project = project;
aspFlavor = project.GetService<AspNetAppProjectFlavor> ();
Build ();
provider = project.LanguageBinding.GetCodeDomProvider ();
var viewEngines = GetProperViewEngines ();
loadedTemplateList = new Dictionary<string, IList<string>> ();
foreach (var engine in viewEngines) {
viewEngineCombo.AppendText (engine);
loadedTemplateList[engine] = aspFlavor.GetCodeTemplates ("AddView", engine);
}
viewEngineCombo.Active = 0;
InitializeTemplateStore (loadedTemplateList);
ContentPlaceHolders = new List<string> ();
string siteMaster = aspFlavor.VirtualToLocalPath ("~/Views/Shared/Site.master", null);
if (project.Files.GetFile (siteMaster) != null)
masterEntry.Text = "~/Views/Shared/Site.master";
placeholderCombo.Model = primaryPlaceholderStore;
UpdateTypePanelSensitivity (null, null);
UpdateMasterPanelSensitivity (null, null);
Validate ();
}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:30,代码来源:AddViewDialog.cs
示例6: CreateTest
public static NUnitProjectTestSuite CreateTest (DotNetProject project)
{
foreach (var p in project.References)
if (p.Reference.IndexOf ("GuiUnit", StringComparison.OrdinalIgnoreCase) != -1 || p.Reference.IndexOf ("nunit.framework") != -1 || p.Reference.IndexOf ("nunit.core") != -1)
return new NUnitProjectTestSuite (project);
return null;
}
开发者ID:telebovich,项目名称:monodevelop,代码行数:7,代码来源:NUnitProjectTestSuite.cs
示例7: OnProjectAdded
static void OnProjectAdded(DotNetProject project)
{
QyotoDesignInfo info = (QyotoDesignInfo)project.ExtendedProperties["QyotoDesignInfo"];
if (info != null) {
info.Project = project;
}
}
开发者ID:codebutler,项目名称:qyotodevelop,代码行数:7,代码来源:QyotoStartupCommand.cs
示例8: UpdateDesignerFile
public static BuildResult UpdateDesignerFile (
CodeBehindWriter writer,
DotNetProject project,
ProjectFile file, ProjectFile designerFile
)
{
var result = new BuildResult ();
//parse the ASP.NET file
var parsedDocument = TypeSystemService.ParseFile (project, file.FilePath).Result as WebFormsParsedDocument;
if (parsedDocument == null) {
result.AddError (string.Format ("Failed to parse file '{0}'", file.Name));
return result;
}
//TODO: ensure type system is up to date
CodeCompileUnit ccu;
result.Append (GenerateCodeBehind (project, designerFile.FilePath, parsedDocument, out ccu));
if (ccu != null) {
writer.WriteFile (designerFile.FilePath, ccu);
}
return result;
}
开发者ID:polluks,项目名称:monodevelop,代码行数:25,代码来源:WebFormsCodeBehind.cs
示例9: NodeEditorWidget
public NodeEditorWidget (DotNetProject project, AddinRegistry reg, ExtensionNodeType ntype, AddinDescription parentAddinDescription, string parentPath, ExtensionNodeDescription node)
{
this.node = node;
this.project = project;
tips = new Tooltips ();
Spacing = 0;
// Header
Label label = new Label ();
label.Wrap = true;
label.WidthRequest = 480;
string txt = "<b>" + node.NodeName + "</b>";
if (ntype.Description.Length > 0)
txt += "\n" + GLib.Markup.EscapeText (ntype.Description);
label.Markup = txt;
label.Xalign = 0f;
PackStart (label, false, false, 6);
PackStart (new HSeparator (), false, false, 0);
// Attributes
grid = new PropertyGrid ();
grid.CurrentObject = new NodeWrapper (project, reg, ntype, parentAddinDescription, parentPath, node);
PackStart (grid, true, true, 0);
ShowAll ();
grid.ShowHelp = true;
grid.ShowToolbar = false;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:33,代码来源:NodeEditorWidget.cs
示例10: MonoSolutionItemHandler
public MonoSolutionItemHandler (DotNetProject project)
{
this.project = project;
project.FileAddedToProject += OnFileAddedToProject;
project.FileRemovedFromProject += OnFileRemovedFromProject;
project.FileRenamedInProject += OnFileRenamedInProject;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:MonoSolutionItemHandler.cs
示例11: RefreshChildNodes
void RefreshChildNodes (DotNetProject project)
{
ITreeBuilder builder = Context.GetTreeBuilder (project);
if (builder != null) {
builder.UpdateChildren ();
}
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:ProjectPackagesProjectNodeBuilderExtension.cs
示例12: RuntimeOptionsPanelWidget
public RuntimeOptionsPanelWidget (DotNetProject project, IEnumerable<ItemConfiguration> configurations)
{
Build ();
this.project = project;
if (project != null) {
// Get the list of available versions, and add only those supported by the target language.
foreach (TargetFramework fx in Runtime.SystemAssemblyService.GetTargetFrameworks ()) {
if (fx != project.TargetFramework) {
if (!project.TargetRuntime.IsInstalled (fx))
continue;
if (!project.SupportsFramework (fx))
continue;
}
runtimeVersionCombo.AppendText (fx.Name);
if (project.TargetFramework == fx)
runtimeVersionCombo.Active = supportedVersions.Count;
supportedVersions.Add (fx);
}
if (supportedVersions.Count <= 1)
Sensitive = false;
}
else
Sensitive = false;
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:25,代码来源:RuntimeOptionsPanel.cs
示例13: References
public References (
MD.DotNetProject project,
IExtendedPackageManagementProjectService projectService)
{
this.msbuildProject = project;
this.projectService = projectService;
}
开发者ID:modulexcite,项目名称:monodevelop-nuget-extensions,代码行数:7,代码来源:References.cs
示例14: CreateNuGetProject
public NuGetProject CreateNuGetProject (DotNetProject project, INuGetProjectContext context)
{
Runtime.AssertMainThread ();
var nugetAwareProject = project as INuGetAwareProject;
if (nugetAwareProject != null)
return nugetAwareProject.CreateNuGetProject ();
var projectSystem = new MonoDevelopMSBuildNuGetProjectSystem (project, context);
string projectJsonPath = ProjectJsonPathUtilities.GetProjectConfigPath (project.BaseDirectory, project.Name);
if (File.Exists (projectJsonPath)) {
return new BuildIntegratedProjectSystem (
projectJsonPath,
project.FileName,
project,
projectSystem,
project.Name,
settings);
}
string baseDirectory = GetBaseDirectory (project);
string folderNuGetProjectFullPath = PackagesFolderPathUtility.GetPackagesFolderPath (baseDirectory, settings);
string packagesConfigFolderPath = project.BaseDirectory;
return new MSBuildNuGetProject (
projectSystem,
folderNuGetProjectFullPath,
packagesConfigFolderPath);
}
开发者ID:PlayScriptRedux,项目名称:monodevelop,代码行数:32,代码来源:MonoDevelopNuGetProjectFactory.cs
示例15: Project
public Project (DotNetProject project)
: this (
project,
PackageManagementExtendedServices.ProjectService,
new PackageManagementFileService ())
{
}
开发者ID:modulexcite,项目名称:monodevelop-nuget-extensions,代码行数:7,代码来源:Project.cs
示例16: GetWebReferenceItems
public static IEnumerable<WebReferenceItem> GetWebReferenceItems (DotNetProject project)
{
foreach (WebReferenceItem item in WcfEngine.GetReferenceItems (project))
yield return item;
foreach (WebReferenceItem item in WsEngine.GetReferenceItems (project))
yield return item;
}
开发者ID:telebovich,项目名称:monodevelop,代码行数:7,代码来源:WebReferencesService.cs
示例17: CreateTest
public static NUnitProjectTestSuite CreateTest (DotNetProject project)
{
foreach (ProjectReference p in project.References)
if (p.Reference.IndexOf ("nunit.framework") != -1 || p.Reference.IndexOf ("nunit.core") != -1)
return new NUnitProjectTestSuite (project);
return null;
}
开发者ID:nocache,项目名称:monodevelop,代码行数:7,代码来源:NUnitProjectTestSuite.cs
示例18: CompilerOptionsPanelWidget
public CompilerOptionsPanelWidget(DotNetProject project)
{
this.Build();
this.project = project;
DotNetProjectConfiguration configuration = (DotNetProjectConfiguration) project.GetActiveConfiguration (IdeApp.Workspace.ActiveConfiguration);
FSharpCompilerParameters compilerParameters = (FSharpCompilerParameters) configuration.CompilationParameters;
ListStore store = new ListStore (typeof (string));
store.AppendValues (GettextCatalog.GetString ("Executable"));
store.AppendValues (GettextCatalog.GetString ("Library"));
store.AppendValues (GettextCatalog.GetString ("Executable with GUI"));
store.AppendValues (GettextCatalog.GetString ("Module"));
compileTargetCombo.Model = store;
CellRendererText cr = new CellRendererText ();
compileTargetCombo.PackStart (cr, true);
compileTargetCombo.AddAttribute (cr, "text", 0);
compileTargetCombo.Active = (int) configuration.CompileTarget;
compileTargetCombo.Changed += new EventHandler (OnTargetChanged);
// Load the codepage. If it matches any of the supported encodigs, use the encoding name
string foundEncoding = null;
foreach (TextEncoding e in TextEncoding.SupportedEncodings) {
if (e.CodePage == -1)
continue;
if (e.CodePage == compilerParameters.CodePage)
foundEncoding = e.Id;
codepageEntry.AppendText (e.Id);
}
if (foundEncoding != null)
codepageEntry.Entry.Text = foundEncoding;
else if (compilerParameters.CodePage != 0)
codepageEntry.Entry.Text = compilerParameters.CodePage.ToString ();
}
开发者ID:mikkom,项目名称:fsharpbinding,代码行数:33,代码来源:CompilerOptionsPanelWidget.cs
示例19: ProjectReferencesFromPackagesFolderNode
public ProjectReferencesFromPackagesFolderNode (
DotNetProject project,
ProjectReferenceCollection projectReferences)
{
Project = project;
References = projectReferences;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:ProjectReferencesFromPackagesFolderNode.cs
示例20: SelectNodeSetDialog
public SelectNodeSetDialog (DotNetProject project, AddinRegistry registry, AddinDescription desc)
{
this.Build();
this.project = project;
this.registry = registry;
this.desc = desc;
foreach (AddinDependency adep in desc.MainModule.Dependencies) {
Addin addin = registry.GetAddin (adep.FullAddinId);
if (addin != null && addin.Description != null) {
foreach (ExtensionNodeSet ns in addin.Description.ExtensionNodeSets) {
combo.AppendText (ns.Id);
sets [ns.Id] = ns;
}
}
}
foreach (ExtensionNodeSet ns in desc.ExtensionNodeSets) {
combo.AppendText (ns.Id);
sets [ns.Id] = ns;
}
nodeseteditor.AllowEditing = false;
buttonOk.Sensitive = false;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:SelectNodeSetDialog.cs
注:本文中的MonoDevelop.Projects.DotNetProject类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论