IManagementHost.CreateBuilder(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the requested object that was created by the class factory and has the specified type.
public:
System::Object ^ CreateBuilder(Type ^ builderType);
public object CreateBuilder (Type builderType);
abstract member CreateBuilder : Type -> obj
Public Function CreateBuilder (builderType As Type) As Object
Parameters
- builderType
- Type
The type of the object to be created.
Returns
An object of type builderType
that was created by the class factory implementation.
Examples
The following example shows an implementation of the CreateBuilder method.
object IManagementHost.CreateBuilder(Type builderType) {
if (builderType == typeof(IConnectionBuilder)) {
return new MyConnectionBuilder();
}
if (builderType == typeof(ICredentialBuilder)) {
return new MyCredentialBuilder();
}
if (builderType == typeof(ICertificateVerificationBuilder)) {
return new MyCertVeriBuilder();
}
return null;
}