public DetailsTagHelper(IDataProtectionProvider protector, IHttpContextAccessor contextAccessor) { var options = NccReflectionService.NccGetClassInstanceWithDi(contextAccessor.HttpContext, NccConstants.OptionsAssemblyName); _nccSettings = options != null ? ((IOptions <NccSettings>)options).Value : new NccSettings(); _protector = protector.CreateProtector(_nccSettings.DataProtectionKey); }
public NccRenderControl(IDataProtectionProvider protector, IRazorViewEngine razorViewEngine, IHttpContextAccessor contextAccessor) { var options = NccReflectionService.NccGetClassInstanceWithDi(contextAccessor.HttpContext, NccConstants.OptionsAssemblyName); _nccSettings = options != null ? ((IOptions <NccSettings>)options).Value : new NccSettings(); _protector = protector.CreateProtector(_nccSettings.DataProtectionKey); _razorViewEngine = razorViewEngine; }