本文整理汇总了C#中IValueReader.ReadLong方法的典型用法代码示例。如果您正苦于以下问题:C# IValueReader.ReadLong方法的具体用法?C# IValueReader.ReadLong怎么用?C# IValueReader.ReadLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueReader
的用法示例。
在下文中一共展示了IValueReader.ReadLong方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
/// <summary>
/// Reads the values from an <see cref="IValueReader"/>.
/// </summary>
/// <param name="r">The <see cref="IValueReader"/> to read the values from.</param>
void Read(IValueReader r)
{
var hashString = r.ReadString(_hashValueKey);
_hash = StringToHash(hashString);
_fileName = r.ReadString(_fileNameValueKey);
var lastUsedRaw = r.ReadLong(_lastUsedValueKey);
_lastUsed = DateTime.FromFileTimeUtc(lastUsedRaw);
}
示例2: Read
/// <summary>
/// Reads a <see cref = "KeyValuePair{T,U}" /> from an <see cref = "IValueReader" />.
/// </summary>
/// <param name = "r">The <see cref = "IValueReader" /> to read from.</param>
/// <returns>The read <see cref = "KeyValuePair{T,U}" />.</returns>
static KeyValuePair<string, HashInfo> Read(IValueReader r)
{
var key = r.ReadString(_textureNameValueKey);
var hash = r.ReadString(_hashValueKey);
var fileSize = r.ReadInt(_fileSizeValueKey);
var lastModified = r.ReadLong(_lastModifiedValueKey);
var hashInfo = new HashInfo(hash, fileSize, lastModified);
return new KeyValuePair<string, HashInfo>(key, hashInfo);
}