Beispiel #1
0
            protected DataViewBase(IHostEnvironment env, string name, InternalSchemaDefinition schemaDefn)
            {
                Contracts.AssertValue(env);
                env.AssertNonWhiteSpace(name);
                Host = env.Register(name);
                Host.AssertValue(schemaDefn);

                _schemaDefn = schemaDefn;
                _schema     = SchemaBuilder.MakeSchema(GetSchemaColumns(schemaDefn));
                int n = schemaDefn.Columns.Length;

                _peeks = new Delegate[n];
                for (var i = 0; i < n; i++)
                {
                    var currentColumn = schemaDefn.Columns[i];
                    _peeks[i] = currentColumn.IsComputed
                        ? currentColumn.Generator
                        : ApiUtils.GeneratePeek <DataViewBase <TRow>, TRow>(currentColumn);
                }
            }