Beispiel #1
0
 public static bool TryParse(byte[] bytes, out TorrentParser torrentParser)
 {
     try
     {
         torrentParser = new TorrentParser(bytes);
         return(true);
     }
     catch (Exception)
     {
         torrentParser = null;
         return(false);
     }
 }
Beispiel #2
0
 public static bool TryParse(string path, out TorrentParser torrentParser)
 {
     try
     {
         torrentParser = new TorrentParser(File.ReadAllBytes(path));
         return(true);
     }
     catch (Exception)
     {
         torrentParser = null;
         return(false);
     }
 }