Esempio n. 1
0
 public T Read(string path)
 {
     try
     {
         var bytes = File.ReadAllBytes(path);
         return(Parser.Parse(bytes));
     }
     catch (Exception e)
     {
         if (!ReadOption.HasFlag(FileReadOption.EmptyIfFailure))
         {
             // エラーにするなら素通し
             throw;
         }
         ChipstarLog.Log_CatchException(e);
         return(new T());
     }
 }
Esempio n. 2
0
 public void Dispose()
 {
     m_stopwatch.Stop();
     ChipstarLog.Log($"{m_tag} == {m_stopwatch.ElapsedMilliseconds * 0.001f} sec");
 }
Esempio n. 3
0
 private StopWatchScope(string tag)
 {
     m_tag = tag;
     m_stopwatch.Start();
     ChipstarLog.Log($"{m_tag} Start");
 }