Alexandria.Engines.Unreal.Package.ReadNameIndex C# (CSharp) Метод

ReadNameIndex() публичный Метод

Read a Name reference from the BinaryReader.
public ReadNameIndex ( BinaryReader reader ) : Name
reader System.IO.BinaryReader The to read from.
Результат Name
        public Name ReadNameIndex(BinaryReader reader)
        {
            int index = UIndex.Read(reader);
            return Names[index];
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Load an <see cref="AttributeDictionary"/> from the <see cref="Package"/> and the <see cref="BinaryReader"/>.
        /// </summary>
        /// <param name="package">The <see cref="Package"/> the dictionary is in.</param>
        /// <param name="reader">The <see cref="BinaryReader"/> that holds the dictionary's data.</param>
        /// <returns>The <see cref="AttributeDictionary"/> or <c>null</c> if there was no entries.</returns>
        public static AttributeDictionary Load(Package package, BinaryReader reader)
        {
            AttributeDictionary result = null;

            while (true)
            {
                var name = package.ReadNameIndex(reader).Value;
                if (name == "None")
                {
                    break;
                }
                if (result == null)
                {
                    result = new AttributeDictionary();
                }
                object current;
                result.TryGetValue(name, out current);
                result[name] = Field.Load(package, reader, current);
            }

            return(result);
        }
All Usage Examples Of Alexandria.Engines.Unreal.Package::ReadNameIndex