Example #1
0
 private void ResetTable(TableItem item, Table table)
 {
     if (item is TableRow)
     {
         TableRow tableRow = (TableRow)item;
         if (tableRow is EsriTableRow)
         {
             ((EsriTableRow)tableRow).SetTable2(table);
         }
     }
     else if (item is TableGroup)
     {
         TableGroup tableGroup = (TableGroup)item;
         if (tableGroup is EsriTableGroup)
         {
             ((EsriTableGroup)tableGroup).SetTable2(table);
         }
         foreach (TableItem item2 in tableGroup.Groups)
         {
             this.ResetTable(item2, table);
         }
         foreach (TableItem item3 in tableGroup.Rows)
         {
             this.ResetTable(item3, table);
         }
     }
 }
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                //---- declare vars
                UITableViewCell       cell           = tableView.DequeueReusableCell(this._cellIdentifier);
                TableItem             item           = this._tableItems[indexPath.Section].Items[indexPath.Row];
                CustomCellController1 cellController = null;

                //---- if there are no cells to reuse, create a new one
                if (cell == null)
                {
                    cellController = new CustomCellController1();
                    cell           = cellController.Cell;
                    cell.Tag       = Environment.TickCount;
                    this._cellControllers[cell.Tag] = cellController;
                }
                else                 //---- if we did get one, we also need to lookup the controller
                {
                    cellController = this._cellControllers[cell.Tag];
                }

                //---- set the properties on the cell
                cellController.Heading    = item.Heading;
                cellController.SubHeading = item.SubHeading;

                //---- if the item has a valid image
                if (!string.IsNullOrEmpty(item.ImageName))
                {
                    if (File.Exists(item.ImageName))
                    {
                        cellController.Image = UIImage.FromBundle(item.ImageName);
                    }
                }

                return(cell);
            }
        public void AddNewItem(string tableName, TableItem tableItem)
        {
            GenericTableEntity genericTableEntity = GenericTableEntity.HydrateFrom(tableItem);
            var operation = TableOperation.Insert(genericTableEntity);

            _operations.Enqueue(new ExecutableTableOperation(tableName, operation, TableOperationType.Insert, tableItem.PartitionKey, tableItem.RowKey));
        }
        public async Task <List <TableItem> > GetAllTable()
        {
            try
            {
                //send request
                HttpResponseMessage responseMessage = await client.GetAsync(ALL_TABLE);

                //get access token from response body
                var responseJson = await responseMessage.Content.ReadAsStringAsync();

                var jObject = JObject.Parse(responseJson);

                var resultObjects = AllChildren(jObject).First(c => c.Type == JTokenType.Array && c.Path.Contains("tables")).Children <JObject>();

                var tables = new List <TableItem>();
                foreach (JObject result in resultObjects)
                {
                    TableItem t = result.ToObject <TableItem>();
                    tables.Add(t);
                }

                return(tables);
            }
            catch
            {
            }
            return(null);
        }
Example #5
0
        /// <summary>
        /// Inserts the item in the table.
        /// </summary>
        private void InsertTableItem(TableItem item)
        {
            // get insert index
            int newInd;

            if (dataGridView.SelectedRows.Count > 0)
            {
                newInd = -1;

                foreach (DataGridViewRow row in dataGridView.SelectedRows)
                {
                    if (newInd < row.Index)
                    {
                        newInd = row.Index;
                    }
                }

                newInd++;
            }
            else if (dataGridView.CurrentRow != null)
            {
                newInd = dataGridView.CurrentRow.Index + 1;
            }
            else
            {
                newInd = dataGridView.Rows.Count;
            }

            // insert item
            tableView.Items.Insert(newInd, item);
            bindingSource.ResetBindings(false);
            SelectTableItem(newInd, !treeView.Focused);
            ChildFormTag.Modified = true;
        }
