SystemUtilGeneric

Description

static class Tinman.Core.System.SystemUtilGeneric<T>

Generic helper class of this namespace.

Public / Methods

Dispose


[Dispose]
public static method Dispose → (1)

obj in : T own

The object to dispose or null.

Disposes the given object iff it implements IDisposable.

Enum​To​Int


[Pure]
public static method EnumToInt → (1)

enumItem in : T

The enum item.

returns → int64

The ordinal value.

Converts the given enum item to its ordinal value.

Equals​Default


[Pure]
public static method EqualsDefault → (2)

in : T

First value.

in : T

Second value.

returns → bool

true if both values are equal, false if not.

Compares the given values.

Hash​Code​Default


[Pure]
public static method HashCodeDefault → (1)

in : T

The value.

returns → int32

The hash code.

Computes a hash code for the given value.

Int​To​Enum


[Pure]
public static method IntToEnum → (1)

value in : int64

The ordinal value.

returns → T

The enum item.

Returns the enum item for the given ordinal value.

Memory​Consumption​Of

3 overloads


[Pure]
public static method MemoryConsumptionOf1 → (2)

things in : T [ ]

The things.

bytesPerElement in : int32

Memory consumption of each element in things in, in bytes.

returns → int64

The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given things.


[Pure]
public static method MemoryConsumptionOf2 → (1)

things in : T [ ]

The things (assumed to be IMemoryConsumption objects).

returns → int64

The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given array of things.


[Pure]
public static method MemoryConsumptionOf3 → (1)

things in : IEnumerable<T>

The things (assumed to be IMemoryConsumption objects).

returns → int64

The estimated memory consumption, in bytes.

Returns the estimated memory consumption of the given array of things.