Пример #1
0
        public DefinitionBuilderTest()
        {
            this.factory = new DefaultFactory();

            this.definition = new Definition <TestQuestion, string, int, string>();

            this.testee = new DefinitionBuilder <TestQuestion, string, int, string>(this.definition, this.factory);
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefinitionBuilder{TQuestion, TAnswer, TParameter, TExpressionResult}"/> class.
        /// </summary>
        /// <param name="definition">The definition to build.</param>
        /// <param name="factory">The factory for creating expression providers.</param>
        public DefinitionBuilder(IDefinition <TQuestion, TAnswer, TParameter, TExpressionResult> definition, IExpressionProviderFactory factory)
        {
            this.Definition = definition;
            this.factory    = factory;

            this.currentSet = new ExpressionProviderSet <TQuestion, TAnswer, TParameter, TExpressionResult>();
            this.Definition.AddExpressionProviderSet(this.currentSet);
        }