Example #6
0
        public void Upsert(string tableName, TableItem tableItem)
        {
            var genericTableEntity = GenericTableEntity.HydrateFrom(tableItem);
            Action <MemoryStorageAccount> action = tables => tables.GetTable(tableName).GetPartition(tableItem.PartitionKey).Upsert(genericTableEntity);

            _pendingActions.Enqueue(new TableAction(action, tableItem.PartitionKey, tableItem.RowKey, tableName));
        }
        public IParseItem Visit(TableItem target)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }

            var gen = _compiler.CurrentGenerator;
            var loc = _compiler.CreateTemporary(typeof(ILuaValue));

            // loc = E.Runtime.CreateTable();
            gen.Emit(OpCodes.Ldarg_1);
            gen.Emit(OpCodes.Callvirt,
                     typeof(ILuaEnvironment).GetProperty(nameof(ILuaEnvironment.Runtime)).GetGetMethod());
            gen.Emit(OpCodes.Callvirt, typeof(ILuaRuntime).GetMethod(nameof(ILuaRuntime.CreateTable)));
            gen.Emit(OpCodes.Stloc, loc);

            foreach (var item in target.Fields)
            {
                // Does not need to use SetItemRaw because there is no Metatable.
                // loc.SetIndex({item.Item1}, {item.Item2});
                gen.Emit(OpCodes.Ldloc, loc);
                item.Key.Accept(this);
                item.Value.Accept(this);
                gen.Emit(OpCodes.Callvirt, typeof(ILuaValue).GetMethod(nameof(ILuaValue.SetIndex)));
            }

            //! push loc;
            gen.Emit(OpCodes.Ldloc, loc);
            _compiler.RemoveTemporary(loc);

            return(target);
        }
        public async Task CreateDeleteTableAsync()
        {
            string storageUri        = StorageUri;
            string accountName       = StorageAccountName;
            string storageAccountKey = PrimaryStorageAccountKey;
            string tableName         = "OfficeSupplies1p2";

            // Construct a new <see cref="TableServiceClient" /> using a <see cref="TableSharedKeyCredential" />.
            var serviceClient = new TableServiceClient(
                new Uri(storageUri),
                new TableSharedKeyCredential(accountName, storageAccountKey));

            try
            {
                #region Snippet:TablesSample1CreateTableAsync
                // Create a new table. The <see cref="TableItem" /> class stores properties of the created table.
                TableItem table = await serviceClient.CreateTableAsync(tableName);

                Console.WriteLine($"The created table's name is {table.TableName}.");
                #endregion
            }
            finally
            {
                #region Snippet:TablesSample1DeleteTableAsync
                // Deletes the table made previously.
                await serviceClient.DeleteTableAsync(tableName);

                #endregion
            }
        }
        public void Upsert(string tableName, TableItem tableItem)
        {
            // Upsert does not use an ETag (If-Match header) - http://msdn.microsoft.com/en-us/library/windowsazure/hh452242.aspx
            GenericTableEntity genericTableEntity = GenericTableEntity.HydrateFrom(tableItem);
            var operation = TableOperation.InsertOrReplace(genericTableEntity);

            _operations.Enqueue(new ExecutableTableOperation(tableName, operation, TableOperationType.InsertOrReplace, tableItem.PartitionKey, tableItem.RowKey));
        }
Example #10
0
    int             calcAutoValue(int value, int preRate, int newRate, TableItem item)
    {
        int totalw = CaleCost100(item, tableConst) - item.gain * 100;

        int cost = item.capBody * tableConst.abillR[ItemAbility.capBody] - (totalw - value * preRate);

        return(cost / newRate);
    }
Example #11
0
 public BuyTable(TableTab script, string name, TableItem item0, int id0)
 {
     tableName  = name;
     item       = item0;
     recvScript = script;
     type       = (int)(item.price_type);
     id         = id0;
 }
Example #12
0
        public void CreateAndIgnoreReservedProperties_DynamicEntityWithoutPartitionKey_ThrowsArgumentException()
        {
            dynamic entity = new ExpandoObject();

            entity.Name   = "Joe";
            entity.RowKey = "rk";

            Assert.ThrowsException <ArgumentException>((Action)(() => TableItem.Create(entity, TableItem.ReservedPropertyBehavior.Ignore)));
        }
Example #13
0
        public void CreateAndIgnoreReservedProperties_DynamicEntityWithKeysProvidedAndConflictingRowKeyProperty_ThrowsArgumentException()
        {
            dynamic entity = new ExpandoObject();

            entity.Name   = "Joe";
            entity.RowKey = "foo";

            Assert.ThrowsException <ArgumentException>((Action)(() => TableItem.Create(entity, "pk", "rk", TableItem.ReservedPropertyBehavior.Ignore)));
        }
