Esempio n. 1
0
        ///<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);
        }
Esempio n. 2
0
        //[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);
        }
Esempio n. 3
0
 ///<summary>Creates a typed table from its typed schema.</summary>
 public TypedTable(TypedSchema <TRow> schema) : this(schema, Activator.CreateInstance <TRow>)
 {
 }