예제 #1
0
        private static void WriteHeadProperty(string stream, EventStreamPosition position, int targetVersion, IBatchOperation batch)
        {
            var headProperties = new Dictionary<string, object>
            {
                {EventJournalTableRowPropertyNames.Version, targetVersion}
            };

            if (EventStreamPosition.IsNewStream(position))
            {
                batch.Insert(stream, "HEAD", headProperties);
            }
            else
            {
                batch.Merge(stream, "HEAD", position.ETag, headProperties);
            }
        }
예제 #2
0
        protected void Insert(string rowKey, IReadOnlyDictionary <string, object> properties)
        {
            AssertOperationPrepared();

            m_operation.Insert(m_streamName, rowKey, properties);
        }
예제 #3
0
        public static void Insert(this IBatchOperation batchOperation, string partitionKey, string rowKey)
        {
            Require.NotNull(batchOperation, "batchOperation");

            batchOperation.Insert(partitionKey, rowKey, EmptyDictionary.Get <string, object>());
        }