Beispiel #1
0
 public override bool ReadBinaryDecode(string path, Action <BinaryReader> callbackRead)
 {
     try
     {
         if (!this.Exists(path))
         {
             return(false);
         }
         using (MemoryStream stream = new MemoryStream(FileIOManagerBase.CustomDecode(this.CryptKeyBytes, this.FileReadAllBytes(path))))
         {
             using (BinaryReader reader = new BinaryReader(stream))
             {
                 callbackRead(reader);
             }
         }
         return(true);
     }
     catch (Exception exception)
     {
         object[] args = new object[] { path, exception.ToString() };
         Debug.LogError(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.FileRead, args));
         return(false);
     }
 }
Beispiel #2
0
 public override byte[] Decode(byte[] bytes)
 {
     return(FileIOManagerBase.CustomDecode(this.CryptKeyBytes, bytes));
 }