本文整理汇总了C#中DataSource.AddDataSet方法的典型用法代码示例。如果您正苦于以下问题:C# DataSource.AddDataSet方法的具体用法?C# DataSource.AddDataSet怎么用?C# DataSource.AddDataSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataSource
的用法示例。
在下文中一共展示了DataSource.AddDataSet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PopulateDataSource
/// <inheritdoc />
protected override void PopulateDataSource(IPatternScope scope, DataSource dataSource, ICodeElementInfo codeElement)
{
var invoker = new FixtureMemberInvoker<IEnumerable>(factoryType, scope, factoryMethodName);
XDocument xdocument = OpenXDocument(codeElement);
var parameters = new object[] { GetElementList(xdocument, xPath) };
var dataSet = new FactoryDataSet(() => invoker.Invoke(parameters), kind, columnCount);
dataSource.AddDataSet(dataSet);
}
示例2: PopulateDataSource
/// <inheritdoc />
protected override void PopulateDataSource(IPatternScope scope, DataSource dataSource, ICodeElementInfo codeElement)
{
// Create the invoker object which Gallio will call by reflection
var invoker = new FixtureMemberInvoker<IEnumerable>(factoryType, scope, factoryMethodName);
// Get an ADO DataTable from the implementation.
DataTable dataTable = BuildDataTable();
// Create the array of arguments which will be passed to the method called by the invoker
var parameters = new object[] {dataTable,
this.RowIndexIncludeFilterArray, this.RowIndexExcludeFilterArray,
this.CellValueIncludeFilterArray, this.CellValueExcludeFilterArray};
// Create a FactoryDataSet with an invoker of our factory methods in the delegate
var dataSet = new FactoryDataSet(() => invoker.Invoke(parameters), FactoryKind.Auto, 0);
dataSource.AddDataSet(dataSet);
}
示例3: PopulateDataSource
/// <inheritdoc />
protected override void PopulateDataSource(IPatternScope scope, DataSource dataSource, ICodeElementInfo codeElement)
{
var dataSet = new XmlDataSet(delegate { return OpenXPathDocument(codeElement); }, itemPath, IsDynamic);
dataSet.DataLocationName = GetDataLocationName();
dataSource.AddDataSet(dataSet);
}
示例4: PopulateDataSource
/// <inheritdoc />
protected override void PopulateDataSource(IPatternScope scope, DataSource dataSource, ICodeElementInfo codeElement)
{
var invoker = new FixtureMemberInvoker<IEnumerable>(factoryType, scope, factoryMethodName);
// Get List-of-Lists of Eleemnts
var listOfListsOfElements = BuildListOfNodeLists(codeElement);
// Use Gallio's invoker object to execute factory method
var parameters = new object[] { listOfListsOfElements };
var dataSet = new FactoryDataSet(() => invoker.Invoke(parameters), kind, columnCount);
dataSource.AddDataSet(dataSet);
}