Skip to content

Commit 2d30adc

Browse files
authored
Merge branch 'main' into move_runtime_attributes
2 parents bb68829 + d291a82 commit 2d30adc

31 files changed

+154
-19
lines changed

nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\AccessedThroughPropertyAttribute.cs" Link="System\Runtime\CompilerServices\AccessedThroughPropertyAttribute.cs" />
173173
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\CallerArgumentExpressionAttribute.cs" Link="System\Runtime\CompilerServices\CallerArgumentExpressionAttribute.cs" />
174174
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\CallerMemberNameAttribute.cs" Link="System\Runtime\CompilerServices\CallerMemberNameAttribute.cs" />
175+
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\ExcludeFromStubsAttribute.cs" Link="System\Runtime\CompilerServices\ExcludeFromStubsAttribute.cs" />
175176
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\ExtensionAttribute.cs" Link="System\Runtime\CompilerServices\ExtensionAttribute.cs" />
176177
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\IndexerNameAttribute.cs" Link="System\CompilerServices\IndexerNameAttribute.cs" />
177178
<Compile Include="..\nanoFramework.CoreLibrary\System\Runtime\CompilerServices\InternalsVisibleToAttribute.cs" Link="System\CompilerServices\InternalsVisibleToAttribute.cs" />

nanoFramework.CoreLibrary/CoreLibrary.nfproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
<Compile Include="System\Runtime\CompilerServices\CallerArgumentExpressionAttribute.cs" />
170170
<Compile Include="System\Runtime\CompilerServices\CallerMemberNameAttribute.cs" />
171171
<Compile Include="System\Runtime\CompilerServices\AccessedThroughPropertyAttribute.cs" />
172+
<Compile Include="System\Runtime\CompilerServices\ExcludeFromStubsAttribute.cs" />
172173
<Compile Include="System\Runtime\CompilerServices\ExtensionAttribute.cs" />
173174
<Compile Include="System\Runtime\CompilerServices\IndexerNameAttribute.cs" />
174175
<Compile Include="System\Runtime\CompilerServices\InternalsVisibleToAttribute.cs" />

