Minor cleanup

This commit is contained in:
moozzyk 2016-11-08 13:14:56 -08:00
parent b865716841
commit 357f5f85bb
3 changed files with 2 additions and 8 deletions

View File

@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace SocialWeather
namespace SocialWeather.Json
{
public class JsonStreamFormatter<T> : IStreamFormatter<T>
{

View File

@ -10,8 +10,6 @@ namespace SocialWeather
private readonly PersistentConnectionLifeTimeManager _lifetimeManager;
private readonly FormatterResolver _formatterResolver;
private readonly ILogger<SocialWeatherEndPoint> _logger;
private object _lockObj = new object();
private WeatherReport _lastWeatherReport;
public SocialWeatherEndPoint(PersistentConnectionLifeTimeManager lifetimeManager,
FormatterResolver formatterResolver, ILogger<SocialWeatherEndPoint> logger)
@ -37,10 +35,6 @@ namespace SocialWeather
WeatherReport weatherReport;
while ((weatherReport = await formatter.ReadAsync(stream)) != null)
{
lock(_lockObj)
{
_lastWeatherReport = weatherReport;
}
await _lifetimeManager.SendToAllAsync(weatherReport);
}
}

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using SocialWeather.Json;
using SocialWeather.Pipe;
using SocialWeather.Protobuf;