本文整理汇总了C#中Blamite.Flexibility.StructureValueCollection.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# StructureValueCollection.GetString方法的具体用法?C# StructureValueCollection.GetString怎么用?C# StructureValueCollection.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blamite.Flexibility.StructureValueCollection
的用法示例。
在下文中一共展示了StructureValueCollection.GetString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ThirdGenGlobal
public ThirdGenGlobal(StructureValueCollection values, ExpressionTable allExpressions)
{
Name = values.GetString("name");
Type = (short)values.GetInteger("type");
DatumIndex valueIndex = new DatumIndex(values.GetInteger("expression index"));
if (valueIndex.IsValid)
Value = allExpressions.FindExpression(valueIndex);
}
示例2: Load
private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, StringIDSource stringIDs, BuildInformation buildInfo)
{
Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name");
ExecutionType = (short)values.GetInteger("execution type");
ReturnType = (short)values.GetInteger("return type");
RootExpressionIndex = new DatumIndex(values.GetInteger("first expression index"));
if (Name == null)
Name = "script_" + RootExpressionIndex.Value.ToString("X8");
Parameters = LoadParameters(reader, values, metaArea, buildInfo);
}
示例3: GetObjectName
private string GetObjectName(StructureValueCollection values, StringIDSource stringIDs)
{
if (values.HasString("name"))
{
return values.GetString("name");
}
if (values.HasInteger("name stringid"))
{
var sid = new StringID(values.GetInteger("name stringid"));
return stringIDs.GetString(sid);
}
throw new InvalidOperationException("Unable to determine the name of objects in the \"" + _layoutName + "\" layout");
}
示例4: 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);
}
示例5: Load
private void Load(StructureValueCollection values, FileSegmenter segmenter)
{
_eofSegment = segmenter.WrapEOF((int) values.GetInteger("file size"));
var metaOffset = (int) values.GetInteger("meta offset");
var metaSize = (int) values.GetInteger("meta size");
uint metaOffsetMask = values.GetInteger("meta offset mask");
var metaSegment = new FileSegment(
segmenter.DefineSegment(metaOffset, metaSize, 0x200, SegmentResizeOrigin.Beginning), segmenter);
MetaArea = new FileSegmentGroup(new MetaOffsetConverter(metaSegment, metaOffsetMask));
IndexHeaderLocation = MetaArea.AddSegment(metaSegment);
Type = (CacheFileType) values.GetInteger("type");
var headerGroup = new FileSegmentGroup();
headerGroup.AddSegment(segmenter.WrapSegment(0, HeaderSize, 1, SegmentResizeOrigin.None));
StringIDCount = (int) values.GetInteger("string table count");
var sidDataSize = (int) values.GetInteger("string table size");
StringIDData = segmenter.WrapSegment((int) values.GetInteger("string table offset"), sidDataSize, 1,
SegmentResizeOrigin.End);
StringIDIndexTable = segmenter.WrapSegment((int) values.GetInteger("string index table offset"), StringIDCount*4, 4,
SegmentResizeOrigin.End);
FileNameCount = (int) values.GetInteger("file table count");
var fileDataSize = (int) values.GetInteger("file table size");
FileNameData = segmenter.WrapSegment((int) values.GetInteger("file table offset"), fileDataSize, 1,
SegmentResizeOrigin.End);
FileNameIndexTable = segmenter.WrapSegment((int) values.GetInteger("file index table offset"), FileNameCount*4, 4,
SegmentResizeOrigin.End);
InternalName = values.GetString("internal name");
ScenarioName = values.GetString("scenario name");
StringArea = new FileSegmentGroup();
StringArea.AddSegment(segmenter.WrapSegment((int) values.GetInteger("string block offset"), StringIDCount*0x80, 0x80,
SegmentResizeOrigin.End));
StringArea.AddSegment(StringIDIndexTable);
StringArea.AddSegment(StringIDData);
StringArea.AddSegment(FileNameIndexTable);
StringArea.AddSegment(FileNameData);
StringIDIndexTableLocation = SegmentPointer.FromOffset(StringIDIndexTable.Offset, StringArea);
StringIDDataLocation = SegmentPointer.FromOffset(StringIDData.Offset, StringArea);
FileNameIndexTableLocation = SegmentPointer.FromOffset(FileNameIndexTable.Offset, StringArea);
FileNameDataLocation = SegmentPointer.FromOffset(FileNameData.Offset, StringArea);
LocaleArea = new FileSegmentGroup();
var rawTableOffset = (int) values.GetInteger("raw table offset");
var rawTableSize = (int) values.GetInteger("raw table size");
RawTable = segmenter.WrapSegment(rawTableOffset, rawTableSize, 1, SegmentResizeOrigin.End);
Checksum = values.GetInteger("checksum");
// Set up a bogus partition table
Partitions = new Partition[1];
Partitions[0] = new Partition(SegmentPointer.FromOffset(MetaArea.Offset, MetaArea), (uint) MetaArea.Size);
}
示例6: Load
private void Load(StructureValueCollection values)
{
Path = values.GetString("map path");
}
示例7: Load
private void Load(StructureValueCollection values)
{
Name = values.GetString("name");
Type = (short)values.GetInteger("type");
}
示例8: ThirdGenGlobalObject
public ThirdGenGlobalObject(StructureValueCollection values, StringIDSource stringIDs)
{
Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name");
Class = (short)values.GetInteger("type");
PlacementIndex = (short)values.GetInteger("placement index");
}
示例9: Load
private void Load(StructureValueCollection values)
{
Name = values.GetString("name");
Type = (short) values.GetInteger("type");
ExpressionIndex = new DatumIndex(values.GetInteger("expression index"));
}