src/MonoTorrent.Client/MonoTorrent/Torrent.cs
/// <summary>
/// Loads a .torrent from the supplied stream. A return value indicates
/// whether the operation was successful.
/// </summary>
/// <param name="stream">The stream containing the data to load</param>
/// <param name="torrent">If the loading was succesful it is assigned the Torrent</param>
/// <returns>True if successful</returns>
Loads a .torrent from the supplied stream. A return value indicates
whether the operation was successful.
Loads a . torrent from the supplied stream . A return value indicates whether the operation was successful .
public static bool TryLoad (Stream stream, out Torrent torrent)
        {
            Check.Stream (stream);
            try {
                torrent = Load (stream);
            } catch {
                torrent = null;
            }
            return torrent != null;
        }
public static bool TryLoad ( Stream stream , out Torrent torrent ) { Check . Stream ( stream ) ; try { torrent = Load ( stream ) ; } catch { torrent = null ; } return torrent != null ; }
Loads a .torrent from the supplied stream.
Loads a . torrent from the supplied stream .
True if successful
True if successful
stream
Stream
The stream containing the data to load
The stream containing the data to load
Torrent
out
torrent
If the loading was succesful it is assigned the Torrent
If the loading was succesful it is assigned the Torrent