本文整理汇总了C#中IDataReader.ReadUTF方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.ReadUTF方法的具体用法?C# IDataReader.ReadUTF怎么用?C# IDataReader.ReadUTF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.ReadUTF方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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");
}
}
示例2: Deserialize
public override void Deserialize(IDataReader reader)
{
self = reader.ReadBoolean();
position = reader.ReadSByte();
accountNickname = reader.ReadUTF();
characterName = reader.ReadUTF();
areaId = reader.ReadShort();
}
示例3: Deserialize
public override void Deserialize(IDataReader reader)
{
filenameHash = reader.ReadUTF();
type = reader.ReadSByte();
if (type < 0)
throw new Exception("Forbidden value on type = " + type + ", it doesn't respect the following condition : type < 0");
value = reader.ReadUTF();
}
示例4: Deserialize
public override void Deserialize(IDataReader reader)
{
errorId = reader.ReadSByte();
if (errorId < 0)
throw new Exception("Forbidden value on errorId = " + errorId + ", it doesn't respect the following condition : errorId < 0");
message = reader.ReadUTF();
helpUrl = reader.ReadUTF();
}
示例5: 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();
}
示例6: Deserialize
public override void Deserialize(IDataReader reader)
{
serverId = reader.ReadShort();
address = reader.ReadUTF();
port = reader.ReadUShort();
if (port < 0 || port > 65535)
throw new Exception("Forbidden value on port = " + port + ", it doesn't respect the following condition : port < 0 || port > 65535");
canCreateNewCharacter = reader.ReadBoolean();
ticket = reader.ReadUTF();
}
示例7: Deserialize
public override void Deserialize(IDataReader reader)
{
channel = reader.ReadSByte();
if (channel < 0)
throw new Exception("Forbidden value on channel = " + channel + ", it doesn't respect the following condition : channel < 0");
content = reader.ReadUTF();
timestamp = reader.ReadInt();
if (timestamp < 0)
throw new Exception("Forbidden value on timestamp = " + timestamp + ", it doesn't respect the following condition : timestamp < 0");
fingerprint = reader.ReadUTF();
}
示例8: Deserialize
public override void Deserialize(IDataReader reader)
{
name = 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");
ownername = reader.ReadUTF();
}
示例9: Load
public void Load(IDataReader reader)
{
Name = reader.ReadUTF();
EMail = reader.ReadUTF();
City = reader.ReadUTF();
Country = reader.ReadUTF();
string date = reader.ReadUTF();
Console.WriteLine(date);
RegTime = DateTime.ParseExact(date, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
}
示例10: Deserialize
public override void Deserialize(IDataReader reader)
{
self = reader.ReadBoolean();
position = reader.ReadSByte();
accountNickname = 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");
playerName = reader.ReadUTF();
playerId = reader.ReadInt();
if (playerId < 0)
throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
areaId = reader.ReadShort();
}
示例11: Deserialize
public virtual void Deserialize(IDataReader reader)
{
guildId = reader.ReadInt();
if (guildId < 0)
throw new Exception("Forbidden value on guildId = " + guildId + ", it doesn't respect the following condition : guildId < 0");
guildName = reader.ReadUTF();
}
示例12: Deserialize
public override void Deserialize(IDataReader reader)
{
characterId = reader.ReadInt();
if (characterId < 0)
throw new Exception("Forbidden value on characterId = " + characterId + ", it doesn't respect the following condition : characterId < 0");
secretAnswerHash = reader.ReadUTF();
}
示例13: Deserialize
public virtual void Deserialize(IDataReader reader)
{
collectorCallerName = reader.ReadUTF();
date = reader.ReadInt();
if (date < 0)
throw new Exception("Forbidden value on date = " + date + ", it doesn't respect the following condition : date < 0");
}
示例14: Deserialize
public override void Deserialize(IDataReader reader)
{
mapId = reader.ReadInt();
if (mapId < 0)
throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
mapKey = reader.ReadUTF();
}
示例15: 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");
}