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