Show / Hide Table of Contents

Class MagnetLink

Inheritance
System.Object
MagnetLink
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: MonoTorrent
Assembly: MonoTorrent.dll
Syntax
public class MagnetLink

Constructors

MagnetLink(InfoHash, String, IList<String>, IEnumerable<String>, Nullable<Int64>)

Declaration
public MagnetLink(InfoHash infoHash, string name = null, IList<string> announceUrls = null, IEnumerable<string> webSeeds = null, long? size = default(long? ))
Parameters
Type Name Description
InfoHash infoHash
System.String name
System.Collections.Generic.IList<System.String> announceUrls
System.Collections.Generic.IEnumerable<System.String> webSeeds
System.Nullable<System.Int64> size

Properties

AnnounceUrls

The list of tracker Urls.

Declaration
public IList<string> AnnounceUrls { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

InfoHash

The infohash of the torrent.

Declaration
public InfoHash InfoHash { get; }
Property Value
Type Description
InfoHash

Name

The display name of the torrent, if available.

Declaration
public string Name { get; }
Property Value
Type Description
System.String

Size

The size in bytes of the data, if available.

Declaration
public long? Size { get; }
Property Value
Type Description
System.Nullable<System.Int64>

Webseeds

The list of webseed Urls.

Declaration
public IList<string> Webseeds { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>

Methods

FromUri(Uri)

Parses a magnet link from the given Uri. The uri should be in the form magnet:?xt=urn:btih:

Declaration
public static MagnetLink FromUri(Uri uri)
Parameters
Type Name Description
System.Uri uri
Returns
Type Description
MagnetLink

Parse(String)

Parses a magnet link from the given string. The uri should be in the form magnet:?xt=urn:btih:

Declaration
public static MagnetLink Parse(string uri)
Parameters
Type Name Description
System.String uri
Returns
Type Description
MagnetLink

ToV1String()

Declaration
public string ToV1String()
Returns
Type Description
System.String

ToV1Uri()

Declaration
public Uri ToV1Uri()
Returns
Type Description
System.Uri

TryParse(String, out MagnetLink)

Returns true if a bitorrent magnet link was successfully parsed from the given string. Otherwise return false.

Declaration
public static bool TryParse(string uri, out MagnetLink magnetLink)
Parameters
Type Name Description
System.String uri
MagnetLink magnetLink
Returns
Type Description
System.Boolean
In This Article
Back to top Generated by DocFX