public NameRecord(PlatformIDs platform, ushort languageId, KnownNameIds nameId, string value)
 {
     this.Platform   = platform;
     this.LanguageID = languageId;
     this.NameID     = nameId;
     this.value      = value;
 }
        public static NameRecord Read(BigEndianBinaryReader reader)
        {
            PlatformIDs  platform   = reader.ReadUInt16 <PlatformIDs>();
            EncodingIDs  encodingId = reader.ReadUInt16 <EncodingIDs>();
            Encoding     encoding   = encodingId.AsEncoding();
            ushort       languageID = reader.ReadUInt16();
            KnownNameIds nameID     = reader.ReadUInt16 <KnownNameIds>();

            var stringReader = StringLoader.Create(reader, encoding);

            return(new NameRecord(platform, languageID, nameID, string.Empty)
            {
                StringReader = stringReader
            });
        }
示例#3
0
 /// <summary>
 /// Gets the name matching the given culture and id.
 /// If <see cref="CultureInfo.InvariantCulture"/> is passed this method will return the first name matching the id.
 /// </summary>
 /// <param name="culture">The culture to load metadata in.</param>
 /// <param name="nameId">The name id to match.</param>
 /// <returns>The <see cref="string"/> name.</returns>
 public string GetNameById(CultureInfo culture, KnownNameIds nameId) => this.nameTable.GetNameById(culture, nameId);