コード例 #1
0
ファイル: TableConfigStore.cs プロジェクト: mmbilinski/config
        public void Write(string key, string value)
        {
            var rowId = new TableRowId(_partitionKey, key);

            if (value == null)
            {
                _tableStorage.Delete(_tableName, rowId);
            }
            else
            {
                var row = new TableRow(rowId);
                row["value"] = value;
                _tableStorage.InsertOrReplace(_tableName, row);
            }
        }
コード例 #2
0
            private void Init(TableRowId rowId, bool useConcurencyKey)
            {
                if (rowId == null)
                {
                    throw new ArgumentNullException("rowId");
                }

                PartitionKey = ToInternalId(rowId.PartitionKey);
                RowKey       = ToInternalId(rowId.RowKey);
                if (useConcurencyKey && rowId.ConcurrencyKey != null)
                {
                    ETag = rowId.ConcurrencyKey;
                }
                else
                {
                    ETag = "*";
                }
                Timestamp = rowId.LastModified;
            }
コード例 #3
0
 private void SetValue(JET_TABLEID tableId, IDictionary <string, JET_COLUMNID> columns, TableRowId rowId)
 {
     Api.SetColumn(_jetSession, tableId, columns[PartitionKeyName], rowId.PartitionKey, Encoding.Unicode);
     Api.SetColumn(_jetSession, tableId, columns[RowKeyName], rowId.RowKey, Encoding.Unicode);
 }
コード例 #4
0
 public EntityAdapter(TableRowId rowId)
 {
     Init(rowId, true);
 }