Show / Hide Table of Contents

    Class Wrapper<T>

    Provides a way to wrap an object of type T.

    Inheritance
    System.Object
    Wrapper<T>
    Hierarchy<T>
    XmlWrapper
    Implements
    IWrapper<T>
    IData
    Namespace: Cuemon
    Assembly: Cuemon.Core.dll
    Syntax
    public class Wrapper<T> : IWrapper<T>, IData
    Type Parameters
    Name Description
    T

    The type of the object to wrap.

    Constructors

    | Improve this Doc

    Wrapper()

    Initializes a new instance of the Wrapper<T> class.

    Declaration
    protected Wrapper()
    | Improve this Doc

    Wrapper(T, MemberInfo)

    Initializes a new instance of the Wrapper<T> class.

    Declaration
    public Wrapper(T instance, MemberInfo memberReference = null)
    Parameters
    Type Name Description
    T instance

    The instance that this wrapper object represents.

    System.Reflection.MemberInfo memberReference

    The member from where instance was referenced.

    Properties

    | Improve this Doc

    Data

    Gets a collection of key/value pairs that provide additional user-defined information about this wrapper object.

    Declaration
    public virtual IDictionary<string, object> Data { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>

    An object that implements the System.Collections.Generic.IDictionary<TKey, TValue> interface and contains a collection of user-defined key/value pairs.

    | Improve this Doc

    HasMemberReference

    Gets a value indicating whether this instance has a member reference.

    Declaration
    public virtual bool HasMemberReference { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has a member reference; otherwise, false.

    | Improve this Doc

    Instance

    Gets the object that this wrapper represents.

    Declaration
    public virtual T Instance { get; protected set; }
    Property Value
    Type Description
    T

    The object that this wrapper represents.

    | Improve this Doc

    InstanceType

    Gets the type of the object that this wrapper represents.

    Declaration
    public virtual Type InstanceType { get; protected set; }
    Property Value
    Type Description
    System.Type

    The type of the that this wrapper represents.

    | Improve this Doc

    MemberReference

    Gets the member from where Instance was referenced.

    Declaration
    public virtual MemberInfo MemberReference { get; set; }
    Property Value
    Type Description
    System.Reflection.MemberInfo

    The member from where Instance was referenced.

    Methods

    | Improve this Doc

    InstanceAs<TResult>()

    Returns a value that is equivalent to the instance of the object that this wrapper represents.

    Declaration
    public TResult InstanceAs<TResult>()
    Returns
    Type Description
    TResult

    A value that is equivalent to the instance of the object that this wrapper represents.

    Type Parameters
    Name Description
    TResult

    The type of the return value.

    Exceptions
    Type Condition
    System.InvalidCastException

    The conversion is not supported - or - Instance does not implement the System.IConvertible interface.

    System.FormatException

    Instance is not in a format for T recognized by System.Globalization.CultureInfo.InvariantCulture.

    System.OverflowException

    Instance represents a number that is out of the range of T.

    | Improve this Doc

    InstanceAs<TResult>(IFormatProvider)

    Returns a value that is equivalent to the instance of the object that this wrapper represents.

    Declaration
    public TResult InstanceAs<TResult>(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider

    An object that supplies culture-specific formatting information.

    Returns
    Type Description
    TResult

    A value that is equivalent to the instance of the object that this wrapper represents.

    Type Parameters
    Name Description
    TResult

    The type of the return value.

    Exceptions
    Type Condition
    System.InvalidCastException

    The conversion is not supported - or - Instance does not implement the System.IConvertible interface.

    System.FormatException

    Instance is not in a format for T recognized by provider.

    System.OverflowException

    Instance represents a number that is out of the range of T.

    Implements

    IWrapper<T>
    IData

    Extension Methods

    ConverterExtensions.ParseWith<TSource, TResult>(TSource, Func<TSource, TResult>)
    ConverterExtensions.ParseWith<TSource, T, TResult>(TSource, Func<TSource, T, TResult>, T)
    ConverterExtensions.ParseWith<TSource, T1, T2, TResult>(TSource, Func<TSource, T1, T2, TResult>, T1, T2)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, TResult>(TSource, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, TResult>(TSource, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    ConverterExtensions.As<TResult>(Object)
    ConverterExtensions.As<TResult>(Object, TResult)
    ConverterExtensions.As<TResult>(Object, TResult, IFormatProvider)
    DelegateUtilityExtensions.Wrap<TResult>(TResult)
    DelegateUtilityExtensions.DynamicWrap<TResult>(TResult)
    TweakerExtensions.Adjust<T>(T, Func<T, T>)
    TypeUtilityExtensions.Is<T>(Object)
    TypeUtilityExtensions.IsNot<T>(Object)
    TypeUtilityExtensions.IsNullable<T>(T)
    WrapperExtensions.UseWrapper<T>(T, Action<IDictionary<String, Object>>)
    WrapperExtensions.UseWrapper<T>(T, MemberInfo, Action<IDictionary<String, Object>>)
    EnumerableUtilityExtensions.Yield<TSource>(TSource)
    HashUtilityExtensions.ComputeHash(Object, Action<HashOptions>)
    HmacUtilityExtensions.ComputeKeyedHash(Object, Byte[], Action<KeyedHashOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX