Beispiel #1
0
        public TfsFacade(ILogEvents logger, Uri tfsCollectionUri, string projectName, string workItemTypeName)
        {
            this.logger           = logger;
            this.projectName      = projectName;
            this.workItemTypeName = workItemTypeName;

            this.tfs = new TfsTeamProjectCollection(tfsCollectionUri);
            logger.ConnectingToTfs(tfsCollectionUri);
            this.tfs.EnsureAuthenticated();
            this.workItemStore = tfs.GetService <WorkItemStore>();
            logger.ConnectedToTfs(tfsCollectionUri);

            if (!workItemStore.Projects.Contains(this.projectName))
            {
                logger.TfsProjectNotFound(this.projectName);
            }
            if (!workItemStore.Projects[projectName].WorkItemTypes.Contains(workItemTypeName))
            {
                logger.TfsWorkItemTypeNotFound(projectName, workItemTypeName);
            }
        }