/// <summary>
        /// Adds the default service to the service collection
        /// </summary>
        /// <param name="builder">The <see cref="IImageSharpCoreBuilder"/> that can be used to further configure the ImageSharp services</param>
        private static void AddDefaultServices(IImageSharpCoreBuilder builder)
        {
            builder.SetUriParser <QueryCollectionUriParser>();

            builder.SetCache <PhysicalFileSystemCache>();

            builder.AddResolver <PhysicalFileSystemResolver>();

            builder.AddProcessor <ResizeWebProcessor>()
            .AddProcessor <FormatWebProcessor>()
            .AddProcessor <BackgroundColorWebProcessor>();
        }
Example #2
0
        /// <summary>
        /// Adds the default service to the service collection
        /// </summary>
        /// <param name="builder">The <see cref="IImageSharpCoreBuilder"/> that can be used to further configure the ImageSharp services</param>
        private static void AddDefaultServices(IImageSharpCoreBuilder builder)
        {
            builder.SetRequestParser <QueryCollectionRequestParser>();

            builder.SetBufferManager <PooledBufferManager>();

            builder.SetCache <PhysicalFileSystemCache>();

            builder.SetCacheHash <CacheHash>();

            builder.SetAsyncKeyLock <AsyncKeyLock>();

            builder.AddResolver <PhysicalFileSystemResolver>();

            builder.AddProcessor <ResizeWebProcessor>()
            .AddProcessor <FormatWebProcessor>()
            .AddProcessor <BackgroundColorWebProcessor>();
        }