-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Roland Pheasant <roland_pheasant@hotmail.com>
- Loading branch information
1 parent
ad5d682
commit 897beb8
Showing
5 changed files
with
13 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
// Copyright (c) 2011-2023 Roland Pheasant. All rights reserved. | ||
// Roland Pheasant licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
#if !NETCOREAPP | ||
namespace System.Runtime.CompilerServices; | ||
|
||
// Allows use of the C#11 `init` keyword, internally within this library, when targeting frameworks older than .NET 5. | ||
internal sealed class IsExternalInit | ||
{ | ||
} | ||
internal sealed class IsExternalInit; | ||
Check warning on line 8 in src/DynamicData/Polyfills/IsExternalInit.cs
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
// Copyright (c) 2011-2023 Roland Pheasant. All rights reserved. | ||
// Roland Pheasant licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
#if !NETCOREAPP | ||
namespace System.Collections.Generic; | ||
|
||
internal static class ListEnsureCapacity | ||
{ | ||
public static void EnsureCapacity<T>( | ||
this List<T> list, | ||
int capacity) | ||
public static void EnsureCapacity<T>(this List<T> list, int capacity) | ||
{ | ||
if (list.Capacity < capacity) | ||
list.Capacity = capacity; | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
// Copyright (c) 2011-2023 Roland Pheasant. All rights reserved. | ||
// Roland Pheasant licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
#if !NET7_0_OR_GREATER | ||
using System.ComponentModel; | ||
|
||
namespace System.Runtime.CompilerServices; | ||
|
||
// Allows use of the C#11 `required` keyword, internally within this library, when targeting frameworks older than .NET 7. | ||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] | ||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
internal sealed class RequiredMemberAttribute | ||
: Attribute | ||
{ | ||
} | ||
internal sealed class RequiredMemberAttribute : Attribute; | ||
#endif |