Skip to content

Commit f47b4d3

Browse files
authored
Add NativeProfiled attribute (#227)
***NO_CI***
1 parent 380fe6a commit f47b4d3

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@
303303
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.DebuggerTypeProxyAttribute">
304304
<InProject>false</InProject>
305305
</NFMDP_PE_ExcludeClassByName>
306+
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.NativeProfiledAttribute">
307+
<InProject>false</InProject>
308+
</NFMDP_PE_ExcludeClassByName>
306309
<NFMDP_PE_ExcludeClassByName Include="System.FlagsAttribute">
307310
<InProject>false</InProject>
308311
</NFMDP_PE_ExcludeClassByName>

nanoFramework.CoreLibrary/CoreLibrary.nfproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<Compile Include="System\AppDomainUnloadedException.cs" />
6767
<Compile Include="System\ApplicationException.cs" />
6868
<Compile Include="System\ArgumentException.cs" />
69+
<Compile Include="System\Diagnostics\NativeProfiledAttribute.cs" />
6970
<Compile Include="System\PlatformNotSupportedException.cs" />
7071
<Compile Include="System\ArgumentNullException.cs" />
7172
<Compile Include="System\ArgumentOutOfRangeException.cs" />
@@ -246,7 +247,7 @@
246247
</NFMDP_PE_ExcludeClassByName>
247248
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute">
248249
<InProject>false</InProject>
249-
</NFMDP_PE_ExcludeClassByName>
250+
</NFMDP_PE_ExcludeClassByName>
250251
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute">
251252
<InProject>false</InProject>
252253
</NFMDP_PE_ExcludeClassByName>
@@ -295,6 +296,9 @@
295296
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.DebuggerTypeProxyAttribute">
296297
<InProject>false</InProject>
297298
</NFMDP_PE_ExcludeClassByName>
299+
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.NativeProfiledAttribute">
300+
<InProject>false</InProject>
301+
</NFMDP_PE_ExcludeClassByName>
298302
<NFMDP_PE_ExcludeClassByName Include="System.FlagsAttribute">
299303
<InProject>false</InProject>
300304
</NFMDP_PE_ExcludeClassByName>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
4+
using System.Runtime.CompilerServices;
5+
6+
namespace System.Diagnostics
7+
{
8+
/// <summary>
9+
/// Indicates that a method will profiled by the runtime, providing it has profiling capabilities enabled.
10+
/// </summary>
11+
/// <remarks>
12+
/// This attribute is exclusive to the .NET nanoFramework runtime and has no effect on other runtimes.
13+
/// </remarks>
14+
[ExcludeType]
15+
[DebuggerNonUserCode]
16+
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
17+
public sealed class NativeProfiledAttribute : Attribute
18+
{ }
19+
}

0 commit comments

Comments
 (0)