From 5edffd0242a16e9866a1f4e9f1e1d2ff4e549d2c Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 13 Mar 2020 18:03:29 +0800 Subject: Clean code. --- Timeline/Controllers/TimelineController.cs | 1 - Timeline/Controllers/UserAvatarController.cs | 2 -- Timeline/Helpers/Log.cs | 1 - Timeline/Models/Http/UserController.cs | 1 - Timeline/Models/Validation/Validator.cs | 5 +---- Timeline/Services/Clock.cs | 3 --- Timeline/Services/PathProvider.cs | 4 ---- Timeline/Startup.cs | 2 +- 8 files changed, 2 insertions(+), 17 deletions(-) (limited to 'Timeline') diff --git a/Timeline/Controllers/TimelineController.cs b/Timeline/Controllers/TimelineController.cs index 8bc0345f..f1781ff3 100644 --- a/Timeline/Controllers/TimelineController.cs +++ b/Timeline/Controllers/TimelineController.cs @@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using Microsoft.Net.Http.Headers; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/Timeline/Controllers/UserAvatarController.cs b/Timeline/Controllers/UserAvatarController.cs index b5f4be1e..4062837b 100644 --- a/Timeline/Controllers/UserAvatarController.cs +++ b/Timeline/Controllers/UserAvatarController.cs @@ -2,9 +2,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using Microsoft.Net.Http.Headers; using System; -using System.Linq; using System.Threading.Tasks; using Timeline.Auth; using Timeline.Filters; diff --git a/Timeline/Helpers/Log.cs b/Timeline/Helpers/Log.cs index 68c975fa..af0b7e13 100644 --- a/Timeline/Helpers/Log.cs +++ b/Timeline/Helpers/Log.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Text; namespace Timeline.Helpers diff --git a/Timeline/Models/Http/UserController.cs b/Timeline/Models/Http/UserController.cs index e4c95cbd..5ee02a95 100644 --- a/Timeline/Models/Http/UserController.cs +++ b/Timeline/Models/Http/UserController.cs @@ -1,7 +1,6 @@ using AutoMapper; using System.ComponentModel.DataAnnotations; using Timeline.Models.Validation; -using Timeline.Services; namespace Timeline.Models.Http { diff --git a/Timeline/Models/Validation/Validator.cs b/Timeline/Models/Validation/Validator.cs index ead7dbef..db139448 100644 --- a/Timeline/Models/Validation/Validator.cs +++ b/Timeline/Models/Validation/Validator.cs @@ -1,8 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Localization; -using System; +using System; using System.ComponentModel.DataAnnotations; -using Timeline.Helpers; using static Timeline.Resources.Models.Validation.Validator; namespace Timeline.Models.Validation diff --git a/Timeline/Services/Clock.cs b/Timeline/Services/Clock.cs index 0499c0c6..040f9304 100644 --- a/Timeline/Services/Clock.cs +++ b/Timeline/Services/Clock.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Timeline.Services { diff --git a/Timeline/Services/PathProvider.cs b/Timeline/Services/PathProvider.cs index 15e66972..1f6b629a 100644 --- a/Timeline/Services/PathProvider.cs +++ b/Timeline/Services/PathProvider.cs @@ -1,9 +1,5 @@ using Microsoft.Extensions.Configuration; -using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Threading.Tasks; namespace Timeline.Services { diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index 38bb3164..f5220446 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -108,7 +108,7 @@ namespace Timeline services.TryAddSingleton(); - services.AddDbContext((services, options )=> + services.AddDbContext((services, options) => { var pathProvider = services.GetRequiredService(); options.UseSqlite($"Data Source={pathProvider.GetDatabaseFilePath()}"); -- cgit v1.2.3