diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-18 19:15:44 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-18 19:15:44 +0800 |
commit | 647006822f01a53dade5ea040210059a98a43196 (patch) | |
tree | 0e7d208f1c0b51c25e185b0a0f852830c10c3bd1 /Timeline/Services/UserAvatarService.cs | |
parent | 39aa54bb10da8b76a4021feb984b8aad0df6269b (diff) | |
download | timeline-647006822f01a53dade5ea040210059a98a43196.tar.gz timeline-647006822f01a53dade5ea040210059a98a43196.tar.bz2 timeline-647006822f01a53dade5ea040210059a98a43196.zip |
Add avatar controller.
Diffstat (limited to 'Timeline/Services/UserAvatarService.cs')
-rw-r--r-- | Timeline/Services/UserAvatarService.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Timeline/Services/UserAvatarService.cs b/Timeline/Services/UserAvatarService.cs index 21153575..4f11978c 100644 --- a/Timeline/Services/UserAvatarService.cs +++ b/Timeline/Services/UserAvatarService.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.IO;
@@ -178,4 +179,13 @@ namespace Timeline.Services }
}
}
+
+ public static class UserAvatarServiceCollectionExtensions
+ {
+ public static void AddUserAvatarService(this IServiceCollection services)
+ {
+ services.AddScoped<IUserAvatarService, UserAvatarService>();
+ services.AddSingleton<IDefaultUserAvatarProvider, DefaultUserAvatarProvider>();
+ }
+ }
}
|