internal async Task <Resource> InternalResolveByCanonicalUri(string url) { var resource = await AsyncResolver.ResolveByCanonicalUriAsync(url).ConfigureAwait(false); OnLoad(url, resource); return(resource); }
private void StartOrientationCheck() { Log.Debug("StartOrientationCheck"); if (_intervalId == AsyncResolver.DefaultCallId) { _intervalId = AsyncResolver.IntervalCall(CheckOrientation, OrientationCheckTimeout); } }
private void OnAuthorized(AuthorizationRequest request) { if (request.Granted) { Log.Debug(t => $"Authorized. DeviceToken: {t}", request.DeviceToken); _status = AuthorizationStatus.Authorized; _deviceToken = request.DeviceToken; if (_notificationToSchedule != null) { // Delay needed as notifications scheduled right away don't work. _callId = AsyncResolver.DelayedCall(() => { // If any notifications were requested before authorization, they must be scheduled after it. foreach (var notification in _notificationToSchedule) { ScheduleNotificationImpl(notification); } // Cleaning notification. _notificationToSchedule = null; }, 0.1F); } } else if (request.Error != null) { Log.Error(e => $"Authorization error: {e}", request.Error); _status = AuthorizationStatus.Denied; } else { Log.Debug("Not authorized. User denied notifications request."); _status = AuthorizationStatus.Denied; } CompleteInitialization(); }
private void StopOrientationCheck() { Log.Debug("StopOrientationCheck"); AsyncResolver.CancelCall(ref _intervalId); }
public void PreDestroy() { CoroutineProvider.StopCoroutine(ref _coroutine); AsyncResolver.CancelCall(ref _callId); }