예제 #1
0
        private void SaveChangeResaveAssets(AssetManager assetManager)
        {
            var simpleAsset = new SimpleAsset("Grandpa", new SimpleAsset("Pa", new SimpleAsset("Son", null)));

            assetManager.Save(simpleAsset);
            simpleAsset.Dble       = 22.0;
            simpleAsset.Child.Dble = 42.0;
            assetManager.SaveSingle(simpleAsset);
        }
예제 #2
0
        private void SaveAssetsAndDeleteAChild(AssetManager assetManager)
        {
            var simpleAsset = new SimpleAsset("Pa", new SimpleAsset("Son", null));

            assetManager.Save(simpleAsset);
            var databaseFileProvider = (DatabaseFileProvider)VirtualFileSystem.ResolveProvider("/db", true).Provider;

            databaseFileProvider.AssetIndexMap.WaitPendingOperations();

            ObjectId childId;

            databaseFileProvider.AssetIndexMap.TryGetValue("SimpleAssets/Son", out childId);

            VirtualFileSystem.FileDelete(FileOdbBackend.BuildUrl(VirtualFileSystem.ApplicationDatabasePath, childId));
        }
예제 #3
0
        private static void SaveSimpleAssets(AssetManager assetManager)
        {
            var simpleAsset = new SimpleAsset("Grandpa", new SimpleAsset("Pa", new SimpleAsset("Son", null)));

            assetManager.Save(simpleAsset);
        }