Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FileStreamOptions.cs
Go to the documentation of this file.
1
namespace
System.IO
;
2
3
public
sealed
class
FileStreamOptions
4
{
5
private
FileMode
_mode
=
FileMode
.Open;
6
7
private
FileAccess
_access
=
FileAccess
.Read;
8
9
private
FileShare
_share
=
FileShare
.Read;
10
11
private
FileOptions
_options
;
12
13
private
long
_preallocationSize
;
14
15
private
int
_bufferSize
= 4096;
16
17
public
FileMode
Mode
18
{
19
get
20
{
21
return
_mode
;
22
}
23
set
24
{
25
if
(value < FileMode.CreateNew || value >
FileMode
.Append)
26
{
27
ThrowHelper
.
ArgumentOutOfRangeException_Enum_Value
();
28
}
29
_mode
=
value
;
30
}
31
}
32
33
public
FileAccess
Access
34
{
35
get
36
{
37
return
_access
;
38
}
39
set
40
{
41
if
(value < FileAccess.Read || value >
FileAccess
.ReadWrite)
42
{
43
ThrowHelper
.
ArgumentOutOfRangeException_Enum_Value
();
44
}
45
_access
=
value
;
46
}
47
}
48
49
public
FileShare
Share
50
{
51
get
52
{
53
return
_share
;
54
}
55
set
56
{
57
FileShare
fileShare =
value
&
~FileShare
.Inheritable;
58
if
((fileShare <
FileShare
.None) || fileShare > (
FileShare
.ReadWrite |
FileShare
.Delete))
59
{
60
ThrowHelper
.
ArgumentOutOfRangeException_Enum_Value
();
61
}
62
_share
=
value
;
63
}
64
}
65
66
public
FileOptions
Options
67
{
68
get
69
{
70
return
_options
;
71
}
72
set
73
{
74
if
(
value
!= 0 && (
value
& (
FileOptions
)67092479) != 0)
75
{
76
ThrowHelper
.
ArgumentOutOfRangeException_Enum_Value
();
77
}
78
_options
=
value
;
79
}
80
}
81
82
public
long
PreallocationSize
83
{
84
get
85
{
86
return
_preallocationSize
;
87
}
88
set
89
{
90
if
(
value
< 0)
91
{
92
throw
new
ArgumentOutOfRangeException
(
"value"
,
SR
.
ArgumentOutOfRange_NeedNonNegNum
);
93
}
94
_preallocationSize
=
value
;
95
}
96
}
97
98
public
int
BufferSize
99
{
100
get
101
{
102
return
_bufferSize
;
103
}
104
set
105
{
106
if
(
value
< 0)
107
{
108
throw
new
ArgumentOutOfRangeException
(
"value"
,
SR
.
ArgumentOutOfRange_NeedNonNegNum
);
109
}
110
_bufferSize
=
value
;
111
}
112
}
113
}
System.ArgumentOutOfRangeException
Definition
ArgumentOutOfRangeException.cs:9
System.IO.FileStreamOptions._options
FileOptions _options
Definition
FileStreamOptions.cs:11
System.IO.FileStreamOptions.BufferSize
int BufferSize
Definition
FileStreamOptions.cs:99
System.IO.FileStreamOptions._bufferSize
int _bufferSize
Definition
FileStreamOptions.cs:15
System.IO.FileStreamOptions._share
FileShare _share
Definition
FileStreamOptions.cs:9
System.IO.FileStreamOptions._access
FileAccess _access
Definition
FileStreamOptions.cs:7
System.IO.FileStreamOptions._mode
FileMode _mode
Definition
FileStreamOptions.cs:5
System.IO.FileStreamOptions._preallocationSize
long _preallocationSize
Definition
FileStreamOptions.cs:13
System.IO.FileStreamOptions.Access
FileAccess Access
Definition
FileStreamOptions.cs:34
System.IO.FileStreamOptions.PreallocationSize
long PreallocationSize
Definition
FileStreamOptions.cs:83
System.IO.FileStreamOptions.Share
FileShare Share
Definition
FileStreamOptions.cs:50
System.IO.FileStreamOptions.Options
FileOptions Options
Definition
FileStreamOptions.cs:67
System.IO.FileStreamOptions
Definition
FileStreamOptions.cs:4
System.SR.ArgumentOutOfRange_NeedNonNegNum
static string ArgumentOutOfRange_NeedNonNegNum
Definition
SR.cs:32
System.SR
Definition
SR.cs:7
System.ThrowHelper.ArgumentOutOfRangeException_Enum_Value
static void ArgumentOutOfRangeException_Enum_Value()
Definition
ThrowHelper.cs:420
System.ThrowHelper
Definition
ThrowHelper.cs:6
System.IO.FileOptions
FileOptions
Definition
FileOptions.cs:5
System.IO.FileAccess
FileAccess
Definition
FileAccess.cs:5
System.IO.FileShare
FileShare
Definition
FileShare.cs:5
System.IO.FileMode
FileMode
Definition
FileMode.cs:4
System.IO
Definition
ConsoleStream.cs:3
System.ExceptionArgument.value
@ value
source
System.Private.CoreLib
System.IO
FileStreamOptions.cs
Generated by
1.10.0