[System.Core] Updated MemoryMappedFileTest
[mono.git] / mcs / class / System.Core / ReferenceSources / Error.cs
1 using System;
2
3 namespace System.Linq
4 {
5         static class Error
6         {
7                 public static ArgumentNullException ArgumentNull (string parameter)
8                 {
9                         return new ArgumentNullException (parameter);
10                 }
11
12                 public static ArgumentOutOfRangeException ArgumentOutOfRange (string parameter)
13                 {
14                         return new ArgumentOutOfRangeException (parameter);
15                 }
16
17                 public static ArgumentException ArgumentNotValid (string parameter)
18                 {
19                         return new ArgumentException (parameter);
20                 }
21
22                 public static NotSupportedException NotSupported ()
23                 {
24                         return new NotSupportedException ();
25                 }
26
27                 public static InvalidOperationException NoElements ()
28                 {
29                         return new InvalidOperationException (Strings.NoElements);
30                 }
31
32                 public static InvalidOperationException NoMatch ()
33                 {
34                         return new InvalidOperationException (Strings.NoMatch);
35                 }
36
37                 public static InvalidOperationException MoreThanOneElement ()
38                 {
39                         return new InvalidOperationException (Strings.MoreThanOneElement);
40                 }
41
42                 public static InvalidOperationException MoreThanOneMatch ()
43                 {
44                         return new InvalidOperationException (Strings.MoreThanOneMatch);
45                 }
46
47                 public static ArgumentException ArgumentNotIEnumerableGeneric (object message)
48                 {
49                         return new ArgumentException (String.Format ("{0} is not IEnumerable<>", message));
50                 }
51
52                 public static InvalidOperationException NoMethodOnTypeMatchingArguments (object p0, object p1)
53                 {
54                         return new InvalidOperationException (Strings.NoMethodOnTypeMatchingArguments (p0, p1));
55                 }
56
57                 public static InvalidOperationException NoMethodOnType (object p0, object p1)
58                 {
59                         return new InvalidOperationException (Strings.NoMethodOnType (p0, p1));
60                 }
61         }
62 }