Class TorrentInfo
- Namespace
- H.Extensions.Torrent
- Assembly
- H.Extensions.Torrent.dll
public class TorrentInfo
- Inheritance
-
TorrentInfo
- Inherited Members
- Extension Methods
Constructors
TorrentInfo(string, Sha1Hash, IEnumerable<TorrentFile>, IEnumerable<Piece>, IEnumerable<IEnumerable<Uri>>, IReadOnlyList<byte>)
public TorrentInfo(string name, Sha1Hash infoHash, IEnumerable<TorrentFile> files, IEnumerable<Piece> pieces, IEnumerable<IEnumerable<Uri>> trackers, IReadOnlyList<byte> metadata)
Parameters
namestringinfoHashSha1HashfilesIEnumerable<TorrentFile>piecesIEnumerable<Piece>trackersIEnumerable<IEnumerable<Uri>>metadataIReadOnlyList<byte>
Properties
Files
public List<TorrentFile> Files { get; }
Property Value
InfoHash
public Sha1Hash InfoHash { get; }
Property Value
Metadata
public IReadOnlyList<byte> Metadata { get; }
Property Value
Name
public string Name { get; }
Property Value
PieceSize
public int PieceSize { get; }
Property Value
Pieces
public IReadOnlyList<Piece> Pieces { get; }
Property Value
TotalSize
public long TotalSize { get; }
Property Value
Trackers
public IReadOnlyList<IReadOnlyList<Uri>> Trackers { get; }
Property Value
Methods
FileIndex(long)
public int FileIndex(long offset)
Parameters
offsetlong
Returns
FileIndex(long, out long)
public int FileIndex(long offset, out long remainder)
Parameters
Returns
FileOffset(int)
public long FileOffset(int fileIndex)
Parameters
fileIndexint
Returns
PieceOffset(Piece)
public long PieceOffset(Piece piece)
Parameters
piecePiece