public async void FillUpMap(bool forceRefresh) { if (loading) { return; } loading = true; if (pane != null && pane.Opened) { pane.SetState(InfoPane.State.Closed, animated: false); } flashBar.ShowLoading(); using (var scope = ActivityScope.Of(Activity)) await DoFillUpMap(scope, forceRefresh); flashBar.ShowLoaded(); showedStale = false; if (pendingSearchTerm != null) { OpenStationWithTerm(pendingSearchTerm); pendingSearchTerm = null; } loading = false; }
async void LoadStationHistory(int stationID) { try { using (var scope = ActivityScope.Of(Activity)) await DoLoadStationHistory(scope, stationID); } catch (Exception e) { AnalyticsHelper.LogException("HistoryFetcher", e); Android.Util.Log.Debug("HistoryFetcher", e.ToString()); } }
protected override async void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); if (!launched) { launched = true; using (var scope = ActivityScope.Of(this)) await DoAsyncStuff(scope); } }
async void DoFetch(bool forceRefresh = false) { using (var scope = ActivityScope.Of(Activity)) await DoFetchInternal(scope, forceRefresh); }