ConfigurationSet.GetConfigurationSet(DirectoryContext) 方法

定义

返回所指定目录上下文的 ConfigurationSet 对象。Returns an ConfigurationSet object for the specified directory context.

public:
 static System::DirectoryServices::ActiveDirectory::ConfigurationSet ^ GetConfigurationSet(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context);
public static System.DirectoryServices.ActiveDirectory.ConfigurationSet GetConfigurationSet (System.DirectoryServices.ActiveDirectory.DirectoryContext context);
static member GetConfigurationSet : System.DirectoryServices.ActiveDirectory.DirectoryContext -> System.DirectoryServices.ActiveDirectory.ConfigurationSet
Public Shared Function GetConfigurationSet (context As DirectoryContext) As ConfigurationSet

参数

context
DirectoryContext

DirectoryContext 对象,它包含用于检索对象的目标和凭据。An DirectoryContext object that contains the target and credentials to use to retrieve the object. 上下文的目标可以是一个 AD LDS 实例,也可以是一个在可以标识配置集的当前目录林中的 serviceConnectionPoint 对象中指定的关键字。The target of the context can be an AD LDS instance or keywords that are specified in the serviceConnectionPoint object in the current forest that can identify the configuration set.

返回

一个 ConfigurationSet 对象,它表示指定上下文的配置集。A ConfigurationSet object that represents the configuration set for the specified context.

异常

未能找到 context 参数中指定的目标。A target specified in the context parameter could not be found.

对基础目录服务的调用导致了错误。A call to the underlying directory service resulted in an error.

contextnullcontext is null.

context 参数无效。The context parameter is not valid.

适用于

另请参阅