public string GetPayload(ConsentAccepted parameter)
        {
            if (parameter == null)
            {
                throw new ArgumentNullException(nameof(parameter));
            }

            return(GetPayload(parameter.Parameter));
        }
 public void Handle(ConsentAccepted evt)
 {
     _repository.Add(new Core.Models.EventAggregate
     {
         Id          = evt.Id,
         AggregateId = evt.ProcessId,
         CreatedOn   = DateTime.UtcNow,
         Description = "Consent accepted",
         Payload     = evt.Payload,
         Order       = evt.Order,
         Type        = evt.ServerName,
         Verbosity   = Core.Models.EventVerbosities.Information,
         Key         = "consent_accepted"
     }).Wait();
 }
Esempio n. 3
0
        public async Task Handle(ConsentAccepted message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            var payload = _serializer.GetPayload(message);
            await _repository.Add(new EventAggregate
            {
                Id          = message.Id,
                AggregateId = message.ProcessId,
                Description = "Consent accepted",
                CreatedOn   = DateTime.UtcNow,
                Payload     = payload,
                Order       = message.Order
            });
        }
Esempio n. 4
0
        public async Task Handle(ConsentAccepted message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            await _repository.Add(new EventAggregate
            {
                Id          = message.Id,
                AggregateId = message.ProcessId,
                Description = "Consent accepted",
                CreatedOn   = DateTime.UtcNow,
                Payload     = message.Payload,
                Order       = message.Order,
                Type        = _options.Type,
                Verbosity   = EventVerbosities.Information,
                Key         = "consent_accepted"
            });
        }