public Task <GetAddressesByPostalCodesResult> ExecuteAsync(GetAddressesByPostalCodesParameters parameters, CancellationToken cancellationToken = default)
        {
            var data = new List <Address>
            {
                new Address
                {
                    StreetName   = "Hallo1",
                    StreetNumber = "Hallo11",
                    PostalCode   = "Hallo12",
                    CityName     = "Hallo13",
                    MyCountry    = new Country(),
                },
                new Address
                {
                    StreetName   = "Hallo2",
                    StreetNumber = "Hallo21",
                    PostalCode   = "Hallo22",
                    CityName     = "Hallo23",
                    MyCountry    = new Country(),
                },
                new Address
                {
                    StreetName   = "Hallo3",
                    StreetNumber = "Hallo31",
                    PostalCode   = "Hallo32",
                    CityName     = "Hallo33",
                    MyCountry    = new Country(),
                },
            };

            return(Task.FromResult(GetAddressesByPostalCodesResult.Ok(data)));
        }
        public Task <GetAddressesByPostalCodesResult> ExecuteAsync(GetAddressesByPostalCodesParameters parameters, CancellationToken cancellationToken = default)
        {
            if (parameters is null)
            {
                throw new System.ArgumentNullException(nameof(parameters));
            }

            return(InvokeExecuteAsync(parameters, cancellationToken));
        }
        public Task <ActionResult> GetAddressesByPostalCodesAsync(GetAddressesByPostalCodesParameters parameters, [FromServices] IGetAddressesByPostalCodesHandler handler, CancellationToken cancellationToken)
        {
            if (handler is null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            return(InvokeGetAddressesByPostalCodesAsync(parameters, handler, cancellationToken));
        }
        public async Task <GetAddressesByPostalCodesResult> InvokeExecuteAsync(GetAddressesByPostalCodesParameters parameters, CancellationToken cancellationToken = default)
        {
            var data = new List <Address>()
            {
                new Address
                {
                    CityName   = "Glostrup",
                    PostalCode = "2600",
                    MyCountry  = new Country
                    {
                        Name       = "Denmark",
                        Alpha2Code = "DK",
                        Alpha3Code = "DNK"
                    }
                }
            };

            return(await Task.FromResult(data));
        }
 private static async Task <ActionResult> InvokeGetAddressesByPostalCodesAsync(GetAddressesByPostalCodesParameters parameters, IGetAddressesByPostalCodesHandler handler, CancellationToken cancellationToken)
 {
     return(await handler.ExecuteAsync(parameters, cancellationToken));
 }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
        private async Task <GetAddressesByPostalCodesResult> InvokeExecuteAsync(GetAddressesByPostalCodesParameters parameters, CancellationToken cancellationToken)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
        {
            throw new System.NotImplementedException();
        }