aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-31 00:10:23 +0800
committercrupest <crupest@outlook.com>2020-01-31 00:10:23 +0800
commit038e8dcf461d4d4ebd51c8fdf7680497869f691c (patch)
treedfd6ca1258d61ed91e59be620a39159919d07a3f /Timeline/Models
parent5aaa4f95e6bdd46e6740c1ecbbd46bdf415eedd2 (diff)
downloadtimeline-038e8dcf461d4d4ebd51c8fdf7680497869f691c.tar.gz
timeline-038e8dcf461d4d4ebd51c8fdf7680497869f691c.tar.bz2
timeline-038e8dcf461d4d4ebd51c8fdf7680497869f691c.zip
...
Diffstat (limited to 'Timeline/Models')
-rw-r--r--Timeline/Models/Http/UserInfo.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Timeline/Models/Http/UserInfo.cs b/Timeline/Models/Http/UserInfo.cs
index 62d989a2..07ac0aad 100644
--- a/Timeline/Models/Http/UserInfo.cs
+++ b/Timeline/Models/Http/UserInfo.cs
@@ -31,11 +31,13 @@ namespace Timeline.Models.Http
public class UserInfoAvatarUrlValueResolver : IValueResolver<User, IUserInfo, string>
{
- private readonly IActionContextAccessor _actionContextAccessor;
- private readonly IUrlHelperFactory _urlHelperFactory;
+ private readonly IActionContextAccessor? _actionContextAccessor;
+ private readonly IUrlHelperFactory? _urlHelperFactory;
public UserInfoAvatarUrlValueResolver()
{
+ _actionContextAccessor = null;
+ _urlHelperFactory = null;
}
public UserInfoAvatarUrlValueResolver(IActionContextAccessor actionContextAccessor, IUrlHelperFactory urlHelperFactory)
@@ -51,7 +53,7 @@ namespace Timeline.Models.Http
return $"/users/{destination.Username}/avatar";
}
- var urlHelper = _urlHelperFactory.GetUrlHelper(_actionContextAccessor.ActionContext);
+ var urlHelper = _urlHelperFactory!.GetUrlHelper(_actionContextAccessor.ActionContext);
return urlHelper.ActionLink(nameof(UserAvatarController.Get), nameof(UserAvatarController), new { destination.Username });
}
}