Example #14
0
        public void CreateAndThrowOnReservedProperties_DynamicEntityWithReservedPropertiesAndKeysProvided_ThrowsInvalidEntityException()
        {
            dynamic entity = new ExpandoObject();

            entity.Name         = "Joe";
            entity.PartitionKey = "foo";

            Assert.ThrowsException <InvalidEntityException>((Action)(() => TableItem.Create(entity, "pk", "rk")));
        }
Example #15
0
 public override bool OnMouseDown(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         TableItem tableItem = this.GetTableItem(e);
         this.SelectedItem = tableItem;
     }
     return(base.OnMouseDown(e));
 }
Example #16
0
        public void Create_KeysNotProvidedAndEntityHasDecoratedKeyProperties_ItemCreatedWithKeys()
        {
            var item = TableItem.Create(new DecoratedItem {
                Id = "pk", Name = "rk", Age = 34
            });

            Assert.AreEqual("pk", item.PartitionKey);
            Assert.AreEqual("rk", item.RowKey);
        }
        private ResponseData GetFakeResponseData()
        {
            ResponseData responseData = new ResponseData();

            responseData.BotMessage = @"Hello, Dear User,Hello, Dear User,Hello,Hello, Dear User,Hello, Dear User, Hello, Dear User, Hello, Dear User,Hello, Dear User";

            if (cycle % 5 == 0)
            {
                responseData.TableOperation = TableOperationType.ShowRadioBox;
            }
            if (cycle % 5 == 1)
            {
                responseData.TableOperation = TableOperationType.ShowCheckBox;
            }
            if (cycle % 5 == 2)
            {
                responseData.TableOperation = TableOperationType.ShowMultiComboBox;
            }
            if (cycle % 5 == 3)
            {
                responseData.TableOperation = TableOperationType.UpdateDataStatus;
            }
            if (cycle % 5 == 4)
            {
                responseData.TableOperation = TableOperationType.ShowCheckBoxForSingleTable;
            }
            cycle++;

            int count = 2;

            if (responseData.TableOperation == TableOperationType.UpdateDataStatus)
            {
                count = 4;
            }
            if (responseData.TableOperation == TableOperationType.ShowCheckBoxForSingleTable)
            {
                count = 1;
            }

            List <TableItem> tableItems = new List <TableItem>();

            for (int j = 0; j < count; j++)
            {
                TableItem tableItem = new TableItem();
                tableItem.TableName = "Table Item" + j;
                for (int i = 0; i < 4; i++)
                {
                    tableItem.TableData.Add(new RowItem("XiangnanLi", "ZhiweiJia"));
                }

                tableItems.Add(tableItem);
            }

            responseData.TableItems = tableItems;

            return(responseData);
        }
Example #18
0
        public void CreateAndThrowOnReservedProperty_KeysProvidedAndNoReservedProperties_KeysSetCorrectly()
        {
            var item = TableItem.Create(new SimpleDataItem {
                FirstType = "Joe", SecondType = 34
            }, "pk", "rk");

            Assert.AreEqual("pk", item.PartitionKey);
            Assert.AreEqual("rk", item.RowKey);
        }
Example #19
0
        public void Create_DynamicWithoutETag_ItemCreatedWithNullETag()
        {
            dynamic entity = new ExpandoObject();

            entity.Name = "Joe";

            TableItem item = TableItem.Create(entity, "pk", "rk");

            Assert.IsNull(item.ETag);
        }
