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


C# VersionControlItemList.All方法代码示例

本文整理汇总了C#中VersionControlItemList.All方法的典型用法代码示例。如果您正苦于以下问题:C# VersionControlItemList.All方法的具体用法?C# VersionControlItemList.All怎么用?C# VersionControlItemList.All使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VersionControlItemList的用法示例。


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

示例1: Show

		public static bool Show (VersionControlItemList items, bool test)
		{
			if (!test) {
				Show (items);
				return true;
			}
			else
				return items.All (i => i.VersionInfo.CanAnnotate);
		}
开发者ID:okrmartin,项目名称:monodevelop,代码行数:9,代码来源:BlameView.cs

示例2: Add

		public static bool Add (VersionControlItemList items, bool test)
		{
			if (!items.All (i => i.VersionInfo.CanAdd))
				return false;
			if (test)
				return true;
			
			new AddWorker (items).Start();
			return true;
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:10,代码来源:AddRemoveMoveCommand.cs

示例3: Show

		public static bool Show (VersionControlItemList items, bool test)
		{
			if (test)
				return items.All (CanShow);
			
			foreach (var item in items) {
				var document = IdeApp.Workbench.OpenDocument (item.Path, item.ContainerProject, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);
				if (document != null)
					document.Window.SwitchView (document.Window.FindView<IMergeView> ());
			}
			
			return true;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:13,代码来源:MergeCommand.cs

示例4: ResolveConflicts

		public static async Task<bool> ResolveConflicts (VersionControlItemList list, bool test)
		{
			if (test)
				return list.All (s => (s.VersionInfo.Status & VersionStatus.Conflicted) == VersionStatus.Conflicted);

			foreach (var item in list.Where (s => (s.VersionInfo.Status & VersionStatus.Conflicted) == VersionStatus.Conflicted)) {
				Document doc = await IdeApp.Workbench.OpenDocument (item.Path, item.ContainerProject, true);
				foreach (var view in doc.Views) {
					if (view.GetContent <MergeView> () != null)
						view.Select ();
				}
			}
			return true;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:14,代码来源:ResolveConflictsCommand.cs

示例5: Show

		public static bool Show (VersionControlItemList items, bool test)
		{
			if (test)
				return items.All (CanShow);
			
			foreach (var item in items) {
				var document = IdeApp.Workbench.OpenDocument (item.Path, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);
				if (document != null) {
					document.Window.SwitchView (document.Window.FindView<ILogView> ());
				} else {
					VersionControlDocumentInfo info = new VersionControlDocumentInfo (null, item, item.Repository);
					LogView logView = new LogView (info);
					info.Document = IdeApp.Workbench.OpenDocument (logView, true).PrimaryView;
					logView.Selected ();	
				}
			}
			
			return true;
		}
开发者ID:head-thrash,项目名称:monodevelop,代码行数:19,代码来源:LogCommand.cs

示例6: IgnoreInternal

		static bool IgnoreInternal (VersionControlItemList items, bool test)
		{
			try {
				if (test)
					return items.All (x => x.VersionInfo.Status == VersionStatus.Unversioned);

				if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to ignore the selected files?"),
				                                AlertButton.No, AlertButton.Yes) != AlertButton.Yes)
					return false;

				new IgnoreWorker (items).Start();
				return true;
			}
			catch (Exception ex) {
				if (test)
					LoggingService.LogError (ex.ToString ());
				else
					MessageService.ShowError (GettextCatalog.GetString ("Version control command failed."), ex);
				return false;
			}
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:21,代码来源:IgnoreCommand.cs

示例7: RevertInternal

		private static bool RevertInternal (VersionControlItemList items, bool test)
		{
			try {
				if (test)
					return items.All (i => i.VersionInfo.CanRevert);

				if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to revert the changes done in the selected files?"), 
				                                GettextCatalog.GetString ("All changes made to the selected files will be permanently lost."),
				                                AlertButton.Cancel, AlertButton.Revert) != AlertButton.Revert)
					return false;

				new RevertWorker (items).Start();
				return true;
			}
			catch (Exception ex) {
				if (test)
					LoggingService.LogError (ex.ToString ());
				else
					MessageService.ShowError (GettextCatalog.GetString ("Version control command failed."), ex);
				return false;
			}
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:22,代码来源:RevertCommand.cs

示例8: Show

		public static async Task<bool> Show (VersionControlItemList items, bool test)
		{
			if (test)
				return items.All (CanShow);
			
			foreach (var item in items) {
				Document document = null;
				if (!item.IsDirectory)
					document = await IdeApp.Workbench.OpenDocument (item.Path, item.ContainerProject, OpenDocumentOptions.Default | OpenDocumentOptions.OnlyInternalViewer);

				if (document != null) {
					document.Window.SwitchView (document.Window.FindView<ILogView> ());
				} else {
					VersionControlDocumentInfo info = new VersionControlDocumentInfo (null, item, item.Repository);
					LogView logView = new LogView (info);
					info.Document = IdeApp.Workbench.OpenDocument (logView, true).PrimaryView;
					logView.Init ();
				}
			}
			
			return true;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:22,代码来源:LogCommand.cs

示例9: Remove

		public static bool Remove (VersionControlItemList items, bool test)
		{
			if (!items.All (i => i.VersionInfo.CanRemove))
				return false;
			if (test)
				return true;
			
			string msg = GettextCatalog.GetString ("Are you sure you want to remove the selected items from the version control system?");
			string msg2 = GettextCatalog.GetString ("The files will be kept on disk.");
			if (MessageService.Confirm (msg, msg2, AlertButton.Delete))
				new RemoveWorker (items).Start();
			return true;
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:13,代码来源:AddRemoveMoveCommand.cs

示例10: CanShow

		public static bool CanShow (VersionControlItemList items, Revision since)
		{
			return items.All (i => i.VersionInfo.CanLog);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:4,代码来源:LogView.cs

示例11: CanCreatePatch

		/// <summary>
		/// Determines whether a patch can be created 
		/// from a VersionControlItemList.
		/// </summary>
		public static bool CanCreatePatch (VersionControlItemList items) 
		{
			if (null == items || 0 == items.Count){ return false; }
			return items.All (i => i.VersionInfo.CanRevert);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:9,代码来源:CreatePatchCommand.cs

示例12: UnignoreInternal

		static bool UnignoreInternal (VersionControlItemList items, bool test)
		{
			try {
				// NGit doesn't return a version info for ignored files.
				if (test)
					return items.All (x => (x.VersionInfo.Status & (VersionStatus.ScheduledIgnore | VersionStatus.Ignored)) != VersionStatus.Unversioned);

				if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to unignore the selected files?"),
				                                AlertButton.No, AlertButton.Yes) != AlertButton.Yes)
					return false;

				new UnignoreWorker (items).Start();
				return true;
			}
			catch (Exception ex) {
				if (test)
					LoggingService.LogError (ex.ToString ());
				else
					MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
				return false;
			}
		}
开发者ID:jrhtcg,项目名称:monodevelop,代码行数:22,代码来源:IgnoreCommand.cs


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