Example #1
0
 internal void Add(ITableSnapshot tableSnapshot, ISnapTable snapTable)
 {
     Debug.Assert(tableSnapshot.StoreSnapshot == this);
     Debug.Assert(snapTable.SnapStore == this.SnapStore);
     this.table.Add(snapTable, tableSnapshot);
     this.primaryKeyHolder.Add((IPrimaryKeyHolder)tableSnapshot);
 }
Example #2
0
 /// <summary>
 /// Adds the table to the store.
 /// Table name should be unique in the store.
 /// </summary>
 /// <param name="snapTable"></param>
 /// <returns></returns>
 public void Add(ISnapTable snapTable)
 {
     if (snapTable.SnapStore != this)
     {
         throw new ArgumentException(Properties.Resources.ErrorSnapTable);
     }
     this.CheckNotFrozen();
     this.table.Add(snapTable.Name, snapTable);
 }
Example #3
0
        /// <summary>
        /// Gets table by name
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public ITableSnapshot Table(string name)
        {
            ISnapTable snapTable = this.SnapStore.Table(name);

            if (snapTable != null && snapTable.IsUserTable)
            {
                return(this.table[snapTable]);
            }
            return(null);
        }