Dev2.Workspaces.WorkspaceItemRepository.Read C# (CSharp) Method

Read() private method

private Read ( ) : IList
return IList
        private IList<IWorkspaceItem> Read()
        {
            var result = new List<IWorkspaceItem>();
            if(File.Exists(RepositoryPath))
            {
                try
                {
                    var xml = XElement.Parse(File.ReadAllText(RepositoryPath));
                    result.AddRange(xml.Elements().Select(x => new WorkspaceItem(x)));
                }
                // ReSharper disable EmptyGeneralCatchClause
                catch
                // ReSharper restore EmptyGeneralCatchClause
                {
                    // corrupt so ignore
                }
            }
            return result;
        }