コード例 #1
0
            public DomainStoreEntity(IIntegrationEvent integrationEvent)
                : this()
            {
                TypeName     = integrationEvent.GetType().AssemblyQualifiedName;
                PartitionKey = EntityPartitionKey;
                RowKey       = GetRowKey(integrationEvent.Created);
                IsCompressed = true;

                var json = JsonConvert.SerializeObject(integrationEvent, TableStorageJsonSerializerSettings.GetDefault());

                Data = IsCompressed ? json.Zip() : json;
            }
コード例 #2
0
            public TransactionStoreDataEntity(string transactionId, IEvent @event)
                : this()
            {
                PartitionKey = transactionId;
                RowKey       = GetRowKey(@event.Created);

                TypeName     = @event.GetType().AssemblyQualifiedName;
                IsCompressed = true;
                IsPublished  = false;

                var json = JsonConvert.SerializeObject(@event, TableStorageJsonSerializerSettings.GetDefault());

                Data = IsCompressed ? json.Zip() : json;
            }