You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@ -10,7 +10,7 @@ namespace System.Buffers
|
||||
/// <summary>
|
||||
/// Provides a mechanism for manual lifetime management.
|
||||
/// </summary>
|
||||
interface IRetainable
|
||||
public interface IRetainable
|
||||
{
|
||||
/// <summary>
|
||||
/// Call this method to indicate that the IRetainable object is in use.
|
||||
|
@ -10,7 +10,7 @@ namespace System.Buffers
|
||||
/// <summary>
|
||||
/// A handle for the memory.
|
||||
/// </summary>
|
||||
unsafe struct MemoryHandle : IDisposable
|
||||
public unsafe struct MemoryHandle : IDisposable
|
||||
{
|
||||
private IRetainable _retainable;
|
||||
private void* _pointer;
|
||||
|
@ -10,7 +10,7 @@ namespace System.Buffers
|
||||
/// <summary>
|
||||
/// Owner of Memory<typeparamref name="T"/> that provides appropriate lifetime management mechanisms for it.
|
||||
/// </summary>
|
||||
abstract class OwnedMemory<T> : IDisposable, IRetainable
|
||||
public abstract class OwnedMemory<T> : IDisposable, IRetainable
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of items in the Memory<typeparamref name="T"/>.
|
||||
|
@ -8,7 +8,9 @@ using System.Runtime.Serialization;
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class KeyNotFoundException : SystemException
|
||||
{
|
||||
public KeyNotFoundException()
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
@ -17,7 +18,9 @@ namespace System.Collections.Generic
|
||||
[DebuggerTypeProxy(typeof(ICollectionDebugView<>))]
|
||||
[DebuggerDisplay("Count = {Count}")]
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class List<T> : IList<T>, System.Collections.IList, IReadOnlyList<T>
|
||||
{
|
||||
private const int DefaultCapacity = 4;
|
||||
@ -445,7 +448,11 @@ namespace System.Collections.Generic
|
||||
int newCapacity = _items.Length == 0 ? DefaultCapacity : _items.Length * 2;
|
||||
// Allow the list to grow to maximum possible capacity (~2G elements) before encountering overflow.
|
||||
// Note that this check works even when _items.Length overflowed thanks to the (uint) cast
|
||||
#if MONO //in mono we don't want to add additional fields to Array
|
||||
if ((uint)newCapacity > Array_ReferenceSources.MaxArrayLength) newCapacity = Array_ReferenceSources.MaxArrayLength;
|
||||
#else
|
||||
if ((uint)newCapacity > Array.MaxArrayLength) newCapacity = Array.MaxArrayLength;
|
||||
#endif
|
||||
if (newCapacity < min) newCapacity = min;
|
||||
Capacity = newCapacity;
|
||||
}
|
||||
@ -1170,6 +1177,9 @@ namespace System.Collections.Generic
|
||||
}
|
||||
}
|
||||
|
||||
#if MONO
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public struct Enumerator : IEnumerator<T>, System.Collections.IEnumerator
|
||||
{
|
||||
private List<T> _list;
|
||||
|
@ -10,7 +10,9 @@ namespace System.Collections.ObjectModel
|
||||
[Serializable]
|
||||
[DebuggerTypeProxy(typeof(ICollectionDebugView<>))]
|
||||
[DebuggerDisplay("Count = {Count}")]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class Collection<T> : IList<T>, IList, IReadOnlyList<T>
|
||||
{
|
||||
private IList<T> items; // Do not rename (binary serialization)
|
||||
|
@ -10,7 +10,9 @@ namespace System.Collections.ObjectModel
|
||||
[Serializable]
|
||||
[DebuggerTypeProxy(typeof(ICollectionDebugView<>))]
|
||||
[DebuggerDisplay("Count = {Count}")]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public class ReadOnlyCollection<T> : IList<T>, IList, IReadOnlyList<T>
|
||||
{
|
||||
private IList<T> list; // Do not rename (binary serialization)
|
||||
|
@ -2,7 +2,7 @@
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
|
||||
namespace System.Globalization
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Private;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
@ -34,7 +34,9 @@ namespace System.Globalization
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public partial class CompareInfo : IDeserializationCallback
|
||||
{
|
||||
// Mask used to check if IndexOf()/LastIndexOf()/IsPrefix()/IsPostfix() has the right flags.
|
||||
@ -344,7 +346,11 @@ namespace System.Globalization
|
||||
return String.CompareOrdinal(string1, string2);
|
||||
}
|
||||
|
||||
#if MONO
|
||||
return internal_compare_switch(string1, 0, string1.Length, string2, 0, string2.Length, options);
|
||||
#else
|
||||
return CompareString(string1.AsReadOnlySpan(), string2.AsReadOnlySpan(), options);
|
||||
#endif
|
||||
}
|
||||
|
||||
// TODO https://github.com/dotnet/coreclr/issues/13827:
|
||||
@ -525,10 +531,14 @@ namespace System.Globalization
|
||||
return CompareOrdinal(string1, offset1, length1, string2, offset2, length2);
|
||||
}
|
||||
|
||||
#if MONO
|
||||
return internal_compare_switch(string1, offset1, length1, string2, offset2, length2, options);
|
||||
#else
|
||||
return CompareString(
|
||||
string1.AsReadOnlySpan().Slice(offset1, length1),
|
||||
string2.AsReadOnlySpan().Slice(offset2, length2),
|
||||
options);
|
||||
#endif
|
||||
}
|
||||
|
||||
private static int CompareOrdinal(string string1, int offset1, int length1, string string2, int offset2, int length2)
|
||||
|
@ -239,7 +239,7 @@ namespace System
|
||||
/// Returns a handle for the array.
|
||||
/// <param name="pin">If pin is true, the GC will not move the array and hence its address can be taken</param>
|
||||
/// </summary>
|
||||
unsafe MemoryHandle Retain(bool pin = false)
|
||||
public unsafe MemoryHandle Retain(bool pin = false)
|
||||
{
|
||||
MemoryHandle memoryHandle = default;
|
||||
if (pin)
|
||||
|
@ -217,7 +217,7 @@ namespace System
|
||||
/// If pin is true, the GC will not move the array until the returned <see cref="MemoryHandle"/>
|
||||
/// is disposed, enabling the memory's address can be taken and used.
|
||||
/// </param>
|
||||
unsafe MemoryHandle Retain(bool pin = false)
|
||||
public unsafe MemoryHandle Retain(bool pin = false)
|
||||
{
|
||||
MemoryHandle memoryHandle = default;
|
||||
if (pin)
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class AsyncStateMachineAttribute : StateMachineAttribute
|
||||
{
|
||||
public AsyncStateMachineAttribute(Type stateMachineType)
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All, Inherited = true)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class CompilerGeneratedAttribute : Attribute
|
||||
{
|
||||
public CompilerGeneratedAttribute() { }
|
||||
|
@ -7,6 +7,9 @@ namespace System.Runtime.CompilerServices
|
||||
// Attribute used to communicate to the VS7 debugger that a class should be treated as if it has global scope.
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public class CompilerGlobalScopeAttribute : Attribute
|
||||
{
|
||||
public CompilerGlobalScopeAttribute() { }
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public abstract class CustomConstantAttribute : Attribute
|
||||
{
|
||||
public abstract Object Value { get; }
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class DateTimeConstantAttribute : CustomConstantAttribute
|
||||
{
|
||||
private DateTime _date;
|
||||
|
@ -7,6 +7,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class DecimalConstantAttribute : Attribute
|
||||
{
|
||||
private Decimal _dec;
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class FixedAddressValueTypeAttribute : Attribute
|
||||
{
|
||||
public FixedAddressValueTypeAttribute() { }
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property, Inherited = true)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class IndexerNameAttribute : Attribute
|
||||
{
|
||||
public IndexerNameAttribute(String indexerName)
|
||||
|
@ -5,6 +5,9 @@
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
|
||||
#if MONO
|
||||
[System.SerializableAttribute]
|
||||
#endif
|
||||
public sealed class IteratorStateMachineAttribute : StateMachineAttribute
|
||||
{
|
||||
public IteratorStateMachineAttribute(Type stateMachineType)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user