ArcGISPortalViewer.ViewModel.MainViewModel.GetMyMapsAsync C# (CSharp) Method

GetMyMapsAsync() private method

private GetMyMapsAsync ( ) : Task>
return Task>
        private async Task<IEnumerable<ArcGISPortalItem>> GetMyMapsAsync() 
        {
            var ps = PortalService.CurrentPortalService;
            if (PortalService.CurrentPortalService.CurrentUser == null)
                return null;

            // modify query string to get the maps owned by the current user
            SearchParameters searchParam = SearchService.CreateSearchParameters("", PortalQuery.MyMaps, 1, 100);
            searchParam.QueryString = string.Format(" ({0}) AND (owner: {1}) ", searchParam.QueryString,  ps.CurrentUser.UserName);

            IsLoadingData = true;
            SearchResultInfo<ArcGISPortalItem> r = await ps.GetSearchResults(searchParam);           
            IsLoadingData = false;
            if (r == null) return null;
            return r.Results;
        }