Пример #1
0
 internal Batch(StreamEntity stream, List <RecordedEvent> events, StreamWriteOptions options)
 {
     this.stream  = stream;
     this.events  = events;
     this.options = options;
     partition    = stream.Partition;
 }
Пример #2
0
        public static StreamEntity InsertStreamEntity(this Partition partition, int version = 0)
        {
            var entity = new StreamEntity
            {
                PartitionKey = partition.PartitionKey,
                RowKey       = Api.StreamRowKey,
                Version      = version
            };

            partition.Table.Execute(TableOperation.Insert(entity));
            return(entity);
        }
Пример #3
0
 static Stream From(Partition partition, StreamEntity entity)
 {
     return(new Stream(partition, entity.ETag, entity.Version, entity.Properties));
 }
Пример #4
0
 Stream BuildStream(DynamicTableEntity entity) => From(partition, StreamEntity.From(entity));
Пример #5
0
 public Insert(Stream stream)
 {
     this.stream = stream.Entity();
     partition   = stream.Partition;
 }
Пример #6
0
 public Replace(Stream stream, StreamProperties properties)
 {
     this.stream            = stream.Entity();
     this.stream.Properties = properties;
     partition = stream.Partition;
 }
Пример #7
0
 static Stream From(Partition partition, StreamEntity entity) =>
 new Stream(partition, entity.ETag, entity.Version, entity.Properties);
Пример #8
0
 Stream BuildStream(DynamicTableEntity entity)
 {
     return(From(partition, StreamEntity.From(entity)));
 }
Пример #9
0
 internal Batch(StreamEntity stream, List <RecordedEvent> events)
 {
     this.stream = stream;
     this.events = events;
     partition   = stream.Partition;
 }