Beispiel #1
0
        public async Task CreateLeadAsync <T>(T command, LeadType leadType) where T : ICommand
        {
            switch (leadType)
            {
            case LeadType.CallCenter:
                await _leadService.CreateCallCenterLeadAsync(command);

                break;

            case LeadType.CustomerSupport:
                await _emailService.SendAsync();

                break;

            case LeadType.Order:
                await _leadService.CreateOrderLeadAsync(command);

                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(leadType), leadType, null);
            }
        }