@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
32 lines (30 loc) • 1.16 kB
JavaScript
export class RpcInboundClient {
/**
* The generic command to make inbound request of RPC.
* (From module to shell or from child to parent window.)
*
* @param rpc the rpc instance.
* @param command the command name.
* @param version the version string.
* @param data the TData object.
* @return Promise<TResult> the promise object.
*/
static call(rpc, command, version, data) {
return rpc.rpcManager.rpcChannel.post(rpc.rpcManager.rpcInbound, { command, version, data });
}
/**
* The generic command to make inbound request of inbound instance.
* (From shell to module or from parent to child window.)
*
* @param rpcChannel the rpc channel instance.
* @param inbound the RPC inbound instance.
* @param command the command name.
* @param version the version string.
* @param data the TData object.
* @return Promise<TResult> the promise object.
*/
static callInbound(rpcChannel, inbound, command, version, data) {
return rpcChannel.post(inbound, { command, version, data });
}
}
//# sourceMappingURL=rpc-inbound-client.js.map