mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
Reformat and apply Stylecop rules
This commit is contained in:
@@ -25,10 +25,7 @@ namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
var res = new XElement(
|
||||
root.Name.LocalName,
|
||||
root.HasElements ?
|
||||
root.Elements().Select(StripNameSpace) :
|
||||
(object)root.Value
|
||||
);
|
||||
root.HasElements ? root.Elements().Select(StripNameSpace) : (object)root.Value);
|
||||
|
||||
res.ReplaceAttributes(
|
||||
root.Attributes().Where(attr => (!attr.IsNamespaceDeclaration)));
|
||||
@@ -46,6 +43,7 @@ namespace NzbDrone.Core.Indexers
|
||||
dateString = RemoveTimeZoneRegex.Replace(dateString, "");
|
||||
result = DateTime.Parse(dateString, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal);
|
||||
}
|
||||
|
||||
return result.ToUniversalTime();
|
||||
}
|
||||
catch (FormatException e)
|
||||
@@ -109,7 +107,6 @@ namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
return (T)Convert.ChangeType(element.Value, typeof(T));
|
||||
}
|
||||
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
return defaultValue;
|
||||
|
||||
Reference in New Issue
Block a user