Пример #1
0
        public ZipBinding(DataViewSchema[] sources)
        {
            Contracts.AssertNonEmpty(sources);
            _sources                = sources;
            _cumulativeColCounts    = new int[_sources.Length + 1];
            _cumulativeColCounts[0] = 0;

            for (int i = 0; i < sources.Length; i++)
            {
                var schema = sources[i];
                _cumulativeColCounts[i + 1] = _cumulativeColCounts[i] + schema.Count;
            }

            var schemaBuilder = new DataViewSchema.Builder();

            foreach (var sourceSchema in sources)
            {
                schemaBuilder.AddColumns(sourceSchema);
            }
            OutputSchema = schemaBuilder.ToSchema();
        }