File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace ImageWizard.Caches;
1010class OneTimeCache : ICache
1111{
1212 private IMetadata ? _metadata ;
13- private byte [ ] _data = Array . Empty < byte > ( ) ;
13+ private byte [ ] _data = [ ] ;
1414
1515 public async Task < ICachedData ? > ReadAsync ( string key )
1616 {
Original file line number Diff line number Diff line change @@ -7,21 +7,15 @@ namespace ImageWizard.Loaders;
77/// <summary>
88/// HttpHeaderItem
99/// </summary>
10- public class HttpHeaderItem
10+ public class HttpHeaderItem ( string name , string value )
1111{
12- public HttpHeaderItem ( string name , string value )
13- {
14- Name = name ;
15- Value = value ;
16- }
17-
1812 /// <summary>
1913 /// Name
2014 /// </summary>
21- public string Name { get ; set ; }
15+ public string Name { get ; set ; } = name ;
2216
2317 /// <summary>
2418 /// Value
2519 /// </summary>
26- public string Value { get ; set ; }
20+ public string Value { get ; set ; } = value ;
2721}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public HttpLoaderOptions()
1717 /// <summary>
1818 /// Custom http header entries.
1919 /// </summary>
20- public IList < HttpHeaderItem > Headers { get ; } = new List < HttpHeaderItem > ( ) ;
20+ public IList < HttpHeaderItem > Headers { get ; } = [ ] ;
2121
2222 /// <summary>
2323 /// Sets default base url for relative urls.
@@ -32,7 +32,7 @@ public HttpLoaderOptions()
3232 /// <summary>
3333 /// Allows only specified hosts.
3434 /// </summary>
35- public string [ ] AllowedHosts { get ; set ; } = Array . Empty < string > ( ) ;
35+ public string [ ] AllowedHosts { get ; set ; } = [ ] ;
3636
3737 public HttpLoaderOptions SetHeader ( string name , string value )
3838 {
You can’t perform that action at this time.
0 commit comments