Table of Contents
API reference

Method TryDecompose

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

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.

public bool TryDecompose(object obj, Type tobj, out object? decomposed, out Type tdecomposed)

Parameters

obj object

Object to decompose.

tobj Type

Type to decompose.

decomposed object

Decomposition result.

tdecomposed Type

Type of the result.

Returns

bool

Whether the operation was successful.