Exemple #1
0
 ///<summary>
 ///</summary>
 ///<param name="redisKey"></param>
 ///<param name="schema"></param>
 ///<param name="capacity"></param>
 ///<param name="dbFilter"></param>
 public TransReceiveParam(string redisKey, SchemaTable schema, int capacity, DbDataFilter dbFilter)
     : this(redisKey)
 {
     Schema = schema;
     Capacity = capacity;
     DbFilter = dbFilter;
 }
Exemple #2
0
 public static void LoadGlobalData()
 {
     int periodTime = GameEnvironment.CacheGlobalPeriod;
     new BaseLog().SaveLog("系统加载单服配置开始...");
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.Start();
     int capacity = int.MaxValue;
     //todo Load
     var dbFilter = new DbDataFilter(capacity);
     new ShareCacheStruct<ServerEnvSet>().AutoLoad(dbFilter);
     new ShareCacheStruct<GameNotice>().AutoLoad(dbFilter);
     new ShareCacheStruct<DailyRestrainSet>().AutoLoad(dbFilter);
     new ShareCacheStruct<UserFriends>().AutoLoad(dbFilter);
     new ShareCacheStruct<UserGuild>().AutoLoad(dbFilter);
     new ShareCacheStruct<GuildMember>().AutoLoad(dbFilter);
     new ShareCacheStruct<UserApply>().AutoLoad(dbFilter);
     new ShareCacheStruct<GuildIdol>().AutoLoad(dbFilter);
     new ShareCacheStruct<GuildMemberLog>().AutoLoad(dbFilter);
     new ShareCacheStruct<GameActive>().AutoLoad(dbFilter);
     new ShareCacheStruct<FestivalInfo>().AutoLoad(dbFilter);
     // new ShareCacheStruct<FestivalRestrain>().AutoLoad(dbFilter);
     new ShareCacheStruct<PetRunPool>().AutoLoad(dbFilter);
     new ShareCacheStruct<UserTakePrize>().AutoLoad(dbFilter);
     new ShareCacheStruct<ServerFight>().AutoLoad(dbFilter);
     new ShareCacheStruct<ServerFightGroup>().AutoLoad(dbFilter);
     new ShareCacheStruct<MemberGroup>().AutoLoad(dbFilter);
     //new ShareCacheStruct<UserMail>().AutoLoad(dbFilter);
     stopwatch.Stop();
     new BaseLog().SaveLog("系统加载单服配置所需时间:" + stopwatch.Elapsed.TotalMilliseconds + "ms");
 }
 /// <summary>
 /// 获取日志数据
 /// 从账号创建到现在的日志数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="schema"></param>
 /// <param name="filter"></param>
 /// <param name="setFunc"></param>
 /// <param name="createTime"></param>
 /// <param name="dataList"></param>
 /// <returns></returns>
 public static bool TryReceiveSqlLog <T>(SchemaTable schema, DbDataFilter filter, EntityPropertySetFunc <T> setFunc, DateTime createTime, out List <T> dataList)
     where T : new()
 {
     return(new SqlDataReceiver(schema, filter).TryReceiveLog(setFunc, createTime, out dataList));
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="schema"></param>
 /// <param name="filter"></param>
 /// <returns></returns>
 public static IDataReceiver GetDataGetter(SchemaTable schema, DbDataFilter filter)
 {
     return(new SqlDataReceiver(schema, filter));
 }
Exemple #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="schema"></param>
 /// <param name="filter"></param>
 /// <returns></returns>
 public static IDataReceiver GetDataGetter(SchemaTable schema, DbDataFilter filter)
 {
     return(GetDataGetter(schema, filter.Capacity, filter));
 }
Exemple #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="schema"></param>
 /// <param name="capacity"></param>
 /// <param name="filter"></param>
 /// <returns></returns>
 public static IDataReceiver GetDataGetter(SchemaTable schema, int capacity, DbDataFilter filter)
 {
     return new SqlDataReceiver(schema, capacity, filter);
 }
Exemple #7
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="schema"></param>
 /// <param name="filter"></param>
 /// <returns></returns>
 public static IDataReceiver GetDataGetter(SchemaTable schema, DbDataFilter filter)
 {
     return GetDataGetter(schema, filter.Capacity, filter);
 }
Exemple #8
0
 ///<summary>
 ///</summary>
 ///<param name="redisKey"></param>
 ///<param name="schema"></param>
 ///<param name="dbFilter"></param>
 public TransReceiveParam(string redisKey, SchemaTable schema, DbDataFilter dbFilter)
     : this(redisKey)
 {
     Schema = schema;
     DbFilter = dbFilter;
 }
 ///<summary>
 ///</summary>
 ///<param name="redisKey"></param>
 ///<param name="schema"></param>
 ///<param name="dbFilter"></param>
 public TransReceiveParam(string redisKey, SchemaTable schema, DbDataFilter dbFilter)
     : this(redisKey)
 {
     Schema   = schema;
     DbFilter = dbFilter;
 }
Exemple #10
0
 /// <summary>
 /// 尝试执行查询Sql数据,并使用反射转换成对象
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="schema">指定的表结构对象</param>
 /// <param name="filter">操作数据的过滤器</param>
 /// <param name="dataList">返回的结果</param>
 /// <returns></returns>
 public static bool TryReceiveSql <T>(SchemaTable schema, DbDataFilter filter, out List <T> dataList)
     where T : ISqlEntity, new()
 {
     return(new SqlDataReceiver(schema, filter).TryReceive(out dataList));
 }