You've already forked linux-packaging-mono
Imported Upstream version 5.16.0.100
Former-commit-id: 38faa55fb9669e35e7d8448b15c25dc447f25767
This commit is contained in:
parent
0a9828183b
commit
7d7f676260
@@ -10,7 +10,11 @@ internal static partial class Interop
|
||||
{
|
||||
internal unsafe partial class Sys
|
||||
{
|
||||
#if !MONO
|
||||
[DllImport(Interop.Libraries.CoreLibNative, EntryPoint = "CoreLibNative_DoubleToString")]
|
||||
#else
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
#endif
|
||||
internal static extern unsafe int DoubleToString(double value, byte* format, byte* buffer, int bufferLength);
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,10 @@ namespace System
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool EqualsOrdinalIgnoreCase(this ReadOnlySpan<char> left, ReadOnlySpan<char> right)
|
||||
#if MONO
|
||||
internal
|
||||
#endif
|
||||
static bool EqualsOrdinalIgnoreCase(this ReadOnlySpan<char> left, ReadOnlySpan<char> right)
|
||||
{
|
||||
if (left.Length != right.Length)
|
||||
{
|
||||
|
@@ -910,22 +910,14 @@ namespace System
|
||||
if (array.Length - index < length)
|
||||
throw new ArgumentException(SR.Argument_InvalidOffLen);
|
||||
|
||||
#if !MONO
|
||||
ref T p = ref Unsafe.As<byte, T>(ref array.GetRawSzArrayData());
|
||||
#endif
|
||||
int i = index;
|
||||
int j = index + length - 1;
|
||||
while (i < j)
|
||||
{
|
||||
#if MONO
|
||||
T temp = array[i];
|
||||
array[i] = array[j];
|
||||
array[j] = temp;
|
||||
#else
|
||||
T temp = Unsafe.Add(ref p, i);
|
||||
Unsafe.Add(ref p, i) = Unsafe.Add(ref p, j);
|
||||
Unsafe.Add(ref p, j) = temp;
|
||||
#endif
|
||||
i++;
|
||||
j--;
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
05afe6b7e296d261b03eff87b6fb61e1db537d32
|
||||
c14603d45ef7ad7f0c541d64df6fd49fc47b9879
|
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -54,7 +55,9 @@ namespace System
|
||||
// the range of the Decimal type.
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public partial struct Decimal : IFormattable, IComparable, IConvertible, IComparable<Decimal>, IEquatable<Decimal>, IDeserializationCallback, ISpanFormattable
|
||||
{
|
||||
// Sign mask for the flags field. A value of zero in this bit indicates a
|
||||
|
@@ -22,7 +22,9 @@ using System.Runtime.Serialization;
|
||||
namespace System
|
||||
{
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public sealed class InsufficientMemoryException : OutOfMemoryException
|
||||
{
|
||||
// There may be a problem here interacting with the ResourceManager in out of memory conditions,
|
||||
|
@@ -14,7 +14,9 @@ using System.Runtime.Serialization;
|
||||
namespace System
|
||||
{
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class MissingFieldException : MissingMemberException
|
||||
{
|
||||
public MissingFieldException()
|
||||
|
@@ -16,7 +16,9 @@ using System.Runtime.Serialization;
|
||||
namespace System
|
||||
{
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class MissingMemberException : MemberAccessException
|
||||
{
|
||||
public MissingMemberException()
|
||||
|
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime;
|
||||
using System.Globalization;
|
||||
|
||||
|
@@ -16,7 +16,9 @@ using System.Runtime.Serialization;
|
||||
namespace System
|
||||
{
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class OutOfMemoryException : SystemException
|
||||
{
|
||||
public OutOfMemoryException()
|
||||
|
@@ -82,6 +82,7 @@ namespace System
|
||||
// declared constructors.
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.Char[])")]
|
||||
public extern String(char[] value);
|
||||
|
||||
[System.Runtime.CompilerServices.DependencyReductionRoot]
|
||||
@@ -105,6 +106,7 @@ namespace System
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.Char[], System.Int32, System.Int32)")]
|
||||
public extern String(char[] value, int startIndex, int length);
|
||||
|
||||
[System.Runtime.CompilerServices.DependencyReductionRoot]
|
||||
@@ -141,6 +143,7 @@ namespace System
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.Char*)")]
|
||||
unsafe public extern String(char* value);
|
||||
|
||||
[System.Runtime.CompilerServices.DependencyReductionRoot]
|
||||
@@ -173,6 +176,7 @@ namespace System
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.Char*, System.Int32, System.Int32)")]
|
||||
unsafe public extern String(char* value, int startIndex, int length);
|
||||
|
||||
[System.Runtime.CompilerServices.DependencyReductionRoot]
|
||||
@@ -214,6 +218,7 @@ namespace System
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.SByte*)")]
|
||||
public extern unsafe String(sbyte* value);
|
||||
|
||||
[DependencyReductionRoot]
|
||||
@@ -232,6 +237,7 @@ namespace System
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.SByte*, System.Int32, System.Int32)")]
|
||||
public extern unsafe String(sbyte* value, int startIndex, int length);
|
||||
|
||||
[DependencyReductionRoot]
|
||||
@@ -284,6 +290,7 @@ namespace System
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.SByte*, System.Int32, System.Int32, System.Text.Encoding)")]
|
||||
public extern unsafe String(sbyte* value, int startIndex, int length, Encoding enc);
|
||||
|
||||
[DependencyReductionRoot]
|
||||
@@ -329,6 +336,7 @@ namespace System
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.Char, System.Int32)")]
|
||||
public extern String(char c, int count);
|
||||
|
||||
[System.Runtime.CompilerServices.DependencyReductionRoot]
|
||||
@@ -376,6 +384,7 @@ namespace System
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[PreserveDependency("System.String.CreateString(System.ReadOnlySpan`1<System.Char>)")]
|
||||
public extern String(ReadOnlySpan<char> value);
|
||||
|
||||
[DependencyReductionRoot]
|
||||
@@ -394,7 +403,6 @@ namespace System
|
||||
return result;
|
||||
}
|
||||
|
||||
#if !MONO // TODO: Undo
|
||||
public static string Create<TState>(int length, TState state, SpanAction<char, TState> action)
|
||||
{
|
||||
if (action == null)
|
||||
@@ -419,7 +427,6 @@ namespace System
|
||||
|
||||
public static implicit operator ReadOnlySpan<char>(string value) =>
|
||||
value != null ? new ReadOnlySpan<char>(ref value.GetRawStringData(), value.Length) : default;
|
||||
#endif
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
@@ -818,3 +825,13 @@ namespace System
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if MONO
|
||||
|
||||
namespace System.Buffers
|
||||
{
|
||||
public delegate void SpanAction<T, in TArg>(Span<T> span, TArg arg);
|
||||
public delegate void ReadOnlySpanAction<T, in TArg>(ReadOnlySpan<T> span, TArg arg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Threading
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace System.Threading.Tasks
|
||||
@@ -712,7 +713,9 @@ namespace System.Threading.Tasks
|
||||
private static void ContractAssertMonitorStatus(Lock syncObj, bool held)
|
||||
{
|
||||
Debug.Assert(syncObj != null, "The Lock object to check must be provided.");
|
||||
#if !MONO
|
||||
Debug.Assert(syncObj.IsAcquired == held, "The locking scheme was not correctly followed.");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>Gets the options to use for tasks.</summary>
|
||||
|
@@ -26,6 +26,7 @@ using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Threading.Tasks
|
||||
@@ -64,7 +65,13 @@ namespace System.Threading.Tasks
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Specifies the type of data contained in the queue.</typeparam>
|
||||
[DebuggerDisplay("Count = {Count}")]
|
||||
internal sealed class MultiProducerMultiConsumerQueue<T> : LowLevelConcurrentQueue<T>, IProducerConsumerQueue<T>
|
||||
internal sealed class MultiProducerMultiConsumerQueue<T> :
|
||||
#if MONO
|
||||
ConcurrentQueue<T>,
|
||||
#else
|
||||
LowLevelConcurrentQueue<T>,
|
||||
#endif
|
||||
IProducerConsumerQueue<T>
|
||||
{
|
||||
/// <summary>Enqueues an item into the queue.</summary>
|
||||
/// <param name="item">The item to enqueue.</param>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime.ExceptionServices;
|
||||
|
||||
namespace System.Threading.Tasks
|
||||
|
@@ -17,6 +17,7 @@
|
||||
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Threading
|
||||
|
@@ -10,7 +10,7 @@ namespace System.Threading
|
||||
/// Simple wrapper around Monitor.Enter and Exit exposing interface as expected by
|
||||
/// System.Private.InteropServices.__ComObject
|
||||
/// </summary>
|
||||
public class Lock
|
||||
public partial class Lock
|
||||
{
|
||||
private object _lock = new object();
|
||||
public void Acquire()
|
||||
|
Reference in New Issue
Block a user