public static void Register() { IocUtils.RegisterSingle <CacheKey>(new CacheKey(PathUtils.GetFileFullPath(CACHE_KEY_FILE))); IocUtils.RegisterSingle <XmlConfig>(new XmlConfig(PathUtils.GetFileFullPath(CONFIG_FILE))); IocUtils.LoadDefaultImplement(DEFAULT_IMPLEMENT_FILE); LoadIoc(); LoadRedis(); }
private static void LoadRedis() { var con = ConnectionMultiplexer.Connect(ConfigUtils.RedisConfig); con.ConnectionFailed += OnConnectionFailed; con.ErrorMessage += OnErrorMessage; con.InternalError += OnInternalError; con.PreserveAsyncOrder = false; IocUtils.RegisterSingle <IConnectionMultiplexer>(con); }