예제 #1
0
        /// <summary>
        /// Populates the specified instance by assigning all properties to anonymous values.
        /// </summary>
        /// <typeparam name="TInstance">The type of the instance to populate.</typeparam>
        /// <param name="anon">The anonymous data provider to use.</param>
        /// <param name="instance">The instance to populate.</param>
        /// <exception cref="ArgumentNullException"><paramref name="anon"/> is null.</exception>
        /// <returns>The populated instance.</returns>
        public static TInstance Populate <TInstance>(this IAnonymousData anon, TInstance instance)
        {
            Argument.NotNull(anon, nameof(anon));

            return(anon.Populate(instance, false));
        }