Пример #1
0
        public void Init()
        {
            _repository = new AppErrorInfoRepository();
            _service    = new AppErrorInfoService(_repository);
            var principal = new ClaimsPrincipal();

            principal.AddIdentity(new ClaimsIdentity(new[] { new Claim(ClaimTypes.Sid, "User1Id") }));
            _controller = new AppErrorInfoController(_service)
            {
                User = principal
            };
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AppErrorInfoService"/> class.
 /// </summary>
 /// <param name="appErrorInfoRepository">
 /// The AppErrorInfo repository.
 /// </param>
 public AppErrorInfoService(IAppErrorInfoRepository appErrorInfoRepository)
 {
     _appErrorInfoRepository = appErrorInfoRepository;
 }