コード例 #1
0
        public override IValue Serialize()
        {
#pragma warning disable LAA1002
            return(new Dictionary(new Dictionary <IKey, IValue>
            {
                [(Text)LevelKey] = Level.Serialize(),
                [(Text)ExpiredBlockIndexKey] = ExpiredBlockIndex.Serialize(),
                [(Text)StartedBlockIndexKey] = StartedBlockIndex.Serialize(),
                [(Text)ReceivedBlockIndexKey] = ReceivedBlockIndex.Serialize(),
                [(Text)RewardLevelKey] = RewardLevel.Serialize(),
                [(Text)RewardMapKey] = new Dictionary(
                    RewardMap.Select(
                        kv => new KeyValuePair <IKey, IValue>(
                            (IKey)kv.Key.Serialize(),
                            kv.Value.Serialize()
                            )
                        )
                    ),
                [(Text)EndKey] = End.Serialize(),
                [(Text)RewardLevelMapKey] = new Dictionary(
                    RewardLevelMap.Select(
                        kv => new KeyValuePair <IKey, IValue>(
                            (IKey)kv.Key.Serialize(),
                            new List(kv.Value.Select(v => v.Serialize())).Serialize()
                            )
                        )
                    ),
            }.Union((Dictionary)base.Serialize())));

#pragma warning restore LAA1002
        }
コード例 #2
0
        public override IValue SerializeV2()
        {
#pragma warning disable LAA1002
            return(new Dictionary(new Dictionary <IKey, IValue>
            {
                [(Text)LevelKey] = Level.Serialize(),
                [(Text)StartedBlockIndexKey] = StartedBlockIndex.Serialize(),
                [(Text)ReceivedBlockIndexKey] = ReceivedBlockIndex.Serialize(),
            }.Union((Dictionary)base.SerializeV2())));

#pragma warning restore LAA1002
        }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Level;
         hashCode = (hashCode * 397) ^ ExpiredBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ StartedBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ ReceivedBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ RewardLevel.GetHashCode();
         return(hashCode);
     }
 }
コード例 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ExpiredBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Type;
         hashCode = (hashCode * 397) ^ SellerAgentAddress.GetHashCode();
         hashCode = (hashCode * 397) ^ SellerAvatarAddress.GetHashCode();
         hashCode = (hashCode * 397) ^ OrderId.GetHashCode();
         hashCode = (hashCode * 397) ^ Price.GetHashCode();
         hashCode = (hashCode * 397) ^ TradableId.GetHashCode();
         hashCode = (hashCode * 397) ^ StartedBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)ItemSubType;
         return(hashCode);
     }
 }
コード例 #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = StartedBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ ExpiredBlockIndex.GetHashCode();
         hashCode = (hashCode * 397) ^ OrderId.GetHashCode();
         hashCode = (hashCode * 397) ^ TradableId.GetHashCode();
         hashCode = (hashCode * 397) ^ Price.GetHashCode();
         hashCode = (hashCode * 397) ^ CombatPoint;
         hashCode = (hashCode * 397) ^ Level;
         hashCode = (hashCode * 397) ^ ItemId;
         hashCode = (hashCode * 397) ^ SellerAgentAddress.GetHashCode();
         hashCode = (hashCode * 397) ^ ItemCount;
         return(hashCode);
     }
 }