Exemplo n.º 1
0
 internal Batch(StreamEntity stream, List <RecordedEvent> events, StreamWriteOptions options)
 {
     this.stream  = stream;
     this.events  = events;
     this.options = options;
     partition    = stream.Partition;
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 static Stream From(Partition partition, StreamEntity entity)
 {
     return(new Stream(partition, entity.ETag, entity.Version, entity.Properties));
 }
Exemplo n.º 4
0
 Stream BuildStream(DynamicTableEntity entity) => From(partition, StreamEntity.From(entity));
Exemplo n.º 5
0
 public Insert(Stream stream)
 {
     this.stream = stream.Entity();
     partition   = stream.Partition;
 }
Exemplo n.º 6
0
 public Replace(Stream stream, StreamProperties properties)
 {
     this.stream            = stream.Entity();
     this.stream.Properties = properties;
     partition = stream.Partition;
 }
Exemplo n.º 7
0
 static Stream From(Partition partition, StreamEntity entity) =>
 new Stream(partition, entity.ETag, entity.Version, entity.Properties);
Exemplo n.º 8
0
 Stream BuildStream(DynamicTableEntity entity)
 {
     return(From(partition, StreamEntity.From(entity)));
 }
Exemplo n.º 9
0
 internal Batch(StreamEntity stream, List <RecordedEvent> events)
 {
     this.stream = stream;
     this.events = events;
     partition   = stream.Partition;
 }