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


C# IDataReader.ReadShort方法代码示例

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


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

示例1: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     bonesId = reader.ReadShort();
     if (bonesId < 0)
         throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
     var limit = reader.ReadUShort();
     skins = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          skins[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     indexedColors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          indexedColors[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     scales = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          scales[i] = reader.ReadShort();
     }
     limit = reader.ReadUShort();
     subentities = new Types.SubEntity[limit];
     for (int i = 0; i < limit; i++)
     {
          subentities[i] = new Types.SubEntity();
          subentities[i].Deserialize(reader);
     }
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:31,代码来源:EntityLook.cs

示例2: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     guildOwner = 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");
     }
     subAreaId = reader.ReadShort();
     if ( subAreaId < 0 )
     {
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     }
     nbMount = reader.ReadSByte();
     nbObject = reader.ReadSByte();
     price = reader.ReadInt();
     if ( price < 0 )
     {
         throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:26,代码来源:PaddockInformationsForSell.cs

示例3: 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

示例4: 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

示例5: Deserialize

 public virtual void Deserialize(IDataReader 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");
     }
     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,代码来源:TaxCollectorBasicInformations.cs

示例6: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     paddockId = reader.ReadInt();
     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");
     }
     abandonned = reader.ReadBoolean();
     int limit = reader.ReadUShort();
     mountsInformations = new Types.MountInformationsForPaddock[limit];
     for (int i = 0; i < limit; i++)
     {
         (mountsInformations as MountInformationsForPaddock[])[i] = new Types.MountInformationsForPaddock();
         (mountsInformations as Types.MountInformationsForPaddock[])[i].Deserialize(reader);
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:PaddockContentInformations.cs

示例7: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     nbcollectorMax = reader.ReadSByte();
     if ( nbcollectorMax < 0 )
     {
         throw new Exception("Forbidden value on nbcollectorMax = " + nbcollectorMax + ", it doesn't respect the following condition : nbcollectorMax < 0");
     }
     taxCollectorHireCost = reader.ReadShort();
     if ( taxCollectorHireCost < 0 )
     {
         throw new Exception("Forbidden value on taxCollectorHireCost = " + taxCollectorHireCost + ", it doesn't respect the following condition : taxCollectorHireCost < 0");
     }
     int limit = reader.ReadUShort();
     informations = new Types.TaxCollectorInformations[limit];
     for (int i = 0; i < limit; i++)
     {
         (informations as Types.TaxCollectorInformations[])[i] = Types.ProtocolTypeManager.GetInstance<Types.TaxCollectorInformations>(reader.ReadShort());
         (informations as Types.TaxCollectorInformations[])[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightersInformations = new Types.TaxCollectorFightersInformation[limit];
     for (int i = 0; i < limit; i++)
     {
         (fightersInformations as Types.TaxCollectorFightersInformation[])[i] = new Types.TaxCollectorFightersInformation();
         (fightersInformations as Types.TaxCollectorFightersInformation[])[i].Deserialize(reader);
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:27,代码来源:TaxCollectorListMessage.cs

示例8: 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

示例9: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     collectorName = 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");
     }
     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");
     }
     userName = reader.ReadUTF();
     experience = reader.ReadDouble();
     int limit = reader.ReadUShort();
     objectsInfos = new Types.ObjectItemQuantity[limit];
     for (int i = 0; i < limit; i++)
     {
         (objectsInfos as Types.ObjectItemQuantity[])[i] = new Types.ObjectItemQuantity();
         (objectsInfos as Types.ObjectItemQuantity[])[i].Deserialize(reader);
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:ExchangeGuildTaxCollectorGetMessage.cs

示例10: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     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();
     ownerConnected = reader.ReadBoolean();
     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");
     subAreaId = reader.ReadShort();
     if (subAreaId < 0)
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     nbRoom = reader.ReadSByte();
     nbChest = reader.ReadSByte();
     var limit = reader.ReadUShort();
     skillListIds = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          skillListIds[i] = reader.ReadInt();
     }
     isLocked = reader.ReadBoolean();
     price = reader.ReadInt();
     if (price < 0)
         throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0");
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:29,代码来源:HouseInformationsForSell.cs

示例11: 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

示例12: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     year = reader.ReadShort();
     if ( year < 0 )
     {
         throw new Exception("Forbidden value on year = " + year + ", it doesn't respect the following condition : year < 0");
     }
     month = reader.ReadShort();
     if ( month < 0 )
     {
         throw new Exception("Forbidden value on month = " + month + ", it doesn't respect the following condition : month < 0");
     }
     day = reader.ReadShort();
     if ( day < 0 )
     {
         throw new Exception("Forbidden value on day = " + day + ", it doesn't respect the following condition : day < 0");
     }
     hour = reader.ReadShort();
     if ( hour < 0 )
     {
         throw new Exception("Forbidden value on hour = " + hour + ", it doesn't respect the following condition : hour < 0");
     }
     minute = reader.ReadShort();
     if ( minute < 0 )
     {
         throw new Exception("Forbidden value on minute = " + minute + ", it doesn't respect the following condition : minute < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:ObjectEffectDate.cs

示例13: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     objectGID = reader.ReadShort();
     if (objectGID < 0)
         throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0");
     powerRate = reader.ReadShort();
     overMax = reader.ReadBoolean();
     var limit = reader.ReadUShort();
     effects = new Types.ObjectEffect[limit];
     for (int i = 0; i < limit; i++)
     {
          effects[i] = Types.ProtocolTypeManager.GetInstance<Types.ObjectEffect>(reader.ReadShort());
          effects[i].Deserialize(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();
     if (quantity < 0)
         throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0");
     objectPrice = reader.ReadInt();
     if (objectPrice < 0)
         throw new Exception("Forbidden value on objectPrice = " + objectPrice + ", it doesn't respect the following condition : objectPrice < 0");
     publicPrice = reader.ReadInt();
     if (publicPrice < 0)
         throw new Exception("Forbidden value on publicPrice = " + publicPrice + ", it doesn't respect the following condition : publicPrice < 0");
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:28,代码来源:ObjectItemToSellInHumanVendorShop.cs

示例14: 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

示例15: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     @base = reader.ReadShort();
     objectsAndMountBonus = reader.ReadShort();
     alignGiftBonus = reader.ReadShort();
     contextModif = reader.ReadShort();
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:7,代码来源:CharacterBaseCharacteristic.cs


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