Skip to content

Commit

Permalink
(GH-5) Adjust to use IPackageDownloader
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Mar 1, 2017
1 parent b3096c6 commit ee5f731
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Core/Packages/DataServicePackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ internal IDataServiceContext Context
set;
}

internal PackageDownloader Downloader { get; set; }
internal IPackageDownloader Downloader { get; set; }

internal IHashProvider HashProvider
{
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Repositories/DataServicePackageRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DataServicePackageRepository :

private IDataServiceContext _context;
private readonly IHttpClient _httpClient;
private readonly PackageDownloader _packageDownloader;
private readonly IPackageDownloader _packageDownloader;
private CultureInfo _culture;
private Tuple<string, string, string> _currentOperation;
private event EventHandler<WebRequestEventArgs> _sendingRequest;
Expand All @@ -45,7 +45,7 @@ public DataServicePackageRepository(IHttpClient client)
{
}

public DataServicePackageRepository(IHttpClient client, PackageDownloader packageDownloader)
public DataServicePackageRepository(IHttpClient client, IPackageDownloader packageDownloader)
{
if (client == null)
{
Expand Down Expand Up @@ -148,7 +148,7 @@ public CultureInfo Culture
}

// Do NOT delete this property. It is used by the functional test.
public PackageDownloader PackageDownloader
public IPackageDownloader PackageDownloader
{
get { return _packageDownloader; }
}
Expand Down
1 change: 1 addition & 0 deletions src/Core/Utility/IPackageDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace NuGet

public interface IPackageDownloader : IHttpClientEvents
{
string CurrentDownloadPackageId { get; }
void DownloadPackage(Uri uri, IPackageMetadata package, Stream targetStream);
void DownloadPackage(IHttpClient downloadClient, IPackageName package, Stream targetStream);
}
Expand Down

0 comments on commit ee5f731

Please sign in to comment.