private void AddTenantNode(AuthTokenDto tokenDto, TenantDto tenant) { var node = new TenantNode(_serverDto, tenant.Name) { DisplayName = tenant.Name, Tag = tenant.Guid }; AddTenantNode(node); }
private void AddTenantNode(AuthTokenDto tokenDto, string tenantName) { var tenantDto = new TenantDto { Name = tenantName }; var node = new TenantNode(_serverDto, tenantName) { DisplayName = tenantName, Tag = tenantName }; AddTenantNode(node); }
private void AddTenantNode(ServerNode serverNode, TenantNode node) { var nodeWithSameNameExists = false; var index = 0; while (index < serverNode.Children.Count) { var tenantNode = (TenantNode)serverNode.Children[index++]; if (tenantNode.DisplayName == node.DisplayName) { nodeWithSameNameExists = true; break; } } if (!nodeWithSameNameExists) { serverNode.Children.Add(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); }