///<summary>Creates a typed table from its typed schema.</summary> public TypedTable(TypedSchema <TRow> schema, Func <TRow> rowCreator) : base(schema) { if (rowCreator == null) { throw new ArgumentNullException("rowCreator"); } this.rowCreator = rowCreator; Rows = new TypedRowCollection(base.Rows); }
//[Obsolete("This pattern is no longer used. Please use a static constructor.")] public static TypedSchema <TRow> Create(string name, Action <TypedSchema <TRow> > creator) { if (creator == null) { throw new ArgumentNullException("creator"); } var retVal = new TypedSchema <TRow>(name); creator(retVal); return(retVal); }
///<summary>Creates a typed table from its typed schema.</summary> public TypedTable(TypedSchema <TRow> schema) : this(schema, Activator.CreateInstance <TRow>) { }