当前位置: 首页>>代码示例>>C#>>正文


C# IDataReader.ReadInt方法代码示例

本文整理汇总了C#中IDataReader.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.ReadInt方法的具体用法?C# IDataReader.ReadInt怎么用?C# IDataReader.ReadInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDataReader的用法示例。


在下文中一共展示了IDataReader.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     houseId = reader.ReadInt();
     if ( houseId < 0 )
     {
         throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
     }
     modelId = reader.ReadShort();
     if ( modelId < 0 )
     {
         throw new Exception("Forbidden value on modelId = " + modelId + ", it doesn't respect the following condition : modelId < 0");
     }
     ownerId = reader.ReadInt();
     ownerName = reader.ReadUTF();
     worldX = reader.ReadShort();
     if ( worldX < -255 || worldX > 255 )
     {
         throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
     }
     worldY = reader.ReadShort();
     if ( worldY < -255 || worldY > 255 )
     {
         throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
     }
     price = reader.ReadUInt();
     if ( price < 0 || price > 4294967295 )
     {
         throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0 || price > 4294967295");
     }
     isLocked = reader.ReadBoolean();
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:31,代码来源:HouseInformationsInside.cs

示例2: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     id = reader.ReadInt();
     if ( id < 0 )
     {
         throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0");
     }
     lifePoints = reader.ReadInt();
     if ( lifePoints < 0 )
     {
         throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
     }
     maxLifePoints = reader.ReadInt();
     if ( maxLifePoints < 0 )
     {
         throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
     }
     prospecting = reader.ReadShort();
     if ( prospecting < 0 )
     {
         throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
     }
     regenRate = reader.ReadByte();
     if ( regenRate < 0 || regenRate > 255 )
     {
         throw new Exception("Forbidden value on regenRate = " + regenRate + ", it doesn't respect the following condition : regenRate < 0 || regenRate > 255");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:PartyUpdateLightMessage.cs

示例3: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     maxPods = reader.ReadShort();
     if (maxPods < 0)
         throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0");
     prospecting = reader.ReadShort();
     if (prospecting < 0)
         throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
     wisdom = reader.ReadShort();
     if (wisdom < 0)
         throw new Exception("Forbidden value on wisdom = " + wisdom + ", it doesn't respect the following condition : wisdom < 0");
     taxCollectorsCount = reader.ReadSByte();
     if (taxCollectorsCount < 0)
         throw new Exception("Forbidden value on taxCollectorsCount = " + taxCollectorsCount + ", it doesn't respect the following condition : taxCollectorsCount < 0");
     taxCollectorAttack = reader.ReadInt();
     kamas = reader.ReadInt();
     if (kamas < 0)
         throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0");
     experience = reader.ReadDouble();
     if (experience < 0)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0");
     pods = reader.ReadInt();
     if (pods < 0)
         throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0");
     itemsValue = reader.ReadInt();
     if (itemsValue < 0)
         throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0");
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:29,代码来源:TaxCollectorDialogQuestionExtendedMessage.cs

示例4: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     symbolShape = reader.ReadShort();
     symbolColor = reader.ReadInt();
     backgroundShape = reader.ReadShort();
     backgroundColor = reader.ReadInt();
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GuildEmblem.cs

示例5: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     challengeId = reader.ReadSByte();
     if ( challengeId < 0 )
     {
         throw new Exception("Forbidden value on challengeId = " + challengeId + ", it doesn't respect the following condition : challengeId < 0");
     }
     targetId = reader.ReadInt();
     baseXpBonus = reader.ReadInt();
     if ( baseXpBonus < 0 )
     {
         throw new Exception("Forbidden value on baseXpBonus = " + baseXpBonus + ", it doesn't respect the following condition : baseXpBonus < 0");
     }
     extraXpBonus = reader.ReadInt();
     if ( extraXpBonus < 0 )
     {
         throw new Exception("Forbidden value on extraXpBonus = " + extraXpBonus + ", it doesn't respect the following condition : extraXpBonus < 0");
     }
     baseDropBonus = reader.ReadInt();
     if ( baseDropBonus < 0 )
     {
         throw new Exception("Forbidden value on baseDropBonus = " + baseDropBonus + ", it doesn't respect the following condition : baseDropBonus < 0");
     }
     extraDropBonus = reader.ReadInt();
     if ( extraDropBonus < 0 )
     {
         throw new Exception("Forbidden value on extraDropBonus = " + extraDropBonus + ", it doesn't respect the following condition : extraDropBonus < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:ChallengeInfoMessage.cs

示例6: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     uid = reader.ReadInt();
     if ( uid < 0 )
     {
         throw new Exception("Forbidden value on uid = " + uid + ", it doesn't respect the following condition : uid < 0");
     }
     targetId = reader.ReadInt();
     turnDuration = reader.ReadShort();
     dispelable = reader.ReadSByte();
     if ( dispelable < 0 )
     {
         throw new Exception("Forbidden value on dispelable = " + dispelable + ", it doesn't respect the following condition : dispelable < 0");
     }
     spellId = reader.ReadShort();
     if ( spellId < 0 )
     {
         throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
     }
     parentBoostUid = reader.ReadInt();
     if ( parentBoostUid < 0 )
     {
         throw new Exception("Forbidden value on parentBoostUid = " + parentBoostUid + ", it doesn't respect the following condition : parentBoostUid < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:25,代码来源:AbstractFightDispellableEffect.cs

示例7: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     genericId = reader.ReadInt();
     if (genericId < 0)
         throw new Exception("Forbidden value on genericId = " + genericId + ", it doesn't respect the following condition : genericId < 0");
     averagePrice = reader.ReadInt();
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:7,代码来源:ExchangeBidPriceMessage.cs

示例8: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     objectUID = reader.ReadInt();
     if (objectUID < 0)
         throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0");
     quantity = reader.ReadInt();
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:ExchangeObjectMoveMessage.cs

示例9: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     lifePoints = reader.ReadInt();
     if (lifePoints < 0)
         throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
     maxLifePoints = reader.ReadInt();
     if (maxLifePoints < 0)
         throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
     prospecting = reader.ReadShort();
     if (prospecting < 0)
         throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
     regenRate = reader.ReadByte();
     if (regenRate < 0 || regenRate > 255)
         throw new Exception("Forbidden value on regenRate = " + regenRate + ", it doesn't respect the following condition : regenRate < 0 || regenRate > 255");
     initiative = reader.ReadShort();
     if (initiative < 0)
         throw new Exception("Forbidden value on initiative = " + initiative + ", it doesn't respect the following condition : initiative < 0");
     pvpEnabled = reader.ReadBoolean();
     alignmentSide = reader.ReadSByte();
     worldX = reader.ReadShort();
     if (worldX < -255 || worldX > 255)
         throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
     worldY = reader.ReadShort();
     if (worldY < -255 || worldY > 255)
         throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
     mapId = reader.ReadInt();
     subAreaId = reader.ReadShort();
     if (subAreaId < 0)
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:31,代码来源:PartyMemberInformations.cs

示例10: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     partyType = reader.ReadSByte();
     if (partyType < 0)
         throw new Exception("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0");
     fromId = reader.ReadInt();
     if (fromId < 0)
         throw new Exception("Forbidden value on fromId = " + fromId + ", it doesn't respect the following condition : fromId < 0");
     fromName = reader.ReadUTF();
     leaderId = reader.ReadInt();
     if (leaderId < 0)
         throw new Exception("Forbidden value on leaderId = " + leaderId + ", it doesn't respect the following condition : leaderId < 0");
     var limit = reader.ReadUShort();
     members = new Types.PartyInvitationMemberInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          members[i] = new Types.PartyInvitationMemberInformations();
          members[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     guests = new Types.PartyGuestInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          guests[i] = new Types.PartyGuestInformations();
          guests[i].Deserialize(reader);
     }
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:28,代码来源:PartyInvitationDetailsMessage.cs

示例11: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     houseId = reader.ReadInt();
     if ( houseId < 0 )
     {
         throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
     }
     modelId = reader.ReadInt();
     if ( modelId < 0 )
     {
         throw new Exception("Forbidden value on modelId = " + modelId + ", it doesn't respect the following condition : modelId < 0");
     }
     ownerName = reader.ReadUTF();
     worldX = reader.ReadShort();
     if ( worldX < -255 || worldX > 255 )
     {
         throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
     }
     worldY = reader.ReadShort();
     if ( worldY < -255 || worldY > 255 )
     {
         throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
     }
     int limit = reader.ReadUShort();
     skillListIds = new int[limit];
     for (int i = 0; i < limit; i++)
     {
         (skillListIds as int[])[i] = reader.ReadInt();
     }
     guildshareParams = reader.ReadUInt();
     if ( guildshareParams < 0 || guildshareParams > 4294967295 )
     {
         throw new Exception("Forbidden value on guildshareParams = " + guildshareParams + ", it doesn't respect the following condition : guildshareParams < 0 || guildshareParams > 4294967295");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:35,代码来源:HouseInformationsForGuild.cs

示例12: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     houseId = reader.ReadInt();
     if ( houseId < 0 )
     {
         throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
     }
     modelId = reader.ReadShort();
     if ( modelId < 0 )
     {
         throw new Exception("Forbidden value on modelId = " + modelId + ", it doesn't respect the following condition : modelId < 0");
     }
     worldX = reader.ReadShort();
     if ( worldX < -255 || worldX > 255 )
     {
         throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
     }
     worldY = reader.ReadShort();
     if ( worldY < -255 || worldY > 255 )
     {
         throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
     }
     mapId = reader.ReadInt();
     subAreaId = reader.ReadShort();
     if ( subAreaId < 0 )
     {
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:AccountHouseInformations.cs

示例13: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     firstNameId = reader.ReadShort();
     if ( firstNameId < 0 )
     {
         throw new Exception("Forbidden value on firstNameId = " + firstNameId + ", it doesn't respect the following condition : firstNameId < 0");
     }
     lastNameId = reader.ReadShort();
     if ( lastNameId < 0 )
     {
         throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
     }
     level = reader.ReadByte();
     if ( level < 1 || level > 200 )
     {
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 1 || level > 200");
     }
     guildId = reader.ReadInt();
     if ( guildId < 0 )
     {
         throw new Exception("Forbidden value on guildId = " + guildId + ", it doesn't respect the following condition : guildId < 0");
     }
     uid = reader.ReadInt();
     if ( uid < 0 )
     {
         throw new Exception("Forbidden value on uid = " + uid + ", it doesn't respect the following condition : uid < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:FightTeamMemberTaxCollectorInformations.cs

示例14: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     nbSubOwned = reader.ReadInt();
     if (nbSubOwned < 0)
         throw new Exception("Forbidden value on nbSubOwned = " + nbSubOwned + ", it doesn't respect the following condition : nbSubOwned < 0");
     subTotal = reader.ReadInt();
     if (subTotal < 0)
         throw new Exception("Forbidden value on subTotal = " + subTotal + ", it doesn't respect the following condition : subTotal < 0");
     maxSub = reader.ReadInt();
     if (maxSub < 0)
         throw new Exception("Forbidden value on maxSub = " + maxSub + ", it doesn't respect the following condition : maxSub < 0");
     var limit = reader.ReadUShort();
     subAreasInformation = new Types.PrismSubAreaInformation[limit];
     for (int i = 0; i < limit; i++)
     {
          subAreasInformation[i] = new Types.PrismSubAreaInformation();
          subAreasInformation[i].Deserialize(reader);
     }
     nbConqsOwned = reader.ReadInt();
     if (nbConqsOwned < 0)
         throw new Exception("Forbidden value on nbConqsOwned = " + nbConqsOwned + ", it doesn't respect the following condition : nbConqsOwned < 0");
     conqsTotal = reader.ReadInt();
     if (conqsTotal < 0)
         throw new Exception("Forbidden value on conqsTotal = " + conqsTotal + ", it doesn't respect the following condition : conqsTotal < 0");
     limit = reader.ReadUShort();
     conquetesInformation = new Types.VillageConquestPrismInformation[limit];
     for (int i = 0; i < limit; i++)
     {
          conquetesInformation[i] = new Types.VillageConquestPrismInformation();
          conquetesInformation[i].Deserialize(reader);
     }
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:32,代码来源:PrismWorldInformationMessage.cs

示例15: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     id = reader.ReadInt();
     waitTime = reader.ReadInt();
     if (waitTime < 0)
         throw new Exception("Forbidden value on waitTime = " + waitTime + ", it doesn't respect the following condition : waitTime < 0");
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameFightTurnStartMessage.cs


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