你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AdapterState interface

用于与复合适配器状态交互的功能。

方法

getState()

获取当前状态

offStateChange((state: TState) => void)

取消订阅 stateChanged 事件的处理程序。

onStateChange((state: TState) => void)

将处理程序订阅到 stateChanged 事件。

方法详细信息

getState()

获取当前状态

function getState(): TState

返回

TState

offStateChange((state: TState) => void)

取消订阅 stateChanged 事件的处理程序。

function offStateChange(handler: (state: TState) => void)

参数

handler

(state: TState) => void

onStateChange((state: TState) => void)

将处理程序订阅到 stateChanged 事件。

function onStateChange(handler: (state: TState) => void)

参数

handler

(state: TState) => void