예제 #1
0
        public void Push(string url, NetworkCredential credential, string name, Stream stream)
        {
            var repository = new IndexedHttpRepositoryFactory(new WebRequestHttpClient()).FromUserInput(url);

            using (var authenticated = repository.Feature <ISupportAuthentication>().WithCredentials(credential))
                repository.Feature <ISupportPublishing>().Publisher().Publish(name, stream);
        }
예제 #2
0
        public object Count(string url, NetworkCredential credential)
        {
            var repository = new IndexedHttpRepositoryFactory(new WebRequestHttpClient()).FromUserInput(url);

            return(repository.PackagesByName.Count);
        }