Show / Hide Table of Contents

Interface ICastable<T>

Defines a series of members to be implemented by an object that allows casting from its type to another.

Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.dll
Syntax
public interface ICastable<T>
Type Parameters
Name Description
T

Target type for the conversion.

Methods

| Edit this page View Source

Cast()

Converts the current instance to an object of type T.

Declaration
T Cast()
Returns
Type Description
T

An object of type T.

| Edit this page View Source

TryCast(out T)

Attempts to perform a conversion operation of the current instance to an object of type T.

Declaration
bool TryCast(out T result)
Parameters
Type Name Description
T result

Result of the conversion.

Returns
Type Description
bool

true if the conversion was successful, false otherwise.

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX