예제 #1
0
        /// <summary>
        /// Bindings for the dependencies for the ProblemGenerator.InputProvider module.
        /// </summary>
        /// <param name="kernel">The kernel.</param>
        /// <param name="settings">The settings for <see cref="ProblemGeneratorInputProvider"/>.</param>
        /// <returns>The kernel for chaining.</returns>
        public static IKernel AddProblemGeneratorInputProvider(this IKernel kernel, ProblemGeneratorInputProviderSettings settings)
        {
            // Bind the input provider
            kernel.Bind <IProblemGeneratorInputProvider>().To <ProblemGeneratorInputProvider>().WithConstructorArgument(settings);

            // Return the kernel for chaining
            return(kernel);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ProblemGeneratorInputProvider"/> class.
 /// </summary>
 /// <param name="settings">The settings for the folder with inputs.</param>
 public ProblemGeneratorInputProvider(ProblemGeneratorInputProviderSettings settings)
 {
     _settings = settings ?? throw new ArgumentNullException(nameof(settings));
 }