Exemplo n.º 1
0
        public ValueGeneratorSelector(
            [NotNull] SimpleValueGeneratorFactory <GuidValueGenerator> guidFactory)
        {
            Check.NotNull(guidFactory, "guidFactory");

            _guidFactory = guidFactory;
        }
Exemplo n.º 2
0
        public void Returns_in_memory_GUID_generator_for_GUID_types_setup_for_client_values()
        {
            var guidFactory = new SimpleValueGeneratorFactory <GuidValueGenerator>();

            var selector = new ValueGeneratorSelector(guidFactory);

            Assert.Same(guidFactory, selector.Select(CreateProperty(typeof(Guid), ValueGenerationOnAdd.Client)));
        }
Exemplo n.º 3
0
        public ValueGeneratorSelector(
            [NotNull] SimpleValueGeneratorFactory <GuidValueGenerator> guidFactory,
            [NotNull] SimpleValueGeneratorFactory <TemporaryIntegerValueGenerator> integerFactory,
            [NotNull] SimpleValueGeneratorFactory <TemporaryStringValueGenerator> stringFactory,
            [NotNull] SimpleValueGeneratorFactory <TemporaryBinaryValueGenerator> binaryFactory)
        {
            Check.NotNull(guidFactory, "guidFactory");

            _guidFactory    = guidFactory;
            _integerFactory = integerFactory;
            _stringFactory  = stringFactory;
            _binaryFactory  = binaryFactory;
        }