Table of Contents

IAppHost 接口

命名空间
ClassIsland.Shared
程序集
ClassIsland.Shared.dll

应用主机接口

public interface IAppHost

字段

CoreVersion

核心库版本

public static Version CoreVersion

字段值

Version

Host

应用主机

public static IHost? Host

字段值

IHost

方法

GetService<T>()

获取指定的服务

public static T GetService<T>()

返回

T

获取的服务

类型参数

T

要获取的服务类型

异常

ArgumentException

TryGetService<T>()

尝试获取指定的服务

public static T? TryGetService<T>()

返回

T

如果获取成功,则返回获取到的服务,否则返回null

类型参数

T

要获取的服务类型