Show / Hide Table of Contents

    Class ConverterBase<TSource, TTarget>

    Represents a base implementation for IConverter interface with the basic logic necessary for value converter from the TSource type to the TTarget type.

    Представляет базовую реализацию для интерфейса IConverter с основной логикой необходимой для конвертера значений из типа TSource в тип TTarget.

    Inheritance
    Object
    ConverterBase<TSource, TTarget>
    CheckedConverter<TSource, TTarget>
    UncheckedConverter<TSource, TTarget>
    UncheckedSignExtendingConverter<TSource, TTarget>
    Implements
    IConverter<TSource, TTarget>
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Platform.Converters
    Assembly: Platform.Converters.dll
    Syntax
    public abstract class ConverterBase<TSource, TTarget> : IConverter<TSource, TTarget>
    Type Parameters
    Name Description
    TSource

    Source type of conversion.

    Исходный тип конверсии.

    TTarget

    Target type of conversion.

    Целевой тип конверсии.

    Methods

    | Improve this Doc View Source

    Convert(TSource)

    Declaration
    public abstract TTarget Convert(TSource source)
    Parameters
    Type Name Description
    TSource source
    Returns
    Type Description
    TTarget
    | Improve this Doc View Source

    ConvertFromObject(ILGenerator)

    Generates a sequence of instructions using that converts a value of type Object to a value of type TTarget.

    Генерирует последовательность инструкций при помощи выполняющую преобразование значения типа Object к значению типа TTarget.

    Declaration
    protected static void ConvertFromObject(ILGenerator il)
    Parameters
    Type Name Description
    ILGenerator il

    An instance.

    Экземпляр .

    | Improve this Doc View Source

    CreateTypeInheritedFrom<TBaseClass>()

    Converts the value of the source type (TSource) to the value of the target type.

    Конвертирует значение исходного типа (TSource) в значение целевого типа.

    Declaration
    protected static TypeBuilder CreateTypeInheritedFrom<TBaseClass>()
    Returns
    Type Description
    TypeBuilder

    The value is converted to the target type (TTarget).

    Значение ковертированное в целевой тип (TTarget).

    Type Parameters
    Name Description
    TBaseClass
    | Improve this Doc View Source

    EmitConvertMethod(TypeBuilder, Action<ILGenerator>)

    Converts the value of the source type (TSource) to the value of the target type.

    Конвертирует значение исходного типа (TSource) в значение целевого типа.

    Declaration
    protected static void EmitConvertMethod(TypeBuilder typeBuilder, Action<ILGenerator> emitConversion)
    Parameters
    Type Name Description
    TypeBuilder typeBuilder
    Action<ILGenerator> emitConversion
    | Improve this Doc View Source

    GetMethodForConversionToTargetType()

    Converts the value of the source type (TSource) to the value of the target type.

    Конвертирует значение исходного типа (TSource) в значение целевого типа.

    Declaration
    protected static MethodInfo GetMethodForConversionToTargetType()
    Returns
    Type Description
    MethodInfo

    The value is converted to the target type (TTarget).

    Значение ковертированное в целевой тип (TTarget).

    | Improve this Doc View Source

    GetNewName()

    Gets a new unique name of an assembly.

    Возвращает новое уникальное имя сборки.

    Declaration
    protected static string GetNewName()
    Returns
    Type Description
    String

    A new unique name of an assembly.

    Новое уникальное имя сборки.

    | Improve this Doc View Source

    LoadDefault(ILGenerator, Type)

    Converts the value of the source type (TSource) to the value of the target type.

    Конвертирует значение исходного типа (TSource) в значение целевого типа.

    Declaration
    protected static void LoadDefault(ILGenerator il, Type targetType)
    Parameters
    Type Name Description
    ILGenerator il
    Type targetType

    Implements

    IConverter<TSource, TTarget>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX