public bool?GetBool(StringWithHash name, int i) { var value = GetValue(name, i); if (!value.HasValue) { return(null); } return(BitConverter.ToBoolean(value.Value.Bytes, 0)); }
public int?GetCount(StringWithHash name) { var label = GetLabel(name); if (label == null) { return(null); } return(label.ArrayCount); }
public string GetString(StringWithHash name, int i) { var value = GetValue(name, i); if (!value.HasValue) { return(null); } return(Encoding.Unicode.GetString(value.Value.Bytes)); }
public int?GetInt(StringWithHash name, int i) { var value = GetValue(name, i); if (!value.HasValue) { return(null); } return(BitConverter.ToInt32(value.Value.Bytes, 0)); }
public float?GetFloat(StringWithHash name, int i) { var value = GetValue(name, i); if (!value.HasValue) { return(null); } return(BitConverter.ToSingle(value.Value.Bytes, 0)); }
public int?GetCount(StringWithHash name) { var tag = GetTag(name); if (tag == null) { return(null); } return(tag.ArrayCount); }
private Label GetLabel(StringWithHash name) { Label key = new Label { Name = name }; var labelIndex = labels.BinarySearch(key); if (labelIndex < 0) { return(null); } return(labels[labelIndex]); }
private Tag GetTag(StringWithHash name) { Tag key = new Tag { Name = name }; var tagIndex = tags.BinarySearch(key); if (tagIndex < 0) { return(null); } return(tags[tagIndex]); }
public Entry GetEntry(StringWithHash name, int i) { var label = GetLabel(name); if (label == null) { return(null); } if (i >= label.ArrayCount) { return(null); } return(entries[label.Offset + i]); }
private Value?GetValue(StringWithHash name, int i) { var tag = GetTag(name); if (tag == null) { return(null); } if (i >= tag.ArrayCount) { return(null); } return(values[tag.Offset + i]); }
public Table GetTable(StringWithHash name) { Label key = new Label { Name = name }; var labelIndex = labels.BinarySearch(key); if (labelIndex < 0) { return(null); } var label = labels[labelIndex]; return(tables[label.Offset]); }
public Entry GetEntry(StringWithHash name) => GetEntry(name, 0);
public string GetString(StringWithHash name) => GetString(name, 0);
public bool?GetBool(StringWithHash name) => GetBool(name, 0);
public float?GetFloat(StringWithHash name) => GetFloat(name, 0);
public int?GetInt(StringWithHash name) => GetInt(name, 0);