forked from bagetter/BaGetter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added possibility to specify multiple PackageSources in the appsettings.
- Loading branch information
Showing
4 changed files
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace BaGetter.Core; | ||
|
||
public class MirrorSource | ||
{ | ||
public Uri PackageSource { get; set; } | ||
public bool Legacy { get; set; } | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
// Check for null and compare run-time types. | ||
if (obj is null || !GetType().Equals(obj.GetType())) | ||
{ | ||
return false; | ||
} | ||
else | ||
{ | ||
var ms = (MirrorSource)obj; | ||
return (PackageSource.Equals(ms.PackageSource)) && (Legacy == ms.Legacy); | ||
} | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
return HashCode.Combine(PackageSource, Legacy); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters