• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CacheList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CacheList的典型用法代码示例。如果您正苦于以下问题:C# CacheList类的具体用法?C# CacheList怎么用?C# CacheList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CacheList类属于命名空间,在下文中一共展示了CacheList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CombatProcessContainer

 public CombatProcessContainer()
 {
     AttackList = new CacheList<CombatEmbattle>();
     DefenseList = new CacheList<CombatEmbattle>();
     ProcessList = new CacheList<CombatProcess>();
     SelfAbilityEffectList = new CacheList<SelfAbilityEffect>();
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:7,代码来源:CombatProcessContainer.cs


示例2: UserDailyRestrain

 public UserDailyRestrain()
     : base(AccessLevel.ReadWrite)
 {
     UserExtend = new DailyUserExtend();
     FunPlot = new CacheList<FunPlot>();
     PlainPlotList = new CacheList<FunPlot>();
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:7,代码来源:UserDailyRestrain.cs


示例3: GetVipUseNum

 /// <summary>
 /// 每日限制次数
 /// </summary>
 /// <returns></returns>
 public static int GetVipUseNum(int vipLv, RestrainType restrainType)
 {
     int rType = (int)restrainType;
     int baseNum = 0;
     int MaxNum = 0;
     int vipNum = 0;
     DailyRestrainSet restrainSet = new ShareCacheStruct<DailyRestrainSet>().FindKey(restrainType);
     if (restrainSet != null)
     {
         baseNum = restrainSet.MaxNum;
     }
     VipLvInfo lvInfo = new ConfigCacheSet<VipLvInfo>().FindKey(vipLv);
     var restrainArray = new CacheList<DailyRestrain>();
     if (lvInfo != null)
     {
         restrainArray = lvInfo.DailyRestrain;
     }
     foreach (DailyRestrain daily in restrainArray)
     {
         if (daily.ID == rType)
         {
             vipNum = daily.Num;
         }
     }
     MaxNum = MathUtils.Addition(baseNum, vipNum, int.MaxValue);
     return MaxNum;
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:31,代码来源:VipHelper.cs


示例4: GeneralInfo

 public GeneralInfo()
     : base(AccessLevel.ReadOnly)
 {
     ShowFilter = new CacheList<ShowFilterInfo>(0, true);
     RecruitFilter = new CacheList<RecruitFilter>(0, true);
     Mature = new CacheList<GeneralProperty>(0, true);
 }
开发者ID:wf15271760803,项目名称:Scut-samples,代码行数:7,代码来源:GeneralInfo.cs


示例5: UserGuild

 public UserGuild()
     : base(AccessLevel.ReadWrite)
 {
     GuildBossInfo = new GuildBossInfo();
     AbilityInfo = new CacheList<GuildAbility>();
     GuildExercise = new GuildExercise();
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:7,代码来源:UserGuild.cs


示例6: FestivalInfo

 public FestivalInfo()
     : base(AccessLevel.ReadWrite)
 {
     Reward = new CacheList<PrizeInfo>();
     TimePriod = new TimePriod();
     TaskConfig = new CacheList<TaskConfigInfo>();
     FestivalExtend = new FestivalExtend();
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:8,代码来源:FestivalInfo.cs


示例7: GetGeneralQuality

 public static string GetGeneralQuality(CacheList<RecruitInfo> _generalQuality)
 {
     string genquality = string.Empty;
     foreach (var quality in _generalQuality)
     {
         genquality += quality.Quality.ToInt() + ",";
     }
     return genquality.TrimEnd(',');
 }
开发者ID:0jpq0,项目名称:Scut,代码行数:9,代码来源:Action1402.cs


示例8: StoryTaskInfo

 public StoryTaskInfo()
     : base(AccessLevel.ReadOnly)
 {
     ReleaseDialogue = new CacheList<DialogueInfo>(0, true);
     TakedDialogue = new CacheList<DialogueInfo>(0, true);
     DeliveryDialogue = new CacheList<DialogueInfo>(0, true);
     PreTaskID = new int[0];
     Reward = new CacheList<PrizeInfo>(0, true);
 }
开发者ID:wf15271760803,项目名称:Scut-samples,代码行数:9,代码来源:StoryTaskInfo.cs


示例9: DailyUserExtend

 public DailyUserExtend():base(false)
 {
     KalpaPlot = new CacheList<FunPlot>();
     LastKalpaPlot = new CacheList<FunPlot>();
     MorePlot = new CacheList<FunPlot>();
     HeroPlot = new List<HeroPlot>();
     WaterNum = new List<DailyRestrain>();
     //待确认,事件绑定
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:9,代码来源:DailyUserExtend.cs


示例10: GameUser

        public static int festId = 1012; //��ֵ����ID

        public GameUser()
            : base(AccessLevel.ReadWrite)
        {
            UserExtend = new GameUserExtend();
            GrayCrystalList = new CacheList<GrayCrystal>();
            SportsCombatQueue = new CacheQueue<SportsCombat>();
            PropertyInfo = new CacheList<GuildAbility>();
            HeritageList = new CacheList<GeneralHeritage>();
            SweepPool = new SweepPoolInfo();
            OpenFun = new List<UserFunction>();
        }
开发者ID:daneric,项目名称:Scut-samples,代码行数:13,代码来源:GameUser.cs


示例11: UserPlotPackage

 /// <summary>
 /// </summary>
 public UserPlotPackage(String UserID)
     : this()
 {
     this._UserID = UserID;
     PlotPackage = new CacheList<UserPlotInfo>
                       {
                           new UserPlotInfo(){PlotID = 1222, BossChallengeCount = 5},
                           new UserPlotInfo(){PlotID = 1223, BossChallengeCount = 5},
                           new UserPlotInfo(){PlotID = 1224, BossChallengeCount = 5}
                       };
 }
开发者ID:wf15271760803,项目名称:Scut-samples,代码行数:13,代码来源:UserPlotPackage.cs


示例12: MapReduceQuery

 public MapReduceQuery(Node n, CacheList cl): base(n) {
   _cl = cl;
   _mut = new Mutable<MRQState>(new MRQState());
   //Add the default query handlers:
   AddQueryMatcher("regex", delegate(object pattern) {
                              return new RegexMatcher((string)pattern);
                            });
   AddQueryMatcher("exact", delegate(object pattern) { return new ExactMatcher(pattern); });
   AddHitCombiner("concat", delegate(object arg) { return ConcatCombiner.Instance; });
   AddHitCombiner("maxcount", delegate(object arg) { return new MaxCountCombiner((int)arg); });
 }
开发者ID:hseom,项目名称:brunet,代码行数:11,代码来源:MapReduceQuery.cs


示例13: GetCaches

 public static Caches GetCaches()
 {
     Cache _cache = HttpRuntime.Cache;
     IDictionaryEnumerator cacheEnum = _cache.GetEnumerator();
     CacheList cl = new CacheList();
     cl = new CacheList();
     while (cacheEnum.MoveNext())
     {
         cl.Add(new CacheInfo(cacheEnum.Key.ToString(), cacheEnum.Value.GetType().ToString()));
     }
     Caches rs = new Caches();
     rs.CacheList = new CacheList();
     cl.SortBy(CacheInfo.Columns.Key, true);
     rs.CacheList.AddRange(cl);
     rs.Total = cl.Count;
     return rs;
 }
开发者ID:TaylorLi,项目名称:WorkStudioEnhance,代码行数:17,代码来源:CacheManager.cs


示例14: Awake

		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public void Awake() {
			var sett = new InputSettings();
			sett.InputTransform = gameObject.transform;
			sett.CameraTransform = HeadsetCameraTransform;
			sett.CursorSize = CursorSize;
			sett.UseMouseForTesting = UseMouseForTesting;
			sett.MousePositionMultiplier = MousePositionMultiplier;
			
			if ( HeadsetCameraTransform == null ) {
				IsFailure = true;
				throw new Exception("The "+typeof(HovercursorLookInput)+" component "+
					"requires the 'Headset Camera Transform' to be set.");
			}

			vCursor = new InputCursor(CursorType.Look, sett);
			vPlaneStates = new CacheList<PlaneState>();
		}
开发者ID:flashwade03,项目名称:Hover-VR-Interface-Kit,代码行数:19,代码来源:HovercursorLookInput.cs


示例15: AppenItemSynthesisLog

 /// <summary>
 /// 新增装备合成log
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="opType"></param>
 /// <param name="itemID"></param>
 /// <param name="num"></param>
 /// <param name="synthesisInfo1"></param>
 /// <param name="synthesisInfo2"></param>
 /// <param name="useGold"></param>
 /// <param name="beforeLv"></param>
 /// <param name="afterLv"></param>
 public static void AppenItemSynthesisLog(string userID, short opType, int itemID, int num, CacheList<SynthesisInfo> synthesisInfo1, SynthesisInfo synthesisInfo2, int useGold, short beforeLv, short afterLv)
 {
     UserItemSynthesisLog log = new UserItemSynthesisLog
       {
           ID = Guid.NewGuid().ToString(),
           UserID = userID,
           OpType = opType,
           ItemID = itemID,
           OpNum = num,
           DemandMaterial = synthesisInfo1,
           SurplusMaterial = synthesisInfo2,
           UseGold = useGold,
           BeforeLv = beforeLv,
           AfterLv = afterLv,
           CreateDate = DateTime.Now
       };
     var sender = DataSyncManager.GetDataSender();
     sender.Send(log);
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:31,代码来源:UserLogHelper.cs


示例16: AppenCtystalLog

        /// <summary>
        /// 玩家命运水晶log
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="opType"></param>
        /// <param name="sumNum"></param>
        /// <param name="opNum"></param>
        /// <param name="useGold"></param>
        /// <param name="surplusGold"></param>
        /// <param name="totalGold"></param>
        public static void AppenCtystalLog(string userID, short opType, int crystalID, int coinNum, int useGold, CacheList<SynthesisInfo> synthesisInfo, short crystalLv, int exp)
        {
            UserCrystalLog log = new UserCrystalLog()
            {
                ID = Guid.NewGuid().ToString(),
                UserID = userID,
                OpType = opType,
                CrystalID = crystalID,
                CoinNum = coinNum,
                UseGold = useGold,
                SynthesisCrystal = synthesisInfo,
                CrystalLv = crystalLv,
                Experience = exp,
                CreateDate = DateTime.Now
            };

            var sender = DataSyncManager.GetDataSender();
            sender.Send(log);
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:29,代码来源:UserLogHelper.cs


示例17: GuildFightCombatUserList

 public static void GuildFightCombatUserList()
 {
     _fightUserList = new CacheList<FightUser>();
     var fightList = new ShareCacheStruct<ServerFight>().FindAll(m => m.FastID == info.FastID);
     foreach (ServerFight fight in fightList)
     {
         if (string.IsNullOrEmpty(fight.CombatMember))
         {
             continue;
         }
         string[] strList = fight.CombatMember.Split(',');
         foreach (string s in strList)
         {
             if (string.IsNullOrEmpty(s))
             {
                 continue;
             }
             var FightStatusUser = _fightUserList.Find(m => !m.IsRemove && m.UserId == s);
             if (FightStatusUser != null)
             {
                 continue;
             }
             FightUser fightUser = new FightUser();
             fightUser.GuildID = fight.GuildID;
             fightUser.UserId = s;
             GameUser user = UserCacheGlobal.CheckLoadUser(s);
             if (user != null)
             {
                 fightUser.UserName = user.NickName;
                 user.UserStatus = UserStatus.FightCombat;
             }
             fightUser.WinCount = 0;
             fightUser.CityID = fight.CityID;
             fightUser.ObtainNum = 0;
             fightUser.InspirePercent = 0;
             fightUser.IsRemove = false;
             fightUser.IsNotEnough = false;
             _fightUserList.Add(fightUser);
         }
     }
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:41,代码来源:GuildFightCombat.cs


示例18: Main

        static void Main(string[] args)
        {
            try
            {
                var dict = new CacheList<int>();
                dict.Add(1);
                string js = dict.ToJson();
                var temp = js.ParseJson<CacheList<int>>();
                if(temp == null)
                {

                }
                GameServerListManager.Initialize();
                var server = new GameProxy();
                Console.WriteLine("Press Enter to exit...");
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                TraceLog.WriteError("Main error:{0}", ex);
            }
        }
开发者ID:haiya,项目名称:Scut,代码行数:22,代码来源:Program.cs


示例19: GetPrizeInfo

 /// <summary>
 /// 获取奖励
 /// </summary>
 /// <param name="List"></param>
 /// <returns></returns>
 public static CacheList<PrizeInfo> GetPrizeInfo(CacheList<PrizeInfo> List)
 {
     if (List[0].Reward == 1)
     {
         return new CacheList<PrizeInfo> { List[RandomUtils.GetRandom(0, List.Count)] };
     }
     else if (List[0].Reward == 2)
     {
         CacheList<PrizeInfo> prizeInfosArray = List;
         double[] probability = new double[prizeInfosArray.Count];
         for (int i = 0; i < prizeInfosArray.Count; i++)
         {
             probability[i] = (double)prizeInfosArray[i].Probability;
         }
         int index2 = RandomUtils.GetHitIndex(probability);
         return new CacheList<PrizeInfo> { prizeInfosArray[index2] };
     }
     else if (List[0].Reward == 3)
     {
         return List;
     }
     return new CacheList<PrizeInfo>();
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:28,代码来源:PrizeHelper.cs


示例20: TakeAction

        public override bool TakeAction()
        {
            var package = UserCrystalPackage.Get(Uid);
            if (ops == 1)
            {
                UserCrystalInfo userCryStal1 = package.CrystalPackage.Find(m => m.UserCrystalID.Equals(userCrystalID1));
                UserCrystalInfo userCryStal2 = package.CrystalPackage.Find(m => m.UserCrystalID.Equals(userCrystalID2));
                // UserCrystal userCryStal1 = UserCrystal.FindKey(userCrystalID1);
                //UserCrystal userCryStal2 = UserCrystal.FindKey(userCrystalID2);
                if (userCryStal1 == null || userCryStal2 == null)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St1308_CrystalNotEnough;
                    return false;
                }
                if (userCryStal1.CrystalLv > 9)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St1308_CrystalLvFull;
                    return false;
                }

                CrystalInfo crystalInfo1 = new ShareCacheStruct<CrystalInfo>().FindKey(userCryStal1.CrystalID);
                CrystalInfo crystalInfo2 = new ShareCacheStruct<CrystalInfo>().FindKey(userCryStal2.CrystalID);
                int cryExprience1 = 0;
                int cryExprience2 = 0;
                if (crystalInfo1 != null && crystalInfo2 != null)
                {
                    cryExprience1 = crystalInfo1.Experience;
                    cryExprience2 = crystalInfo2.Experience;

                    if (crystalInfo1.CrystalQuality == crystalInfo2.CrystalQuality)
                    {
                        if (userCryStal1.CurrExprience >= userCryStal2.CurrExprience)
                        {
                            UpdateCrystal(userCrystalID1, userCrystalID2, cryExprience2);
                        }
                        else
                        {
                            UpdateCrystal(userCrystalID2, userCrystalID1, cryExprience1);
                        }
                    }
                    else if (crystalInfo1.CrystalQuality > crystalInfo2.CrystalQuality)
                    {
                        UpdateCrystal(userCrystalID1, userCrystalID2, cryExprience2);
                    }
                    else
                    {
                        UpdateCrystal(userCrystalID2, userCrystalID1, cryExprience1);
                    }

                }
            }
            else if (ops == 2)
            {
                CacheList<SynthesisInfo> SynList = new CacheList<SynthesisInfo>();
                int experience = 0;
                var userCrystalArray = package.CrystalPackage.FindAll(m => m.IsSale == 2 && m.GeneralID.Equals(0));
                if (userCrystalArray.Count == 0)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St1308_CrystalNotEnough;
                    return false;
                }
                userCrystalArray.QuickSort((x, y) =>
                {
                    int result = 0;
                    if (x == null && y == null) return 0;
                    if (x != null && y == null) return 1;
                    if (x == null) return -1;
                    result = (int)new ShareCacheStruct<CrystalInfo>().FindKey(y.CrystalID).CrystalQuality.CompareTo(
                        new ShareCacheStruct<CrystalInfo>().FindKey(x.CrystalID).CrystalQuality);
                    if (result == 0)
                    {
                        result = y.CurrExprience.CompareTo(x.CurrExprience);
                    }
                    return result;
                });

                UserCrystalInfo userCrystal1 =
                    package.CrystalPackage.Find(m => m.UserCrystalID == userCrystalArray[0].UserCrystalID);
                int maxExprience = 0;
                if (userCrystal1 == null)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St1308_CrystalNotEnough;
                    return false;
                }
                short upLv = 10;
                CrystalLvInfo crystalLvInfo = new ShareCacheStruct<CrystalLvInfo>().FindKey(userCrystal1.CrystalID, upLv);
                maxExprience = crystalLvInfo == null ? 0 : crystalLvInfo.UpExperience;


                foreach (UserCrystalInfo crystal in userCrystalArray)
                {
                    CrystalInfo crystalInfo = new ShareCacheStruct<CrystalInfo>().FindKey(crystal.CrystalID);
                    if (crystalInfo != null)
                    {
                        experience = crystalInfo.Experience;
                    }
//.........这里部分代码省略.........
开发者ID:daneric,项目名称:Scut-samples,代码行数:101,代码来源:Action1308.cs



注:本文中的CacheList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CacheManager类代码示例发布时间:2022-05-24
下一篇:
C# CacheItemRemovedReason类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap