DesignTimeData.GetSelectedDataSource 方法

定义

获取设计主机中按名称选择的数据源,该数据源由指定的组件的站点属性表示。

重载

名称 说明
GetSelectedDataSource(IComponent, String)

获取设计主机中按名称选择的数据源,该数据源由指定的组件的站点属性表示,并由指定的数据源名称标识。

GetSelectedDataSource(IComponent, String, String)

获取设计主机中按名称选择的数据源,该数据源由指定的组件的站点属性表示,并由指定的数据源名称和成员名称标识。

GetSelectedDataSource(IComponent, String)

获取设计主机中按名称选择的数据源,该数据源由指定的组件的站点属性表示,并由指定的数据源名称标识。

public:
 static System::Object ^ GetSelectedDataSource(System::ComponentModel::IComponent ^ component, System::String ^ dataSource);
public static object GetSelectedDataSource(System.ComponentModel.IComponent component, string dataSource);
static member GetSelectedDataSource : System.ComponentModel.IComponent * string -> obj
Public Shared Function GetSelectedDataSource (component As IComponent, dataSource As String) As Object

参数

component
IComponent

IComponent包含数据源的对象。

dataSource
String

要检索的数据源的名称。

返回

实现 IListSourceIEnumerable 表示所选数据源的对象,或者 null 无法访问数据源或设计器主机。

另请参阅

适用于

GetSelectedDataSource(IComponent, String, String)

获取设计主机中按名称选择的数据源,该数据源由指定的组件的站点属性表示,并由指定的数据源名称和成员名称标识。

public:
 static System::Collections::IEnumerable ^ GetSelectedDataSource(System::ComponentModel::IComponent ^ component, System::String ^ dataSource, System::String ^ dataMember);
public static System.Collections.IEnumerable GetSelectedDataSource(System.ComponentModel.IComponent component, string dataSource, string dataMember);
static member GetSelectedDataSource : System.ComponentModel.IComponent * string * string -> System.Collections.IEnumerable
Public Shared Function GetSelectedDataSource (component As IComponent, dataSource As String, dataMember As String) As IEnumerable

参数

component
IComponent

实现 IComponent 包含数据源属性的对象。

dataSource
String

要检索的数据源。

dataMember
String

要检索的数据成员。

返回

实现 IEnumerable 包含数据成员的对象,或者 null 无法访问数据源、成员或组件的站点。

另请参阅

适用于