public List <DFSTarget> GetDFSTargets() { List <DFSTarget> dfsTargets = new List <DFSTarget>(); foreach (DfsTarget dfsTargetInformation in DfsTarget.GetInstances()) { DFSTarget dfsTargetData = new DFSTarget(dfsTargetInformation.Name, dfsTargetInformation.ServerName, dfsTargetInformation.ShareName, dfsTargetInformation.Description, dfsTargetInformation.State.ToString()); dfsTargets.Add(dfsTargetData); } return(dfsTargets); }
public void GetDFSTargets(string DFSNamespace) { List <DFSRoot> dfsTarget = new List <DFSRoot>(); foreach (DfsTarget dfsTargetInformation in DfsTarget.GetInstances()) { if (dfsTargetInformation.Name.Contains(DFSNamespace)) { DFSRoot dfsRootData = new DFSRoot(dfsNodeInformation.Name, dfsNodeInformation.Description, dfsNodeInformation.Timeout); dfsTarget.Add(dfsRootData); } } return(dfsTarget); }