Example #20
0
        private void btn_Calculate_Click(object sender, EventArgs e)
        {
            // Get Input Values
            double v_min         = (double)in_Vmin.Value;
            double v_max         = (double)in_Vmax.Value;
            int    num_of_bits   = (int)in_NumOfBits.Value;
            double sampled_value = (double)in_SampledValue.Value;

            // Levels
            int levels = (int)(Math.Pow(2, num_of_bits));

            out_Levels.Text = levels.ToString();

            // Step Size
            double step_size = Math.Round((v_max - v_min) / levels, 3);

            out_StepSize.Text = step_size.ToString();

            // Table
            out_Table.Items.Clear();
            TableItem closestItem = new TableItem();

            for (int level = 0; level < levels; level++)
            {
                // Add leading zeroes to represent an n bit binary
                string binary = Convert.ToString(level, 2);
                for (int length = binary.Length; length < num_of_bits; length++)
                {
                    binary = "0" + binary;
                }

                // Create object
                TableItem this_item = new TableItem();
                this_item.level    = level;
                this_item.binary   = binary;
                this_item.voltage  = Math.Round(v_min + (level * step_size), 3);
                this_item.position = Math.Abs(this_item.voltage - sampled_value);

                // Check if this item is closest to the sampled value
                if (level == 0 || closestItem.position > this_item.position)
                {
                    closestItem = this_item;
                }

                // Insert to Table
                ListViewItem this_tableitem = new ListViewItem(this_item.level.ToString());
                this_tableitem.SubItems.Add(this_item.binary);
                this_tableitem.SubItems.Add(this_item.voltage.ToString());
                out_Table.Items.Add(this_tableitem);
            }

            // Quantized
            out_QuantizedValue.Text = closestItem.voltage.ToString();
            out_DigitalValue.Text   = closestItem.binary;
        }
Example #21
0
        public void Create_DynamicEntityWithETag_ItemCreatedWithETag()
        {
            dynamic entity = new ExpandoObject();

            entity.Name = "Joe";
            entity.ETag = "etag";

            TableItem item = TableItem.Create(entity, "pk", "rk", TableItem.ReservedPropertyBehavior.Ignore);

            Assert.IsNotNull(item.ETag);
        }
Example #22
0
        public void CreateAndIgnoreReservedProperties_DyanmicEntityWithKeysProvidedAndMatchingRowKeyProperty_ReturnsItemWithRowKey()
        {
            dynamic entity = new ExpandoObject();

            entity.Name   = "Joe";
            entity.RowKey = "rk";

            TableItem item = TableItem.Create(entity, "pk", "rk", TableItem.ReservedPropertyBehavior.Ignore);

            Assert.AreEqual("rk", item.RowKey);
        }
Example #23
0
        public void Create_DynamicEntityAndKeysProvided_ItemCreatedWithKeys()
        {
            dynamic entity = new ExpandoObject();

            entity.Name = "Joe";

            TableItem item = TableItem.Create(entity, "pk", "rk");

            Assert.AreEqual("pk", item.PartitionKey);
            Assert.AreEqual("rk", item.RowKey);
        }
Example #24
0
        public void Create_ValidEntity_PropertiesSetCorrectly()
        {
            var item = TableItem.Create(new SimpleDataItem {
                FirstType = "Joe", SecondType = 34
            }, "pk", "rk");

            Assert.AreEqual(3, item.Properties.Count);
            Assert.AreEqual("Joe", item.Properties["FirstType"].Item1);
            Assert.AreEqual(34, item.Properties["SecondType"].Item1);
            Assert.IsNull(item.Properties["UriTypeProperty"].Item1);
        }
Example #25
0
        /// <summary>
        /// データを流し込むためのUpdateメソッド
        /// </summary>
        /// <param name="item"></param>
        public void Update(TableItem item)
        {
            NameLabel.Text    = item.Name;
            TitleLabel.Text   = item.Title;
            AvatorImage.Image = item.Image;

            AvatorImage.Layer.CornerRadius = AvatorImage.Bounds.Height / 2;
            AvatorImage.Layer.BorderWidth  = 2;
            AvatorImage.Layer.BorderColor  = UIColor.FromRGB(0x34, 0x98, 0xdb).CGColor;
            AvatorImage.ClipsToBounds      = true;
        }
Example #26
0
        public async Task CreateTableIfNotExists()
        {
            // Call CreateTableIfNotExists when the table already exists.
            Assert.That(async() => await service.CreateTableIfNotExistsAsync(tableName).ConfigureAwait(false), Throws.Nothing);

            // Call CreateTableIfNotExists when the table does not already exists.
            var       newTableName = Recording.GenerateAlphaNumericId("testtable", useOnlyLowercase: true);
            TableItem table        = await service.CreateTableIfNotExistsAsync(newTableName).ConfigureAwait(false);

            Assert.That(table.TableName, Is.EqualTo(newTableName));
        }
