Class TypeInstanceFactory | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class TypeInstanceFactory

    Inheritance
    System.Object
    TypeInstanceFactory
    Namespace: Unity.Properties
    Syntax
    public static class TypeInstanceFactory

    Methods

    Construct<TValue, TInput>(TInput)

    Constructs an instance of based on the given value.

    Declaration
    public static TValue Construct<TValue, TInput>(TInput source)
    Parameters
    Type Name Description
    TInput source

    The source value containing the data for construction.

    Returns
    Type Description
    TValue

    A new instance of the destination type

    Type Parameters
    Name Description
    TValue

    The destination type to construct.

    TInput

    The source type containing type information.

    IsRegistered<TValue, TInput>()

    Declaration
    public static bool IsRegistered<TValue, TInput>()
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    TValue
    TInput

    Register<TValue>(TypeInstanceFactory.ITypeConstructor<TValue>)

    Declaration
    public static void Register<TValue>(TypeInstanceFactory.ITypeConstructor<TValue> handler)
    Parameters
    Type Name Description
    TypeInstanceFactory.ITypeConstructor<TValue> handler
    Type Parameters
    Name Description
    TValue

    Register<TInput, TValue>(TypeInstanceFactory.ITypeConstructor<TInput, TValue>)

    Declaration
    public static void Register<TInput, TValue>(TypeInstanceFactory.ITypeConstructor<TInput, TValue> handler)
    Parameters
    Type Name Description
    TypeInstanceFactory.ITypeConstructor<TInput, TValue> handler
    Type Parameters
    Name Description
    TInput
    TValue

    TryConstruct<TValue, TInput>(TInput, out TValue)

    Declaration
    public static bool TryConstruct<TValue, TInput>(TInput source, out TValue value)
    Parameters
    Type Name Description
    TInput source
    TValue value
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    TValue
    TInput
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX