Exemplo n.º 1
0
 public SmartSqlConfig()
 {
     Settings             = Settings.Default;
     SqlMaps              = new Dictionary <string, SqlMap>();
     ObjectFactoryBuilder = new ExpressionObjectFactoryBuilder();
     TagBuilderFactory    = new TagBuilderFactory();
     TypeHandlerFactory   = new TypeHandlerFactory();
     LoggerFactory        = NullLoggerFactory.Instance;
     DeserializerFactory  = new DeserializerFactory();
     Properties           = new Properties();
     IdGenerator          = SnowflakeId.Default;
     DbSessionFactory     = new DbSessionFactory(this);
     SessionStore         = new DbSessionStore(DbSessionFactory);
     StatementAnalyzer    = new StatementAnalyzer();
 }
Exemplo n.º 2
0
 public SmartSqlConfig()
 {
     Settings             = Settings.Default;
     SqlMaps              = new Dictionary <string, SqlMap>();
     Filters              = new FilterCollection();
     ObjectFactoryBuilder = new ExpressionObjectFactoryBuilder();
     TagBuilderFactory    = new TagBuilderFactory();
     TypeHandlerFactory   = new TypeHandlerFactory();
     LoggerFactory        = NullLoggerFactory.Instance;
     DeserializerFactory  = new DeserializerFactory();
     Properties           = new Properties();
     IdGenerators         = new Dictionary <string, IIdGenerator>
     {
         { nameof(SnowflakeId.Default), SnowflakeId.Default }
     };
     DbSessionFactory         = new DbSessionFactory(this);
     SessionStore             = new DbSessionStore(DbSessionFactory);
     StatementAnalyzer        = new StatementAnalyzer();
     InvokeSucceedListener    = new InvokeSucceedListener();
     DbSessionFactory.Opened += (sender, args) => { InvokeSucceedListener.BindDbSessionEvent(args.DbSession); };
 }