Esempio n. 1
0
        private async Task <CharacterCache> GetCharacterCacheCoreAsync(bool blnSync)
        {
            string strPath = FilePath;

            if (!string.IsNullOrEmpty(strPath))
            {
                CharacterCache objReturn = new CharacterCache();
                if (blnSync)
                {
                    // ReSharper disable once MethodHasAsyncOverload
                    objReturn.LoadFromFile(strPath);
                }
                else
                {
                    await objReturn.LoadFromFileAsync(strPath);
                }
                return(objReturn);
            }
            return(null);
        }