• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Projects.ConfigurationSelector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MonoDevelop.Projects.ConfigurationSelector的典型用法代码示例。如果您正苦于以下问题:C# ConfigurationSelector类的具体用法?C# ConfigurationSelector怎么用?C# ConfigurationSelector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ConfigurationSelector类属于MonoDevelop.Projects命名空间,在下文中一共展示了ConfigurationSelector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Execute

		internal protected virtual Task Execute (ProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration, SolutionRunConfiguration runConfiguration)
		{
			context.RunConfiguration = runConfiguration;
#pragma warning disable 618 // Type or member is obsolete
			return Execute (monitor, context, configuration);
#pragma warning restore 618 // Type or member is obsolete
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:7,代码来源:SolutionExtension.cs


示例2: CustomCommandWidget

		public CustomCommandWidget (IWorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector)
		{
			this.Build();
			this.cmd = cmd;
			if (cmd != null) {
				updating = true;
				comboType.RemoveText (0);
				updating = false;
			}
			
			this.entry = entry;
			UpdateControls ();
			this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;
			
			StringTagModelDescription tagModel;
			if (entry is SolutionItem)
				tagModel = ((SolutionItem)entry).GetStringTagModelDescription (configSelector);
			else if (entry is WorkspaceItem)
				tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription ();
			else
				tagModel = new StringTagModelDescription ();

			tagSelectorDirectory.TagModel = tagModel;
			tagSelectorDirectory.TargetEntry = workingdirEntry;
			
			tagSelectorCommand.TagModel = tagModel;
			tagSelectorCommand.TargetEntry = entryCommand;
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:28,代码来源:CustomCommandWidget.cs


示例3: Build

		protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration)
		{
			BuildResult res = base.Build (monitor, entry, configuration);
			if (res.ErrorCount > 0 || !(entry is DotNetProject))
				return res;
			
			DotNetProject project = (DotNetProject) entry;
			AddinData data = AddinData.GetAddinData (project);
			if (data == null)
				return res;
			
			monitor.Log.WriteLine (AddinManager.CurrentLocalizer.GetString ("Verifying add-in description..."));
			string fileName = data.AddinManifestFileName;
			ProjectFile file = data.Project.Files.GetFile (fileName);
			if (file == null)
				return res;
			
			string addinFile;
			if (file.BuildAction == BuildAction.EmbeddedResource)
				addinFile = project.GetOutputFileName (ConfigurationSelector.Default);
			else
				addinFile = file.FilePath;
			
			AddinDescription desc = data.AddinRegistry.GetAddinDescription (new ProgressStatusMonitor (monitor), addinFile);
			StringCollection errors = desc.Verify ();
			
			foreach (string err in errors) {
				res.AddError (data.AddinManifestFileName, 0, 0, "", err);
				monitor.Log.WriteLine ("ERROR: " + err);
			}
			
			return res;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:33,代码来源:AddinProjectExtension.cs


示例4: OnGetReferencedAssemblies

		internal protected override async Task<List<string>> OnGetReferencedAssemblies (ConfigurationSelector configuration)
		{
			var res = await base.OnGetReferencedAssemblies (configuration);
			var asms = Project.TargetRuntime.AssemblyContext.GetAssemblies (Project.TargetFramework).Where (a => a.Package.IsFrameworkPackage).Select (a => a.Location);
			res.AddRange (asms);
			return res;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:PortableDotNetProjectFlavor.cs


示例5: Build

        /// <summary>
        ///   Builds the specified solution item.
        /// </summary>
        /// <param name = "monitor">The monitor.</param>
        /// <param name = "item">The item.</param>
        /// <param name = "configuration">The configuration.</param>
        /// <returns>The build result.</returns>
        protected override BuildResult Build(IProgressMonitor monitor, SolutionEntityItem item, ConfigurationSelector configuration)
        {
            BuildResult result = new BuildResult ();

            // Pre-build
            monitor.BeginTask (GettextCatalog.GetString ("Pre-Building..."), 1);
            this.PreBuild (result, monitor, item, configuration);
            monitor.EndTask();
            if (result.ErrorCount > 0) {
                return result;
            }

            // Build
            monitor.BeginTask (GettextCatalog.GetString ("Building"), 1);
            result.Append (base.Build (monitor, item, configuration));
            monitor.EndTask();
            if (result.ErrorCount > 0) {
                return result;
            }

            // Post-build
            monitor.BeginTask (GettextCatalog.GetString ("Post-Building..."), 1);
            this.PostBuild (result, monitor, item, configuration);
            monitor.EndTask();

            return result;
        }
开发者ID:Monobjc,项目名称:monobjc-monodevelop,代码行数:34,代码来源:MonobjcBuildExtension.cs


示例6: CanExecute

		/// <summary>
		/// Flags Unity projects for debugging with this addin
		/// </summary>
		protected override bool CanExecute (SolutionEntityItem item, ExecutionContext context, ConfigurationSelector configuration)
		{
			if (CanExecuteProject (item as Project, context)) {
				return context.ExecutionHandler.CanExecute (new UnityExecutionCommand (item.BaseDirectory.FullPath));
			}
			return base.CanExecute (item, context, configuration);
		}
开发者ID:Tak,项目名称:MonoDevelop.Debugger.Soft.Unity,代码行数:10,代码来源:UnityProjectServiceExtension.cs


示例7: GetProjectDeployFiles

		public virtual DeployFileCollection GetProjectDeployFiles (DeployContext ctx, Project project, ConfigurationSelector configuration)
		{
			if (Next != null)
				return Next.GetDeployFiles (ctx, project, configuration);
			else
				return new DeployFileCollection ();
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:DeployServiceExtension.cs


示例8: GetSourcePaths

		public override IEnumerable<string> GetSourcePaths (ConfigurationSelector sel)
		{
			useOriginalBasePath = true;
			var en = base.GetSourcePaths (sel).ToList();
			useOriginalBasePath = false;
			return en;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:7,代码来源:DubSubPackage.cs


示例9: DoBuild

		protected override BuildResult DoBuild (IProgressMonitor monitor, ConfigurationSelector configuration)
		{
			useOriginalBasePath = true;
			var res = base.DoBuild (monitor, configuration);
			useOriginalBasePath = false;
			return res;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:7,代码来源:DubSubPackage.cs


示例10: GetProjectDeployFiles

		public override DeployFileCollection GetProjectDeployFiles (DeployContext ctx, Project project, ConfigurationSelector config)
		{
			DeployFileCollection col = base.GetProjectDeployFiles (ctx, project, config);
			
			LinuxDeployData data = LinuxDeployData.GetLinuxDeployData (project);
			
			if (ctx.Platform == "Linux") {
				DotNetProject netProject = project as DotNetProject;
				if (netProject != null) {
					DotNetProjectConfiguration conf = netProject.GetConfiguration (config) as DotNetProjectConfiguration;
					if (conf != null) {
						if (conf.CompileTarget == CompileTarget.Exe || conf.CompileTarget == CompileTarget.WinExe) {
							if (data.GenerateScript) {
								col.Add (GenerateLaunchScript (ctx, netProject, data, conf));
							}
						}
						if (conf.CompileTarget == CompileTarget.Library || conf.CompiledOutputName.FileName.EndsWith (".dll")) {
							if (data.GeneratePcFile) {
								col.Add (GeneratePcFile (ctx, netProject, data, conf));
							}
						}
					}
				}
			}
			
			// If the project is deploying an app.desktop file, rename it to the name of the project.
			foreach (DeployFile file in col) {
				if (Path.GetFileName (file.RelativeTargetPath) == "app.desktop") {
					string dir = Path.GetDirectoryName (file.RelativeTargetPath);
					file.RelativeTargetPath = Path.Combine (dir, data.PackageName + ".desktop");
				}
			}
			
			return col;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:35,代码来源:LinuxDeployExtension.cs


示例11: DoExecute

        protected override void DoExecute(IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
        {
            IodineConfiguration config = (IodineConfiguration)GetConfiguration (configuration);
            IConsole console = config.ExternalConsole ?
                context.ExternalConsoleFactory.CreateConsole (!config.PauseConsoleOutput) :
                context.ConsoleFactory.CreateConsole (!config.PauseConsoleOutput);

            AggregatedOperationMonitor aggregatedMonitor = new AggregatedOperationMonitor (monitor);
            try {
                string param = string.Format ("\"{0}\" {1}", config.MainFile, config.CommandLineParameters);

                IProcessAsyncOperation op = Runtime.ProcessService.StartConsoleProcess ("iodine",
                        param, BaseDirectory,
                        config.EnvironmentVariables, console, null);

                monitor.CancelRequested += delegate {
                    op.Cancel ();
                };

                aggregatedMonitor.AddOperation (op);
                op.WaitForCompleted ();
                monitor.Log.WriteLine ("Iodine exited with code: " + op.ExitCode);

            } catch (Exception e) {
                monitor.ReportError (GettextCatalog.GetString ("Cannot execute \"{0}\"", config.MainFile), e);
            } finally {
                console.Dispose ();
                aggregatedMonitor.Dispose ();
            }
        }
开发者ID:IodineLang,项目名称:IodineBindings,代码行数:30,代码来源:IodineProject.cs


示例12: Clean

		protected override void Clean (MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, ConfigurationSelector configuration)
		{
			var proj = item as MonoGameContentProject;
			MonoGameContentProjectConfiguration cfg = null;
			if (proj != null)
				cfg = proj.GetConfiguration (configuration) as MonoGameContentProjectConfiguration;
			if (proj == null) {
				monitor.Log.WriteLine("Cleaning for Unknown MonoGame Project");
				base.Clean (monitor, item, configuration);
			}
			var manager = new PipelineManager(proj.BaseDirectory.FullPath,
			                                  Path.Combine(cfg.OutputDirectory, cfg.MonoGamePlatform),
			                                  cfg.IntermediateOutputDirectory);
			monitor.Log.WriteLine("Detected {0} MonoGame Platform", cfg.MonoGamePlatform);                              
			foreach(var file in proj.Files)
			{
				if (file.BuildAction == "Compile") {
					try {
						monitor.Log.WriteLine("Cleaning {0}", file.FilePath.FileName);
						manager.CleanContent(file.FilePath.FullPath, null);
					}
					catch(Exception ex)
					{
						monitor.Log.WriteLine(ex.Message);
					}
				}
			}
			base.Clean (monitor, item, configuration);
		}
开发者ID:GhostTap,项目名称:MonoGame,代码行数:29,代码来源:MonoGameContentBuildExtension.cs


示例13: GetReferencedDProjects

		public virtual IEnumerable<AbstractDProject> GetReferencedDProjects(ConfigurationSelector configuration)
		{
			AbstractDProject p;
			foreach (var dep in References.ReferencedProjectIds)
				if ((p = ParentSolution.GetSolutionItem(dep) as AbstractDProject) != null)
					yield return p;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:7,代码来源:AbstractDProject.cs


示例14: GetReferencedItems

		public override IEnumerable<SolutionItem> GetReferencedItems(ConfigurationSelector configuration)
		{
			SolutionItem p;
			foreach (var dep in References.ReferencedProjectIds)
				if ((p = ParentSolution.GetSolutionItem(dep)) != null)
					yield return p;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:7,代码来源:AbstractDProject.cs


示例15: OnGetOutputFileName

 protected override FilePath OnGetOutputFileName (ConfigurationSelector configuration)
 {
   var output = base.OnGetOutputFileName (configuration);
   if (!disableOutputNameChange && IsSupportedProject)
     return output.ChangeExtension (PluginExtension);
   return output;
 }
开发者ID:mcneel,项目名称:RhinoCommonXamarinStudioAddin,代码行数:7,代码来源:RhinoProjectServiceExtension.cs


示例16: Build

		protected override BuildResult Build (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration)
		{
			DotNetProject project = (DotNetProject) entry;
			GtkDesignInfo info = GtkDesignInfo.FromProject (project);

			// The code generator must run in the GUI thread since it needs to
			// access to Gtk classes
			Generator gen = new Generator ();
			lock (gen) {
				Gtk.Application.Invoke (delegate { gen.Run (monitor, project, configuration); });
				Monitor.Wait (gen);
			}
					
			BuildResult res = base.Build (monitor, entry, configuration);

			if (gen.Messages != null) {
				foreach (string s in gen.Messages)
//					res.AddWarning (info.GuiBuilderProject.File, 0, 0, null, s);
// TODO:	Add gtkx file name in the Generator 
					res.AddWarning ("", 0, 0, null, s);
						
				if (gen.Messages.Length > 0)
					info.ForceCodeGenerationOnBuild ();
			}
			return res;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:26,代码来源:GtkProjectServiceExtension.cs


示例17: BuildProject

		public static BuildResult BuildProject(DubProject prj, IProgressMonitor mon, ConfigurationSelector sel)
		{
			var br = new BuildResult();

			// Skip building sourceLibraries
			string targetType = null;
			var cfg = prj.GetConfiguration (sel) as DubProjectConfiguration;
			if (cfg != null){
				cfg.BuildSettings.TryGetTargetTypeProperty (prj, sel, ref targetType);
				if(string.IsNullOrWhiteSpace(targetType))
					prj.CommonBuildSettings.TryGetTargetTypeProperty (prj, sel, ref targetType);

				if (targetType != null && targetType.ToLower ().Contains("sourcelibrary")) {
					br.BuildCount = 1;
					return br;
				}
			}

			var args = new StringBuilder("build");

			BuildCommonArgAppendix(args, prj, sel);

			string output;
			string errDump;

			int status = ProjectBuilder.ExecuteCommand(DubSettings.Instance.DubCommand, args.ToString(), prj.BaseDirectory, 
				mon, out errDump, out output);
			br.CompilerOutput = output;

			ErrorExtracting.HandleReturnCode (mon, br, status);
			ErrorExtracting.HandleCompilerOutput(prj, br, output);
			ErrorExtracting.HandleCompilerOutput(prj, br, errDump);

			return br;
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:35,代码来源:DubBuilder.cs


示例18: CustomCommandWidget

        public CustomCommandWidget(IWorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector, CustomCommandType[] supportedTypes)
        {
            this.Build();
            this.supportedTypes = supportedTypes;
            this.cmd = cmd;

            updating = true;

            if (cmd == null)
                comboType.AppendText (GettextCatalog.GetString ("(Select a project operation)"));

            foreach (var ct in supportedTypes)
                comboType.AppendText (commandNames [(int)ct]);

            updating = false;

            this.entry = entry;
            UpdateControls ();
            this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;

            StringTagModelDescription tagModel;
            if (entry is SolutionItem)
                tagModel = ((SolutionItem)entry).GetStringTagModelDescription (configSelector);
            else if (entry is WorkspaceItem)
                tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription ();
            else
                tagModel = new StringTagModelDescription ();

            tagSelectorDirectory.TagModel = tagModel;
            tagSelectorDirectory.TargetEntry = workingdirEntry;

            tagSelectorCommand.TagModel = tagModel;
            tagSelectorCommand.TargetEntry = entryCommand;
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:34,代码来源:CustomCommandWidget.cs


示例19: GetCombineDeployFiles

		public virtual DeployFileCollection GetCombineDeployFiles (DeployContext ctx, SolutionFolder combine, ConfigurationSelector configuration)
		{
			if (Next != null)
				return Next.GetDeployFiles (ctx, combine, configuration);
			else
				return new DeployFileCollection ();
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:DeployServiceExtension.cs


示例20: OnExecute

    protected override Task OnExecute(ProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
    {
      if (base.OnGetCanExecute(context, configuration))
      {
        return base.OnExecute(monitor, context, configuration);
      }

      try
      {
        var project = Project as DotNetProject;
        if (project != null && IsSupportedProject)
        {
          const string SoftDebuggerName = RhinoSoftDebuggerEngine.DebuggerName;
          var config = project.GetConfiguration(configuration) as DotNetProjectConfiguration;
          var cmd = new RhinoCommonExecutionCommand(project.GetOutputFileName(configuration), project);
          cmd.Arguments = config.CommandLineParameters;
          cmd.WorkingDirectory = Path.GetDirectoryName(config.CompiledOutputName);
          cmd.EnvironmentVariables = config.GetParsedEnvironmentVariables();
          cmd.TargetRuntime = project.TargetRuntime;
          cmd.UserAssemblyPaths = project.GetUserAssemblyPaths(configuration);

          var executionModes = Runtime.ProcessService.GetExecutionModes();
          var executionMode = executionModes.SelectMany(r => r.ExecutionModes).FirstOrDefault(r => r.Id == SoftDebuggerName);
          var console = context.ConsoleFactory.CreateConsole(new OperationConsoleFactory.CreateConsoleOptions(true));
          var operation = executionMode.ExecutionHandler.Execute(cmd, console);
          monitor.CancellationToken.Register(() => operation.Cancel());
          return operation.Task;
        }
      }
      catch (Exception ex)
      {
        monitor.ReportError($"An error occurred starting Rhino.\n{ex}", ex);
      }
      return null;
    }
开发者ID:mcneel,项目名称:RhinoCommonXamarinStudioAddin,代码行数:35,代码来源:RhinoProjectServiceExtension.cs



注:本文中的MonoDevelop.Projects.ConfigurationSelector类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Projects.DotNetAssemblyProject类代码示例发布时间:2022-05-26
下一篇:
C# Projects.BuildResult类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap