コード例 #1
0
        public static async Task <T> InvokeAsyncWithPromise <T>(this IJSRuntime jSRuntime, string jsFunctionName, params object[] args)
        {
            var promiseHandler = new JsPromiseHandler <T>(jSRuntime);

            var result = await promiseHandler.CallAndWaitForResult(jsFunctionName, args);

            return(result);
        }
コード例 #2
0
        public static async Task InvokeVoidAsyncWithPromise(this IJSRuntime jSRuntime, string jsFunctionName, params object[] args)
        {
            var promiseHandler = new JsPromiseHandler(jSRuntime);

            await promiseHandler.CallAndWaitForResult(jsFunctionName, args);
        }