public Verificator(MockBehavior behavior, IErrorFormatter errorFormatter) { Contract.Requires(errorFormatter != null, "errorFormatter should not be null."); _behavior = behavior; _errorFormatter = errorFormatter; }
/// <summary> /// Initializes a new instance of the <see cref="HttpErrorHandler"/> class. /// </summary> /// <param name="formatter">Used to format the response using the uncaught exception.</param> public HttpErrorHandler(IErrorFormatter formatter) { if (formatter == null) { throw new ArgumentNullException("formatter"); } _formatter = formatter; }
public UsersController( ApiContext context, Iserializer serializer, IErrorFormatter errorFormatter, IConfiguration config, UserManager <UserDTO> userManager, SignInManager <UserDTO> signInManager) : base(context, serializer, errorFormatter) { _userManager = userManager; _signInManager = signInManager; _jwt = new JwtService(config); }
public void SetErrorFormatter([NotNull] Control control, [CanBeNull] IErrorFormatter errorFormatter) { Ensure.ArgumentNotNull(control, "control"); var changeKind = this.errorFormatters.Modify(control, errorFormatter); if (changeKind == ChangeKind.Added) { control.Validating += this.Validate; } else if (changeKind == ChangeKind.Removed) { control.Validating -= this.Validate; } }
/// <summary> /// Initializes a new instance of the <see cref="HttpErrorHandler"/> class. /// </summary> /// <param name="formatter">Used to format the response using the uncaught exception.</param> public HttpErrorHandler(IErrorFormatter formatter) { if (formatter == null) throw new ArgumentNullException("formatter"); _formatter = formatter; }
public ApiControllerBase(ApiContext context, Iserializer serializer, IErrorFormatter errorFormatter) { Serializer = serializer; ErrorFormatter = errorFormatter; Context = context; }
/// <summary> /// Creates a new ErrorDocumentFormatter /// </summary> /// <param name="errorFormatter"></param> /// <param name="metadataFormatter"></param> public ErrorDocumentFormatter(IErrorFormatter errorFormatter, IMetadataFormatter metadataFormatter) { _errorFormatter = errorFormatter; _metadataFormatter = metadataFormatter; }
public QuizController(ApiContext context, Iserializer serializer, IErrorFormatter errorFormatter) : base(context, serializer, errorFormatter) { }
public RecommendationController(ApiContext context, Iserializer serializer, IErrorFormatter errorFormatter, IScoreService scoreService) : base(context, serializer, errorFormatter) { _scoreService = scoreService; }