Ejemplo n.º 1
0
        void folders_Changed()
        {
            bool hasChildren = false;

            if (Folders.State == LazyState.Loaded)
            {
                disposable = disposable.EnsureDispose();
                if (Folders.Value != null)
                {
                    disposable  = Folders.Value.Advise(folders_Changed);
                    hasChildren = Folders.Value.Count == 0;
                }
            }

            if (this.hasChildren != hasChildren)
            {
                this.hasChildren = hasChildren;
                Notify();
            }
        }
Ejemplo n.º 2
0
 public override void Dispose()
 {
     base.Dispose();
     disposable = disposable.EnsureDispose();
 }