当前位置: 首页>>代码示例>>C#>>正文


C# DataSource.AddDataSet方法代码示例

本文整理汇总了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);
 }
开发者ID:rprouse,项目名称:mbunit-v3,代码行数:9,代码来源:XmlDataObjectAttribute.cs

示例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);
        }
开发者ID:rprouse,项目名称:mbunit-v3,代码行数:18,代码来源:TabularDataAttributeBase.cs

示例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);
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:8,代码来源:XmlDataAttribute.cs

示例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);
        }
开发者ID:rprouse,项目名称:mbunit-v3,代码行数:12,代码来源:XmlDataObjectCartesianAttribute.cs


注:本文中的DataSource.AddDataSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。