nanoFramework.CoreLibrary/System/AttributeTargets.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.Runtime.CompilerServices;
8+
79
namespace System
810
{
911
/// <summary>
1012
/// Specifies the application elements on which it is valid to apply an attribute.
1113
/// </summary>
12-
[Flags, Serializable]
14+
[ExcludeFromStubs]
15+
[Flags]
16+
[Serializable]
1317
public enum AttributeTargets
1418
{
1519
/// <summary>

nanoFramework.CoreLibrary/System/AttributeUsageAttribute.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.Runtime.CompilerServices;
8+
79
namespace System
810
{
911
/// <summary>
1012
/// Specifies the usage of another attribute class. This class cannot be inherited.
1113
/// </summary>
12-
[AttributeUsage(AttributeTargets.Class), Serializable]
14+
[AttributeUsage(AttributeTargets.Class)]
15+
[ExcludeFromStubs]
16+
[Serializable]
1317
public sealed class AttributeUsageAttribute : Attribute
1418
{
1519
internal AttributeTargets _attributeTarget;

nanoFramework.CoreLibrary/System/CLSCompliantAttribute.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.Runtime.CompilerServices;
8+
79
namespace System
810
{
911
/// <summary>
1012
/// Indicates whether a program element is compliant with the Common Language Specification (CLS). This class cannot be inherited.
1113
/// </summary>
12-
[AttributeUsage(AttributeTargets.All), Serializable]
14+
[AttributeUsage(AttributeTargets.All)]
15+
[ExcludeFromStubs]
16+
[Serializable]
1317
public sealed class CLSCompliantAttribute : Attribute
1418
{
1519
private bool _compliant;

nanoFramework.CoreLibrary/System/ComponentModel/EditorBrowsableAttribute.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
44
// See LICENSE file in the project root for full license information.
55
//
6+
7+
using System.Runtime.CompilerServices;
8+
69
namespace System.ComponentModel
710
{
811
using System;
@@ -30,6 +33,7 @@ public enum EditorBrowsableState
3033
/// Specifies that a property or method is viewable in an editor. This class cannot be inherited.
3134
/// </summary>
3235
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate)]
36+
[ExcludeFromStubs]
3337
#pragma warning disable CS0659 // Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
3438
///////////////////////////////////////////////////////////////////////////////////////////////////////
3539
// GetHashCode() implementation is provided by general native function CLR_RT_HeapBlock::GetHashCode //

nanoFramework.CoreLibrary/System/DBNull.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.ComponentModel;
8+
using System.Runtime.CompilerServices;
9+
710
namespace System
811
{
912
/// <summary>
1013
/// Represents a nonexistent value. This class cannot be inherited.
1114
/// </summary>
12-
[ComponentModel.EditorBrowsableAttribute(ComponentModel.EditorBrowsableState.Never)]
15+
[EditorBrowsable(EditorBrowsableState.Never)]
16+
[ExcludeFromStubs]
1317
public sealed class DBNull
1418
{
1519

nanoFramework.CoreLibrary/System/Diagnostics/ConditionalAttribute.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.Runtime.CompilerServices;
8+
79
namespace System.Diagnostics
810
{
911
/// <summary>
1012
/// Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.
1113
/// </summary>
12-
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true), Serializable]
14+
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
15+
[ExcludeFromStubs]
16+
[Serializable]
1317
public sealed class ConditionalAttribute : Attribute
1418
{
1519
private readonly String _conditionString;

nanoFramework.CoreLibrary/System/Diagnostics/DebuggerAttributes.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// See LICENSE file in the project root for full license information.
55
//
66

7+
using System.Runtime.CompilerServices;
8+
79
namespace System.Diagnostics
810
{
911
using System;
@@ -15,7 +17,9 @@ namespace System.Diagnostics
1517
/// Designer provided types and members that are not part of the code specifically created by the user can complicate the debugging experience. This attribute suppresses the display of these adjunct types and members in the debugger window and automatically steps through, rather than into, designer provided code. When the debugger encounters this attribute when stepping through user code, the user experience is to not see the designer provided code and to step to the next user-supplied code statement.
1618
/// The debugger behaviour when the <see cref="DebuggerNonUserCodeAttribute"/> is present is similar to using a combination of the <see cref="DebuggerHiddenAttribute"/> attribute, which hides the code from the debugger, and the <see cref="DebuggerStepThroughAttribute"/> attribute, which tells the debugger to step through, rather than into, the code it is applied to.
1719
/// </remarks>
18-
[Serializable, AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
20+
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
21+
[ExcludeFromStubs]
22+
[Serializable]
1923
public sealed class DebuggerStepThroughAttribute : Attribute
2024
{
2125
/// <summary>
@@ -30,7 +34,9 @@ public DebuggerStepThroughAttribute() { }
3034
/// <remarks>
3135
/// The <see cref="DebuggerStepperBoundaryAttribute"/> attribute is used as an escape from the effect of a <see cref="DebuggerNonUserCodeAttribute"/>. When executing within the boundaries of the <see cref="DebuggerNonUserCodeAttribute"/>, designer-provided code is executed as a step-through until the next user supplied code is encountered. When context switches are made on a thread, the next user-supplied code module stepped into may not relate to the code that was in the process of being debugged. To avoid this debugging experience, use the <see cref="DebuggerStepperBoundaryAttribute"/> to escape from stepping through code to running code. For example, in Visual Studio 2005, encountering a <see cref="DebuggerStepperBoundaryAttribute"/> while stepping through code using the F10 key (or Step Over command) has the same effect as pressing the F5 key or using the Start Debugging command.
3236
/// </remarks>
33-
[Serializable, AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
37+
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
38+
[ExcludeFromStubs]
39+
[Serializable]
3440
public sealed class DebuggerStepperBoundaryAttribute : Attribute
3541
{
3642
/// <summary>
@@ -45,7 +51,9 @@ public DebuggerStepperBoundaryAttribute() { }
4551
/// <remarks>
4652
/// The common language runtime attaches no semantics to this attribute. It is provided for use by source code debuggers. For example, the Visual Studio 2005 debugger does not stop in a method marked with this attribute and does not allow a breakpoint to be set in the method. Other debugger attributes recognized by the Visual Studio 2005 debugger are the <see cref="DebuggerNonUserCodeAttribute"/> and the <see cref="DebuggerStepThroughAttribute"/>.
4753
/// </remarks>
48-
[Serializable, AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor, Inherited = false)]
54+
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor, Inherited = false)]
55+
[ExcludeFromStubs]
56+
[Serializable]
4957
public sealed class DebuggerHiddenAttribute : Attribute
5058
{
5159
/// <summary>
@@ -61,7 +69,9 @@ public DebuggerHiddenAttribute() { }
6169
/// Designer provided types and members that are not part of the code specifically created by the user can complicate the debugging experience. This attribute suppresses the display of these adjunct types and members in the debugger window and automatically steps through, rather than into, designer provided code. When the debugger encounters this attribute when stepping through user code, the user experience is to not see the designer provided code and to step to the next user-supplied code statement.
6270
/// The debugger behaviour when the <see cref="DebuggerNonUserCodeAttribute"/> is present is similar to using a combination of the <see cref="DebuggerHiddenAttribute"/> attribute, which hides the code from the debugger, and the <see cref="DebuggerStepThroughAttribute"/> attribute, which tells the debugger to step through, rather than into, the code it is applied to.
6371
/// </remarks>
64-
[Serializable, AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)]
72+
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)]
73+
[ExcludeFromStubs]
74+
[Serializable]
6575
public sealed class DebuggerNonUserCodeAttribute : Attribute
6676
{
6777
/// <summary>
@@ -233,6 +243,7 @@ public DebuggerBrowsableState State
233243
/// </summary>
234244
/// <remarks>Available only in mscorlib build with support for System.Reflection.</remarks>
235245
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)]
246+
[ExcludeFromStubs]
236247
public sealed class DebuggerTypeProxyAttribute : Attribute
237248
{
238249
private readonly string _typeName;
@@ -318,6 +329,7 @@ public string TargetTypeName
318329
/// Determines how a class or field is displayed in the debugger variable windows.
319330
/// </summary>
320331
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Assembly, AllowMultiple = true)]
332+
[ExcludeFromStubs]
321333
public sealed class DebuggerDisplayAttribute : Attribute
322334
{
323335
private string _name;

nanoFramework.CoreLibrary/System/FlagsAttribute.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
44
// See LICENSE file in the project root for full license information.
55
//
6+
7+
using System.Runtime.CompilerServices;
8+
69
namespace System
710
{
811
/// <summary>
912
/// Indicates that an enumeration can be treated as a bit field; that is, a set of flags.
1013
/// </summary>
11-
[AttributeUsage(AttributeTargets.Enum), Serializable]
14+
[AttributeUsage(AttributeTargets.Enum)]
15+
[ExcludeFromStubs]
16+
[Serializable]
1217
public class FlagsAttribute : Attribute
1318
{
1419
}

0 commit comments

Comments
 (0)