Fantasy
搜索结果

    显示/隐藏目录

    PoolCore 类

    对象池抽象接口,用于创建和管理可重复使用的对象实例。

    继承
    object
    PoolCore
    实现
    IDisposable
    继承成员
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    命名空间: Fantasy.Pool
    程序集: Fantasy.Net.dll
    语法
    public abstract class PoolCore : IDisposable

    构造函数

    | 编辑本文 查看源代码

    PoolCore(int)

    构造函数

    声明
    protected PoolCore(int maxCapacity)
    参数
    类型 名称 描述
    int maxCapacity

    初始的容量

    属性

    | 编辑本文 查看源代码

    Count

    池子里可用的数量

    声明
    public int Count { get; }
    属性值
    类型 描述
    int

    方法

    | 编辑本文 查看源代码

    Dispose()

    销毁方法

    声明
    public virtual void Dispose()
    | 编辑本文 查看源代码

    Rent(Type)

    租借

    声明
    public IPool Rent(Type type)
    参数
    类型 名称 描述
    Type type

    租借的类型

    返回
    类型 描述
    IPool
    异常
    类型 条件
    NotSupportedException
    | 编辑本文 查看源代码

    Rent<T>()

    租借

    声明
    public T Rent<T>() where T : IPool, new()
    返回
    类型 描述
    T
    类型参数
    名称 描述
    T
    | 编辑本文 查看源代码

    Return(Type, IPool)

    返还

    声明
    public void Return(Type type, IPool obj)
    参数
    类型 名称 描述
    Type type
    IPool obj

    实现

    IDisposable

    扩展方法

    JsonHelper.ToJson<T>(T)
    • 编辑本文
    • 查看源代码
    本文内容
    Back to top Generated by DocFX