Inheritance: System.Uri
        public System.Net.WebRequest Create(Uri uri)
        {
            var providerUri = new StorageUri(uri);
            var provider = _storageService.GetProviderByUri(providerUri);
            var itemPath = providerUri.GetPath();

            return new KeeAnywhereWebRequest(provider, itemPath);
        }
Beispiel #2
0
        public IStorageProvider GetProviderByUri(StorageUri uri)
        {
            var descriptor = StorageRegistry.Descriptors.FirstOrDefault(_ => _.Scheme == uri.Scheme);
            if (descriptor == null)
                throw new NotImplementedException(string.Format("A provider for scheme '{0}' is not implemented.",
                    uri.Scheme));

            var accountName = uri.GetAccountName();
            var account = _configService.FindAccount(descriptor.Type, accountName);
            var provider = descriptor.ProviderFactory(account);

            return provider;
        }
Beispiel #3
0
        public IStorageProvider GetProviderByUri(string uriString)
        {
            var uri = new StorageUri(uriString);

            return GetProviderByUri(uri);
        }
        public IStorageProvider GetProviderByUri(string uriString)
        {
            var uri = new StorageUri(uriString);

            return(GetProviderByUri(uri));
        }