@@ -10,45 +10,25 @@ namespace ImageMagick.Configuration;
1010/// </summary>
1111public sealed class ConfigurationFiles : IConfigurationFiles
1212{
13- private ConfigurationFiles (
14- IConfigurationFile colors ,
15- IConfigurationFile configure ,
16- IConfigurationFile delegates ,
17- IConfigurationFile english ,
18- IConfigurationFile locale ,
19- IConfigurationFile log ,
20- IConfigurationFile policy ,
21- IConfigurationFile thresholds ,
22- IConfigurationFile type ,
23- IConfigurationFile typeGhostscript )
13+ private ConfigurationFiles ( )
2414 {
25- Colors = colors ;
26- Configure = configure ;
27- Delegates = delegates ;
28- English = english ;
29- Locale = locale ;
30- Log = log ;
31- Policy = policy ;
32- Thresholds = thresholds ;
33- Type = type ;
34- TypeGhostscript = typeGhostscript ;
15+ Colors = new ConfigurationFile ( " colors.xml" ) ;
16+ Configure = new ConfigurationFile ( " configure.xml" ) ;
17+ Delegates = new ConfigurationFile ( " delegates.xml" ) ;
18+ English = new ConfigurationFile ( " english.xml" ) ;
19+ Locale = new ConfigurationFile ( " locale.xml" ) ;
20+ Log = new ConfigurationFile ( " log.xml" ) ;
21+ Policy = new ConfigurationFile ( " policy.xml" ) ;
22+ Thresholds = new ConfigurationFile ( " thresholds.xml" ) ;
23+ Type = new ConfigurationFile ( " type.xml" ) ;
24+ TypeGhostscript = new ConfigurationFile ( "type-ghostscript.xml" ) ;
3525 }
3626
3727 /// <summary>
3828 /// Gets the default configuration.
3929 /// </summary>
4030 public static IConfigurationFiles Default
41- => new ConfigurationFiles (
42- colors : new ConfigurationFile ( "colors.xml" ) ,
43- configure : new ConfigurationFile ( "configure.xml" ) ,
44- delegates : new ConfigurationFile ( "delegates.xml" ) ,
45- english : new ConfigurationFile ( "english.xml" ) ,
46- locale : new ConfigurationFile ( "locale.xml" ) ,
47- log : new ConfigurationFile ( "log.xml" ) ,
48- policy : new ConfigurationFile ( "policy.xml" ) ,
49- thresholds : new ConfigurationFile ( "thresholds.xml" ) ,
50- type : new ConfigurationFile ( "type.xml" ) ,
51- typeGhostscript : new ConfigurationFile ( "type-ghostscript.xml" ) ) ;
31+ => new ConfigurationFiles ( ) ;
5232
5333 /// <summary>
5434 /// Gets all the configuration files.
@@ -125,26 +105,4 @@ IConfigurationFiles IConfigurationFiles.Default
125105 /// Gets the type-ghostscript configuration.
126106 /// </summary>
127107 public IConfigurationFile TypeGhostscript { get ; }
128-
129- /// <summary>
130- /// Creates a new configuration with Inkscape enabled.
131- /// </summary>
132- /// <returns>A new configuration with Inkscape enabled.</returns>
133- public IConfigurationFiles WithInkscapeEnabled ( )
134- {
135- var delegates = new ConfigurationFile ( Delegates ) ;
136- delegates . Data = delegates . Data . Replace ( @"<!--<delegate decode=""svg:decode"" stealth=""True"" command="""inkscape" "%s" - -export-filename="%s" - -export-dpi="%s" - -export-background="%s" - -export-background-opacity="%s" > "%s" 2>&1""/>-->" , @"<delegate decode=""svg:decode"" stealth=""True"" command="""inkscape" "%s" --export-filename="%s" --export-dpi="%s" --export-background="%s" --export-background-opacity="%s" > "%s" 2>&1""/>" ) ;
137-
138- return new ConfigurationFiles (
139- colors : new ConfigurationFile ( Colors ) ,
140- configure : new ConfigurationFile ( Configure ) ,
141- delegates : new ConfigurationFile ( delegates ) ,
142- english : new ConfigurationFile ( English ) ,
143- locale : new ConfigurationFile ( Locale ) ,
144- log : new ConfigurationFile ( Log ) ,
145- policy : new ConfigurationFile ( Policy ) ,
146- thresholds : new ConfigurationFile ( Thresholds ) ,
147- type : new ConfigurationFile ( Type ) ,
148- typeGhostscript : new ConfigurationFile ( TypeGhostscript ) ) ;
149- }
150108}
0 commit comments