当前位置: 首页>>代码示例>>C#>>正文


C# SolutionEntityItem类代码示例

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


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

示例1: Compile

		protected override BuildResult Compile (MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, BuildData buildData)
		{
			var proj = item as Project;
			if (proj == null)
				return base.Compile (monitor, item, buildData);
			if (!proj.GetProjectTypes().Any(x => supportedProjectTypes.ContainsKey(x)))
				return base.Compile (monitor, item, buildData);
			var files = buildData.Items.Where(x => x is ProjectFile).Cast<ProjectFile>().ToArray();
			foreach (var file in files.Where(f => f.BuildAction == "MonoGameContentReference")) {
				var path = System.IO.Path.Combine (Path.GetDirectoryName (file.FilePath.ToString ()), "bin", supportedProjectTypes[platform]);
				monitor.Log.WriteLine("Processing {0}", path);	
				if (!Directory.Exists (path))
					continue;
				foreach (var output in Directory.GetFiles (path, "*.*", SearchOption.AllDirectories)) {
					var link = string.Format ("Content{0}",  output.Replace (path, ""));
					if (proj.Files.FirstOrDefault (x => Path.GetFileName (x.FilePath.ToString ()) == Path.GetFileName (output)) == null) {
						monitor.Log.WriteLine ("Auto Including Content {0}", output);
						proj.Files.Add (new ProjectFile (output, BuildAction.BundleResource) {
							Link = new MonoDevelop.Core.FilePath (link),
							Flags = ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden,
							Visible = false,
						});
					}
				}
			}
			return base.Compile (monitor, item, buildData);
		}
开发者ID:Cardanis,项目名称:MonoGame,代码行数:27,代码来源:MonoGameBuildExtension.cs

示例2: Compile

 protected override BuildResult Compile(MonoDevelop.Core.IProgressMonitor monitor, SolutionEntityItem item, BuildData buildData)
 {
     #if DEBUG
     monitor.Log.WriteLine("MonoGame Extension Compile Called");
     #endif
     try
     {
         var proj = item as MonoGameProject;
         if (proj == null)
         {
            return base.Compile (monitor, item, buildData);
         }
         monitor.Log.WriteLine("Compiling for {0}", proj.MonoGamePlatform);
         var results = new System.Collections.Generic.List<BuildResult>();
         foreach(var file in proj.Files)
         {
             if (MonoGameBuildAction.IsMonoGameBuildAction(file.BuildAction))
             {
                 buildData.Items.Add(file);
                 var buildResult = MonoGameContentProcessor.Compile(file, monitor, buildData);
                 results.Add(buildResult);
             }
         }
         return base.Compile (monitor, item, buildData).Append(results);
     }
     finally
     {
     #if DEBUG
         monitor.Log.WriteLine("MonoGame Extension Compile Ended");
     #endif
     }
 }
开发者ID:dellis1972,项目名称:MonoGameMonoDevelopAddin,代码行数:32,代码来源:MonoGameProject.cs

示例3: 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

示例4: 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

