File tree Expand file tree Collapse file tree 6 files changed +73
-1
lines changed Expand file tree Collapse file tree 6 files changed +73
-1
lines changed Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ #if ! NET6_0_OR_GREATER
6+
7+ namespace System . Runtime . CompilerServices ;
8+
9+ /// <summary>
10+ /// Used to indicate to the compiler that the <c>.locals init</c> flag should not be set in method headers.
11+ /// </summary>
12+ /// <remarks>Internal copy of the .NET 5 attribute.</remarks>
13+ [ AttributeUsage (
14+ AttributeTargets . Module |
15+ AttributeTargets . Class |
16+ AttributeTargets . Struct |
17+ AttributeTargets . Interface |
18+ AttributeTargets . Constructor |
19+ AttributeTargets . Method |
20+ AttributeTargets . Property |
21+ AttributeTargets . Event ,
22+ Inherited = false ) ]
23+ internal sealed class SkipLocalsInitAttribute : Attribute
24+ {
25+ }
26+
27+ #endif
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ using System . Runtime . CompilerServices ;
6+
7+ // See notes in CommunityToolkit.HighPerformance for more info
8+ [ module: SkipLocalsInit ]
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ public static class ValueTypeExtensions
4141 /// Console.WriteLine((-1).ToHexString()); // "0xFFFFFFFF"
4242 /// </code>
4343 /// </remarks>
44- [ SkipLocalsInit ]
4544 public static unsafe string ToHexString < T > ( this T value )
4645 where T : unmanaged
4746 {
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ using System . Runtime . CompilerServices ;
6+
7+ // See notes in CommunityToolkit.HighPerformance for more info
8+ [ module: SkipLocalsInit ]
Original file line number Diff line number Diff line change 44
55using System . Runtime . CompilerServices ;
66
7+ // See notes in CommunityToolkit.HighPerformance for more info
8+ [ module: SkipLocalsInit ]
9+
710[ assembly: InternalsVisibleTo ( "CommunityToolkit.Mvvm.Internals.UnitTests" ) ]
Original file line number Diff line number Diff line change 1+ // Licensed to the .NET Foundation under one or more agreements.
2+ // The .NET Foundation licenses this file to you under the MIT license.
3+ // See the LICENSE file in the project root for more information.
4+
5+ #if ! NET6_0_OR_GREATER
6+
7+ namespace System . Runtime . CompilerServices ;
8+
9+ /// <summary>
10+ /// Used to indicate to the compiler that the <c>.locals init</c> flag should not be set in method headers.
11+ /// </summary>
12+ /// <remarks>Internal copy from the BCL attribute.</remarks>
13+ [ AttributeUsage (
14+ AttributeTargets . Module |
15+ AttributeTargets . Class |
16+ AttributeTargets . Struct |
17+ AttributeTargets . Interface |
18+ AttributeTargets . Constructor |
19+ AttributeTargets . Method |
20+ AttributeTargets . Property |
21+ AttributeTargets . Event ,
22+ Inherited = false ) ]
23+ internal sealed class SkipLocalsInitAttribute : Attribute
24+ {
25+ }
26+
27+ #endif
You can’t perform that action at this time.
0 commit comments