Exemplo n.º 1
0
        public async Task <IEnumerable <Bookmark> > GetBookmarks()
        {
            if (!isSignedIn)
            {
                throw new InvalidOperationException("Please sign in first.");
            }

            if (storageClient == null || collectionKeys == null)
            {
                throw new InvalidOperationException("Please make sure you are correctly logged in to the sync service.");
            }

            IEnumerable <BasicStorageObject> collection = await storageClient.GetCollection("bookmarks", true);

            return(Crypto.DecryptWbos <Bookmark>(collectionKeys, collection));
        }
Exemplo n.º 2
0
        public IEnumerable <Bookmark> GetBookmarks()
        {
            if (!_isSignedIn)
            {
                throw new InvalidOperationException("Please sign in first");
            }

            if (_storageClient == null || _collectionKeys == null)
            {
                throw new InvalidOperationException("Please make sure you are correctly logged in to the Sync service");
            }

            IEnumerable <BasicStorageObject> collection = _storageClient.GetCollection("bookmarks", true).Result;

            return(Crypto.DecryptWbos <Bookmark>(_collectionKeys, collection));
        }