public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { this.encrtpyHelper = context.HttpContext.RequestServices.GetService <IEncrtpyHelper>(); //// execute any code before the action executes UnprotectProperties(context); var result = await next(); // execute any code after the action executes }
public ProtectStringValueProviderX(System.Reflection.PropertyInfo pi, IEncrtpyHelper encryptHelper) { this.targetProperty = pi; this.encryptHelper = encryptHelper; }
public ProtectedStringPropertyResolverX(IServiceProvider serviceProvider) { encrtpyHelper = (IEncrtpyHelper)serviceProvider.GetService(typeof(IEncrtpyHelper)); }