本文整理汇总了C#中IValueReader.ReadBool方法的典型用法代码示例。如果您正苦于以下问题:C# IValueReader.ReadBool方法的具体用法?C# IValueReader.ReadBool怎么用?C# IValueReader.ReadBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueReader
的用法示例。
在下文中一共展示了IValueReader.ReadBool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadPayload
public override void ReadPayload (ISerializationContext context, IValueReader reader)
{
if (reader.ReadBool())
SenderId = reader.ReadString();
GroupId = reader.ReadInt32();
Text = reader.ReadString();
}
示例2: Deserialize
public void Deserialize(IValueReader reader)
{
this.NonCharacter = reader.ReadBool();
this.PlayerID = reader.ReadInt32 ();
int count = reader.ReadInt32 ();
for(int i = 0; i < count; i++)
this.path.Add ((Directions) reader.ReadInt32 ());
}
示例3: BodyInfo
/// <summary>
/// Initializes a new instance of the <see cref="BodyInfo"/> class.
/// </summary>
/// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param>
public BodyInfo(IValueReader reader)
{
ID = reader.ReadBodyID(_idValueKey);
Body = reader.ReadString(_bodyValueKey);
Fall = reader.ReadString(_fallValueKey);
Jump = reader.ReadString(_jumpValueKey);
Attack = reader.ReadString(_attackValueKey);
Stand = reader.ReadString(_standValueKey);
Walk = reader.ReadString(_walkValueKey);
Size = reader.ReadVector2(_sizeValueKey);
Paperdoll = reader.ReadBool(_paperdollValueKey);
}
示例4: Read
/// <summary>
/// Reads the values for this <see cref="NPCChatConditionalCollectionItemBase"/> from an <see cref="IValueReader"/>.
/// </summary>
/// <param name="reader"><see cref="IValueReader"/> to read the values from.</param>
/// <exception cref="ArgumentException">The read <see cref="NPCChatConditionalBase"/> was invalid.</exception>
protected void Read(IValueReader reader)
{
var not = reader.ReadBool("Not");
var conditionalName = reader.ReadString("ConditionalName");
var parameters = reader.ReadManyNodes("Parameters", NPCChatConditionalParameter.Read);
var conditional = NPCChatConditionalBase.GetConditional(conditionalName);
if (conditional == null)
{
const string errmsg = "Failed to get conditional `{0}`.";
throw new ArgumentException(string.Format(errmsg, conditionalName), "reader");
}
SetReadValues(conditional, not, parameters);
}
示例5: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
if (reader.ReadBool())
{
string[] algs = new string[reader.ReadInt32()];
for (int i = 0; i < algs.Length; ++i)
algs[i] = reader.ReadString();
SignatureHashAlgorithms = algs;
}
Protocol[] protocols = new Protocol[reader.ReadInt32()];
for (int i = 0; i < protocols.Length; ++i)
protocols[i] = new Protocol (context, reader);
Protocols = protocols;
}
示例6: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
this.IsActive = reader.ReadBool();
}
示例7: ReadCustomValues
/// <summary>
/// When overridden in the derived class, reads all custom state values from the <paramref name="reader"/>.
/// </summary>
/// <param name="reader">The <see cref="IValueReader"/> to read the state values from.</param>
protected override void ReadCustomValues(IValueReader reader)
{
Closed = reader.ReadBool(_closedKeyName);
Scale = reader.ReadFloat(_scaleKeyName);
Rotation = reader.ReadFloat(_rotationKeyName);
PolygonOrigin = reader.ReadEnum<PolygonOrigin>(_polygonOriginKeyName);
Points.Read(_pointsNodeName, reader);
}
示例8: 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 virtual void ReadState(IValueReader reader)
{
Multiline = reader.ReadBool(_multilineValueKey);
Text = reader.ReadString(_textValueKey);
PersistableHelper.Read(this, reader);
}
示例9: 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)
{
PositionProvider = null;
Tag = null;
Position = reader.ReadVector2(_positionValueKey);
Size = reader.ReadVector2(_sizeValueKey);
Color = reader.ReadColor(_colorValueKey);
Rotation = reader.ReadFloat(_rotationValueKey);
IsEnabled = reader.ReadBool(_isEnabledValueKey);
var grhIndex = reader.ReadGrhIndex(_spriteValueKey);
if (!grhIndex.IsInvalid)
Sprite = new Grh(grhIndex, AnimType.Loop, 0);
else
Sprite = null;
}
示例10: Read
/// <summary>
/// Reads the SkeletonNode's values from an IValueReader.
/// </summary>
/// <param name="reader">IValueReader to read the values from.</param>
/// <returns>The name of the parent SkeletonNode, or null if the SkeletonNode has no parent (root node).
/// The SkeletonNode's parent must be set manually using this value.</returns>
public string Read(IValueReader reader)
{
Name = reader.ReadString(_nameValueKey);
Position = reader.ReadVector2(_positionValueKey);
IsModifier = reader.ReadBool(_isModifierValueKey);
var hasParent = reader.ReadBool(_hasParentValueKey);
string parentName = null;
if (hasParent)
parentName = reader.ReadString(_parentNameValueKey);
return parentName;
}
示例11: 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();
}
示例12: ReadPayload
public override void ReadPayload(ISerializationContext context, IValueReader reader)
{
Removing = reader.ReadBool();
BanInfo = new BanInfo (context, reader);
}
示例13: ReadCustomValues
/// <summary>
/// Reads the <see cref="ParticleModifier"/>'s custom values from the <see cref="reader"/>.
/// </summary>
/// <param name="reader"><see cref="IValueReader"/> to read the custom values from.</param>
protected override void ReadCustomValues(IValueReader reader)
{
ModifyRed = reader.ReadBool(_modifyRedKeyName);
ModifyGreen = reader.ReadBool(_modifyGreenKeyName);
ModifyBlue = reader.ReadBool(_modifyBlueKeyName);
ModifyAlpha = reader.ReadBool(_modifyAlphaKeyName);
ReleaseColor = reader.ReadColor(_releaseColorKeyName);
UltimateColor = reader.ReadColor(_ultimateColorKeyName);
}
示例14: 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();
}
示例15: Read
void Read(IValueReader r)
{
var position = r.ReadVector2(_positionValueKey);
var size = r.ReadVector2(_sizeValueKey);
IsPlatform = r.ReadBool(_isPlatformValueKey);
BoundGrhIndex = r.ReadGrhIndex(_boundGrhIndexValueKey);
SetPositionRaw(position);
SetSizeRaw(size);
}