示例#1
0
 /// <summary>
 /// Initializes an <see cref="ErrorInfoProvider"/> with a set of <see cref="ErrorInfoProviderOptions"/> filled out by the specified delegate.
 /// </summary>
 public ErrorInfoProvider(Action <ErrorInfoProviderOptions> optionsBuilder)
 {
     if (optionsBuilder == null)
     {
         throw new ArgumentNullException(nameof(optionsBuilder));
     }
     _options = new ErrorInfoProviderOptions();
     optionsBuilder(_options);
 }
示例#2
0
 /// <summary>
 /// Initializes an <see cref="ErrorInfoProvider"/> with a specified set of <see cref="ErrorInfoProviderOptions"/>.
 /// </summary>
 public ErrorInfoProvider(ErrorInfoProviderOptions options)
 {
     _options = options ?? throw new ArgumentNullException(nameof(options));
 }