diff options
author | crupest <crupest@outlook.com> | 2020-03-13 18:03:29 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-03-13 18:03:29 +0800 |
commit | 1af4f51abcd09be68bc0e2ad77b163569a50a6b3 (patch) | |
tree | 23167ac72ad2a0a878eacbfec7fdd9b8b4a81c55 /Timeline | |
parent | 671590b071cccfb889e68c3f74581fcf15a02921 (diff) | |
download | timeline-1af4f51abcd09be68bc0e2ad77b163569a50a6b3.tar.gz timeline-1af4f51abcd09be68bc0e2ad77b163569a50a6b3.tar.bz2 timeline-1af4f51abcd09be68bc0e2ad77b163569a50a6b3.zip |
Clean code.
Diffstat (limited to 'Timeline')
-rw-r--r-- | Timeline/Controllers/TimelineController.cs | 1 | ||||
-rw-r--r-- | Timeline/Controllers/UserAvatarController.cs | 2 | ||||
-rw-r--r-- | Timeline/Helpers/Log.cs | 1 | ||||
-rw-r--r-- | Timeline/Models/Http/UserController.cs | 1 | ||||
-rw-r--r-- | Timeline/Models/Validation/Validator.cs | 5 | ||||
-rw-r--r-- | Timeline/Services/Clock.cs | 3 | ||||
-rw-r--r-- | Timeline/Services/PathProvider.cs | 4 | ||||
-rw-r--r-- | Timeline/Startup.cs | 2 |
8 files changed, 2 insertions, 17 deletions
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<IActionContextAccessor, ActionContextAccessor>();
- services.AddDbContext<DatabaseContext>((services, options )=>
+ services.AddDbContext<DatabaseContext>((services, options) =>
{
var pathProvider = services.GetRequiredService<IPathProvider>();
options.UseSqlite($"Data Source={pathProvider.GetDatabaseFilePath()}");
|