mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-27 03:04:49 +03:00
ReSharper format: conform inline 'out' parameters.
This commit is contained in:
@@ -114,9 +114,7 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
var dateText = result.ToString();
|
||||
|
||||
DateTime dateTimeResult;
|
||||
|
||||
if (DateTime.TryParseExact(dateText, _datetimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out dateTimeResult))
|
||||
if (DateTime.TryParseExact(dateText, _datetimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out var dateTimeResult))
|
||||
{
|
||||
return dateTimeResult.ToUniversalTime();
|
||||
}
|
||||
@@ -201,8 +199,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, double value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value);
|
||||
}
|
||||
@@ -214,8 +211,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, string value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -234,8 +230,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, bool value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value);
|
||||
}
|
||||
@@ -247,8 +242,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, float value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value);
|
||||
}
|
||||
@@ -260,8 +254,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, int value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value);
|
||||
}
|
||||
@@ -273,8 +266,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, Guid value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value.ToGuidBlob());
|
||||
}
|
||||
@@ -286,8 +278,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, DateTime value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value.ToDateTimeParamValue());
|
||||
}
|
||||
@@ -299,8 +290,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, long value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value);
|
||||
}
|
||||
@@ -312,8 +302,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBind(this IStatement statement, string name, byte[] value)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.Bind(value);
|
||||
}
|
||||
@@ -325,8 +314,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
public static void TryBindNull(this IStatement statement, string name)
|
||||
{
|
||||
IBindParameter bindParam;
|
||||
if (statement.BindParameters.TryGetValue(name, out bindParam))
|
||||
if (statement.BindParameters.TryGetValue(name, out var bindParam))
|
||||
{
|
||||
bindParam.BindNull();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user