Пример #1
0
        /// <summary>
        /// Registers a binder type to use when generating values.
        /// </summary>
        /// <typeparam name="TBinder">The <see cref="IAutoBinder"/> type to use.</typeparam>
        /// <param name="builder">The current configuration builder instance.</param>
        /// <returns>The current configuration builder instance.</returns>
        public static IAutoFakerConfigBuilder WithBinder <TBinder>(this IAutoFakerConfigBuilder builder)
            where TBinder : IAutoBinder, new()
        {
            var binder = new TBinder();

            return(builder?.WithBinder(binder));
        }