本文整理汇总了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();
}
示例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");
}
}
示例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");
}
示例4: Deserialize
public virtual void Deserialize(IDataReader reader)
{
symbolShape = reader.ReadShort();
symbolColor = reader.ReadInt();
backgroundShape = reader.ReadShort();
backgroundColor = reader.ReadInt();
}
示例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");
}
}
示例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");
}
}
示例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();
}
示例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();
}
示例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");
}
示例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);
}
}
示例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");
}
}
示例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");
}
}
示例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");
}
}
示例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);
}
}
示例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");
}