CodeDomProvider::CreateProvider Method (String^, IDictionary<String^, String^>^)
Gets a CodeDomProvider instance for the specified language and provider options.
Assembly: System (in System.dll)
public: [ComVisibleAttribute(false)] static CodeDomProvider^ CreateProvider( String^ language, IDictionary<String^, String^>^ providerOptions )
Parameters
- language
-
Type:
System::String^
The language name.
- providerOptions
-
Type:
System.Collections.Generic::IDictionary<String^, String^>^
A collection of provider options from the configuration file.
Return Value
Type: System.CodeDom.Compiler::CodeDomProvider^A CodeDOM provider that is implemented for the specified language name and options.
Note |
|---|
This method is most commonly used to create an instance of a code provider in an application that may optionally use one of several providers. CreateProvider(String^, IDictionary<String^, String^>^) enables you to specify at run time the version of the code provider you want to instantiate. If you know at design time which code provider is to be used, you should create an instance of that code provider instead of using the CreateProvider(String^, IDictionary<String^, String^>^) method. |
Use CreateProvider(String^, IDictionary<String^, String^>^) when you want to dynamically find a configured provider implementation for a specific language and options. Language names are case-insensitive. For information about supported provider options, see the specific CodeDOM provider documentation.
For information about validating a provider and calling a provider if more than one provider implementation is configured for the language name, see the Remarks section of the CreateProvider(String^) method.
Available since 4.0
