using GFramework.Game.Abstractions.coroutine; namespace GFramework.Game.coroutine; /// /// 协程上下文类,用于封装协程执行所需的环境信息 /// /// 协程作用域,定义协程的执行范围 /// 协程调度器,负责协程的调度和执行管理 /// 协程的所有者对象,可为空,默认为null public class CoroutineContext(ICoroutineScope scope, CoroutineScheduler scheduler, object? owner = null) : ICoroutineContext { /// /// 获取协程作用域 /// public ICoroutineScope Scope { get; } = scope; /// /// 获取协程调度器 /// public ICoroutineScheduler Scheduler { get; } = scheduler; /// /// 获取协程所有者对象 /// public object? Owner { get; } = owner; }