File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/ImageSharp.Web/Commands Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1- // Copyright (c) Six Labors.
1+ // Copyright (c) Six Labors.
22// Licensed under the Apache License, Version 2.0.
33
44using System ;
@@ -50,14 +50,13 @@ public static ICommandConverter GetConverter(Type type)
5050 /// </exception>
5151 public static void AddConverter ( Type type , Type converter )
5252 {
53- Guard . IsTrue ( typeof ( ICommandConverter ) . IsAssignableFrom ( converter ) , nameof ( converter ) , "Converter does not implement ICommandConverter." ) ;
53+ const string Message = "Converter does not implement ICommandConverter." ;
54+ Guard . IsTrue ( typeof ( ICommandConverter ) . IsAssignableFrom ( converter ) , nameof ( converter ) , Message ) ;
5455
55- if ( ConverterCache . ContainsKey ( type ) )
56+ if ( ! ConverterCache . ContainsKey ( type ) )
5657 {
57- return ;
58+ ConverterCache [ type ] = ( ICommandConverter ) Activator . CreateInstance ( converter ) ;
5859 }
59-
60- ConverterCache [ type ] = ( ICommandConverter ) Activator . CreateInstance ( converter ) ;
6160 }
6261 }
63- }
62+ }
You can’t perform that action at this time.
0 commit comments