Пример #1
0
		public bool EditPostProcessing(string filename)
		{
			var connection = GetTfsPersistentConnection();
			var handler = new TfsFileHandler(connection.TfsTeamProjectCollection, filename);

			// nothing to do if the file does not exist on the file system
			if (!handler.FileExistsOnFileSystem) return true;

			return handler.FileExistsOnServer ? handler.CheckoutFileForEdit() : handler.AddFile();
		}
Пример #2
0
		public bool EditPreProcessing(string filename)
		{
			var connection = GetTfsPersistentConnection();
			var handler = new TfsFileHandler(connection.TfsTeamProjectCollection, filename);

			// nothing to do if the file has yet to be added to TFS
			if (!handler.FileExistsOnServer) return true;
			
			return handler.CheckoutFileForEdit();
		}
Пример #3
0
		public bool DeletePreProcessing(string filename)
		{
			var connection = GetTfsPersistentConnection();
			var handler = new TfsFileHandler(connection.TfsTeamProjectCollection, filename);
			return handler.CheckoutFileForDelete();
		}
Пример #4
0
		public bool FileExistsInSourceControl(string filename)
		{
			var connection = GetTfsPersistentConnection();
			var handler = new TfsFileHandler(connection.TfsTeamProjectCollection, filename);
			return handler.GetFileExistsOnServer();
		}