mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Reformat and apply Stylecop rules
This commit is contained in:
@@ -9,7 +9,6 @@ namespace NzbDrone.Core.CustomFormats
|
||||
{
|
||||
public CustomFormat()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CustomFormat(string name, params string[] tags)
|
||||
@@ -31,17 +30,37 @@ namespace NzbDrone.Core.CustomFormats
|
||||
|
||||
public bool Equals(CustomFormat other)
|
||||
{
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
if (ReferenceEquals(null, other))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, other))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return int.Equals(Id, other.Id);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((CustomFormat) obj);
|
||||
if (ReferenceEquals(null, obj))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, obj))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (obj.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return Equals((CustomFormat)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
@@ -60,9 +79,12 @@ namespace NzbDrone.Core.CustomFormats
|
||||
public static List<CustomFormat> WithNone(this IEnumerable<CustomFormat> formats)
|
||||
{
|
||||
var list = formats.ToList();
|
||||
if (list.Any()) return list;
|
||||
if (list.Any())
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
return new List<CustomFormat>{CustomFormat.None};
|
||||
return new List<CustomFormat> { CustomFormat.None };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user