Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit dd85ad6

Browse files
OmarTawfiksafern
authored andcommitted
Add System.Runtime.CompilerServices.ReadOnlyAttribute (#10777)
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent abda906 commit dd85ad6

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@
305305
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\LoadHint.cs"/>
306306
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\MethodCodeType.cs"/>
307307
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\MethodImplOptions.cs"/>
308+
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\ReadOnlyAttribute.cs"/>
308309
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\StringFreezingAttribute.cs"/>
309310
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\SuppressIldasmAttribute.cs"/>
310311
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\TupleElementNamesAttribute.cs"/>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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.ComponentModel;
6+
7+
namespace System.Runtime.CompilerServices
8+
{
9+
/// <summary>
10+
/// Reserved to be used by the compiler for tracking metadata.
11+
/// This attribute should not be used by developers in source code.
12+
/// </summary>
13+
[EditorBrowsable(EditorBrowsableState.Never)]
14+
[AttributeUsage(AttributeTargets.All, Inherited = false)]
15+
public sealed class ReadOnlyAttribute : Attribute
16+
{
17+
public ReadOnlyAttribute()
18+
{
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)