private static Func <IIdentityMap> CreateFactory <TKey>(IKey key)
        {
            var factory = key.GetPrincipalKeyValueFactory <TKey>();

            return(typeof(TKey).IsNullableType()
                ? (Func <IIdentityMap>)(() => new NullableKeyIdentityMap <TKey>(key, factory))
                : () => new IdentityMap <TKey>(key, factory));
        }
        private static Func <bool, IIdentityMap> CreateFactory <TKey>(IKey key)
        {
            var factory = key.GetPrincipalKeyValueFactory <TKey>();

            return(typeof(TKey).IsNullableType()
                ? (Func <bool, IIdentityMap>)(sensitiveLoggingEnabled => new NullableKeyIdentityMap <TKey>(key, factory, sensitiveLoggingEnabled))
                : sensitiveLoggingEnabled => new IdentityMap <TKey>(key, factory, sensitiveLoggingEnabled));
        }
Beispiel #3
0
        private static IKeyValueIndexFactory CreateFactory <TKey>(IKey key)
#pragma warning disable EF1001 // Internal EF Core API usage.
        => new KeyValueIndexFactory <TKey>(key.GetPrincipalKeyValueFactory <TKey>());
Beispiel #4
0
 private static Func <IWeakReferenceIdentityMap> CreateFactory <TKey>(IKey key)
 => () => new WeakReferenceIdentityMap <TKey>(key, key.GetPrincipalKeyValueFactory <TKey>());
Beispiel #5
0
 private static IKeyValueIndexFactory CreateFactory <TKey>(IKey key)
 => new KeyValueIndexFactory <TKey>(key.GetPrincipalKeyValueFactory <TKey>());
 private static Func <IInMemoryTable> CreateFactory <TKey>(IKey key)
 => () => new InMemoryTable <TKey>(key.GetPrincipalKeyValueFactory <TKey>());
Beispiel #7
0
 private static Func <IFileContextTable> CreateFactory <TKey>(IKey key, FileContextIntegerValueGeneratorCache idCache, FileContextOptionsExtension options)
 => () => new FileContextTable <TKey>(key.GetPrincipalKeyValueFactory <TKey>(), key.DeclaringEntityType, idCache, options);
 private static Func <IInMemoryTable> CreateFactory <TKey>(IKey key, bool sensitiveLoggingEnabled)
 => () => new InMemoryTable <TKey>(key.GetPrincipalKeyValueFactory <TKey>(), sensitiveLoggingEnabled);
Beispiel #9
0
 private static Func <ILiteDBTable> CreateFactory <TKey>(IKey key, bool sensitiveLoggingEnabled, LiteDB.LiteDatabase _liteDatabase, IEntityType _entityType)
 => () => new LiteDBTable <TKey>(key.GetPrincipalKeyValueFactory <TKey>(), sensitiveLoggingEnabled, _liteDatabase, _entityType);
Beispiel #10
0
 private static Func <IFileContextTable> CreateFactory <TKey>(IKey key)
 => () => new FileContextTable <TKey>(key.GetPrincipalKeyValueFactory <TKey>(), key.DeclaringEntityType);