本文整理汇总了C#中Blamite.Flexibility.StructureValueCollection.GetArray方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.GetArray方法的具体用法?C# StructureValueCollection.GetArray怎么用?C# StructureValueCollection.GetArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Flexibility.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.GetArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadLanguages
private List<ThirdGenLanguage> LoadLanguages(StructureValueCollection values, FileSegmenter segmenter, BuildInformation buildInfo)
{
StructureValueCollection[] languageSet = values.GetArray("languages");
var result = from language in languageSet
select new ThirdGenLanguage(language, segmenter, LocaleArea, buildInfo);
return result.ToList<ThirdGenLanguage>();
}
示例2: LoadLanguages
private List<ThirdGenLanguage> LoadLanguages(StructureValueCollection values, FileSegmenter segmenter,
EngineDescription buildInfo)
{
StructureValueCollection[] languageSet = values.GetArray("languages");
IEnumerable<ThirdGenLanguage> result =
languageSet.Select((l, i) => new ThirdGenLanguage((GameLanguage) i, l, segmenter, LocaleArea, buildInfo));
return result.ToList();
}
示例3: Load
/// <summary>
/// Loads data from a StructureValueCollection containing data read from a unic tag.
/// </summary>
/// <param name="values">The StructureValueCollection to retrieve values from.</param>
private void Load(StructureValueCollection values)
{
// Load ranges
StructureValueCollection[] rangeValues = values.GetArray("language ranges");
Ranges = new LocaleRange[rangeValues.Length];
for (int i = 0; i < rangeValues.Length; i++)
{
int startIndex = (int)rangeValues[i].GetInteger("range start index");
int size = (int)rangeValues[i].GetInteger("range size");
Ranges[i] = new LocaleRange(startIndex, size);
}
}
示例4: LoadInteropData
private void LoadInteropData(StructureValueCollection headerValues)
{
// TODO: fix this shit for the h3beta
SectionOffsetMasks = headerValues.GetArray("offset masks").Select(v => v.GetInteger("mask")).ToArray();
Sections = headerValues.GetArray("sections").Select(v => new ThirdGenInteropSection(v)).ToArray();
DebugPointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Debug);
ResourcePointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Resource);
TagBufferPointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Tag);
LocalePointerConverter = MakePointerConverter(ThirdGenInteropSectionType.Localization);
}
示例5: Load
private void Load(StructureValueCollection values, FileSegmenter segmenter)
{
segmenter.DefineSegment(0, HeaderSize, 1, SegmentResizeOrigin.Beginning); // Define a segment for the header
_eofSegment = segmenter.WrapEOF((int) values.GetInteger("file size"));
LoadInteropData(values);
RawTable = CalculateRawTableSegment(segmenter);
Type = (CacheFileType) values.GetInteger("type");
InternalName = values.GetString("internal name");
ScenarioName = values.GetString("scenario name");
XDKVersion = (int) values.GetInteger("xdk version");
FileSegment metaSegment = CalculateTagDataSegment(values, segmenter);
if (metaSegment != null)
{
uint virtualBase = values.GetInteger("virtual base address");
MetaArea = new FileSegmentGroup(new MetaAddressConverter(metaSegment, virtualBase));
MetaArea.AddSegment(metaSegment);
IndexHeaderLocation = SegmentPointer.FromPointer(values.GetInteger("index header address"), MetaArea);
Partitions = LoadPartitions(values.GetArray("partitions"));
}
else
{
Partitions = new Partition[0];
}
CalculateStringGroup(values, segmenter);
}