Exemple #1
0
        private async Task ExecuteShowDetailCommand(PostaladaElem message)
        {
            MessagesViewModel messagesViewModel = this;

            messagesViewModel._singleNavigation.DisableNavigation();
            int num = await messagesViewModel._navigationService.Navigate <MessageDetailViewModel, PostaladaElem>((M1)message, (IMvxBundle)null, new CancellationToken()) ? 1 : 0;
        }
Exemple #2
0
        private async Task ExecuteRefreshCommand()
        {
            MessagesViewModel messagesViewModel = this;

            try
            {
                if (!messagesViewModel.HasInternetConnection)
                {
                    throw new NoInternetConnectionException().SetErrorCode <NoInternetConnectionException>("/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/ViewModels/MessagesViewModel.cs", 191);
                }
                await messagesViewModel.LoadMessages();
            }
            catch (Exception ex)
            {
                CrossMobileAnalytics.Current.TrackException(ex, (IDictionary <string, string>)null, nameof(ExecuteRefreshCommand), "/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/ViewModels/MessagesViewModel.cs", 198);
                ErrorHandler.Current.HandleError(ex);
            }
            finally
            {
                messagesViewModel.NotBusy();
            }
        }
Exemple #3
0
        private async Task LoadMessages()
        {
            // ISSUE: explicit reference operation
            // ISSUE: reference to a compiler-generated field
            int num1 = (^ this).\u003C\u003E1__state;
            MessagesViewModel           messagesViewModel1 = this;
            IEnumerable <PostaladaElem> tempPostaladaElemek;

            try
            {
                tempPostaladaElemek          = (IEnumerable <PostaladaElem>)null;
                messagesViewModel1.IsLoading = true;
                TaskAwaiter <IEnumerable <PostaladaElem> > taskAwaiter;
                try
                {
                    if (messagesViewModel1.ActiveProfile == null)
                    {
                        messagesViewModel1.ActiveProfile = messagesViewModel1._profileDataService.GetActiveProfile();
                    }
                    IEnumerable <PostaladaElem>        postaladaElemek = messagesViewModel1._uzenetDataService.GetPostaladaElemek(messagesViewModel1.ActiveProfile);
                    IOrderedEnumerable <PostaladaElem> orderedEnumerable;
                    if (postaladaElemek == null)
                    {
                        orderedEnumerable = (IOrderedEnumerable <PostaladaElem>)null;
                    }
                    else
                    {
                        IEnumerable <PostaladaElem> source = postaladaElemek.Where <PostaladaElem>((Func <PostaladaElem, bool>)(x => x.Uzenet != null));
                        orderedEnumerable = source != null?source.OrderByDescending <PostaladaElem, DateTimeOffset>((Func <PostaladaElem, DateTimeOffset>)(x => x.Uzenet.KuldesDatum)) : (IOrderedEnumerable <PostaladaElem>)null;
                    }
                    IEnumerable <PostaladaElem> postaladaElems = (IEnumerable <PostaladaElem>)orderedEnumerable;
                    tempPostaladaElemek = postaladaElems;
                    if (!messagesViewModel1.HasInternetConnection)
                    {
                        if (postaladaElems == null)
                        {
                            messagesViewModel1.ShowError();
                        }
                    }
                    else
                    {
                        TaskAwaiter <IEnumerable <PostaladaElem> > awaiter = messagesViewModel1._uzenetDataService.FetchPostaladaElemek(messagesViewModel1.ActiveProfile).GetAwaiter();
                        if (!awaiter.IsCompleted)
                        {
                            // ISSUE: explicit reference operation
                            // ISSUE: reference to a compiler-generated field
                            (^ this).\u003C\u003E1__state = num1 = 0;
                            taskAwaiter = awaiter;
                            // ISSUE: explicit reference operation
                            // ISSUE: reference to a compiler-generated field
                            (^ this).\u003C\u003Et__builder.AwaitUnsafeOnCompleted <TaskAwaiter <IEnumerable <PostaladaElem> >, MessagesViewModel.\u003CLoadMessages\u003Ed__32>(ref awaiter, this);
                            return;
                        }
                        IEnumerable <PostaladaElem> result = awaiter.GetResult();
                        tempPostaladaElemek = (IEnumerable <PostaladaElem>)messagesViewModel1._uzenetDataService.OverridePostaladaElemek(messagesViewModel1.ActiveProfile, result).OrderByDescending <PostaladaElem, DateTimeOffset>((Func <PostaladaElem, DateTimeOffset>)(x => x.Uzenet.KuldesDatum));
                        messagesViewModel1._messenger.Publish <ActiveProfileChangedMessage>((M0) new ActiveProfileChangedMessage((object)messagesViewModel1, messagesViewModel1.ActiveProfile));
                    }
                }
                catch (Exception ex1)
                {
                    IEnumerable <PostaladaElem> postaladaElemek = messagesViewModel1._uzenetDataService.GetPostaladaElemek(messagesViewModel1.ActiveProfile);
                    if (postaladaElemek == null)
                    {
                        messagesViewModel1.ShowError();
                    }
                    else if (!postaladaElemek.Any <PostaladaElem>())
                    {
                        try
                        {
                            TaskAwaiter <IEnumerable <PostaladaElem> > awaiter = messagesViewModel1._uzenetDataService.FetchPostaladaElemek(messagesViewModel1.ActiveProfile).GetAwaiter();
                            if (!awaiter.IsCompleted)
                            {
                                int num2;
                                // ISSUE: explicit reference operation
                                // ISSUE: reference to a compiler-generated field
                                (^ this).\u003C\u003E1__state = num2 = 1;
                                taskAwaiter = awaiter;
                                // ISSUE: explicit reference operation
                                // ISSUE: reference to a compiler-generated field
                                (^ this).\u003C\u003Et__builder.AwaitUnsafeOnCompleted <TaskAwaiter <IEnumerable <PostaladaElem> >, MessagesViewModel.\u003CLoadMessages\u003Ed__32>(ref awaiter, this);
                                return;
                            }
                            IEnumerable <PostaladaElem> result = awaiter.GetResult();
                            tempPostaladaElemek = (IEnumerable <PostaladaElem>)messagesViewModel1._uzenetDataService.OverridePostaladaElemek(messagesViewModel1.ActiveProfile, result).OrderByDescending <PostaladaElem, DateTimeOffset>((Func <PostaladaElem, DateTimeOffset>)(x => x.Uzenet.KuldesDatum));
                            messagesViewModel1._messenger.Publish <ActiveProfileChangedMessage>((M0) new ActiveProfileChangedMessage((object)messagesViewModel1, messagesViewModel1.ActiveProfile));
                        }
                        catch (Exception ex2)
                        {
                            CrossMobileAnalytics.Current.TrackException(ex2, (IDictionary <string, string>)null, nameof(LoadMessages), "/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/ViewModels/MessagesViewModel.cs", 151);
                        }
                    }
                    else
                    {
                        messagesViewModel1.PostaladaElemek = tempPostaladaElemek;
                    }
                    CrossMobileAnalytics.Current.TrackException(ex1, (IDictionary <string, string>)null, nameof(LoadMessages), "/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/ViewModels/MessagesViewModel.cs", 161);
                }
                MessagesViewModel           messagesViewModel2 = messagesViewModel1;
                IEnumerable <PostaladaElem> source1            = tempPostaladaElemek;
                List <PostaladaElem>        postaladaElemList  = source1 != null?source1.OrderByDescending <PostaladaElem, DateTimeOffset>((Func <PostaladaElem, DateTimeOffset>)(x => x.Uzenet.KuldesDatum)).ToList <PostaladaElem>() : (List <PostaladaElem>)null;

                messagesViewModel2.PostaladaElemek = (IEnumerable <PostaladaElem>)postaladaElemList;
                messagesViewModel1.IsLoading       = false;
            }
            catch (Exception ex)
            {
                // ISSUE: explicit reference operation
                // ISSUE: reference to a compiler-generated field
                (^ this).\u003C\u003E1__state = -2;
                tempPostaladaElemek           = (IEnumerable <PostaladaElem>)null;
                // ISSUE: explicit reference operation
                // ISSUE: reference to a compiler-generated field
                (^ this).\u003C\u003Et__builder.SetException(ex);
                return;
            }
            // ISSUE: explicit reference operation
            // ISSUE: reference to a compiler-generated field
            (^ this).\u003C\u003E1__state = -2;
            tempPostaladaElemek           = (IEnumerable <PostaladaElem>)null;
            // ISSUE: explicit reference operation
            // ISSUE: reference to a compiler-generated field
            (^ this).\u003C\u003Et__builder.SetResult();
        }