コード例 #1
0
ファイル: ObjectTests.cs プロジェクト: pacificIT/mono-upnp
 public void StorageFolderInstantiation ()
 {
     var options = new StorageFolderOptions ();
     SetStorageFolderOptions (options);
     var storage_folder = new StorageFolder ("-1", "-1", options);
     AssertStorageFolder (storage_folder, options);
     AssertStorageFolder (storage_folder, storage_folder.GetOptions ());
 }
コード例 #2
0
ファイル: ObjectTests.cs プロジェクト: pacificIT/mono-upnp
 static void AssertStorageFolder (StorageFolder storageFolder, StorageFolderOptions options)
 {
     AssertContainer (storageFolder, options);
     Assert.AreEqual (storageFolder.StorageUsed, options.StorageUsed);
 }
コード例 #3
0
        void PrepareRoot ()
        {
            var child_count = 0;
            if (!share_all_tags) {
                foreach (var tag in db.Tags.RootCategory.Children) {
                    if (shared_tags.Contains (tag.Id)) {
                        child_count++;
                    }
                }
            } else {
                child_count = db.Tags.RootCategory.Children.Count;
            }

            var rootOptions = new StorageFolderOptions {
                IsRestricted = true,
                Title = "F-Spot RootCategory",
                ChildCount = child_count
            };

            var root = new StorageFolder(id.ToString (), "-1", rootOptions);

            tags_cache.Add (db.Tags.RootCategory.Id, root);
        }