public ReadOnlyDirectoryServerCollection FindAllDirectoryServers() { base.CheckIfDisposed(); if (this.appType == ApplicationPartitionType.ADApplicationPartition) { return(this.FindAllDirectoryServersInternal(null)); } if (!this.committed) { throw new InvalidOperationException(Res.GetString("CannotPerformOperationOnUncommittedObject")); } ReadOnlyDirectoryServerCollection servers = new ReadOnlyDirectoryServerCollection(); servers.AddRange(ConfigurationSet.FindAdamInstances(base.context, base.Name, null)); return(servers); }
public ReadOnlyDirectoryServerCollection FindAllDirectoryServers(string siteName) { CheckIfDisposed(); if (siteName == null) { throw new ArgumentNullException("siteName"); } if (_appType == ApplicationPartitionType.ADApplicationPartition) { // AD return FindAllDirectoryServersInternal(siteName); } else { // Check that the application partition has been committed if (!_committed) { throw new InvalidOperationException(Res.GetString(Res.CannotPerformOperationOnUncommittedObject)); } ReadOnlyDirectoryServerCollection directoryServers = new ReadOnlyDirectoryServerCollection(); directoryServers.AddRange(ConfigurationSet.FindAdamInstances(context, Name, siteName)); return directoryServers; } }
public ReadOnlyDirectoryServerCollection FindAllDirectoryServers(string siteName) { base.CheckIfDisposed(); if (siteName != null) { if (this.appType != ApplicationPartitionType.ADApplicationPartition) { if (this.committed) { ReadOnlyDirectoryServerCollection readOnlyDirectoryServerCollection = new ReadOnlyDirectoryServerCollection(); readOnlyDirectoryServerCollection.AddRange(ConfigurationSet.FindAdamInstances(this.context, base.Name, siteName)); return readOnlyDirectoryServerCollection; } else { throw new InvalidOperationException(Res.GetString("CannotPerformOperationOnUncommittedObject")); } } else { return this.FindAllDirectoryServersInternal(siteName); } } else { throw new ArgumentNullException("siteName"); } }
public ReadOnlyDirectoryServerCollection FindAllDirectoryServers() { base.CheckIfDisposed(); if (this.appType == ApplicationPartitionType.ADApplicationPartition) { return this.FindAllDirectoryServersInternal(null); } if (!this.committed) { throw new InvalidOperationException(Res.GetString("CannotPerformOperationOnUncommittedObject")); } ReadOnlyDirectoryServerCollection servers = new ReadOnlyDirectoryServerCollection(); servers.AddRange(ConfigurationSet.FindAdamInstances(base.context, base.Name, null)); return servers; }