Ejemplo n.º 1
0
        private void AddDescriptor(DomainMemberDescriptor descriptor)
        {
            var viewModel = descriptor.Host == null?this.CreateInstance(this.authentication, descriptor, this.Owner) : descriptor.Host as DomainMemberTreeItemBase;

            viewModel.Parent = this;
            descriptor.Host  = viewModel;
        }
Ejemplo n.º 2
0
 private void RemoveDescriptor(DomainMemberDescriptor descriptor)
 {
     foreach (var item in this.Items.ToArray())
     {
         if (item is DomainMemberTreeItemBase viewModel && viewModel.Descriptor == descriptor)
         {
             this.Items.Remove(viewModel);
         }
     }
 }
Ejemplo n.º 3
0
 protected virtual DomainMemberTreeItemBase CreateInstance(Authentication authentication, DomainMemberDescriptor descriptor, object owner)
 {
     return(new DomainMemberTreeItemBase(authentication, descriptor, owner));
 }