Table of Contents
API reference

Interface IDecomposer

Namespace
DisCatSharp.Common.Serialization
Assembly
DisCatSharp.Common.dll

Provides an interface to decompose an object into another object or combination of objects.

public interface IDecomposer
Extension Methods

Methods

CanDecompose(Type)

Checks whether the decomposer can decompose a specific type.

CanRecompose(Type)

Checks whether the decomposer can recompose a specific decomposed type.

Note that while a type might be considered recomposable, other factors might prevent recomposing operation from being successful.

TryDecompose(object, Type, out object?, out Type)

Attempts to decompose a given object of specified source type. The operation produces the decomposed object and the type it got decomposed into.

TryRecompose(object, Type, Type, out object?)

Attempts to recompose given object of specified source type, into specified target type. The operation produces the recomposed object.