本文整理汇总了C#中MonoDevelop.Projects.DotNetProject类的典型用法代码示例。如果您正苦于以下问题:C# DotNetProject类的具体用法?C# DotNetProject怎么用?C# DotNetProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DotNetProject类属于MonoDevelop.Projects命名空间,在下文中一共展示了DotNetProject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
示例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);
}
示例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);
}
示例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 ();
}
示例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 ();
}
示例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;
}
示例7: OnProjectAdded
static void OnProjectAdded(DotNetProject project)
{
QyotoDesignInfo info = (QyotoDesignInfo)project.ExtendedProperties["QyotoDesignInfo"];
if (info != null) {
info.Project = project;
}
}
示例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;
}
示例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;
}
示例10: MonoSolutionItemHandler
public MonoSolutionItemHandler (DotNetProject project)
{
this.project = project;
project.FileAddedToProject += OnFileAddedToProject;
project.FileRemovedFromProject += OnFileRemovedFromProject;
project.FileRenamedInProject += OnFileRenamedInProject;
}
示例11: RefreshChildNodes
void RefreshChildNodes (DotNetProject project)
{
ITreeBuilder builder = Context.GetTreeBuilder (project);
if (builder != null) {
builder.UpdateChildren ();
}
}
示例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;
}
示例13: References
public References (
MD.DotNetProject project,
IExtendedPackageManagementProjectService projectService)
{
this.msbuildProject = project;
this.projectService = projectService;
}
示例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);
}
示例15: Project
public Project (DotNetProject project)
: this (
project,
PackageManagementExtendedServices.ProjectService,
new PackageManagementFileService ())
{
}