-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathLocalIOProvider.cs
93 lines (61 loc) · 2.47 KB
/
LocalIOProvider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System.IO;
using System.Text;
using Composite.Core.IO.Plugins.IOProvider;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
namespace Composite.Plugins.IO.IOProviders.LocalIOProvider
{
[ConfigurationElementType(typeof(NonConfigurableIOProvider))]
internal class LocalIOProvider : IIOProvider
{
public IC1Directory C1Directory
{
get
{
return new LocalC1Directory();
}
}
public IC1File C1File
{
get
{
return new LocalC1File();
}
}
public IC1FileInfo CreateFileInfo(string fileName)
{
return new LocalC1FileInfo(fileName);
}
public IC1DirectoryInfo CreateDirectoryInfo(string path)
{
return new LocalC1DirectoryInfo(path);
}
public IC1FileStream CreateFileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)
{
return new LocalC1FileStream(path, mode, access, share, bufferSize, options);
}
public IC1FileSystemWatcher CreateFileSystemWatcher(string path, string filter)
{
return new LocalC1FileSystemWatcher(path, filter);
}
public IC1StreamReader CreateStreamReader(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)
{
return new LocalC1StreamReader(path, encoding, detectEncodingFromByteOrderMarks, bufferSize);
}
public IC1StreamReader CreateStreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)
{
return new LocalC1StreamReader(stream, encoding, detectEncodingFromByteOrderMarks, bufferSize);
}
public IC1StreamWriter CreateStreamWriter(string path, bool append, Encoding encoding, int bufferSize)
{
return new LocalC1StreamWriter(path, append, encoding, bufferSize);
}
public IC1StreamWriter CreateStreamWriter(Stream stream, Encoding encoding, int bufferSize)
{
return new LocalC1StreamWriter(stream, encoding, bufferSize);
}
public IC1Configuration CreateConfiguration(string path)
{
return new LocalC1Configuration(path);
}
}
}