public override bool TryGetNodeDetail(out NodeDetail nodeDetail) { NodeDetail thisNodeDetail; bool sucess; List <object> childernNaames = new List <object>(); string[] childPathChunks = new string[this.PathChunks.Length - 1]; Array.Copy(this.PathChunks, 1, childPathChunks, 0, this.PathChunks.Length - 1); switch (PathChunks[0].ToLower()) { case ProviderUtil.DATABASES: DatabaseConfigurations databasees = ((ClusterConfiguration)Configuration).Databases; thisNodeDetail = new DatabasesDetail(PathChunks[0], databasees, childPathChunks); sucess = true; break; default: thisNodeDetail = new EndNodeDetail(); sucess = false; break; } if (PathChunks.Length == 1) { nodeDetail = thisNodeDetail; return(sucess); } return(thisNodeDetail.TryGetNodeDetail(out nodeDetail)); }
public override bool TryGetNodeDetail(out NodeDetail nodeDetail) { NodeDetail thisNodeDetail; bool sucess; List <object> childernNaames = new List <object>(); string[] childPathChunks = new string[this.PathChunks.Length - 1]; Array.Copy(this.PathChunks, 1, childPathChunks, 0, this.PathChunks.Length - 1); switch (PathChunks[0].ToLower()) { case ProviderUtil.SHARDS: DeploymentConfiguration deployment = ((ClusterConfiguration)Configuration).Deployment; thisNodeDetail = new ShardsDetail(PathChunks[0], deployment, childPathChunks); sucess = true; break; case ProviderUtil.DATABASES: DatabaseConfigurations databasees = ((ClusterConfiguration)Configuration).Databases; thisNodeDetail = new DatabasesDetail(PathChunks[0], databasees, childPathChunks); sucess = true; break; case ProviderUtil.CONFIGCLUSTER: thisNodeDetail = new ConfigurationNodesDetail(PathChunks[0], true, true, new ConfigClusterInfo(ConfigurationConnection.ConfigCluster), childPathChunks); sucess = true; break; default: thisNodeDetail = null; sucess = false; break; } if (PathChunks.Length == 1) { nodeDetail = thisNodeDetail; return(sucess); } return(thisNodeDetail.TryGetNodeDetail(out nodeDetail)); }