Incapsulates all the TFS-related functionality.
Inheritance: IDisposable
Beispiel #1
0
		/// <summary>
		/// Initializes a new instance.
		/// </summary>
		private Program(TeamFoundationServerGateway tfsGateway, IMailGateway mailGateway, TimeSpan cutoffTimeSpan)
		{
			m_tfsGateway = tfsGateway;
			m_adGateway = new ActiveDirectoryGateway();
			m_mailGateway = mailGateway;
			m_runTime = DateTime.Now;
			m_cutoffTimeSpan = cutoffTimeSpan;
		}
Beispiel #2
0
		/// <summary>
		/// Assembly entry point.
		/// </summary>
		private static int Main(string[] args)
		{
			/*xxxargs = new[]
			{
				@"Command=ReportToUsers",
				@"TfsServerUri=http://rufrt-vxbuild:8080/tfs/sed",
				@"CutoffDays=0",
				@"[email protected]",
			};*/

			try
			{
				Arguments arguments = new Arguments(args);
				using (var tfsGateway = new TeamFoundationServerGateway(arguments.TfsServerUri))
				{
					using (var mailGateway = MailGatewayFactory.CreateGateway(new MailAddress(Resources.MailSenderAddress, Resources.MailSenderName)))
					{
						return (new Program(tfsGateway, mailGateway, arguments.CutoffTimeSpan)).Run(arguments);
					}
				}
			}
			catch (Exception e)
			{
				return ErrorHandler.Runtime(e);
			}
		}