本文整理汇总了C#中IValueReader.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# IValueReader.ReadByte方法的具体用法?C# IValueReader.ReadByte怎么用?C# IValueReader.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueReader
的用法示例。
在下文中一共展示了IValueReader.ReadByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadPayload
public override void ReadPayload(IValueReader reader)
{
this.NetworkID = reader.ReadUInt32();
this.CharacterName = reader.ReadString();
this.Action = (PlayerUpdateAction)reader.ReadByte();
}
示例2: ReadState
/// <summary>
/// Reads the state of the object from an <see cref="IValueReader"/>. Values should be read in the exact
/// same order as they were written.
/// </summary>
/// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param>
public void ReadState(IValueReader reader)
{
PersistableHelper.Read(this, reader);
// Equipped bodies
int count = reader.ReadByte("EquippedBodiesCount");
_equippedBodies.Clear();
for (var i = 0; i < count; i++)
{
var s = reader.ReadString("EquippedBody_" + i);
_equippedBodies.Add(s);
}
}
示例3: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
Result = (ConnectResult)reader.ReadByte();
KeyboardEncryption = reader.ReadBool();
MouseEncryption = reader.ReadBool();
}
示例4: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
Reason = (ConnectionResult)reader.ReadByte();
if (Reason == ConnectionResult.Custom)
CustomReason = reader.ReadString();
}
示例5: Deserialize
public void Deserialize(ISerializationContext context, IValueReader reader)
{
UserId = reader.ReadInt32();
Username = reader.ReadString();
CurrentChannelId = reader.ReadInt32();
Nickname = reader.ReadString();
Phonetic = reader.ReadString();
IsMuted = reader.ReadBool();
Status = (UserStatus)reader.ReadByte();
Comment = reader.ReadString();
}
示例6: Read
/// <summary>
/// Reads a <see cref="QuickBarSlotValues"/> from an <see cref="IValueReader"/>.
/// </summary>
/// <param name="r">The <see cref="IValueReader"/> to read the values from.</param>
/// <returns>The <see cref="QuickBarSlotValues"/> read from the <paramref name="r"/>.</returns>
public static QuickBarSlotValues Read(IValueReader r)
{
var slot = r.ReadByte("Slot");
var type = r.ReadEnum<QuickBarItemType>("Type");
var value = r.ReadInt("Value");
return new QuickBarSlotValues(slot, type, value);
}
示例7: ReadPayload
public override void ReadPayload (ISerializationContext context, IValueReader reader)
{
GroupId = reader.ReadInt32();
Response = (InvitationResponse)reader.ReadByte();
}
示例8: Deserialize
public void Deserialize(ISerializationContext context, IValueReader reader)
{
Name = reader.ReadString();
Description = reader.ReadString();
Logo = reader.ReadString();
Passworded = reader.ReadBool();
RegistrationMode = (UserRegistrationMode)reader.ReadByte();
if (RegistrationMode != UserRegistrationMode.None)
RegistrationContent = reader.ReadString();
}
示例9: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
OriginalMessageId = reader.ReadUInt16();
Count = reader.ReadByte();
Payload = reader.ReadBytes();
}
示例10: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
SourceId = reader.ReadInt32 ();
Sequence = reader.ReadInt32();
byte frames = reader.ReadByte();
Data = new byte[frames][];
for (int i = 0; i < frames; ++i)
Data[i] = reader.ReadBytes();
}
示例11: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
this.SourceName = reader.ReadString ();
this.SourceResult = (SourceResult)reader.ReadByte ();
switch (this.SourceResult)
{
case Messages.SourceResult.NewSource:
case Messages.SourceResult.SourceRemoved:
case Messages.SourceResult.Succeeded:
this.Source = new AudioSource (context, reader);
break;
}
}
示例12: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
this.TargetType = (TargetType)reader.ReadByte();
ushort numTargets = reader.ReadUInt16();
int[] targets = new int[numTargets];
for (int i = 0; i < targets.Length; ++i)
targets[i] = reader.ReadInt32();
TargetIds = targets;
Sequence = reader.ReadInt32();
SourceId = reader.ReadInt32();
byte frames = reader.ReadByte();
Data = new byte[frames][];
for (int i = 0; i < frames; ++i)
Data[i] = reader.ReadBytes();
}
示例13: Deserialize
public void Deserialize(ISerializationContext context, IValueReader reader)
{
this.UserId = reader.ReadInt32();
this.ResultState = (LoginResultState)reader.ReadByte ();
}
示例14: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
this.Result = (ChannelChangeResult)reader.ReadByte ();
this.MoveInfo = new ChannelChangeInfo (context, reader);
}
示例15: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
Mode = (UserListMode) reader.ReadByte();
}