Show / Hide Table of Contents

Class PBFExtensions

Contains helper/extension methods to help with PBF encoding/decoding.

Inheritance
System.Object
PBFExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public static class PBFExtensions

Fields

EpochTicks

Ticks since 1/1/1970

Declaration
public static long EpochTicks
Field Value
System.Int64

Methods

FromUnixTime(Int64)

Converts a number of milliseconds from 1/1/1970 into a standard DateTime.

Declaration
public static DateTime FromUnixTime(this long milliseconds)
Parameters
System.Int64 milliseconds

Returns
System.DateTime

GetString(Encoding, Byte[])

Decodes a sequence of bytes from the specified byte array into a string.

Declaration
public static string GetString(this Encoding encoding, byte[] bytes)
Parameters
Encoding encoding

System.Byte[] bytes

Returns
System.String

ToUnixTime(DateTime)

Converts a standard DateTime into the number of milliseconds since 1/1/1970.

Declaration
public static long ToUnixTime(this DateTime date)
Parameters
System.DateTime date

Returns
System.Int64

Back to top Built by Itinero, MIT licensed.