File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/ImageSharp.Web/DependencyInjection Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -54,26 +54,20 @@ public static IImageSharpBuilder SetRequestParser(this IImageSharpBuilder builde
5454 /// <param name="builder">The core builder.</param>
5555 /// <param name="implementationFactory">The factory method for returning a <see cref="MemoryAllocator"/>.</param>
5656 /// <returns>The <see cref="IImageSharpBuilder"/>.</returns>
57+ [ Obsolete ( "Use ImageSharp.Configuration.MemoryAllocator. This will be removed in a future version." , true ) ]
5758 public static IImageSharpBuilder SetMemoryAllocator ( this IImageSharpBuilder builder , Func < IServiceProvider , MemoryAllocator > implementationFactory )
58- {
59- var descriptor = new ServiceDescriptor ( typeof ( MemoryAllocator ) , implementationFactory , ServiceLifetime . Singleton ) ;
60- builder . Services . Replace ( descriptor ) ;
61- return builder ;
62- }
59+ => builder ;
6360
6461 /// <summary>
6562 /// Sets the given <see cref="MemoryAllocator"/> adding it to the service collection.
6663 /// </summary>
6764 /// <typeparam name="TMemoryAllocator">The type of class implementing <see cref="MemoryAllocator"/>to add.</typeparam>
6865 /// <param name="builder">The core builder.</param>
6966 /// <returns>The <see cref="IImageSharpBuilder"/>.</returns>
67+ [ Obsolete ( "Use ImageSharp.Configuration.MemoryAllocator. This will be removed in a future version." , true ) ]
7068 public static IImageSharpBuilder SetMemoryAllocator < TMemoryAllocator > ( this IImageSharpBuilder builder )
7169 where TMemoryAllocator : MemoryAllocator
72- {
73- var descriptor = new ServiceDescriptor ( typeof ( MemoryAllocator ) , typeof ( TMemoryAllocator ) , ServiceLifetime . Singleton ) ;
74- builder . Services . Replace ( descriptor ) ;
75- return builder ;
76- }
70+ => builder ;
7771
7872 /// <summary>
7973 /// Sets the given <see cref="IImageCache"/> adding it to the service collection.
You can’t perform that action at this time.
0 commit comments