public CheckContext(TfsClient tfs)
		{
			m_tfs = tfs;

			LocalFiles = new CheckContextService<List<string>>(GetLocalFiles);
			ProjectDocument = new CheckContextService<ProjectDocument>(GetProjectDocument);
			ProjectCommonProperties = new CheckContextService<Dictionary<string, string>>(GetProjectCommonProperties);
			ProjectDebugProperties = new CheckContextService<Dictionary<string, string>>(GetProjectDebugProperties);
			ProjectReleaseProperties = new CheckContextService<Dictionary<string, string>>(GetProjectReleaseProperties);
			ProjectIsWeb = new CheckContextService<bool>(GetProjectIsWeb);
			ProjectFiles = new CheckContextService<List<ProjectFile>>(GetProjectFiles);

			TfsSolutionItems = new CheckContextService<List<string>>(GetTfsSolutionItems);
			TfsNugetItems = new CheckContextService<List<string>>(GetTfsNugetItems);
			TfsPackagesItems = new CheckContextService<List<string>>(GetTfsPackagesItems);
			TfsSolutionFile = new CheckContextService<string>(GetTfsSolutionFile);
			TfsNugetConfig = new CheckContextService<string>(GetTfsNugetConfig);
		}
Exemple #2
0
		private static void CheckProject()
		{
			var tfs = new TfsClient(Config.TfsUrl);
			var context = new CheckContext(tfs);

			foreach (var issue in Args.CheckIssues.Split('|'))
			{
				var checker = GetChecker(issue);

				try
				{
					checker.Check(context);
				}
				catch (FailedCheckException e)
				{
					throw new InvalidOperationException(
						String.Format(
							@"
                               
                               
*** FAILED CHECK {0} // {1} ***
                               
{2}
                               
If you beleive everything is correct please talk to Oleg Shuruev to improve this check.
                               
                               
",
							issue,
							checker.GetType().Name,
							e.Message),
						e);
				}

				Console.WriteLine("{0}... OK", issue);
			}
		}
		public TfsSourceControl(string tfsUrl)
		{
			m_tfs = new TfsClient(tfsUrl);
		}