public static T ToEntity <T>(this IProviderConfigurationDto input)
            where T : class, IProviderConfiguration, new()
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            var result = new T();

            input.CopyTo(result);
            return(result);
        }
        public static void CopyTo(this IProviderConfigurationDto input, IProviderConfiguration output)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            output.ProviderId             = input.ProviderId;
            output.ProviderParametersJson = input.ProviderParameters?.ToString();
        }
        public static void CopyTo(this IProviderConfiguration input, IProviderConfigurationDto output)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            output.ProviderId         = input.ProviderId;
            output.ProviderParameters = input.GetProviderParameters();
        }