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


C# IDataReader.ReadByte方法代码示例

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


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

示例1: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     byte flag1 = reader.ReadByte();
     enabled = BooleanByteWrapper.GetFlag(flag1, 0);
     abandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1);
     level = reader.ReadByte();
     if ( level < 0 || level > 255 )
     {
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0 || level > 255");
     }
     expLevelFloor = reader.ReadDouble();
     if ( expLevelFloor < 0 )
     {
         throw new Exception("Forbidden value on expLevelFloor = " + expLevelFloor + ", it doesn't respect the following condition : expLevelFloor < 0");
     }
     experience = reader.ReadDouble();
     if ( experience < 0 )
     {
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0");
     }
     expNextLevelFloor = reader.ReadDouble();
     if ( expNextLevelFloor < 0 )
     {
         throw new Exception("Forbidden value on expNextLevelFloor = " + expNextLevelFloor + ", it doesn't respect the following condition : expNextLevelFloor < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:26,代码来源:GuildInformationsGeneralMessage.cs

示例2: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     position = reader.ReadByte();
     if (position < 0 || position > 255)
         throw new Exception("Forbidden value on position = " + position + ", it doesn't respect the following condition : position < 0 || position > 255");
     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");
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:25,代码来源:ObjectItem.cs

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

示例4: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     byte flag1 = reader.ReadByte();
     showExperience = BooleanByteWrapper.GetFlag(flag1, 0);
     showExperienceLevelFloor = BooleanByteWrapper.GetFlag(flag1, 1);
     showExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(flag1, 2);
     showExperienceFightDelta = BooleanByteWrapper.GetFlag(flag1, 3);
     showExperienceForGuild = BooleanByteWrapper.GetFlag(flag1, 4);
     showExperienceForMount = BooleanByteWrapper.GetFlag(flag1, 5);
     isIncarnationExperience = BooleanByteWrapper.GetFlag(flag1, 6);
     experience = reader.ReadDouble();
     if (experience < 0)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0");
     experienceLevelFloor = reader.ReadDouble();
     if (experienceLevelFloor < 0)
         throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0");
     experienceNextLevelFloor = reader.ReadDouble();
     if (experienceNextLevelFloor < 0)
         throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0");
     experienceFightDelta = reader.ReadInt();
     experienceForGuild = reader.ReadInt();
     if (experienceForGuild < 0)
         throw new Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0");
     experienceForMount = reader.ReadInt();
     if (experienceForMount < 0)
         throw new Exception("Forbidden value on experienceForMount = " + experienceForMount + ", it doesn't respect the following condition : experienceForMount < 0");
     rerollExperienceMul = reader.ReadInt();
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:29,代码来源:FightResultExperienceData.cs

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

示例6: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     byte flag1 = reader.ReadByte();
     success = BooleanByteWrapper.GetFlag(flag1, 0);
     session = BooleanByteWrapper.GetFlag(flag1, 1);
     name = reader.ReadUTF();
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:7,代码来源:IgnoredDeleteResultMessage.cs

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

示例8: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     byte flag1 = reader.ReadByte();
     hasRights = BooleanByteWrapper.GetFlag(flag1, 0);
     wasAlreadyConnected = BooleanByteWrapper.GetFlag(flag1, 1);
     login = reader.ReadUTF();
     nickname = reader.ReadUTF();
     accountId = reader.ReadInt();
     if ( accountId < 0 )
     {
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     }
     communityId = reader.ReadSByte();
     if ( communityId < 0 )
     {
         throw new Exception("Forbidden value on communityId = " + communityId + ", it doesn't respect the following condition : communityId < 0");
     }
     secretQuestion = reader.ReadUTF();
     subscriptionEndDate = reader.ReadDouble();
     if ( subscriptionEndDate < 0 )
     {
         throw new Exception("Forbidden value on subscriptionEndDate = " + subscriptionEndDate + ", it doesn't respect the following condition : subscriptionEndDate < 0");
     }
     accountCreation = reader.ReadDouble();
     if ( accountCreation < 0 )
     {
         throw new Exception("Forbidden value on accountCreation = " + accountCreation + ", it doesn't respect the following condition : accountCreation < 0");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:29,代码来源:IdentificationSuccessMessage.cs

示例9: Deserialize

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

示例10: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     newLevel = reader.ReadByte();
     if ( newLevel < 2 || newLevel > 200 )
     {
         throw new Exception("Forbidden value on newLevel = " + newLevel + ", it doesn't respect the following condition : newLevel < 2 || newLevel > 200");
     }
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:8,代码来源:GuildLevelUpMessage.cs

示例11: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     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");
     name = reader.ReadUTF();
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:8,代码来源:CharacterMinimalInformations.cs

示例12: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     lockDuration = reader.ReadByte();
     if (lockDuration < 0 || lockDuration > 255)
         throw new Exception("Forbidden value on lockDuration = " + lockDuration + ", it doesn't respect the following condition : lockDuration < 0 || lockDuration > 255");
     author = reader.ReadUTF();
     content = reader.ReadUTF();
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:8,代码来源:PopupWarningMessage.cs

示例13: Deserialize

 public virtual void Deserialize(IDataReader reader)
 {
     byte flag1 = reader.ReadByte();
     isSecret = BooleanByteWrapper.GetFlag(flag1, 0);
     isRestrictedToPartyOnly = BooleanByteWrapper.GetFlag(flag1, 1);
     isClosed = BooleanByteWrapper.GetFlag(flag1, 2);
     isAskingForHelp = BooleanByteWrapper.GetFlag(flag1, 3);
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:8,代码来源:FightOptionsInformations.cs

示例14: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     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,代码行数:8,代码来源:LifePointsRegenBeginMessage.cs

示例15: Deserialize

 public override void Deserialize(IDataReader reader)
 {
     requestId = reader.ReadByte();
     if (requestId < 0 || requestId > 255)
         throw new Exception("Forbidden value on requestId = " + requestId + ", it doesn't respect the following condition : requestId < 0 || requestId > 255");
     contactType = reader.ReadSByte();
     if (contactType < 0)
         throw new Exception("Forbidden value on contactType = " + contactType + ", it doesn't respect the following condition : contactType < 0");
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:9,代码来源:ContactLookRequestMessage.cs


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