public MostrarMensajes(IJSRuntime js)
 {
     this.js = js;
 }
 public FileReaderJsInterop(IJSRuntime jsRuntime, IInvokeUnmarshalled invokeUnmarshalled)
 {
     CurrentJSRuntime   = jsRuntime;
     InvokeUnmarshalled = invokeUnmarshalled;
 }
Exemple #3
0
 public GlobalMouseEventHandler(IJSRuntime jsRuntime)
 {
     _jsRuntime = jsRuntime;
     _dotNetObjectReferences = new List <DotNetObjectReference <PageMouseEventInfo> >();
 }
Exemple #4
0
        // Invoke any registered event handler with an instance of the JS
        // runtime which can be used by any interop proxies or surrogates
        internal virtual void FirePrepareForInterop(IJSRuntime js)
        {
            var ev = new PrepareForInteropEventArgs(js);

            PrepareForInterop?.Invoke(this, ev);
        }
Exemple #5
0
 public FlyoutPanelService(IJSRuntime jsRuntime)
 {
     _jsRuntime = jsRuntime;
 }
Exemple #6
0
 public static async ValueTask MyFunction(this IJSRuntime js, string message)
 {
     await js.InvokeVoidAsync("my_function", message);
 }
Exemple #7
0
 public static ValueTask <string> GetFromLocalStorage(this IJSRuntime js, string key)
 => js.InvokeAsync <string>("localStorage.getItem", key);
Exemple #8
0
 public static async ValueTask LogToConsole(this IJSRuntime js, string message)
 {
     await js.InvokeVoidAsync("console.log", message);
 }
Exemple #9
0
 public UserCustomAuthenticationStateProvider(IJSRuntime jsRuntime, IUserService userService)
 {
     this.jsRuntime   = jsRuntime;
     this.userService = userService;
 }
Exemple #10
0
 public PopoverInterop(IJSRuntime jsRuntime)
 {
     Ensure.NotNull(jsRuntime, "jsRuntime");
     this.jsRuntime = jsRuntime;
 }
Exemple #11
0
 public static async ValueTask InitializeInactivityTimer <T>(this IJSRuntime js, DotNetObjectReference <T> dotNetObjectReference)
     where T : class
 {
     await js.InvokeVoidAsync("initializeInactivityTimer", dotNetObjectReference);
 }
Exemple #12
0
 public ClientToastrService(IJSRuntime jsRuntime)
 {
     JsRuntime = jsRuntime;
 }
Exemple #13
0
 public ExampleJsInterop(IJSRuntime js)
 {
     this.js = js;
 }
    public static ValueTask NavigateToFragmentAsync(this NavigationManager navigationManager, IJSRuntime jSRuntime)
    {
        Uri uri = navigationManager.ToAbsoluteUri(navigationManager.Uri);

        if (uri.Fragment.Length == 0)
        {
            return(default);
 public TooltipsInitializer(IJSRuntime jsRuntime)
 {
     moduleTask = new(() => jsRuntime.InvokeAsync <IJSObjectReference>(
                          "import", "./_content/SafeExchange.Client.Web.Components/tooltipsInitializer.js").AsTask());
 }
 public LocalStorageService(IJSRuntime js) => _js = js;
Exemple #17
0
 public static async ValueTask <bool> Confirm(this IJSRuntime js, string message)
 {
     return(await js.InvokeAsync <bool>("confirm", message));
 }
Exemple #18
0
 /// <summary>
 /// Creates a new <see cref="RemoteUriHelper"/>.
 /// </summary>
 /// <param name="jsRuntime"></param>
 public RemoteUriHelper(IJSRuntime jsRuntime)
 {
     _jsRuntime = jsRuntime;
 }
Exemple #19
0
 public static ValueTask <object> SetInLocalStorage(this IJSRuntime js, string key, string content)
 => js.InvokeAsync <object>("localStorage.setItem", key, content);
Exemple #20
0
        public Common(IJSRuntime jsRuntime, NavigationManager navigationManager)
        {
            _jsRuntime = jsRuntime;

            _navigationManager = navigationManager;
        }
Exemple #21
0
 public static ValueTask <object> RemoveItem(this IJSRuntime js, string key)
 => js.InvokeAsync <object>("localStorage.removeItem", key);
Exemple #22
0
 public BeepPlayer(IJSRuntime jsRuntime)
 {
     _JSRuntime = jsRuntime;
 }
Exemple #23
0
 public PrepareForInteropEventArgs(IJSRuntime js)
 {
     JS = js;
 }
Exemple #24
0
 // TODO: clean this
 public static Task <bool> SetChartData(IJSRuntime runtime, string id, ChartType type, object data, object options)
 {
     return(runtime.InvokeAsync <bool>("DBlazorCharts.setChartData", id, ToChartTypeString(type), data, options, data is string, options is string));
 }
 public LocalStorageService(IJSRuntime jsRuntime)
 {
     _jsRuntime = jsRuntime;
 }
 public static async ValueTask ToastrSuccess(this IJSRuntime JSRuntime, string message)
 {
     await JSRuntime.InvokeVoidAsync("ShowToastr", "success", message);
 }
Exemple #27
0
 public CodeInlineHandler(IJSRuntime jSRuntime)
 {
     this.jSRuntime = jSRuntime;
 }
 public static async ValueTask ToastrWarning(this IJSRuntime JSRuntime, string message)
 {
     await JSRuntime.InvokeVoidAsync("ShowToastr", "warning", message);
 }
Exemple #29
0
 public WebAssemblyHost(IServiceProvider services, IJSRuntime runtime)
 {
     Services = services ?? throw new ArgumentNullException(nameof(services));
     _runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
 }
Exemple #30
0
 public AspNetGitHubAccessor(IJSRuntime jsRuntime)
 {
     _jsRuntime = jsRuntime;
 }