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


C# IWorkspaceObject类代码示例

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


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

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

示例2: VersionControlItem

		public VersionControlItem (Repository repository, IWorkspaceObject workspaceObject, FilePath path, bool isDirectory)
		{
			this.path = path;
			this.repository = repository;
			this.workspaceObject = workspaceObject;
			this.isDirectory = isDirectory;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:VersionControlItem.cs

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

示例4: UnitTest

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

示例5: VersionControlItem

		public VersionControlItem (Repository repository, IWorkspaceObject workspaceObject, FilePath path, bool isDirectory, VersionInfo versionInfo)
		{
			Path = path;
			Repository = repository;
			WorkspaceObject = workspaceObject;
			IsDirectory = isDirectory;
			this.versionInfo = versionInfo;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:8,代码来源:VersionControlItem.cs

示例6: Task

		public Task (FilePath file, string description, int column, int line, TaskSeverity severity, TaskPriority priority, IWorkspaceObject parent, object owner)
		{
			this.file = file;
			this.description = description;
			this.column = column;
			this.line = line;
			this.severity = severity;
			this.priority = priority;
			this.owner = owner;
			this.parentObject = parent;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:11,代码来源:Task.cs

示例7: CreateTest

		public static UnitTest CreateTest (IWorkspaceObject entry)
		{
			var project = entry as DotNetProject;
			if (project != null) {
				foreach (var r in project.References) {
					if (r.Reference == "xunit")
						return new XUnitProjectTestSuite (project);
				}
			}

			return null;
		}
开发者ID:qihangnet,项目名称:xamarinstudio.xunit,代码行数:12,代码来源:XUnitProjectTestSuite.cs

示例8: CreateUnitTest

		public UnitTest CreateUnitTest (IWorkspaceObject entry)
		{
			UnitTest test = null;

			if (entry is DotNetProject)
				test = XUnitProjectTestSuite.CreateTest (entry);

			UnitTestGroup group = test as UnitTestGroup;
			if (group != null && !group.HasTests)
				return null;

			return test;
		}
开发者ID:lextm,项目名称:xamarinstudio.xunit,代码行数:13,代码来源:XUnitTestProvider.cs

示例9: CreateTest

		public static UnitTest CreateTest (IWorkspaceObject entry)
		{
			var project = entry as DotNetProject;
			if (project != null) {
				foreach (var r in project.References) {
					if (r.Reference == "xunit") // xUnit.Net 1.x
						return new XUnitProjectTestSuite (project);
					if (r.Reference.StartsWith ("xunit.core")) // xUnit.Net 2.x
						return new XUnitProjectTestSuite (project);
				}
			}

			return null;
		}
开发者ID:lextm,项目名称:xamarinstudio.xunit,代码行数:14,代码来源:XUnitProjectTestSuite.cs

示例10: CreateUnitTest

		public UnitTest CreateUnitTest (IWorkspaceObject entry)
		{
			if (entry is DotNetProject) {
				DotNetProject project = (DotNetProject) entry;
				MonoSolutionItemHandler handler = ProjectExtensionUtil.GetItemHandler (project) as MonoSolutionItemHandler;
				if (handler != null) {
					if (handler.UnitTest != null)
						return (UnitTest) handler.UnitTest;
					string testFileBase = handler.GetTestFileBase ();
					UnitTest testSuite = new MonoTestSuite (project, project.Name, testFileBase);
					handler.UnitTest = testSuite;
					return testSuite;
				}
			}
			return null;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:16,代码来源:MonoTestProvider.cs

示例11: ExportProjectDialog

		public ExportProjectDialog (IWorkspaceObject entry, FileFormat selectedFormat)
		{
			this.Build();
			
			FileFormat f = entry is WorkspaceItem ? ((WorkspaceItem)entry).FileFormat : ((SolutionEntityItem)entry).FileFormat;
			labelNewFormat.Text = f.Name;
			
			formats = Services.ProjectService.FileFormats.GetFileFormatsForObject (entry);
			foreach (FileFormat format in formats)
				comboFormat.AppendText (format.Name);

			int sel = Array.IndexOf (formats, selectedFormat);
			if (sel == -1) sel = 0;
			comboFormat.Active = sel;
			
			folderEntry.Path = entry.ItemDirectory;
			UpdateControls ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:18,代码来源:ExportProjectDialog.cs

示例12: Publish

		public static bool Publish (IWorkspaceObject entry, FilePath localPath, bool test)
		{
			if (test)
				return true;

			if (!VersionControlService.CheckVersionControlInstalled ())
				return false;

			List<FilePath> files = new List<FilePath> ();

			// Build the list of files to be checked in			
			string moduleName = entry.Name;
			if (localPath == entry.BaseDirectory) {
				GetFiles (files, entry);
			} else if (entry is Project) {
				foreach (ProjectFile file in ((Project)entry).Files.GetFilesInPath (localPath))
					if (file.Subtype != Subtype.Directory)
						files.Add (file.FilePath);
			} else
				return false;

			if (files.Count == 0)
				return false;
	
			SelectRepositoryDialog dlg = new SelectRepositoryDialog (SelectRepositoryMode.Publish);
			try {
				dlg.ModuleName = moduleName;
				dlg.Message = GettextCatalog.GetString ("Initial check-in of module {0}", moduleName);
				do {
					if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok && dlg.Repository != null) {
						AlertButton publishButton = new AlertButton ("_Publish");					
						if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to publish the project?"), GettextCatalog.GetString ("The project will be published to the repository '{0}', module '{1}'.", dlg.Repository.Name, dlg.ModuleName), AlertButton.Cancel, publishButton) == publishButton) {
							PublishWorker w = new PublishWorker (dlg.Repository, dlg.ModuleName, localPath, files.ToArray (), dlg.Message);
							w.Start ();
							break;
						}
					} else
						break;
				} while (true);
			} finally {
				dlg.Destroy ();
			}
			return true;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:44,代码来源:PublishCommand.cs

示例13: CreateUnitTest

		public UnitTest CreateUnitTest (IWorkspaceObject entry)
		{
			UnitTest test = null;
			
			if (entry is SolutionFolder)
				test = SolutionFolderTestGroup.CreateTest ((SolutionFolder)entry);
			if (entry is Solution)
				test = SolutionFolderTestGroup.CreateTest (((Solution)entry).RootFolder);
			if (entry is Workspace)
				test = WorkspaceTestGroup.CreateTest ((Workspace)entry);
			if (entry is DotNetProject)
				test = NUnitProjectTestSuite.CreateTest ((DotNetProject)entry);
			if (entry is NUnitAssemblyGroupProject)
				test = ((NUnitAssemblyGroupProject)entry).RootTest;
			
			UnitTestGroup grp = test as UnitTestGroup;
			if (grp != null && !grp.HasTests)
				return null;
			
			return test;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:21,代码来源:SystemTestProvider.cs

示例14: GetAllFiles

		private Core.FilePath[] GetAllFiles(IWorkspaceObject item)
		{
			var files = new List<Core.FilePath>();
			if (item is Solution) {
				var sln = (Solution)item;
				files.Add(sln.FileName);
				foreach (var childSolution in sln.GetAllSolutions())
					if (childSolution != sln)
						files.AddRange(GetAllFiles(childSolution));

				foreach (var project in sln.GetAllProjects())
					files.AddRange(GetAllFiles(project));
			}

			if (item is Project) {
				var prj = (Project)item;
				files.Add(prj.FileName);
				foreach (var file in ((Project)item).Files)
					files.Add(file.FilePath);
			}

			return files.ToArray();
		}
开发者ID:yvanjanssens,项目名称:monodevelop-git,代码行数:23,代码来源:GitCommandHandler.cs

示例15: Export

		public void Export (IWorkspaceObject entry, FileFormat format)
		{
			ExportProjectDialog dlg = new ExportProjectDialog (entry, format);
			try {
				if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
					
					using (IProgressMonitor mon = IdeApp.Workbench.ProgressMonitors.GetToolOutputProgressMonitor (true)) {
						string folder = dlg.TargetFolder;
						
						string file = entry is WorkspaceItem ? ((WorkspaceItem)entry).FileName : ((SolutionEntityItem)entry).FileName;
						Services.ProjectService.Export (mon, file, folder, dlg.Format);
					}
				}
			} finally {
				dlg.Destroy ();
			}
		}
开发者ID:JoeRobich,项目名称:monodevelop,代码行数:17,代码来源:ProjectOperations.cs


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