more cleanup

This commit is contained in:
Michele Scandura 2020-11-18 11:22:46 +00:00
parent af441e772b
commit 77832db39d
28 changed files with 45 additions and 105 deletions

View file

@ -1,9 +1,7 @@
using System.Net;
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Sledgemapper.Api.Commands;
using Sledgemapper.Api.Handlers;
using Sledgemapper.Shared.Entities;
using System.Threading.Tasks;

View file

@ -1,8 +1,5 @@
using System;
using System.Security.AccessControl;
using Microsoft.EntityFrameworkCore;
using Sledgemapper.Api.Models;
using System.Reflection;
namespace Sledgemapper.Api.Data
{
public static class DbInitializer

View file

@ -1,10 +1,8 @@
using MediatR;
using Microsoft.AspNetCore.Http.Features;
using Sledgemapper.Api.Data;
using Sledgemapper.Api.Commands;
using Sledgemapper.Api.Notifications;
using Sledgemapper.Shared.Entities;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading;

View file

@ -4,9 +4,7 @@ using Sledgemapper.Api.Data;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Sledgemapper.Api.Commands;
using Sledgemapper.Api.Notifications;
using Sledgemapper.Api.Handlers;
using System.Linq;
using Sledgemapper.Shared.Entities;

View file

@ -12,7 +12,7 @@ namespace Sledgemapper.Helpers
public AppException(string message) : base(message) { }
public AppException(string message, params object[] args)
: base(String.Format(CultureInfo.CurrentCulture, message, args))
: base(string.Format(CultureInfo.CurrentCulture, message, args))
{
}
}

View file

@ -16,7 +16,7 @@ namespace SignalRChat.Hubs
[Authorize]
public class SledgemapperHub : Hub<ISledgemapperClient>
{
private static readonly ConcurrentDictionary<int, string> UserColors = new ConcurrentDictionary<int, string>();
private static readonly ConcurrentDictionary<int, string> UserColors = new();
private readonly MyDbContext _dbContext;
private readonly DataContext _datacontext;
@ -29,7 +29,8 @@ namespace SignalRChat.Hubs
// other colors
// #cca300, #20f200, #004011, #00e6d6, #005c73, #0057d9, #d900ca, #660029, #d9003a
// private static Dictionary<string, Session> _sessions = new Dictionary<string, Session>();
public List<string> Colors = new List<string>{
public List<string> Colors = new()
{
"#e6194B",
"#f58231",
"#3cb44b",

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Sledgemapper.Migrations.SqlServerMigrations
{

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Sledgemapper.Migrations.SqliteMigrations
{

View file

@ -1,4 +1,3 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Sledgemapper.Api.Models

View file

@ -1,5 +1,3 @@
using System.Data;
using System;
using System.ComponentModel.DataAnnotations;
namespace Sledgemapper.Api.Models

View file

@ -1,5 +1,3 @@
using System.Data;
using System;
using System.ComponentModel.DataAnnotations;
namespace Sledgemapper.Api.Models

View file

@ -1,4 +1,3 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Sledgemapper.Api.Models

View file

@ -1,5 +1,3 @@
using System.Data;
using System;
using System.ComponentModel.DataAnnotations;
namespace Sledgemapper.Api.Models

View file

@ -1,5 +1,4 @@
using MediatR;
using Sledgemapper.Shared.Entities;
using System;
namespace Sledgemapper.Api.Notifications

View file

@ -1,6 +1,3 @@
using Sledgemapper.Api.Models;
using Sledgemapper.Shared.Entities;
namespace Sledgemapper.Api.Notifications

View file

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

View file

@ -1,15 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SignalRChat.Hubs;
using MediatR.Pipeline;
using Sledgemapper.Api.Data;
using Microsoft.EntityFrameworkCore;
using MediatR;