本文整理汇总了C#中Blamite.Serialization.StructureValueCollection.SetRaw方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.SetRaw方法的具体用法?C# StructureValueCollection.SetRaw怎么用?C# StructureValueCollection.SetRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Serialization.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.SetRaw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public StructureValueCollection Serialize()
{
var result = new StructureValueCollection();
result.SetInteger("string count", (uint) StringCount);
result.SetInteger("locale table size", LocaleData != null ? (uint) LocaleData.Size : 0);
if (LocaleIndexTableLocation != null)
result.SetInteger("locale index table offset", LocaleIndexTableLocation.AsPointer());
if (LocaleDataLocation != null)
result.SetInteger("locale data index offset", LocaleDataLocation.AsPointer());
if (IndexTableHash != null)
result.SetRaw("index table hash", IndexTableHash);
if (StringDataHash != null)
result.SetRaw("string data hash", StringDataHash);
return result;
}
示例2: SerializePage
private StructureValueCollection SerializePage(ResourcePage page, FourthGenCacheFileReference[] externalFiles)
{
var result = new StructureValueCollection();
result.SetInteger("salt", page.Salt);
result.SetInteger("flags", page.Flags);
result.SetInteger("compression codec index",
(page.CompressionMethod != ResourcePageCompression.None) ? 0 : 0xFFFFFFFF);
result.SetInteger("shared cache file index",
(page.FilePath != null) ? (uint) FindExternalFile(externalFiles, page.FilePath) : 0xFFFFFFFF);
result.SetInteger("unknown 1", (uint) page.Unknown1);
result.SetInteger("compressed block offset", (uint) page.Offset);
result.SetInteger("compressed block size", (uint) page.CompressedSize);
result.SetInteger("uncompressed block size", (uint) page.UncompressedSize);
result.SetInteger("checksum", page.Checksum);
result.SetRaw("hash 1", page.Hash1);
result.SetRaw("hash 2", page.Hash2);
result.SetRaw("hash 3", page.Hash3);
result.SetInteger("unknown 2", (uint) page.Unknown2);
result.SetInteger("unknown 3", (uint) page.Unknown3);
return result;
}