Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
/// will be smaller and faster than a Hashtable if the number of elements is 10 or less.
/// This should not be used if performance is important for large numbers of elements.
[Serializable]
/// will be smaller and faster than a Hashtable if the number of elements is 10 or less.
/// This should not be used if performance is important for large numbers of elements.
[Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
-#if CORECLR
- internal
-#else
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+#if CORERT
#endif
class ListDictionaryInternal : IDictionary
{
#endif
class ListDictionaryInternal : IDictionary
{
-#if CORECLR
- internal
-#else
#endif
partial class DefaultBinder : Binder
{
#endif
partial class DefaultBinder : Binder
{
return Unsafe.Add(ref _pointer.Value, index);
}
#else
return Unsafe.Add(ref _pointer.Value, index);
}
#else
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
get
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
get
{
public abstract partial class MethodInfo : MethodBase
{
{
public abstract partial class MethodInfo : MethodBase
{
+#if CORERT
+ public // Needs to be public so that Reflection.Core can see it.
- // Not an api but needs to be public so that Reflection.Core can access it.
- public
#endif
virtual int GenericParameterCount => GetGenericArguments().Length;
}
#endif
virtual int GenericParameterCount => GetGenericArguments().Length;
}
namespace System.Reflection
{
namespace System.Reflection
{
-#if CORECLR
- internal
-#else
public // Needs to be public so that Reflection.Core can see it.
public // Needs to be public so that Reflection.Core can see it.
#endif
static class SignatureTypeExtensions
{
#endif
static class SignatureTypeExtensions
{
// into smaller chunks, each of size sqrt(n), would be substantially better for
// resource files containing thousands of resources.
//
// into smaller chunks, each of size sqrt(n), would be substantially better for
// resource files containing thousands of resources.
//
-#if CORECLR
- internal
-#else
public // On CoreRT, this must be public because of need to whitelist past the ReflectionBlock.
public // On CoreRT, this must be public because of need to whitelist past the ReflectionBlock.
#endif
sealed class RuntimeResourceSet : ResourceSet, IEnumerable
{
#endif
sealed class RuntimeResourceSet : ResourceSet, IEnumerable
{
-}
\ No newline at end of file
/// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder{TResult}"/> struct.</summary>
/// <returns>The initialized instance.</returns>
public static AsyncValueTaskMethodBuilder<TResult> Create() =>
/// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder{TResult}"/> struct.</summary>
/// <returns>The initialized instance.</returns>
public static AsyncValueTaskMethodBuilder<TResult> Create() =>
-#if CORECLR
- // _methodBuilder should be initialized to AsyncTaskMethodBuilder<TResult>.Create(), but on coreclr
- // that Create() is a nop, so we can just return the default here.
- default(AsyncValueTaskMethodBuilder<TResult>);
-#else
// corert's AsyncTaskMethodBuilder<TResult>.Create() currently does additional debugger-related
// work, so we need to delegate to it.
new AsyncValueTaskMethodBuilder<TResult>() { _methodBuilder = AsyncTaskMethodBuilder<TResult>.Create() };
// corert's AsyncTaskMethodBuilder<TResult>.Create() currently does additional debugger-related
// work, so we need to delegate to it.
new AsyncValueTaskMethodBuilder<TResult>() { _methodBuilder = AsyncTaskMethodBuilder<TResult>.Create() };
+#else
+ // _methodBuilder should be initialized to AsyncTaskMethodBuilder<TResult>.Create(), but on coreclr
+ // that Create() is a nop, so we can just return the default here.
+ default(AsyncValueTaskMethodBuilder<TResult>);
#endif
/// <summary>Begins running the builder with the associated state machine.</summary>
#endif
/// <summary>Begins running the builder with the associated state machine.</summary>
return ref Unsafe.Add(ref _pointer.Value, index);
}
#else
return ref Unsafe.Add(ref _pointer.Value, index);
}
#else
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
get
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
get
/// This only exists for compatibility with .NET Framework.
/// </summary>
[Serializable]
/// This only exists for compatibility with .NET Framework.
/// </summary>
[Serializable]
- public // On CoreRT this must be public.
#endif
sealed class UnitySerializationHolder : ISerializable, IObjectReference
{
#endif
sealed class UnitySerializationHolder : ISerializable, IObjectReference
{