/// <summary>
 /// Initializes a new instance of the <see cref="OpenWaveRestApiEncoder" /> class.
 /// </summary>
 /// <param name="imageTransformService">The image transform service.</param>
 /// <param name="imageTransformationBuilderFactory">The image transformation builder factory.</param>
 /// <param name="defaultImageTransform">The image transform type that should be used if not specified in query.</param>
 /// <param name="queryAuthorizer">The image transformation query authorizer.</param>
 public OpenWaveRestApiEncoder(
     IWebImageTransformationService imageTransformService = null,
     IImageTransformationBuilderFactory imageTransformationBuilderFactory = null,
     ImageTransform? defaultImageTransform = null,
     IQueryAuthorizer queryAuthorizer = null)
 {
     ImageTransformationService = imageTransformService ?? OpenWaves.ServiceLocator.Resolve<IWebImageTransformationService>();
     ImageTransformationBuilderFactory = imageTransformationBuilderFactory ?? OpenWaves.ServiceLocator.Resolve<IImageTransformationBuilderFactory>();
     DefaultImageTransform = defaultImageTransform ?? Config.DefaultTransform;
     QueryAuthorizer = queryAuthorizer ?? OpenWaves.ServiceLocator.Resolve<IQueryAuthorizer>();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenWaveRestApiEncoder" /> class.
        /// </summary>
        /// <param name="imageTransformService">The image transform service.</param>
        /// <param name="imageTransformationBuilderFactory">The image transformation builder factory.</param>
        /// <param name="defaultImageTransform">The image transform type that should be used if not specified in query.</param>
        /// <param name="imageTransformationParser">The image transformation parser.</param>
        public OpenWaveRestApiEncoder(
            IWebImageTransformationService imageTransformService = null,
            IImageTransformationBuilderFactory imageTransformationBuilderFactory = null,
            ImageTransform? defaultImageTransform = null,
            IImageTransformationParser imageTransformationParser = null)
        {
            ImageTransformationService = imageTransformService ?? OpenWaves.ServiceLocator.Resolve<IWebImageTransformationService>();
            ImageTransformationBuilderFactory = imageTransformationBuilderFactory ?? OpenWaves.ServiceLocator.Resolve<IImageTransformationBuilderFactory>();
            DefaultImageTransform = defaultImageTransform ?? Config.DefaultTransform;

            var wrapResolver = new WrapResolver(ServiceLocatorUtils.GetCurrentResolver());
            wrapResolver.Register<IImageTransformationParser>(imageTransformationParser ?? new UniversalImageTransformationParser());
            ServiceLocator.SetResolver(wrapResolver);
        }