Example #27
0
        public void Create_DynamicEntityAndKeysProvided_ItemCreatedWithCorrectProperties()
        {
            dynamic entity = new ExpandoObject();

            entity.Name = "Joe";

            TableItem item = TableItem.Create(entity, "pk", "rk");

            Assert.AreEqual(1, item.Properties.Count);
            Assert.AreEqual("Joe", item.Properties["Name"].Item1);
        }
        /// <summary>填充</summary>
        /// <param name="table"></param>
        public void Fill(TableItem table)
        {
            var dt = table.DataTable;

            DisplayName = dt.DisplayName;
            Description = dt.Description;

            TableName  = dt.TableName;
            ConnName   = table.ConnName;
            InsertOnly = dt.InsertOnly;
        }
Example #29
0
        public void ConvertTo_ItemHasColumnWithNonBoolType_ResultingObjectHasFalsePropertyValue()
        {
            dynamic item = new ExpandoObject();

            item.IsAwesome = "yes!";

            TableItem tableItem   = TableItem.Create(item, "pk", "rk");
            var       tableEntity = GenericTableEntity.HydrateFrom(tableItem);

            Assert.ThrowsException <InvalidOperationException>(() => tableEntity.ConvertTo <TypeWithBoolProperty>());
        }
Example #30
0
        private EntitySession(String connName, String tableName)
        {
            ConnName  = connName;
            TableName = tableName;
            Key       = connName + "###" + tableName;

            TableItem       = TableItem.Create(ThisType);
            Table           = TableItem.DataTable.Clone() as IDataTable;
            Table.TableName = tableName;

            Queue = new EntityQueue(this);
        }
Example #31
0
        private TableItem AddTable(string name, string alias)
        {
            if (String.IsNullOrEmpty(name))
                throw new ArgumentNullException("Table.Name");

            if (String.IsNullOrEmpty(alias))
                alias = name;

            string upper = alias.ToUpper();
            TableItem item = new TableItem(name) { Alias = alias };
            this.tables[upper] = item;
            return item;
            // return this.tables[upper] = new TableItem(name) { Alias = alias };
            //return this.tables[upper];
        }
Example #32
0
    // Use this for initialization
    void Start () {
        updateAvataName ();
        setGameName ();
        for (int i = 0; i < 1; i++)
			{
                TableItem it = new TableItem ();
                it.id = i;
                it.status = 0;
                it.name = i + "";
                it.masid = i + "";
                it.nUser = 1;
                it.maxUser = 2;
                it.money = 20;
                it.needMoney = 1000;
                it.maxMoney = 1000;
                it.Lock = 0;
                it.typeTable = 1;
                it.choinhanh = 0;


                gameControl.listTableItem.Add (it);
			}
        createScollPane (gameControl.listTableItem, 0);
    }
 private void OnTablesComboBoxSelectedIndexChanged(object sender, EventArgs e)
 {
     TableItem selectedItem = this._tablesComboBox.SelectedItem as TableItem;
     if ((selectedItem == null) || (this._previousTable != selectedItem))
     {
         Cursor current = Cursor.Current;
         this._fieldsCheckedListBox.Items.Clear();
         this._selectDistinctCheckBox.Checked = false;
         this._generateMode = 0;
         try
         {
             Cursor.Current = Cursors.WaitCursor;
             if (selectedItem != null)
             {
                 ICollection columns = selectedItem.DesignerDataTable.Columns;
                 this._tableQuery = new SqlDataSourceTableQuery(this._dataConnection, selectedItem.DesignerDataTable);
                 this._fieldsCheckedListBox.Items.Add(new ColumnItem());
                 foreach (DesignerDataColumn column in columns)
                 {
                     this._fieldsCheckedListBox.Items.Add(new ColumnItem(column));
                 }
                 this._tableQuery.AsteriskField = true;
                 this._fieldsCheckedListBox.SetItemChecked(0, true);
             }
             else
             {
                 this._tableQuery = null;
             }
             this._previousTable = selectedItem;
         }
         catch (Exception exception)
         {
             UIServiceHelper.ShowError(base.ServiceProvider, exception, System.Design.SR.GetString("SqlDataSourceConfigureSelectPanel_CouldNotGetTableSchema"));
         }
         finally
         {
             UIHelper.UpdateFieldsCheckedListBoxColumnWidth(this._fieldsCheckedListBox);
             this.UpdateEnabledUI();
             this.UpdatePreview();
             Cursor.Current = current;
         }
     }
 }
 public SampleStyleListScreen(TableItem styleType)
     : base(styleType, styleType.Heading, 44.0f, UITableViewCellStyle.Subtitle, UITableViewCellAccessory.DisclosureIndicator, true)
 {
     this.ShowSearchBar = true;
     this.tableSource.LoadMoreDataEvent += HandleLoadMoreDataEvent;
 }
