ConnectionStringEditor.SetProviderName(Object, DesignerDataConnection) 方法

定义

将提供程序名称放在 ConnectionStringEditor 类的指定实例上。Puts the provider name on the specified instance of the ConnectionStringEditor class.

protected:
 virtual void SetProviderName(System::Object ^ instance, System::ComponentModel::Design::Data::DesignerDataConnection ^ connection);
protected virtual void SetProviderName (object instance, System.ComponentModel.Design.Data.DesignerDataConnection connection);
abstract member SetProviderName : obj * System.ComponentModel.Design.Data.DesignerDataConnection -> unit
override this.SetProviderName : obj * System.ComponentModel.Design.Data.DesignerDataConnection -> unit
Protected Overridable Sub SetProviderName (instance As Object, connection As DesignerDataConnection)

参数

instance
Object

ConnectionStringEditor 或派生类的实例。A ConnectionStringEditor or an instance of a derived class.

注解

SetProviderName方法在参数上设置提供程序名称 instanceThe SetProviderName method sets the provider name on the instance parameter. 例如,在 SqlDataSourceConnectionStringEditor 派生自类的中, ConnectionStringEditor ExpressionBinding 如果连接是配置的连接,则这将设置提供程序名称或添加对象。For example, in the SqlDataSourceConnectionStringEditor, which derives from the ConnectionStringEditor class, this either sets the provider name or adds an ExpressionBinding object, if the connection is a configured connection. 在此实现中, SetProviderName 方法不执行任何操作。In this implementation, the SetProviderName method does nothing.

适用于