Show / Hide Table of Contents

    Class Default<T>

    Represents an access point to instances of default types (created using the constructor with no arguments).

    Представляет собой точку доступа к экземплярям типов по умолчанию (созданных с помощью конструктора без аргументов).

    Inheritance
    Object
    Default<T>
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Platform.Singletons
    Assembly: Platform.Singletons.dll
    Syntax
    public static class Default<T>
        where T : new()
    Type Parameters
    Name Description
    T

    The type of instance of the object.

    Тип экземпляра объекта.

    Fields

    | Improve this Doc View Source

    Instance

    Returns an instance of an object by default.

    Возвращает экземпляр объекта по умолчанию.

    Declaration
    public static readonly T Instance
    Field Value
    Type Description
    T

    Properties

    | Improve this Doc View Source

    ThreadInstance

    If you really need maximum performance, use this property. This property should create only one instance per thread.

    Если вам действительно нужна максимальная производительность, используйте это свойство. Это свойство должно создавать только один экземпляр на поток.

    Declaration
    public static T ThreadInstance { get; }
    Property Value
    Type Description
    T
    Remarks

    Check for null is intended to create only classes, not structs.

    Проверка на значение null выполняется специально для создания только классов, а не структур.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX