private void AddTenantNode(AuthTokenDto tokenDto, TenantDto tenant) { var node = new TenantNode(tokenDto.ServerDto, tenant.Name) { DisplayName = tenant.Name, Tag = tenant.Guid, Parent = this }; node.Refresh(this, EventArgs.Empty); AddTenantNode(node); }
private void AddTenantNode(TenantNode node) { var nodeWithSameNameExists = false; var index = 0; while (index < Children.Count) { var tenantNode = (TenantNode)Children [index++]; if (tenantNode.DisplayName == node.DisplayName) { nodeWithSameNameExists = true; break; } } if (nodeWithSameNameExists) { Children.RemoveAt(index - 1); } Children.Add(node); NSNotificationCenter.DefaultCenter.PostNotificationName("ReloadOutlineView", this); }
private void AddTenantNode (TenantNode node) { var nodeWithSameNameExists = false; var index = 0; while (index < Children.Count) { var tenantNode = (TenantNode)Children [index++]; if (tenantNode.DisplayName == node.DisplayName) { nodeWithSameNameExists = true; break; } } if (nodeWithSameNameExists) Children.RemoveAt (index - 1); Children.Add (node); NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadOutlineView", this); }
private void AddTenantNode (AuthTokenDto tokenDto, TenantDto tenant) { var node = new TenantNode (tokenDto.ServerDto, tenant.Name) { DisplayName = tenant.Name, Tag = tenant.Guid, Parent = this }; node.Refresh (this, EventArgs.Empty); AddTenantNode (node); }