Fix to UriTemplate.Match to properly handle query parameters without a value. No...
[mono.git] / mcs / class / corlib / ReferenceSources / Environment.cs
1 using System.Globalization;
2
3 namespace System
4 {
5         partial class Environment
6         {
7                 internal static string GetResourceString (string key)
8                 {
9                         switch (key) {
10                         case "AssertionFailed":
11                                 return "Assertion failed.";
12                         case "AssumptionFailed":
13                                 return "Assumption failed.";
14                         case "InvariantFailed":
15                                 return "Invariant failed.";
16                         case "PostconditionFailed":
17                                 return "Postcondition failed.";
18                         case "PostconditionOnExceptionFailed":
19                                 return "Postcondition failed after throwing an exception.";
20                         case "PreconditionFailed":
21                                 return "Precondition failed.";
22                         }
23
24                         return key;
25                 }
26
27                 internal static string GetResourceString (string key, CultureInfo culture)
28                 {
29                         return key;
30                 }
31
32                 internal static string GetResourceString (string key, params object[] values)
33                 {
34                         switch (key) {
35                         case "AssertionFailed_Cnd":
36                                 key = "Assertion failed: {0}";
37                                 break;
38                         case "AssumptionFailed_Cnd":
39                                 key = "Assumption failed: {0}";
40                                 break;
41                         case "InvariantFailed_Cnd":
42                                 key = "Invariant failed: {0}";
43                                 break;
44                         case "PostconditionFailed_Cnd":
45                                 key = "Postcondition failed: {0}";
46                                 break;
47                         case "PostconditionOnExceptionFailed_Cnd":
48                                 key = "Postcondition failed after throwing an exception: {0}";
49                                 break;
50                         case "PreconditionFailed_Cnd":
51                                 key = "Precondition failed: {0}";
52                                 break;
53                         }
54
55                         return string.Format (CultureInfo.InvariantCulture, key, values);
56                 }
57         }
58 }