diff options
Diffstat (limited to 'src/mscorlib/src/System/Internal.cs')
-rw-r--r-- | src/mscorlib/src/System/Internal.cs | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/src/mscorlib/src/System/Internal.cs b/src/mscorlib/src/System/Internal.cs index b0860109d9..1534326921 100644 --- a/src/mscorlib/src/System/Internal.cs +++ b/src/mscorlib/src/System/Internal.cs @@ -10,6 +10,7 @@ ** ** ===========================================================*/ + using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Collections.Generic; @@ -22,13 +23,13 @@ using System.Threading.Tasks; using System.Runtime.InteropServices.WindowsRuntime; #endif // FEATURE_COMINTEROP -[assembly:DefaultDependencyAttribute(LoadHint.Always)] +[assembly: DefaultDependencyAttribute(LoadHint.Always)] // mscorlib would like to have its literal strings frozen if possible [assembly: System.Runtime.CompilerServices.StringFreezingAttribute()] namespace System { - static class Internal + static class CommonlyUsedGenericInstantiations { // This method is purely an aid for NGen to statically deduce which // instantiations to save in the ngen image. @@ -44,7 +45,7 @@ namespace System // instantiation closure process is driven by "fixup" references // left in the final code stream. [MethodImplAttribute(MethodImplOptions.NoOptimization)] - static void CommonlyUsedGenericInstantiations() + static CommonlyUsedGenericInstantiations() { // Make absolutely sure we include some of the most common // instantiations here in mscorlib's ngen image. @@ -86,14 +87,14 @@ namespace System new EnumEqualityComparer<System.Reflection.MemberTypes>(); // Microsoft.Expression.DesignModel - new Dictionary<Object, KeyValuePair<Object,Object>>(); - new Dictionary<KeyValuePair<Object,Object>, Object>(); + new Dictionary<Object, KeyValuePair<Object, Object>>(); + new Dictionary<KeyValuePair<Object, Object>, Object>(); NullableHelper<Boolean>(); NullableHelper<Byte>(); NullableHelper<Char>(); - NullableHelper<DateTime>(); - NullableHelper<Decimal>(); + NullableHelper<DateTime>(); + NullableHelper<Decimal>(); NullableHelper<Double>(); NullableHelper<Guid>(); NullableHelper<Int16>(); @@ -127,7 +128,7 @@ namespace System new KeyValuePair<Char, UInt16>('\0', UInt16.MinValue); new KeyValuePair<UInt16, Double>(UInt16.MinValue, Double.MinValue); new KeyValuePair<Object, Int32>(String.Empty, Int32.MinValue); - new KeyValuePair<Int32, Int32>(Int32.MinValue, Int32.MinValue); + new KeyValuePair<Int32, Int32>(Int32.MinValue, Int32.MinValue); SZArrayHelper<Boolean>(null); SZArrayHelper<Byte>(null); SZArrayHelper<DateTime>(null); @@ -156,15 +157,15 @@ namespace System #pragma warning restore 4014 } - static T NullableHelper<T>() where T : struct + private static T NullableHelper<T>() where T : struct { - Nullable.Compare<T>(null, null); - Nullable.Equals<T>(null, null); + Nullable.Compare<T>(null, null); + Nullable.Equals<T>(null, null); Nullable<T> nullable = new Nullable<T>(); return nullable.GetValueOrDefault(); - } + } - static void SZArrayHelper<T>(SZArrayHelper oSZArrayHelper) + private static void SZArrayHelper<T>(SZArrayHelper oSZArrayHelper) { // Instantiate common methods for IList implementation on Array oSZArrayHelper.get_Count<T>(); @@ -174,20 +175,20 @@ namespace System // System.Runtime.CompilerServices.AsyncVoidMethodBuilder // System.Runtime.CompilerServices.TaskAwaiter - static async void AsyncHelper<T>() + private static async void AsyncHelper<T>() { await Task.Delay(1); } // System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.__Canon] // System.Runtime.CompilerServices.TaskAwaiter'[System.__Canon] - static async Task<String> AsyncHelper2<T>() + private static async Task<String> AsyncHelper2<T>() { return await Task.FromResult<string>(""); } // System.Runtime.CompilerServices.AsyncTaskMethodBuilder // System.Runtime.CompilerServices.AsyncTaskMethodBuilder'1[VoidTaskResult] - static async Task AsyncHelper3() + private static async Task AsyncHelper3() { await Task.FromResult<string>(""); } @@ -201,7 +202,7 @@ namespace System // typed as matching instantiations of mscorlib copies of WinRT interfaces (IIterable<T>, IVector<T>, // IMap<K, V>, ...) which is necessary to generate all required IL stubs. - static void CommonlyUsedWinRTRedirectedInterfaceStubs() + private static void CommonlyUsedWinRTRedirectedInterfaceStubs() { WinRT_IEnumerable<byte>(null, null, null); WinRT_IEnumerable<char>(null, null, null); @@ -247,14 +248,14 @@ namespace System WinRT_Nullable<double>(); } - static void WinRT_IEnumerable<T>(IterableToEnumerableAdapter iterableToEnumerableAdapter, EnumerableToIterableAdapter enumerableToIterableAdapter, IIterable<T> iterable) + private static void WinRT_IEnumerable<T>(IterableToEnumerableAdapter iterableToEnumerableAdapter, EnumerableToIterableAdapter enumerableToIterableAdapter, IIterable<T> iterable) { // instantiate stubs for the one method on IEnumerable<T> and the one method on IIterable<T> iterableToEnumerableAdapter.GetEnumerator_Stub<T>(); enumerableToIterableAdapter.First_Stub<T>(); } - static void WinRT_IList<T>(VectorToListAdapter vectorToListAdapter, VectorToCollectionAdapter vectorToCollectionAdapter, ListToVectorAdapter listToVectorAdapter, IVector<T> vector) + private static void WinRT_IList<T>(VectorToListAdapter vectorToListAdapter, VectorToCollectionAdapter vectorToCollectionAdapter, ListToVectorAdapter listToVectorAdapter, IVector<T> vector) { WinRT_IEnumerable<T>(null, null, null); @@ -278,7 +279,7 @@ namespace System listToVectorAdapter.Clear<T>(); } - static void WinRT_IReadOnlyCollection<T>(VectorViewToReadOnlyCollectionAdapter vectorViewToReadOnlyCollectionAdapter) + private static void WinRT_IReadOnlyCollection<T>(VectorViewToReadOnlyCollectionAdapter vectorViewToReadOnlyCollectionAdapter) { WinRT_IEnumerable<T>(null, null, null); @@ -286,7 +287,7 @@ namespace System vectorViewToReadOnlyCollectionAdapter.Count<T>(); } - static void WinRT_IReadOnlyList<T>(IVectorViewToIReadOnlyListAdapter vectorToListAdapter, IReadOnlyListToIVectorViewAdapter listToVectorAdapter, IVectorView<T> vectorView) + private static void WinRT_IReadOnlyList<T>(IVectorViewToIReadOnlyListAdapter vectorToListAdapter, IReadOnlyListToIVectorViewAdapter listToVectorAdapter, IVectorView<T> vectorView) { WinRT_IEnumerable<T>(null, null, null); WinRT_IReadOnlyCollection<T>(null); @@ -299,7 +300,7 @@ namespace System listToVectorAdapter.Size<T>(); } - static void WinRT_IDictionary<K, V>(MapToDictionaryAdapter mapToDictionaryAdapter, MapToCollectionAdapter mapToCollectionAdapter, DictionaryToMapAdapter dictionaryToMapAdapter, IMap<K, V> map) + private static void WinRT_IDictionary<K, V>(MapToDictionaryAdapter mapToDictionaryAdapter, MapToCollectionAdapter mapToCollectionAdapter, DictionaryToMapAdapter dictionaryToMapAdapter, IMap<K, V> map) { WinRT_IEnumerable<KeyValuePair<K, V>>(null, null, null); @@ -324,7 +325,7 @@ namespace System dictionaryToMapAdapter.Clear<K, V>(); } - static void WinRT_IReadOnlyDictionary<K, V>(IMapViewToIReadOnlyDictionaryAdapter mapToDictionaryAdapter, IReadOnlyDictionaryToIMapViewAdapter dictionaryToMapAdapter, IMapView<K, V> mapView, MapViewToReadOnlyCollectionAdapter mapViewToReadOnlyCollectionAdapter) + private static void WinRT_IReadOnlyDictionary<K, V>(IMapViewToIReadOnlyDictionaryAdapter mapToDictionaryAdapter, IReadOnlyDictionaryToIMapViewAdapter dictionaryToMapAdapter, IMapView<K, V> mapView, MapViewToReadOnlyCollectionAdapter mapViewToReadOnlyCollectionAdapter) { WinRT_IEnumerable<KeyValuePair<K, V>>(null, null, null); WinRT_IReadOnlyCollection<KeyValuePair<K, V>>(null); @@ -344,7 +345,7 @@ namespace System dictionaryToMapAdapter.HasKey<K, V>(default(K)); } - static void WinRT_Nullable<T>() where T : struct + private static void WinRT_Nullable<T>() where T : struct { Nullable<T> nullable = new Nullable<T>(); NullableMarshaler.ConvertToNative(ref nullable); |