Open sandboxFocus

Method TryGet

TryGet(Type, out IFormatter?)

Attempts to get the IFormatter for the specified Type.

Declaration
public bool TryGet(Type objectType, out IFormatter? formatter)
Parameters
Type Name Description
Type objectType

Object type.

IFormatter formatter

The formatter for objects of the specified type, or null if the repository is unable to provide a formatter for the specified type.

Returns
Type Description
bool

true if the repository was able to provide a formatter for the specified type; otherwise, false.

Implements