Dev2.Workspaces.WorkspaceRepository.GetLatest C# (CSharp) Method

GetLatest() public method

Overwrites this workspace with the server versions except for those provided.
public GetLatest ( IWorkspace workspace, IList servicesToIgnore ) : void
workspace IWorkspace The workspace to be queried.
servicesToIgnore IList The services being to be ignored.
return void
        public void GetLatest(IWorkspace workspace, IList<string> servicesToIgnore)
        {
            lock(_readLock)
            {
                // ReSharper disable RedundantAssignment
                var filesToIgnore = servicesToIgnore.Select(s => s += ".xml").ToList();
                // ReSharper restore RedundantAssignment
                var targetPath = EnvironmentVariables.GetWorkspacePath(workspace.ID);
                _resourceCatalog.SyncTo(ServerWorkspacePath, targetPath, true, true, filesToIgnore);
            }
        }