forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__Error.cs
More file actions
31 lines (26 loc) · 897 Bytes
/
__Error.cs
File metadata and controls
31 lines (26 loc) · 897 Bytes
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
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics.Contracts;
namespace System.IO
{
[Pure]
internal static class __Error
{
internal static Exception GetFileNotOpen()
{
return new ObjectDisposedException(null, SR.ObjectDisposed_FileClosed);
}
internal static Exception GetReadNotSupported()
{
return new NotSupportedException(SR.NotSupported_UnreadableStream);
}
internal static Exception GetSeekNotSupported()
{
return new NotSupportedException(SR.NotSupported_UnseekableStream);
}
internal static Exception GetWriteNotSupported()
{
return new NotSupportedException(SR.NotSupported_UnwritableStream);
}
}
}