Oracle® Coherence .NET API Reference Release 3.7.1
E22844-03

Validate that the supplied object is compatible with the specified type.

Namespace:  Tangosol.IO.Pof.Reflection
Assembly:  Coherence (in Coherence.dll) Version: 3.7.1.23 (3.7.1.23)

Syntax

C#
public static Object EnsureType(
	Object o,
	int typeId,
	IPofContext ctx
)

Parameters

o
Type: System..::.Object
The object.
typeId
Type: System..::.Int32
The Pof type identifier; includes Pof intrinsics, Pof compact values, and user types.
ctx
Type: Tangosol.IO.Pof..::.IPofContext
The IPofContext.

Return Value

The original object.

Exceptions

ExceptionCondition
System..::.ArgumentException If the specified type is a user type that is unknown to this IPofContext or there is no type mapping.
System..::.InvalidCastException If the specified object is not assignable to the specified type.

See Also