示例#1
0
        protected override void GetChildItems(string path, bool recurse)
        {
            if (PathIsDrive(path))
            {
                NodeDetail thisNode = new NoSDbDetail(null, this.PSDriveInfo);
                WriteItemObject("\n    Context: " + path + "\n", path, false);
                PrintableTable childs = thisNode.ChilderanTable;
                WriteItemObject(childs.GetTableRows(), path, false);
                WriteItemObject("", path, false);
            }
            else
            {
                try
                {
                    ConfigurationConnection.UpdateClusterConfiguration();
                    ConfigurationConnection.UpdateDatabaseClusterInfo();
                }
                catch (Exception ex)
                {
                    throw ex;
                }


                string[]   pathChunks = SplitPath(path);
                NodeDetail thisNode;
                if (new NoSDbDetail(pathChunks, this.PSDriveInfo).TryGetNodeDetail(out thisNode))
                {
                    WriteItemObject("\n    Context: " + path + "\n", path, false);
                    PrintableTable childs = thisNode.ChilderanTable;
                    WriteItemObject(childs.GetTableRows(), path, false);
                    WriteItemObject("", path, false);
                }
            }
        }
示例#2
0
        internal LocalDatabaseDetail(string nodeName, bool isContainer, bool isValid,
                                     ClusterConfiguration configuration, string[] pathChunks)
        {
            NodeName       = nodeName;
            NodeType       = PathType.LocalDB;
            IsContainer    = isContainer;
            IsValid        = isValid;
            Configuration  = configuration;
            ChilderanTable = new PrintableTable();
            ChilderanTable.AddRow(ProviderUtil.DATABASES);
            ChilderanName = new List <string>();
            ChilderanName.Add(ProviderUtil.DATABASES);
            string tableString = ChilderanTable.GetTableRows();

            PathChunks = pathChunks;
        }
示例#3
0
        internal ConfigManagerDetail(string nodeName, bool isContainer, bool isValid,
                                     ClusterConfiguration configuration, string[] pathChunks)
        {
            NodeName       = nodeName;
            NodeType       = PathType.ConfigurationManager;
            IsContainer    = isContainer;
            IsValid        = isValid;
            Configuration  = configuration;
            ChilderanTable = new PrintableTable(" ");
            ChilderanName  = new List <string>();
            ChilderanTable.AddRow(ProviderUtil.DATABASES);
            ChilderanName.Add(ProviderUtil.DATABASES);
            if (!ConfigurationConnection.ClusterConfiguration.DisplayName.Equals(MiscUtil.STAND_ALONE))
            {
                ChilderanTable.AddRow(ProviderUtil.SHARDS);
                ChilderanName.Add(ProviderUtil.SHARDS);
                ChilderanTable.AddRow(ProviderUtil.CONFIGCLUSTER);
                ChilderanName.Add(ProviderUtil.CONFIGCLUSTER);
            }

            ChilderanTable.GetTableRows();
            PathChunks = pathChunks;
        }