Reformat and apply Stylecop rules

This commit is contained in:
ta264
2019-12-22 22:08:53 +00:00
committed by Qstick
parent d4fa9b7345
commit f02fa629cc
1186 changed files with 7105 additions and 5616 deletions

View File

@@ -50,7 +50,6 @@ namespace Radarr.Http.ClientSchema
}
return target;
}
public static T ReadFromSchema<T>(List<Field> fields)
@@ -58,7 +57,6 @@ namespace Radarr.Http.ClientSchema
return (T)ReadFromSchema(fields, typeof(T));
}
// Ideally this function should begin a System.Linq.Expression expression tree since it's faster.
// But it's probably not needed till performance issues pop up.
public static FieldMapping[] GetFieldMappings(Type type)
@@ -78,6 +76,7 @@ namespace Radarr.Http.ClientSchema
_mappings[type] = result;
}
return result;
}
}
@@ -156,32 +155,26 @@ namespace Radarr.Http.ClientSchema
{
return fieldValue => fieldValue?.ToString().ParseInt32() ?? 0;
}
else if (propertyType == typeof(long))
{
return fieldValue => fieldValue?.ToString().ParseInt64() ?? 0;
}
else if (propertyType == typeof(double))
{
return fieldValue => fieldValue?.ToString().ParseDouble() ?? 0.0;
}
else if (propertyType == typeof(int?))
{
return fieldValue => fieldValue?.ToString().ParseInt32();
}
else if (propertyType == typeof(Int64?))
else if (propertyType == typeof(long?))
{
return fieldValue => fieldValue?.ToString().ParseInt64();
}
else if (propertyType == typeof(double?))
{
return fieldValue => fieldValue?.ToString().ParseDouble();
}
else if (propertyType == typeof(IEnumerable<int>))
{
return fieldValue =>
@@ -196,7 +189,6 @@ namespace Radarr.Http.ClientSchema
}
};
}
else if (propertyType == typeof(IEnumerable<string>))
{
return fieldValue =>
@@ -211,7 +203,6 @@ namespace Radarr.Http.ClientSchema
}
};
}
else
{
return fieldValue => fieldValue;
@@ -220,7 +211,7 @@ namespace Radarr.Http.ClientSchema
private static string GetCamelCaseName(string name)
{
return Char.ToLowerInvariant(name[0]) + name.Substring(1);
return char.ToLowerInvariant(name[0]) + name.Substring(1);
}
}
}