Alexandria.Engines.DarkSouls.Archive.FindRecordByPath C# (CSharp) Method

FindRecordByPath() public method

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.
return 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