當前位置: 首頁>>代碼示例>>C#>>正文


C# Projects.DotNetProject類代碼示例

本文整理匯總了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;
            }
        }
開發者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


注:本文中的MonoDevelop.Projects.DotNetProject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。