// special constructor used by the virtual folders (allows for folder relocation)
 public FolderMediaLocation(FileInfo info, IFolderMediaLocation parent, IFolderMediaLocation location)
     : base(info, parent) {
     children = new MediaBrowser.Library.Util.Lazy<IList<IMediaLocation>>(GetChildren);
     index = new MediaBrowser.Library.Util.Lazy<Dictionary<string, IMediaLocation>>(CreateIndex); 
     if (location == null) {
         this.location = this;
     } else {
         this.location = location;
     }
 }
 // special constructor used by the virtual folders (allows for folder relocation)
 public FolderMediaLocation(FileInfo info, IFolderMediaLocation parent, IFolderMediaLocation location)
     : base(info, parent)
 {
     children = new MediaBrowser.Library.Util.Lazy <IList <IMediaLocation> >(GetChildren);
     index    = new MediaBrowser.Library.Util.Lazy <Dictionary <string, IMediaLocation> >(CreateIndex);
     if (location == null)
     {
         this.location = this;
     }
     else
     {
         this.location = location;
     }
 }
Esempio n. 3
0
 public Folder()
     : base()
 {
     children = new MediaBrowser.Library.Util.Lazy <List <BaseItem> >(() => GetChildren(true), () => OnChildrenChanged(null));
 }
Esempio n. 4
0
 public virtual void RetrieveChildren()
 {
     children   = ApiId != null ? new Lazy <List <BaseItem> >(() => GetChildren(true), () => OnChildrenChanged(null)) : new Lazy <List <BaseItem> >(() => new List <BaseItem>(), null);
     mediaCount = null;
 }