Alexandria.Engines.DarkSouls.Archive.FindRecordByPath C# (CSharp) Метод

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

Find an ArchiveRecord by its path, or return null if not found.
public FindRecordByPath ( string path ) : ArchiveRecord
path string The path of the to search for.
Результат ArchiveRecord
        public ArchiveRecord FindRecordByPath(string path)
        {
            return RecordsByPath.TryGetValue(path);
        }

Usage Example

Пример #1
0
        /// <summary>Get the item language archive, which contains the <see cref="ItemArchiveId"/> <see cref="StringArchive"/>s.</summary>
        /// <param name="baseArchive"></param>
        /// <param name="language"></param>
        /// <returns></returns>
        public static Archive GetItemLanguageArchive(Archive baseArchive, Language language = Language.English)
        {
            string        path   = string.Format(LanguageItemArchivePath, GetLanguageId(language));
            ArchiveRecord record = baseArchive.FindRecordByPath(path);

            if (record == null)
            {
                return(null);
            }
            Asset contents = record.Contents;

            return(contents as Archive);
        }
All Usage Examples Of Alexandria.Engines.DarkSouls.Archive::FindRecordByPath