@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
24 lines (22 loc) • 924 B
JavaScript
import { RpcType } from '../rpc-base';
import { RpcInboundClient } from '../rpc-inbound-client';
import { RpcUpdateDataKey } from './rpc-update-data-model';
export class RpcUpdateDataClient {
/**
* The update data command.
*
* @param name the module name.
* @param subName the sub name of module.
* @param data the update data object.
* @return Promise<void> the promise object.
*/
static updateData(rpc, name, subName, data) {
const rpcInbound = rpc.rpcManager.rpcChannel.getRpc(name, subName, RpcType.Inbound);
if (rpcInbound) {
return RpcInboundClient.call(rpc, RpcUpdateDataKey.command, RpcUpdateDataKey.version, data);
}
const message = MsftSme.getStrings().MsftSmeShell.Core.Error.RpcNotFountInbound.message;
return Promise.reject(message.format(name, subName));
}
}
//# sourceMappingURL=rpc-update-data-client.js.map