Пример #1
0
        public async Task <BlazorQueryDOM> Load(string url, object data, Action <string, string, object> complete)
        {
            var actionWrapper         = new ActionWrapper <string, string, object>(complete);
            var dotNetObjectReference = DotNetObjectReference.Create(actionWrapper);
            await JSRuntimeInstance.InvokeAsync <Task>(BlazorQueryList.Load, CurrentSelector, url, data, dotNetObjectReference);

            return(this);
        }
Пример #2
0
        public async Task <BlazorQueryDOM> FadeOut(Action <string> completed)
        {
            var actionWrapper         = new ActionWrapper <string>(completed);
            var dotNetObjectReference = DotNetObjectReference.Create(actionWrapper);
            await JSRuntimeInstance.InvokeAsync <Task>(BlazorQueryList.FadeOut, CurrentSelector, dotNetObjectReference);

            return(this);
        }
Пример #3
0
        // Functions - Actions
        public async Task <BlazorQueryDOM> Text(Func <int, string, string> func)
        {
            var actionWrapper         = new FuncWrapper <int, string, string>(func);
            var dotNetObjectReference = DotNetObjectReference.Create(actionWrapper);
            await JSRuntimeInstance.InvokeAsync <string>(BlazorQueryList.Text_Func, CurrentSelector, dotNetObjectReference);

            return(this);
        }
Пример #4
0
        public async Task <BlazorQueryDOM> Select(string selector)
        {
            BlazorQueryDOM dom = new BlazorQueryDOM(JSRuntimeInstance);

            dom.CurrentSelector = selector;
            var data = await JSRuntimeInstance.InvokeAsync <string>(BlazorQueryList.Select, selector);

            dom.Elements = JsonSerializer.Deserialize <List <BlazorQueryDOMElement> >(data);

            return(dom);
        }
Пример #5
0
 public async Task ConsoleLog(string message) => await JSRuntimeInstance.InvokeAsync <Task>(BlazorQueryList.Utils_ConsoleLog, message);
Пример #6
0
 // Utilities
 public async Task Alert(string message) => await JSRuntimeInstance.InvokeAsync <Task>(BlazorQueryList.Utils_Alert, message);