Show / Hide Table of Contents

Class BEncodedNumber

Class representing a BEncoded number

Inheritance
System.Object
BEncodedValue
BEncodedNumber
Implements
System.IComparable<BEncodedNumber>
Inherited Members
BEncodedValue.Encode()
BEncodedValue.Clone<T>(T)
BEncodedValue.Decode(Byte[])
BEncodedValue.Decode(Byte[], Int32, Int32)
BEncodedValue.Decode(Byte[], Int32, Int32, Boolean)
BEncodedValue.Decode(Stream)
BEncodedValue.Decode(RawReader)
BEncodedValue.Decode<T>(Byte[])
BEncodedValue.Decode<T>(Byte[], Int32, Int32)
BEncodedValue.Decode<T>(Byte[], Int32, Int32, Boolean)
BEncodedValue.Decode<T>(Stream)
BEncodedValue.Decode<T>(RawReader)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: MonoTorrent.BEncoding
Assembly: MonoTorrent.dll
Syntax
public class BEncodedNumber : BEncodedValue, IComparable<BEncodedNumber>

Constructors

BEncodedNumber()

Declaration
public BEncodedNumber()

BEncodedNumber(Int64)

Create a new BEncoded number with the given value

Declaration
public BEncodedNumber(long value)
Parameters
Type Name Description
System.Int64 value

The value of the BEncodedNumber

Properties

Number

The value of the BEncodedNumber

Declaration
public long Number { get; set; }
Property Value
Type Description
System.Int64

Methods

CompareTo(BEncodedNumber)

Declaration
public int CompareTo(BEncodedNumber other)
Parameters
Type Name Description
BEncodedNumber other
Returns
Type Description
System.Int32

CompareTo(Int64)

Declaration
public int CompareTo(long other)
Parameters
Type Name Description
System.Int64 other
Returns
Type Description
System.Int32

CompareTo(Object)

Declaration
public int CompareTo(object other)
Parameters
Type Name Description
System.Object other
Returns
Type Description
System.Int32

Encode(Byte[], Int32)

Encodes this number to the supplied byte[] starting at the supplied offset

Declaration
public override int Encode(byte[] buffer, int offset)
Parameters
Type Name Description
System.Byte[] buffer

The buffer to write the data to

System.Int32 offset

The offset to start writing the data at

Returns
Type Description
System.Int32
Overrides
BEncodedValue.Encode(Byte[], Int32)

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

LengthInBytes()

Returns the length of the encoded string in bytes

Declaration
public override int LengthInBytes()
Returns
Type Description
System.Int32
Overrides
BEncodedValue.LengthInBytes()

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Operators

Implicit(Int64 to BEncodedNumber)

Declaration
public static implicit operator BEncodedNumber(long value)
Parameters
Type Name Description
System.Int64 value
Returns
Type Description
BEncodedNumber

Implements

System.IComparable<T>
In This Article
Back to top Generated by DocFX