本文整理汇总了C#中Blamite.Flexibility.StructureValueCollection.FindInteger方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.FindInteger方法的具体用法?C# StructureValueCollection.FindInteger怎么用?C# StructureValueCollection.FindInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Flexibility.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.FindInteger方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateMetaOffset
private int CalculateMetaOffset(StructureValueCollection values)
{
if (values.HasInteger("raw table offset") && values.HasInteger("raw table size"))
{
// Load raw table info
int rawTableSize = (int)values.GetInteger("raw table size");
int rawTableOffset = (int)values.GetInteger("raw table offset");
// There are two ways to get the meta offset:
// 1. Raw table offset + raw table size
// 2. If raw table offset is zero, then the meta offset is directly stored in the header
// (The raw table offset can still be calculated in this case, but can't be used to find the meta the traditional way)
if (rawTableOffset != 0)
return rawTableOffset + rawTableSize;
}
uint offset;
if (!values.FindInteger("meta offset", out offset))
throw new ArgumentException("The XML layout file is missing information on how to find the meta offset.");
return (int)offset;
}