Renamed private fields according to coding guidelinesù

This commit is contained in:
LivioF 2017-09-10 12:46:36 +02:00 committed by Pawel Kadluczka
parent eec4b33cff
commit fea0db3814
1 changed files with 8 additions and 8 deletions

View File

@ -17,8 +17,8 @@ namespace Microsoft.AspNetCore.SignalR.Tests.Common
{ {
private ILoggerFactory _loggerFactory; private ILoggerFactory _loggerFactory;
private ILogger _logger; private ILogger _logger;
private IWebHost host; private IWebHost _host;
private IApplicationLifetime lifetime; private IApplicationLifetime _lifetime;
private readonly IDisposable _logToken; private readonly IDisposable _logToken;
public string BaseUrl => "http://localhost:3000"; public string BaseUrl => "http://localhost:3000";
@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests.Common
private void StartServer() private void StartServer()
{ {
host = new WebHostBuilder() _host = new WebHostBuilder()
.ConfigureLogging(builder => builder.AddProvider(new ForwardingLoggerProvider(_loggerFactory))) .ConfigureLogging(builder => builder.AddProvider(new ForwardingLoggerProvider(_loggerFactory)))
.UseStartup(typeof(TStartup)) .UseStartup(typeof(TStartup))
.UseKestrel() .UseKestrel()
@ -44,10 +44,10 @@ namespace Microsoft.AspNetCore.SignalR.Tests.Common
.UseContentRoot(Directory.GetCurrentDirectory()) .UseContentRoot(Directory.GetCurrentDirectory())
.Build(); .Build();
var t = Task.Run(() => host.Start()); var t = Task.Run(() => _host.Start());
_logger.LogInformation("Starting test server..."); _logger.LogInformation("Starting test server...");
lifetime = host.Services.GetRequiredService<IApplicationLifetime>(); _lifetime = _host.Services.GetRequiredService<IApplicationLifetime>();
if (!lifetime.ApplicationStarted.WaitHandle.WaitOne(TimeSpan.FromSeconds(5))) if (!_lifetime.ApplicationStarted.WaitHandle.WaitOne(TimeSpan.FromSeconds(5)))
{ {
// t probably faulted // t probably faulted
if (t.IsFaulted) if (t.IsFaulted)
@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests.Common
} }
_logger.LogInformation("Test Server started"); _logger.LogInformation("Test Server started");
lifetime.ApplicationStopped.Register(() => _lifetime.ApplicationStopped.Register(() =>
{ {
_logger.LogInformation("Test server shut down"); _logger.LogInformation("Test server shut down");
_logToken.Dispose(); _logToken.Dispose();
@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests.Common
public void Dispose() public void Dispose()
{ {
_logger.LogInformation("Shutting down test server"); _logger.LogInformation("Shutting down test server");
host.Dispose(); _host.Dispose();
_loggerFactory.Dispose(); _loggerFactory.Dispose();
} }