-
Notifications
You must be signed in to change notification settings - Fork 1
/
Misc.cs
166 lines (139 loc) · 5.08 KB
/
Misc.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace System.Collections.Generic
{
public static class NonRandomizedStringEqualityComparer
{
public static IEqualityComparer<string> Default
{
get{ return EqualityComparer<string>.Default; }
}
}
public interface ICollectionDebugView<T> { }
public class DictionaryKeyCollectionDebugView<TKey, TValue> { }
public class DictionaryValueCollectionDebugView<TKey, TValue> { }
public class IDictionaryDebugView<TKey, TValue> { }
public class HashSetEqualityComparer<T> : IEqualityComparer<FastHashSet<T>>
{
public bool Equals([AllowNull] FastHashSet<T> x, [AllowNull] FastHashSet<T> y)
{
throw new NotImplementedException();
}
public int GetHashCode([DisallowNull] FastHashSet<T> obj)
{
throw new NotImplementedException();
}
}
}
namespace System.Diagnostics
{
public class SR
{
public static readonly string InvalidOperation_EnumFailedVersion = "";
public static readonly string InvalidOperation_ConcurrentOperationsNotSupported = "";
public static readonly string Arg_ArrayPlusOffTooSmall = "";
public static readonly string Arg_HTCapacityOverflow = "";
public static readonly string Serialization_MissingKeys = "";
public static readonly string ArgumentOutOfRange_NeedNonNegNum = "";
public static readonly string Arg_HSCapacityOverflow = "";
public static readonly string InvalidOperation_EnumOpCantHappen = "";
}
public static class ThrowHelper
{
public static void ThrowArgumentNullException(string argName)
{
throw new ArgumentNullException(argName);
}
public static void ThrowKeyNotFoundException(object key)
{
throw new KeyNotFoundException("key");
}
public static void ThrowIndexArgumentOutOfRange_NeedNonNegNumException()
{
throw new IndexOutOfRangeException();
}
public static void ThrowArgumentException(string msg)
{
throw new ArgumentException(msg);
}
public static void ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
{
throw new InvalidOperationException();
}
public static void ThrowAddingDuplicateWithKeyArgumentException(object key)
{
throw new ArgumentException();
}
public static void ThrowSerializationException(string msg)
{
throw new Exception(msg);
}
public static void ThrowArgumentException_Argument_InvalidArrayType()
{
throw new ArgumentException();
}
public static void ThrowArgumentOutOfRangeException(string argName)
{
throw new ArgumentOutOfRangeException(argName);
}
public static void IfNullAndNullsAreIllegalThenThrow<TValue>(object value = null, object arg2 = null)
{
throw new Exception();
}
public static void ThrowWrongValueTypeArgumentException(object arg1, object arg)
{
throw new Exception();
}
public static void ThrowWrongKeyTypeArgumentException(object arg1, object arg)
{
throw new Exception();
}
public static void ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
{
throw new Exception();
}
public static void ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen()
{
throw new Exception();
}
public static void ThrowNotSupportedException(string message)
{
throw new NotSupportedException();
}
}
public static class ExceptionArgument
{
public const string dictionary = "dictionary";
public const string collection = "collection";
public const string array = "array";
public const string capacity = "capacity";
public const string key = "key";
public const string info = "info";
public const string value = "value";
}
public static class ExceptionResource
{
public const string Arg_ArrayPlusOffTooSmall = "";
public const string Serialization_MissingKeys = "";
public const string Serialization_NullKey = "";
public const string NotSupported_KeyCollectionSet = "";
public const string Arg_NonZeroLowerBound = "";
public const string Arg_RankMultiDimNotSupported = "";
public const string NotSupported_ValueCollectionSet = "";
}
}
namespace Internal.Runtime.CompilerServices
{
public static class Unsafe1
{
public static bool IsNullRef<T>(ref T value)
{
return true;
}
public static ref T NullRef<T>()
{
throw new NotSupportedException();
}
}
}