SetLogProvider() public method

public SetLogProvider ( ILogProvider value ) : IConfiguration
value ILogProvider
return IConfiguration
Ejemplo n.º 1
0
        public IConfiguration Merge(IConfiguration configuration)
        {
            var mergedConfig = new DefaultConfiguration();

            mergedConfig.SetAuditLogProvider(AuditLogProvider ?? configuration.AuditLogProvider);

            mergedConfig.SetDefaultChangeTrackingMode(_defaultChangeTrackingMode ?? configuration.DefaultChangeTrackingMode);

            mergedConfig.SetDefaultConnectionName(_defaultConnectionName ?? configuration.DefaultConnectionName);

            mergedConfig.SetDefaultCacheRepresentation(_defaultL1CacheRepresentation ?? configuration.DefaultCacheRepresentation);

            mergedConfig.SetDefaultMaterializationMode(_defaultMaterializationMode ?? configuration.DefaultMaterializationMode);

            mergedConfig.SetDefaultSerializationMode(_defaultSerializationMode ?? configuration.DefaultSerializationMode);

            mergedConfig.SetExecutionContext(ExecutionContext ?? configuration.ExecutionContext);

            mergedConfig.SetGenerateDeleteSql(GenerateDeleteSql || configuration.GenerateDeleteSql);

            mergedConfig.SetGenerateInsertSql(GenerateInsertSql || configuration.GenerateInsertSql);

            mergedConfig.SetGenerateUpdateSql(GenerateUpdateSql || configuration.GenerateUpdateSql);

            mergedConfig.SetLogging(Logging || configuration.Logging);

            mergedConfig.SetOperationNamingConvention(_operationNamingConvention ?? configuration.OperationNamingConvention);

            mergedConfig.SetOperationPrefix(_operationPrefix ?? configuration.OperationPrefix);

            mergedConfig.SetHiLoTableName(_hiLoTableName ?? configuration.HiLoTableName);

            mergedConfig.SetLogProvider(LogProvider ?? configuration.LogProvider);

            mergedConfig.SetAutoTypeCoercion(AutoTypeCoercion || configuration.AutoTypeCoercion);

            mergedConfig.SetIgnoreInvalidParameters(IgnoreInvalidParameters || configuration.IgnoreInvalidParameters);

            mergedConfig.SetSystemConfiguration(SystemConfiguration ?? configuration.SystemConfiguration);

            return(mergedConfig);
        }
Ejemplo n.º 2
0
        public IConfiguration Merge(IConfiguration configuration)
        {
            var mergedConfig = new DefaultConfiguration();

            mergedConfig.SetAuditLogProvider(_auditLogProvider ?? configuration.AuditLogProvider);

            mergedConfig.SetDefaultChangeTrackingMode(_defaultChangeTrackingMode.HasValue ? _defaultChangeTrackingMode.Value : configuration.DefaultChangeTrackingMode);

            mergedConfig.SetDefaultConnectionName(_defaultConnectionName ?? configuration.DefaultConnectionName);

            mergedConfig.SetDefaultFetchMode(_defaultFetchMode.HasValue ? _defaultFetchMode.Value : configuration.DefaultFetchMode);

            mergedConfig.SetDefaultL1CacheRepresentation(_defaultL1CacheRepresentation.HasValue ? _defaultL1CacheRepresentation.Value : configuration.DefaultL1CacheRepresentation);

            mergedConfig.SetDefaultMaterializationMode(_defaultMaterializationMode.HasValue ? _defaultMaterializationMode.Value : configuration.DefaultMaterializationMode);

            mergedConfig.SetDefaultSerializationMode(_defaultSerializationMode.HasValue ? _defaultSerializationMode.Value : configuration.DefaultSerializationMode);

            mergedConfig.SetExecutionContext(_executionContext ?? configuration.ExecutionContext);

            mergedConfig.SetGenerateDeleteSql(GenerateDeleteSql || configuration.GenerateDeleteSql);

            mergedConfig.SetGenerateInsertSql(GenerateInsertSql || configuration.GenerateInsertSql);

            mergedConfig.SetGenerateUpdateSql(GenerateUpdateSql || configuration.GenerateUpdateSql);

            mergedConfig.SetLogging(Logging || configuration.Logging);

            mergedConfig.SetOperationNamingConvention(_operationNamingConvention.HasValue ? _operationNamingConvention.Value : configuration.OperationNamingConvention);

            mergedConfig.SetOperationPrefix(_operationPrefix ?? configuration.OperationPrefix);

            mergedConfig.SetHiLoTableName(_hiLoTableName ?? configuration.HiLoTableName);

            mergedConfig.SetLogProvider(_logProvider ?? configuration.LogProvider);

            return mergedConfig;
        }