public NeoVirtFS(IMongoDatabase db)
        {
            this.db = db;
            // Get wired up to our collections
            NeoVirtFSCol        = db.NeoVirtFS();
            NeoVirtFSDeletedCol = db.NeoVirtFSDeleted();
            //NeoVirtFSNamespacesCol = db.NeoVirtFSNamespaces();
            //NeoVirtFSVolumesCol = db.NeoVirtFSVolumes();
            //NeoVirtFSSecPrincipalsCol = db.NeoVirtFSSecPrincipals();
            //NeoVirtFSSecACLsCol = db.NeoVirtFSSecACLs();

            bac  = db.BakedAssets();
            bvol = db.BakedVolumes();

            if (nodeCache == null)      // Some other instance might have done this
            {
                var oa = new MemoryCacheOptions()
                {
                    // SizeLimit = 100 * 1024 * 1024
                };  // 100 mb?
                nodeCache = new MemoryCache(oa);
            }

            var HaveRoot = NeoAssets.Mongo.NeoVirtFS.PullNamespacesAndVolumes(db,
                                                                              ref NamespaceNames,
                                                                              ref Namespaces,
                                                                              ref RootNameSpace);

            if (!HaveRoot)
            {
                throw new Exception("Did not define a root namespace");
            }
        }
Exemplo n.º 2
0
 public VfsBakedAssets(IMongoDatabase db)
 {
     this.db = db;
     bac     = db.BakedAssets();
 }
Exemplo n.º 3
0
 public AssetFilesystem(IMongoDatabase db)
 {
     this.db = db;
     bac     = db.BakedAssets();
 }