示例#1
0
    protected void RemoveService(bool throwIfNotExists = false)
    {
        if (!GameServiceCollection.TryRemoveService <T>() && throwIfNotExists)
        {
            throw new System.Exception($"Service \"{nameof(T)}\" is currently not injected");
        }

        _isActive = false;
    }