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


C# SolutionItem类代码示例

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


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

示例1: AddToProject

		public override bool AddToProject (SolutionItem parent, Project project, string language, string directory, string name)
		{
			// Replace template variables
			
			string cname = Path.GetFileNameWithoutExtension (name);
			string[,] tags = { 
				{"Name", cname},
			};
			
			string content = addinTemplate.OuterXml;
			content = StringParserService.Parse (content, tags);
			
			// Create the manifest
			
			XmlDocument doc = new XmlDocument ();
			doc.LoadXml (content);

			string file = Path.Combine (directory, "manifest.addin.xml");
			doc.Save (file);
			
			project.AddFile (file, BuildAction.EmbeddedResource);
			
			AddinData.EnableAddinAuthoringSupport ((DotNetProject)project);
			return true;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:AddinFileDescriptionTemplate.cs

示例2: AddFileToProject

        public ProjectFile AddFileToProject(SolutionItem policyParent, Project project, string language, string directory, string name)
        {
            generatedFile = SaveFile (policyParent, project, language, directory, name);
            if (generatedFile != null) {
                string buildAction = this.buildAction ?? project.GetDefaultBuildAction (generatedFile);
                ProjectFile projectFile = project.AddFile (generatedFile, buildAction);

                if (!string.IsNullOrEmpty (dependsOn)) {
                    Dictionary<string,string> tags = new Dictionary<string,string> ();
                    ModifyTags (policyParent, project, language, name, generatedFile, ref tags);
                    string parsedDepName = StringParserService.Parse (dependsOn, tags);
                    if (projectFile.DependsOn != parsedDepName)
                        projectFile.DependsOn = parsedDepName;
                }

                if (!string.IsNullOrEmpty (customTool))
                    projectFile.Generator = customTool;

                DotNetProject netProject = project as DotNetProject;
                if (netProject != null) {
                    // Add required references
                    foreach (string aref in references) {
                        string res = netProject.AssemblyContext.GetAssemblyFullName (aref, netProject.TargetFramework);
                        res = netProject.AssemblyContext.GetAssemblyNameForVersion (res, netProject.TargetFramework);
                        if (!ContainsReference (netProject, res))
                            netProject.References.Add (new ProjectReference (ReferenceType.Package, aref));
                    }
                }

                return projectFile;
            } else
                return null;
        }
开发者ID:brantwedel,项目名称:monodevelop,代码行数:33,代码来源:SingleFileDescriptionTemplate.cs

示例3: GetDeployFiles

		public override DeployFileCollection GetDeployFiles (DeployContext ctx, SolutionItem entry, ConfigurationSelector configuration)
		{
			if (entry is IDeployable)
				return new DeployFileCollection (((IDeployable)entry).GetDeployFiles (configuration));
			
			return base.GetDeployFiles (ctx, entry, configuration);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:7,代码来源:DefaultDeployServiceExtension.cs

示例4: DeployDialog

		public DeployDialog (SolutionItem defaultEntry, bool createBuilderOnly)
		{
			this.Build();
			notebook.ShowTabs = false;
			this.defaultEntry = defaultEntry;
			
			if (createBuilderOnly) {
				vboxSaveProject.Hide ();
				checkSave.Active = true;
				checkSave.Hide ();
				saveSeparator.Hide ();
			}
			else {
				pageSave.Hide ();
				FillProjectSelectors ();
			}
			
			store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object));
			targetsTree.Model = store;
			
			targetsTree.HeadersVisible = false;
			CellRendererImage cr = new CellRendererImage();
			cr.Yalign = 0;
			targetsTree.AppendColumn ("", cr, "image", 0);
			targetsTree.AppendColumn ("", new Gtk.CellRendererText(), "markup", 1);
			
			targetsTree.Selection.Changed += delegate (object s, EventArgs a) {
				UpdateButtons ();
			};
			
			FillBuilders ();
			
			UpdateButtons ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:34,代码来源:DeployDialog.cs

示例5: Fill

		public void Fill (PackageBuilder builder, SolutionItem selection)
		{
			store.Clear ();
			
			this.builder = builder;
			if (selection is SolutionFolder) {
				foreach (SolutionItem e in ((SolutionFolder)selection).GetAllItems ()) {
					if (builder.CanBuild (e))
						selectedEntries [e] = e;
				}
			}
			else if (selection != null) {
				selectedEntries [selection] = selection;
			}
			
			if (selection != null)
				solution = selection.ParentSolution;
			else {
				solution = IdeApp.ProjectOperations.CurrentSelectedSolution;
				if (solution == null) {
					ReadOnlyCollection<Solution> items = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem.GetAllSolutions ();
					if (items.Count > 0)
						solution = items [0];
					else
						return;
				}
			}
			AddEntry (TreeIter.Zero, solution.RootFolder);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:29,代码来源:EntrySelectionTree.cs

示例6: GetService

		public virtual object GetService (SolutionItem item, Type type)
		{
			if (type.IsInstanceOfType (this))
				return this;
			else
				return GetNext (item).GetService (item, type);
		}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:7,代码来源:ProjectServiceExtension.cs

示例7: AddEntry

		void AddEntry (TreeIter iter, SolutionItem entry)
		{
			string icon;
			if (entry.ParentFolder == null)
				icon = MonoDevelop.Ide.Gui.Stock.Solution;
			else if (entry is SolutionFolder)
				icon = MonoDevelop.Ide.Gui.Stock.SolutionFolderClosed;
			else if (entry is Project)
				icon = ((Project)entry).StockIcon;
			else
				icon = MonoDevelop.Ide.Gui.Stock.Project;
			
			bool visible = builder.CanBuild (entry);
			bool selected = selectedEntries.ContainsKey (entry);
			
			if (!(entry is SolutionFolder) && !visible)
				return;
			
			if (!iter.Equals (TreeIter.Zero))
				iter = store.AppendValues (iter, icon, entry.Name, entry, selected && visible, visible);
			else
				iter = store.AppendValues (icon, entry.Name, entry, selected && visible, visible);
			
			if (selected)
				tree.ExpandToPath (store.GetPath (iter));
			
			if (entry is SolutionFolder) {
				foreach (SolutionItem ce in ((SolutionFolder)entry).Items) {
					AddEntry (iter, ce);
				}
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:32,代码来源:EntrySelectionTree.cs

示例8: GetSupportLevel

		public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
		{
			if (entry is Project)
				return FeatureSupportLevel.SupportedByDefault;
			else
				return FeatureSupportLevel.NotSupported;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:MakefileIntegrationFeature.cs

示例9: CanDeploy

		public bool CanDeploy (SolutionItem entry, MakefileType type)
		{
			Project project = entry as Project;
			if ( project == null ) return false;
			if ( FindSetupForProject ( project ) == null ) return false;
			return true;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:SimpleProjectMakefileHandler.cs

示例10: Fill

		public void Fill (SolutionFolder parentCombine, SolutionItem entry, ISolutionItemFeature[] features)
		{
			selectedFeatures.Clear ();
			selectedEditors.Clear ();
			
			this.entry = entry;
			this.parentCombine = parentCombine;
			
			foreach (Gtk.Widget w in box.Children) {
				box.Remove (w);
				w.Destroy ();
			}
			// Show enabled features at the beginning
			foreach (ISolutionItemFeature feature in features)
				if (feature.GetSupportLevel (parentCombine, entry) == FeatureSupportLevel.Enabled) {
					Gtk.Widget editor = AddFeature (feature);
					selectedFeatures.Add (feature);
					selectedEditors.Add (editor);
				}
			foreach (ISolutionItemFeature feature in features)
				if (feature.GetSupportLevel (parentCombine, entry) != FeatureSupportLevel.Enabled)
					AddFeature (feature);
			
			if (box.Children.Length == 0) {
				// No features
				Label lab = new Label ();
				lab.Xalign = 0;
				lab.Text = GettextCatalog.GetString ("There are no additional features available for this project.");
				box.PackStart (lab, false, false, 0);
				lab.Show ();
			}
			scrolled.AddWithViewport (box);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:33,代码来源:CombineEntryFeatureSelector.cs

示例11: ApplyFeature

		public void ApplyFeature (SolutionFolder parentCombine, SolutionItem entry, Widget editor)
		{
			GtkFeatureWidget fw = (GtkFeatureWidget) editor;
			ReferenceManager refmgr = new ReferenceManager ((DotNetProject) entry);
			refmgr.GtkPackageVersion = fw.SelectedVersion;
			refmgr.Dispose ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:GtkFeatureWidget.cs

示例12: Install

		public void Install (IProgressMonitor monitor, SolutionItem entry, string appName, string prefix, ConfigurationSelector configuration)
		{
			this.appName = appName;
			
			using (DeployContext ctx = new DeployContext (this, "Linux", prefix)) {
				InstallEntry (monitor, ctx, entry, configuration);
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:InstallResolver.cs

示例13: UnitTest

		protected UnitTest (string name, WorkspaceObject ownerSolutionItem)
		{
			this.name = name;
			this.ownerSolutionItem = ownerSolutionItem;
			ownerSolutionEntityItem = ownerSolutionItem as SolutionItem;
			if (ownerSolutionEntityItem != null)
				ownerSolutionEntityItem.DefaultConfigurationChanged += OnConfugurationChanged;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:8,代码来源:UnitTest.cs

示例14: GetMappedConfiguration

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

示例15: BuildEnabledForItem

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


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