public IEnumerable <Deployment> GetAll() { if (!_fileSystem.Exists(_deploymentsFile)) { return(new Deployment[0]); } var json = _fileSystem.ReadAllText(_deploymentsFile); var deployments = _serializer.FromJson <IEnumerable <Deployment> >(json); return(deployments); }
/// <summary> /// Initializes a new instance of <see cref="AllImprovables"/> /// </summary> public AllImprovables(ITenantAwareFileSystem fileSystem, ISerializer serializer) { _fileSystem = fileSystem; if (_fileSystem.Exists(_improvablesFile)) { var json = _fileSystem.ReadAllText(_improvablesFile); Query = serializer.FromJson <IEnumerable <ImprovableForListing> >(json).AsQueryable(); } else { Query = new ImprovableForListing[0].AsQueryable(); } }