System::Collections::Generic::Details::CastRules

Structures

StructDescription
CastTypeContains the functions to determine the cast type.

Functions

FunctionDescription
std::enable_if_t<CastType<Source, Result>::None, Result> Cast(Source)Casts the source type to the result type. Used when the source and the result types are the same.
std::enable_if_t<CastType<Source, Result>::Static, Result> Cast(Source)Casts the source type to the result type. Used when the source type can be statically cast to the result type.
std::enable_if_t<CastType<Source, Result>::Dynamic, Result> Cast(Source)Casts the source type to the result type. Used when the types aren’t the same and the source type cannot be statically cast to the result type.
std::enable_if_t<CastType<Source, Result>::NullableBoxing, Result> Cast(Source)Casts the source type to the result type. Used when the source type is being boxed to the Nullable class instance.
std::enable_if_t<CastType<Source, Result>::NullableUnboxing, Result> Cast(Source)Casts the source type to the result type. Used when the source type is being unboxed from the Nullable class instance.
std::enable_if_t<CastType<Source, Result>::Boxing, Result> Cast(Source)Casts the source type to the result type. Used when the source type is being boxed to the Object class instance.
std::enable_if_t<CastType<Source, Result>::Unboxing, Result> Cast(Source)Casts the source type to the result type. Used when the source type is being unboxed from the Object class instance.
std::enable_if_t<CastType<Source, Result>::Invalid, Result> Cast(Source)Casts the source type to the result type. Used when the casting is invalid or the conversion is explicit.
bool IsNull(T)Checks that the represented value is nullptr.
bool IsNull(SharedPtr<T>)Checks that the represented value is nullptr.
bool IsNull(Nullable<T>)Checks that the represented value is nullptr.
std::enable_if_t<CastType<Source, Result>::None, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::Static, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::Dynamic, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::NullableBoxing, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::NullableUnboxing, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::Boxing, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::Unboxing, bool> CanCast(Source)Checks the cast possibility.
std::enable_if_t<CastType<Source, Result>::Invalid, bool> CanCast(Source)Checks the cast possibility.