Skip to content

Commit

Permalink
Remove unused declared variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tsimbalar committed Oct 16, 2017
1 parent fc4b4f2 commit 3377bf3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions test/Serilog.Tests/MethodOverloadConventionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,7 @@ public void ValidateIsEnabledMethods(Type loggerType)
Assert.Equal(parameter.Name, "level");
Assert.Equal(parameter.ParameterType, typeof(LogEventLevel));

CollectingSink sink;

var logger = GetLogger(loggerType, out sink, LogEventLevel.Information);
var logger = GetLogger(loggerType, out _, LogEventLevel.Information);

var falseResult = InvokeMethod(method, logger, new object[] { LogEventLevel.Verbose });

Expand Down Expand Up @@ -761,10 +759,7 @@ static void InvokeConventionMethod(

static void InvokeConventionMethod(MethodInfo method, Type[] typeArgs, object[] parameters)
{
CollectingSink sink;
LogEventLevel level;

InvokeConventionMethod(method, typeArgs, parameters, out level, out sink);
InvokeConventionMethod(method, typeArgs, parameters, out _, out _);
}

static void InvokeConventionMethodAndTest(MethodInfo method, Type[] typeArgs, object[] parameters)
Expand Down Expand Up @@ -901,9 +896,7 @@ static void EvaluateSingleResult(LogEventLevel level, CollectingSink results)

static ILogger GetLogger(Type loggerType)
{
CollectingSink sink;

return GetLogger(loggerType, out sink);
return GetLogger(loggerType, out _);
}

static ILogger GetLogger(Type loggerType, out CollectingSink sink, LogEventLevel level = LogEventLevel.Verbose)
Expand Down Expand Up @@ -940,4 +933,4 @@ static ILogger GetLogger(Type loggerType, out CollectingSink sink, LogEventLevel
throw new ArgumentException($"Logger Type of {loggerType} is not supported");
}
}
}
}

0 comments on commit 3377bf3

Please sign in to comment.