/// <summary> /// Begins to stream from this http host /// </summary> /// <param name="content">The package location on remote host</param> public static async Task <Any <Stream> > GetPackage(this HttpClient http, PackageContent content) { if (content.IsValid) { HttpResponseMessage response = await http.GetAsync(content.RemoteLocation); if (response.IsSuccessStatusCode) { return(await response.Content.ReadAsStreamAsync()); } } return(Any <Stream> .Empty); }
public override bool Equals(object obj) { PackageContent settings = (obj as PackageContent); if (settings != null) { return(remoteLocation.Equals(settings.remoteLocation)); } else { return(false); } }