Skip to the content.

< Back


GenericClass<T>

Namespace: MyClassLib.SubNamespace

Generic class.

public class GenericClass<T> where T : new()

Type Parameters

T
The type param.

Inheritance ObjectGenericClass<T>
Attributes NullableContextAttribute, NullableAttribute

Constructors

GenericClass()

Initializes a new instance of the GenericClass<T> class.

public GenericClass()

GenericClass(T)

Initializes a new instance of the GenericClass<T> class.

public GenericClass(T param)

Parameters

param T
The generic parameter.

Methods

GetGenericInstance<TSource>()

Gets a new instance of generic param.

public TSource GetGenericInstance<TSource>() where TSource : new()

Type Parameters

TSource
The generic param.

Returns

TSource
The new instance.

GetGenericInstance<TSource>(TSource)

Gets a new instance of generic param.

public TSource GetGenericInstance<TSource>(TSource source) where TSource : new()

Type Parameters

TSource
The generic param.

Parameters

source TSource
The object source.

Returns

TSource
The new instance.

Map<TSource, TTarget>(TSource, TTarget)

Map object.

public TTarget Map<TSource, TTarget>(TSource source, TTarget target) where TTarget : new()

Type Parameters

TSource
The source type.

TTarget
The source target.

Parameters

source TSource
The object source.

target TTarget
The target

Returns

TTarget
The mapped object.

StoreOrdered<TKey, TValue>(TKey, TValue)

Stores a value indexed by a comparable, non-null key.

public void StoreOrdered<TKey, TValue>(TKey key, TValue value) where TKey : IComparable<TKey> where TValue : class, IDisposable

Type Parameters

TKey
A non-nullable comparable key.

TValue
A reference type implementing IDisposable.

Parameters

key TKey
The key.

value TValue
The value.

WriteRaw<TBlittable>(TBlittable)

Writes an unmanaged value to a sink.

public void WriteRaw<TBlittable>(TBlittable value) where TBlittable : unmanaged

Type Parameters

TBlittable
An unmanaged value type.

Parameters

value TBlittable
The unmanaged value.


< Back