Beispiel #1
0
        public IViewStore GetViewStorage(string name, bool create)
        {
            var view = _views[name];

            if (view == null)
            {
                try {
                    view         = new ForestDBViewStore(this, name, create);
                    _views[name] = view;
                } catch (InvalidOperationException) {
                    return(null);
                } catch (Exception e) {
                    Log.E(TAG, String.Format("Error creating view storage for {0}", name), e);
                    return(null);
                }
            }

            return(view);
        }
Beispiel #2
0
 public IEnumerable <string> GetAllViews()
 {
     return(System.IO.Directory.EnumerateFiles(Directory, "*." + ForestDBViewStore.VIEW_INDEX_PATH_EXTENSION).
            Select(x => ForestDBViewStore.FileNameToViewName(Path.GetFileName(x))));
 }