Example #35
0
        /// <summary>Adds/Replaces the indicated socket, settings and notification target to the monitor list and starts the background service thread if it is not already running.</summary>
        public void AddSocketToList(Socket s, bool read, bool write, bool error, INotifyable notifyTarget)
        {
            TableItem tableItem = new TableItem() { s = s, read = read, write = write, error = error, notifyTarget = notifyTarget };

            lock (userTableMutex)
            {
                userTableDictionary[s] = tableItem;
                rebuildTablesFromUserTable = true;
            }

            StartBackgroundThreadIfNeeded();
        }
Example #36
0
            internal WhereItem(TableItem table, string columnName, string parameterName, ConditionOperator op, object[] values)
            {
                if (String.IsNullOrEmpty(columnName))
                    throw new ArgumentNullException("columnName");
                if (null == values)
                    throw new ArgumentNullException("values");

                this.Table = table;
                this.Criteria = new FilterCriteria(columnName, op, '@', values) { ParameterName = parameterName };
            }
Example #37
0
            internal JoinItem(TableItem leftTable, string leftColumn, JoinType joinType, TableItem rightTable, string rightColumn)
            {
                if (null == leftTable)
                    throw new ArgumentNullException("leftTable");
                if (null == rightTable)
                    throw new ArgumentNullException("rightTable");

                if (String.IsNullOrEmpty(leftColumn))
                    throw new ArgumentNullException("leftColumn");
                if (String.IsNullOrEmpty(rightColumn))
                    throw new ArgumentNullException("rightColumn");

                this.LeftTable = leftTable;
                this.LeftColumn = leftColumn;
                this.JoinType = joinType;
                this.RightTable = rightTable;
                this.RightColumn = rightColumn;
            }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        bool isNew = asuc1.ItemAttributes.Item.IsNew;

        if (TableName == RsOneItemTable.Unknown)
        {
            asuc1.ItemAttributes.Save();
        }
        else
        {
            TableItem item = new TableItem(Cxt);

            item.TableName = TableName;
            item.TableItemAttributes = asuc1.ItemAttributes;
            item.TableConfigItemAttributes = teuc1.TableConfigItemAttributes;
            item.SelectedCategories = teuc1.SelectedCategories;

            item.Save();

            teuc1.SetItem(item.Item);
        }

        if (Page.IsValid)
        {
            if (isNew)
            {
                try
                {
                    ServiceCategory.UpdateStats(Cxt, Cxt.ServiceID, Cxt.CategoryID);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            ph4.Visible = true;
            ph5.Visible = false;
            lcd.Text = "Information saved successfully.";
        }
    }
Example #39
0
        private void ReclaimMemoryIfNeeded(List<TableItem> awaitingMemTables)
        {
            var toPutOnDisk = awaitingMemTables.OfType<IMemTable>().Count() - MaxMemoryTables;
            for (var i = awaitingMemTables.Count - 1; i >= 1 && toPutOnDisk > 0; i--)
            {
                var memtable = awaitingMemTables[i].Table as IMemTable;
                if (memtable == null || !memtable.MarkForConversion())
                    continue;

                Log.Trace("Putting awaiting file as PTable instead of MemTable [{0}].", memtable.Id);

                var ptable = PTable.FromMemtable(memtable, _fileNameProvider.GetFilenameNewTable(), _indexCacheDepth);
                var swapped = false;
                lock (_awaitingTablesLock)
                {
                    for (var j = _awaitingMemTables.Count - 1; j >= 1; j--)
                    {
                        var tableItem = _awaitingMemTables[j];
                        if (!(tableItem.Table is IMemTable) || tableItem.Table.Id != ptable.Id) continue;
                        swapped = true;
                        _awaitingMemTables[j] = new TableItem(ptable,
                            tableItem.PrepareCheckpoint,
                            tableItem.CommitCheckpoint);
                        break;
                    }
                }
                if (!swapped)
                    ptable.MarkForDestruction();
                toPutOnDisk--;
            }
        }