File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace AngleSharp.Io.Cookie
15
15
/// </summary>
16
16
public class AdvancedCookieProvider : ICookieProvider
17
17
{
18
- private readonly IFileHandler _handler ;
18
+ private readonly ICookieFileHandler _handler ;
19
19
private readonly Boolean _forceParse ;
20
20
private readonly Boolean _httpOnlyExtension ;
21
21
private readonly List < WebCookie > _cookies ;
@@ -25,7 +25,7 @@ public class AdvancedCookieProvider : ICookieProvider
25
25
/// </summary>
26
26
/// <param name="handler">The handler responsible for file system interaction.</param>
27
27
/// <param name="options">The options to use for the cookie provider.</param>
28
- public AdvancedCookieProvider ( IFileHandler handler , AdvancedCookieProviderOptions options = default )
28
+ public AdvancedCookieProvider ( ICookieFileHandler handler , AdvancedCookieProviderOptions options = default )
29
29
{
30
30
_handler = handler ;
31
31
_forceParse = options . IsForceParse ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ namespace AngleSharp.Io.Cookie
5
5
/// <summary>
6
6
/// Represents a file handler.
7
7
/// </summary>
8
- public interface IFileHandler
8
+ public interface ICookieFileHandler
9
9
{
10
10
/// <summary>
11
11
/// Reads the (text) content from the file.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ namespace AngleSharp.Io.Cookie
7
7
/// Represents a file handler against the local
8
8
/// file system.
9
9
/// </summary>
10
- public class LocalFileHandler : IFileHandler
10
+ public class LocalFileHandler : ICookieFileHandler
11
11
{
12
12
private readonly String _filePath ;
13
13
@@ -17,9 +17,9 @@ public class LocalFileHandler : IFileHandler
17
17
/// <param name="filePath">The path to resolve to.</param>
18
18
public LocalFileHandler ( String filePath ) => _filePath = filePath ;
19
19
20
- String IFileHandler . ReadFile ( ) => File . ReadAllText ( _filePath ) ;
20
+ String ICookieFileHandler . ReadFile ( ) => File . ReadAllText ( _filePath ) ;
21
21
22
- void IFileHandler . WriteFile ( String content )
22
+ void ICookieFileHandler . WriteFile ( String content )
23
23
{
24
24
//TODO Replace with queued async method
25
25
File . WriteAllText ( _filePath , content ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace AngleSharp.Io.Cookie
6
6
/// A memory file handler to feed the cookie provider.
7
7
/// Ideal for testing and sandboxed ("private") browsing.
8
8
/// </summary>
9
- public class MemoryFileHandler : IFileHandler
9
+ public class MemoryFileHandler : ICookieFileHandler
10
10
{
11
11
private String _content ;
12
12
@@ -17,8 +17,8 @@ public class MemoryFileHandler : IFileHandler
17
17
/// <param name="initialContent">The optional initial content.</param>
18
18
public MemoryFileHandler ( String initialContent = "" ) => _content = initialContent ;
19
19
20
- String IFileHandler . ReadFile ( ) => _content ;
20
+ String ICookieFileHandler . ReadFile ( ) => _content ;
21
21
22
- void IFileHandler . WriteFile ( String content ) => _content = content ;
22
+ void ICookieFileHandler . WriteFile ( String content ) => _content = content ;
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public static IConfiguration WithTemporaryCookies(this IConfiguration configurat
120
120
/// <param name="configuration">The configuration to extend.</param>
121
121
/// <param name="fileHandler">The handler for the cookie source.</param>
122
122
/// <returns>The new instance with the service.</returns>
123
- public static IConfiguration WithCookies ( this IConfiguration configuration , IFileHandler fileHandler ) =>
123
+ public static IConfiguration WithCookies ( this IConfiguration configuration , ICookieFileHandler fileHandler ) =>
124
124
configuration . WithCookies ( new AdvancedCookieProvider ( fileHandler ) ) ;
125
125
126
126
/// <summary>
You can’t perform that action at this time.
0 commit comments