Table of Contents

Add Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/ConvertibleConverterDictionary.cs

Add<T>(Func<T, byte[]>)

Adds a converter for the specified T.

public ConvertibleConverterDictionary Add<T>(Func<T, byte[]> converter) where T : IConvertible

Parameters

converter Func<T, byte[]>

The delegate that converts an instance of T to a byte array.

Returns

ConvertibleConverterDictionary

This instance so that additional converters can be configured.

Type Parameters

T

The type that implements IConvertible.

Exceptions

TypeArgumentOutOfRangeException

T does not implement IConvertible.

Add(Type, Func<IConvertible, byte[]>)

Adds a converter for the specified type.

public ConvertibleConverterDictionary Add(Type type, Func<IConvertible, byte[]> converter)

Parameters

type Type

The type that implements IConvertible.

converter Func<IConvertible, byte[]>

The delegate that converts an IConvertible instance to a byte array.

Returns

ConvertibleConverterDictionary

This instance so that additional converters can be configured.

Exceptions

ArgumentNullException

type is null.

ArgumentOutOfRangeException

type does not implement IConvertible.