예제 #1
0
 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;
 }
예제 #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;
 }
예제 #3
0
        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);
        }
예제 #4
0
 public static IApplicationBuilder UseApiResponseAndExceptionWrapper(this IApplicationBuilder builder, AutoWrapperOptions options = default)
 {
     options = options ?? new AutoWrapperOptions();
     return(builder.UseMiddleware <AutoWrapperMiddleware>(options));
 }
예제 #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);
        }