コード例 #1
0
        public EntityValueTypeMergingStrategiesManager(IEntityMetamodel metamodel, IValueTypeMergingStrategiesFactory strategiesesFactory)
        {
            _metamodel           = metamodel;
            _strategiesesFactory = strategiesesFactory;

            _strategieTypes = new ConcurrentDictionary <Type, ValueTypeMergingStrategy>();
        }
コード例 #2
0
        public void InitializeTest()
        {
            var metamodelProvider = new ImperativeMetamodelProvider();
            var serializerMock    = new Mock <IStorageValueSerializer>();

            metamodelProvider.UseSerializer <SerializableTestType>(serializerMock.Object);

            _metamodel = new EntityMetamodelImpl(metamodelProvider);
        }
コード例 #3
0
        /// <summary>
        /// Configures metamodel with the given <paramref name="provider"/>
        /// </summary>
        /// <param name="provider">Metamodel provider</param>
        public static void Configure(IMetamodelProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            if (_isConfigured)
            {
                throw new InvalidOperationException("Metamodel has already been configured");
            }

            Instance = new EntityMetamodelImpl(provider);

            _isConfigured = true;
        }
コード例 #4
0
 static EntityMetamodel()
 {
     Instance = new EntityMetamodelImpl(new AnnotationsBasedMetamodelProvider());
 }
コード例 #5
0
 public static void Configure(IEntityMetamodel metamodel, IValueTypeMergingStrategiesFactory strategiesFactory)
 {
     Instance = new EntityValueTypeMergingStrategiesManager(metamodel, strategiesFactory);
 }
コード例 #6
0
 public StorageValueConvertersFactory(IEntityMetamodel metamodel)
 {
     _metamodel = metamodel;
 }