/// <inheritdoc/> public async ValueTask DisposeAsync() { if (JSObjectReference != null) { await JSObjectReference.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (_langJs is not null) { await _langJs.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (_animationJs is not null) { var start = _registeredStartEvents .Select(s => new KeyValuePair <ElementReference, string>(s.Value.Element, s.Value.AnimationName)); var iteration = _registeredIterationEvents .Select(s => new KeyValuePair <ElementReference, string>(s.Value.Element, s.Value.AnimationName)); var end = _registeredEndEvents .Select(s => new KeyValuePair <ElementReference, string>(s.Value.Element, s.Value.AnimationName)); await _animationJs.InvokeVoidAsync("dispose", start.ToArray(), iteration.ToArray(), end.ToArray()); await _animationJs.DisposeAsync(); } foreach (var item in _registeredStartEvents) { item.Dispose(); } foreach (var item in _registeredIterationEvents) { item.Dispose(); } foreach (var item in _registeredEndEvents) { item.Dispose(); } }
public async ValueTask DisposeAsync() { if (_focusJs is not null) { await _focusJs.DisposeAsync(); } }
async ValueTask IAsyncDisposable.DisposeAsync() { if (_js != null) { await _js.DisposeAsync(); } }
protected virtual async ValueTask DisposeAsyncCore() { if (jsModule is not null) { await jsModule.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (_clipboardJs is not null) { await _clipboardJs.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (this.moduleTask.IsValueCreated) { IJSObjectReference module = await this.moduleTask.Value; await module.DisposeAsync(); } }
public async ValueTask DisposeAsync() { _objectRef?.Dispose(); if (_pwaModule != null) { await _pwaModule.DisposeAsync(); } }
protected virtual async ValueTask DisposeAsyncCore() { if (jsModule != null) { await jsModule.InvokeVoidAsync("dispose", scrollspyElement); await jsModule.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (_clickJs is not null) { await _clickJs.InvokeVoidAsync("dispose", (object)_registeredElements.ToArray()); await _clickJs.DisposeAsync(); } }
// Use the async method when having at least on async call in dispose. public async ValueTask DisposeAsync() { // .NET references needs to be disposed. Not so important just here. _dotNetReference?.Dispose(); await JSRuntime.InvokeVoidAsync("blazorResize.unRegister", nameof(MainLayout)); // Dispose the javascript module. await _module.DisposeAsync(); }
public async ValueTask DisposeAsync() { if (_transitionJs is not null) { await _transitionJs.InvokeVoidAsync("dispose", _registeredElements.ToArray()); await _transitionJs.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (_animationJs is not null) { await _animationJs.InvokeVoidAsync("dispose", _registeredStartEvents.ToArray(), _registeredIterationEvents.ToArray(), _registeredEndEvents.ToArray()); await _animationJs.DisposeAsync(); } }
protected virtual async ValueTask DisposeAsyncCore() { NavigationManager.LocationChanged -= OnLocationChanged; if (jsModule is not null) { await jsModule.DisposeAsync(); } }
public async ValueTask DisposeAsync() { IsDisposing = true; if (asyncModule != null) { await asyncModule.DisposeAsync(); } module?.Dispose(); }
public async ValueTask DisposeAsync() { if (_scrollJs is not null) { await _scrollJs.InvokeVoidAsync("dispose", (object)_dotNetObjectReferences.Select(s => s.Value.EventId).ToArray()); await _scrollJs.DisposeAsync(); } }
public async void Dispose() { if (jsModuleTask.IsValueCreated) { await jsModule.InvokeVoidAsync("stopCamera", VideoElement); await jsModule.DisposeAsync(); } GC.SuppressFinalize(this); }
public async ValueTask DisposeAsync() { if (_mapsJs is not null) { await _mapsJs.InvokeVoidAsync("dispose", MapContainerId); await _mapsJs.DisposeAsync(); } _dotNetObjectReference?.Dispose(); }
public async ValueTask DisposeAsync() { GC.SuppressFinalize(this); if (_ChartJSInstance != null) { await _ChartJSInstance.InvokeVoidAsync("dispose"); await _ChartJSInstance.DisposeAsync(); } _Handler?.Dispose(); }
public ValueTask DisposeAsync() { IJSObjectReference module = _module; _module = null; if (module != null) { return(module.DisposeAsync()); } return(ValueTask.CompletedTask); }
protected virtual async ValueTask DisposeAsyncCore() { disposed = true; if (jsModule != null) { await jsModule.InvokeVoidAsync("dispose", toastElement); await jsModule.DisposeAsync(); } dotnetObjectReference.Dispose(); }
protected virtual async ValueTask DisposeAsyncCore() { validationMessageStore?.Clear(); if (jsModule != null) { await CloseDropDownAsync(fromInputElement); await CloseDropDownAsync(toInputElement); await jsModule.DisposeAsync(); } Dispose(false); }
// Unregister the drop zone events public async ValueTask DisposeAsync() { if (_dropZoneInstance != null) { await _dropZoneInstance.InvokeVoidAsync("dispose"); await _dropZoneInstance.DisposeAsync(); } if (_module != null) { await _module.DisposeAsync(); } }
public async ValueTask DisposeAsync() { if (_clickJs is not null) { await _clickJs.InvokeVoidAsync("dispose", (object)_dotNetObjectReferences.Select(s => s.Value.ElementRef).ToArray()); await _clickJs.DisposeAsync(); } foreach (var item in _dotNetObjectReferences) { item.Dispose(); } }
public async ValueTask DisposeAsync() { if (_geoJs is not null) { await _geoJs.InvokeVoidAsync("dispose", (object)_dotNetObjectReferences.Select(s => s.Value.HandlerId).Distinct().ToArray()); await _geoJs.DisposeAsync(); } foreach (var item in _dotNetObjectReferences) { item.Dispose(); } }
public async ValueTask DisposeAsync() { if (_transitionJs is not null) { var registeredElements = _dotNetObjectReferences .Select(s => new KeyValuePair <ElementReference, string>(s.Value.Element, s.Value.TransitionPropertyName)); await _transitionJs.InvokeVoidAsync("dispose", registeredElements.ToArray()); await _transitionJs.DisposeAsync(); } foreach (var item in _dotNetObjectReferences) { item.Dispose(); } }
protected virtual async ValueTask DisposeAsyncCore() { disposed = true; // Microsoft violates the pattern - there is no protected virtual voud Dispose(bool) method and the IDisposable implementation is explicit. ((IDisposable)this).Dispose(); if (jsModule != null) { await jsModule.InvokeVoidAsync("dispose", Id); await jsModule.DisposeAsync(); } dotnetObjectReference.Dispose(); }
protected virtual async ValueTask DisposeAsyncCore() { disposed = true; if (jsModule != null) { if (opened) { // We need to remove backdrop when leaving "page" when HxOffcanvas is shown (opened). await jsModule.InvokeVoidAsync("dispose", offcanvasElement); } await jsModule.DisposeAsync(); } dotnetObjectReference.Dispose(); }
protected virtual async ValueTask DisposeAsyncCore() { if (_elixModule is not null) { await _elixModule.DisposeAsync().ConfigureAwait(false); _elixModule = null; } if (_generalModule is not null) { await _generalModule.DisposeAsync().ConfigureAwait(false); _generalModule = null; } _openedChangeCallbackReference?.Dispose(); _openedChangeCallbackReference = null; }