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

C# IWorkspaceObject类代码示例

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

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



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


示例16: GetFiles

		static void GetFiles (List<FilePath> files, IWorkspaceObject entry)
		{
			// Ensure that we strip out all linked files from outside of the solution/projects path.
			if (entry is IWorkspaceFileObject)
				files.AddRange (((IWorkspaceFileObject)entry).GetItemFiles (true).Where (file => file.CanonicalPath.IsChildPathOf (entry.BaseDirectory)));
		}
开发者ID:KrazyPengwin,项目名称:monodevelop,代码行数:6,代码来源:PublishCommand.cs


示例17: ShowOptions

		public void ShowOptions (IWorkspaceObject entry)
		{
			ShowOptions (entry, null);
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:4,代码来源:ProjectOperations.cs


示例18: BuildTest

		public UnitTest BuildTest (IWorkspaceObject entry)
		{
			foreach (ITestProvider p in providers) {
				try {
					UnitTest t = p.CreateUnitTest (entry);
					if (t != null)
						return t;
				} catch {
				}
			}
			return null;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:12,代码来源:NUnitService.cs


示例19: FindRootTest

		public UnitTest FindRootTest (IWorkspaceObject item)
		{
			return FindRootTest (RootTests, item);
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:4,代码来源:NUnitService.cs


示例20: SaveUserTasks

		internal static void SaveUserTasks (IWorkspaceObject item)
		{
			string fileToSave = GetUserTasksFilename ((WorkspaceItem)item);
			try {
				List<Task> utasks = new List<Task> (userTasks.GetItemTasks (item, true));
				if (utasks.Count == 0) {
					if (File.Exists (fileToSave))
						File.Delete (fileToSave);
				} else {
					XmlDataSerializer serializer = new XmlDataSerializer (new DataContext ());
					serializer.Serialize (fileToSave, utasks);
				}
			} catch (Exception ex) {
				LoggingService.LogWarning ("Could not save user tasks: " + fileToSave, ex);
			}
		}
开发者ID:head-thrash,项目名称:monodevelop,代码行数:16,代码来源:TaskService.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IWorld类代码示例发布时间:2022-05-24
下一篇:
C# IWorkspaceFileObject类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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