public SearchCriteria ValidateAddress(SearchCriteria criteria) { ValidateAddressCommand validateAddressCommand = new ValidateAddressCommand(criteria); validateAddressCommand.Execute(); return(validateAddressCommand.CommandResult); }
public void Consume(IConsumeContext <MemberAddressAdded> context) { Console.WriteLine("Do some address validation here for: {0}", context.Message.MemberId); var command = new ValidateAddressCommand(NewId.NextGuid(), DateTime.UtcNow, context.Message.MemberId); context.Bus.ScheduleMessage(DateTime.UtcNow + TimeSpan.FromSeconds(5), command); }