示例5: SaveProject

		public override void SaveProject (IProgressMonitor monitor, SolutionEntityItem item, MSBuildProject project)
		{
			EnsureNuGetPackageBuildImportsTargetUpdater currentUpdater = Updater;
			if (currentUpdater != null) {
				currentUpdater.UpdateProject (project);
			}
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:7,代码来源:PackageManagementMSBuildExtension.cs

示例6: 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

示例7: 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

示例8: GenerateExecutionModeCommands

        public static void GenerateExecutionModeCommands(SolutionEntityItem project, CanExecuteDelegate runCheckDelegate, CommandArrayInfo info)
        {
            CommandExecutionContext ctx = new CommandExecutionContext (project, runCheckDelegate);
            bool supportsParameterization = false;

            foreach (List<IExecutionMode> modes in GetExecutionModeCommands (ctx, false, true)) {
                foreach (IExecutionMode mode in modes) {
                    CommandInfo ci = info.Add (mode.Name, new CommandItem (ctx, mode));
                    if ((mode.ExecutionHandler is ParameterizedExecutionHandler) || ((mode is CustomExecutionMode) && ((CustomExecutionMode)mode).PromptForParameters)) {
                        // It will prompt parameters, so we need command to end with '..'.
                        // However, some commands may end with '...' already and we don't want to break
                        // already-translated strings by altering them
                        if (!ci.Text.EndsWith ("..."))
                            ci.Text += "...";
                        supportsParameterization = true;
                    } else {
                        // The parameters window will be shown if ctrl is pressed
                        ci.Description = GettextCatalog.GetString ("Run With: {0}", ci.Text);
                        if (SupportsParameterization (mode, ctx)) {
                            ci.Description += " - " + GettextCatalog.GetString ("Hold Control key to display the execution parameters dialog.");
                            supportsParameterization = true;
                        }
                    }
                }
                if (info.Count > 0)
                    info.AddSeparator ();
            }
            if (supportsParameterization) {
                info.AddSeparator ();
                info.Add (GettextCatalog.GetString ("Edit Custom Modes..."), new CommandItem (ctx, null));
            }
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:32,代码来源:ExecutionModeCommandService.cs

示例9: LoadProject

		public override void LoadProject (IProgressMonitor monitor, SolutionEntityItem item, MSBuildProject msproject)
		{
			base.LoadProject (monitor, item, msproject);

			var dnp = item as DotNetProject;
			if (dnp == null)
				return;

			// Convert .projitems imports into project references

			foreach (var sp in msproject.Imports.Where (im => im.Label == "Shared" && im.Project.EndsWith (".projitems"))) {
				var projitemsFile = sp.Project;
				if (!string.IsNullOrEmpty (projitemsFile)) {
					projitemsFile = MSBuildProjectService.FromMSBuildPath (item.ItemDirectory, projitemsFile);
					projitemsFile = Path.Combine (Path.GetDirectoryName (msproject.FileName), projitemsFile);
					if (File.Exists (projitemsFile)) {
						MSBuildSerializer iser = Handler.CreateSerializer ();
						iser.SerializationContext.BaseFile = projitemsFile;
						iser.SerializationContext.ProgressMonitor = monitor;
						MSBuildProject p = new MSBuildProject ();
						p.Load (projitemsFile);
						Handler.LoadProjectItems (p, iser, ProjectItemFlags.Hidden | ProjectItemFlags.DontPersist);
						var r = new ProjectReference (ReferenceType.Project, Path.GetFileNameWithoutExtension (projitemsFile));
						r.Flags = ProjectItemFlags.DontPersist;
						r.SetItemsProjectPath (projitemsFile);
						dnp.References.Add (r);
					}
				}
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:30,代码来源:SharedAssetsProjectMSBuildExtension.cs

示例10: 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

示例11: UpdateImports

        public void UpdateImports(SolutionEntityItem item, List<String> imports)
        {
            // Remove imports
            imports.Remove (importCocoaApplication);
            imports.Remove (importConsoleApplication);
            imports.Remove (importCocoaLibrary);

            // Check project nature
            MonobjcProject project = item as MonobjcProject;
            if (project == null) {
                return;
            }

            switch (project.ApplicationType) {
            case MonobjcProjectType.CocoaApplication:
                imports.Add (importCocoaApplication);
                break;
            case MonobjcProjectType.ConsoleApplication:
                imports.Add (importConsoleApplication);
                break;
            case MonobjcProjectType.CocoaLibrary:
                imports.Add (importCocoaLibrary);
                break;
            }
        }
开发者ID:Monobjc,项目名称:monobjc-monodevelop,代码行数:25,代码来源:MonobjcMSBuildImportProvider.cs

示例12: Clean

		protected override void Clean (IProgressMonitor monitor, SolutionEntityItem entry, ConfigurationSelector configuration)
		{
			base.Clean (monitor, entry, configuration);
			
			CProject project = (CProject) entry;
			CProjectConfiguration conf = (CProjectConfiguration) project.GetConfiguration (configuration);
			project.Compiler.Clean (project.Files, conf, monitor);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:CProjectServiceExtension.cs

示例13: GetRequiredImports

 public IEnumerable<string> GetRequiredImports(SolutionEntityItem item)
 {
     MonobjcProject project = item as MonobjcProject;
     if (project != null) {
         if (project.CompileTarget == CompileTarget.Exe)
             yield return target;
     }
 }
开发者ID:JeanAzzopardi,项目名称:monodevelop-monobjc,代码行数:8,代码来源:MonobjcMSBuildImportProvider.cs

示例14: BuildEnabledForItem

		public bool BuildEnabledForItem (SolutionEntityItem item)
		{
			foreach (SolutionConfigurationEntry entry in configurations) {
				if (entry.Item == item)
					return entry.Build && item.Configurations [entry.ItemConfiguration] != null;
			}
			return false;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:SolutionConfiguration.cs

示例15: GetMappedConfiguration

		public string GetMappedConfiguration (SolutionEntityItem item)
		{
			foreach (SolutionConfigurationEntry entry in configurations) {
				if (entry.Item == item)
					return entry.ItemConfiguration;
			}
			return null;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:SolutionConfiguration.cs


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