public void GetFileListOutput()
        {
            var items = vcServer.GetItems("$/", RecursionType.Full);

            foreach (var item in items.Items)
            {
                OutputService.WriteOutput(item.ServerItem);
            }
        }
        public void UpdateProject(string path)
        {
            var status = workSpace.Get(new[] { path }, VersionSpec.Latest, RecursionType.Full,
                                       GetOptions.GetAll | GetOptions.Overwrite);

            if (status.NoActionNeeded)
            {
                OutputService.WriteOutput($"<TFS>No Actions needed on: {path}");
            }

            if (status.NumFailures > 0)
            {
                Failures = status.GetFailures();
            }
        }
        public void Connect(Uri path)
        {
            try
            {
                // Connect to the team project collection and the server that hosts the version-control repository.
                var tpc = new TfsTeamProjectCollection(path);
                vcServer = tpc.GetService <VersionControlServer>();

                workSpaceInfo = Workstation.Current.GetLocalWorkspaceInfo(vcServer, Environment.MachineName,
                                                                          vcServer.AuthorizedUser);
                workSpace = vcServer.GetWorkspace(workSpaceInfo);

                IsConnected = true;
            }
            catch (Exception exception)
            {
                IsConnected = false;
                logger.Error(exception, $"couldn't connect to Server: {TeamFoundationServerUrl}");
                OutputService.WriteOutput(
                    $"couldn't connect to Server: {TeamFoundationServerUrl} Error:{exception.Message}");
            }
        }