public AutoWrapperMembers(AutoWrapperOptions options, ILogger <AutoWrapperMiddleware> logger, JsonSerializerSettings jsonSettings, Dictionary <string, string> propertyMappings = null, bool hasSchemaForMappping = false)
 {
     _options              = options;
     _logger               = logger;
     _jsonSettings         = jsonSettings;
     _propertyMappings     = propertyMappings;
     _hasSchemaForMappping = hasSchemaForMappping;
 }
Example #2
0
 public AutoWrapperMembers(AutoWrapperOptions options, ILogger <AutoWrapperMiddleware> logger, JsonSerializerSettings jsonSettings, Dictionary <string, string> propertyMappings = null, bool isCustomObjectUsed = false)
 {
     _options            = options;
     _logger             = logger;
     _jsonSettings       = jsonSettings;
     _propertyMappings   = propertyMappings;
     _isCustomObjectUsed = isCustomObjectUsed;
 }
        public AutoWrapperMiddleware(RequestDelegate next, AutoWrapperOptions options, ILogger <AutoWrapperMiddleware> logger, IActionResultExecutor <ObjectResult> executor) : base(next, options, logger, executor)
        {
            var jsonSettings = Helpers.JSONHelper.GetJSONSettings(options.IgnoreNullValue, options.ReferenceLoopHandling, options.UseCamelCaseNamingStrategy);

            _awm = new AutoWrapperMembers(options, logger, jsonSettings);
        }
Example #4
0
 public static IApplicationBuilder UseApiResponseAndExceptionWrapper(this IApplicationBuilder builder, AutoWrapperOptions options = default)
 {
     options = options ?? new AutoWrapperOptions();
     return(builder.UseMiddleware <AutoWrapperMiddleware>(options));
 }
Example #5
0
        public AutoWrapperMiddleware(RequestDelegate next, AutoWrapperOptions options, ILogger <AutoWrapperMiddleware> logger) : base(next, options, logger)
        {
            var jsonSettings = Helpers.JSONHelper.GetJSONSettings(options.IgnoreNullValue, options.UseCamelCaseNamingStrategy);

            _awm = new AutoWrapperMembers(options, logger, jsonSettings);
        }