Skip to content

Commit 6cfe459

Browse files
committed
Add RequiresAssemblyFilesAttribute
1 parent cb52c48 commit 6cfe459

27 files changed

Lines changed: 827 additions & 12 deletions

apiCount.include.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**API count: 921**
1+
**API count: 922**
22

33
### Per Target Framework
44

assemblySize.include.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
| net481 | 8.5KB | 295.0KB | +286.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
1414
| netcoreapp2.0 | 9.0KB | 271.5KB | +262.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
1515
| netcoreapp2.1 | 9.0KB | 250.5KB | +241.5KB | +9.0KB | +7.0KB | +9.5KB | +14.0KB |
16-
| netcoreapp2.2 | 9.0KB | 250.5KB | +241.5KB | +9.0KB | +7.0KB | +9.5KB | +14.0KB |
17-
| netcoreapp3.0 | 9.5KB | 241.5KB | +232.0KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB |
16+
| netcoreapp2.2 | 9.0KB | 251.0KB | +242.0KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB |
17+
| netcoreapp3.0 | 9.5KB | 241.5KB | +232.0KB | +9.5KB | +6.5KB | +9.5KB | +14.0KB |
1818
| netcoreapp3.1 | 9.5KB | 240.0KB | +230.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
1919
| net5.0 | 9.5KB | 204.5KB | +195.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
2020
| net6.0 | 10.0KB | 149.0KB | +139.0KB | +9.5KB | +7.0KB | +512bytes | +3.5KB |
@@ -40,8 +40,8 @@
4040
| net481 | 8.5KB | 430.1KB | +421.6KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
4141
| netcoreapp2.0 | 9.0KB | 397.4KB | +388.4KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
4242
| netcoreapp2.1 | 9.0KB | 365.2KB | +356.2KB | +16.7KB | +8.7KB | +14.4KB | +19.4KB |
43-
| netcoreapp2.2 | 9.0KB | 365.2KB | +356.2KB | +16.7KB | +8.7KB | +14.4KB | +19.4KB |
44-
| netcoreapp3.0 | 9.5KB | 346.9KB | +337.4KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB |
43+
| netcoreapp2.2 | 9.0KB | 365.7KB | +356.7KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB |
44+
| netcoreapp3.0 | 9.5KB | 346.9KB | +337.4KB | +17.2KB | +8.2KB | +14.4KB | +19.4KB |
4545
| netcoreapp3.1 | 9.5KB | 345.4KB | +335.9KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
4646
| net5.0 | 9.5KB | 292.3KB | +282.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
4747
| net6.0 | 10.0KB | 219.4KB | +209.4KB | +17.2KB | +8.7KB | +1.1KB | +4.2KB |

readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The package targets `netstandard2.0` and is designed to support the following ru
1313
* `uap10`
1414

1515

16-
**API count: 921**<!-- include: apiCount. path: /apiCount.include.md -->
16+
**API count: 922**<!-- include: apiCount. path: /apiCount.include.md -->
1717

1818
### Per Target Framework
1919

@@ -107,8 +107,8 @@ This project uses features from the current stable SDK and C# language. As such
107107
| net481 | 8.5KB | 295.0KB | +286.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
108108
| netcoreapp2.0 | 9.0KB | 271.5KB | +262.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
109109
| netcoreapp2.1 | 9.0KB | 250.5KB | +241.5KB | +9.0KB | +7.0KB | +9.5KB | +14.0KB |
110-
| netcoreapp2.2 | 9.0KB | 250.5KB | +241.5KB | +9.0KB | +7.0KB | +9.5KB | +14.0KB |
111-
| netcoreapp3.0 | 9.5KB | 241.5KB | +232.0KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB |
110+
| netcoreapp2.2 | 9.0KB | 251.0KB | +242.0KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB |
111+
| netcoreapp3.0 | 9.5KB | 241.5KB | +232.0KB | +9.5KB | +6.5KB | +9.5KB | +14.0KB |
112112
| netcoreapp3.1 | 9.5KB | 240.0KB | +230.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
113113
| net5.0 | 9.5KB | 204.5KB | +195.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
114114
| net6.0 | 10.0KB | 149.0KB | +139.0KB | +9.5KB | +7.0KB | +512bytes | +3.5KB |
@@ -134,8 +134,8 @@ This project uses features from the current stable SDK and C# language. As such
134134
| net481 | 8.5KB | 430.1KB | +421.6KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
135135
| netcoreapp2.0 | 9.0KB | 397.4KB | +388.4KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
136136
| netcoreapp2.1 | 9.0KB | 365.2KB | +356.2KB | +16.7KB | +8.7KB | +14.4KB | +19.4KB |
137-
| netcoreapp2.2 | 9.0KB | 365.2KB | +356.2KB | +16.7KB | +8.7KB | +14.4KB | +19.4KB |
138-
| netcoreapp3.0 | 9.5KB | 346.9KB | +337.4KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB |
137+
| netcoreapp2.2 | 9.0KB | 365.7KB | +356.7KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB |
138+
| netcoreapp3.0 | 9.5KB | 346.9KB | +337.4KB | +17.2KB | +8.2KB | +14.4KB | +19.4KB |
139139
| netcoreapp3.1 | 9.5KB | 345.4KB | +335.9KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
140140
| net5.0 | 9.5KB | 292.3KB | +282.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
141141
| net6.0 | 10.0KB | 219.4KB | +209.4KB | +17.2KB | +8.7KB | +1.1KB | +4.2KB |
@@ -2067,7 +2067,7 @@ void ObjectDisposedExceptionExample(bool isDisposed)
20672067
ObjectDisposedException.ThrowIf(isDisposed, typeof(Consume));
20682068
}
20692069
```
2070-
<sup><a href='/src/Consume/Consume.cs#L594-L618' title='Snippet source file'>snippet source</a> | <a href='#snippet-ArgumentExceptionUsage' title='Start of snippet'>anchor</a></sup>
2070+
<sup><a href='/src/Consume/Consume.cs#L595-L619' title='Snippet source file'>snippet source</a> | <a href='#snippet-ArgumentExceptionUsage' title='Start of snippet'>anchor</a></sup>
20712071
<!-- endSnippet -->
20722072

20732073

@@ -2086,7 +2086,7 @@ void EnsureExample(Order order, Customer customer, string customerId, string ema
20862086
this.quantity = Ensure.NotNegativeOrZero(quantity);
20872087
}
20882088
```
2089-
<sup><a href='/src/Consume/Consume.cs#L624-L636' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnsureUsage' title='Start of snippet'>anchor</a></sup>
2089+
<sup><a href='/src/Consume/Consume.cs#L625-L637' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnsureUsage' title='Start of snippet'>anchor</a></sup>
20902090
<!-- endSnippet -->
20912091

20922092

src/Consume/Consume.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class Consume
9999
type = typeof(DynamicallyAccessedMembersAttribute);
100100
type = typeof(DynamicDependencyAttribute);
101101
type = typeof(RequiresDynamicCodeAttribute);
102+
type = typeof(RequiresAssemblyFilesAttribute);
102103
type = typeof(RequiresUnreferencedCodeAttribute);
103104
type = typeof(UnconditionalSuppressMessageAttribute);
104105
type = typeof(CompilerFeatureRequiredAttribute);
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#if !NET6_0_OR_GREATER
2+
3+
#nullable enable
4+
5+
namespace System.Diagnostics.CodeAnalysis;
6+
7+
using Targets = AttributeTargets;
8+
9+
/// <summary>
10+
/// Indicates that the specified member requires assembly files to be on disk.
11+
/// </summary>
12+
[ExcludeFromCodeCoverage]
13+
[DebuggerNonUserCode]
14+
[AttributeUsage(
15+
validOn: Targets.Constructor |
16+
Targets.Event |
17+
Targets.Method |
18+
Targets.Property,
19+
Inherited = false)]
20+
#if PolyUseEmbeddedAttribute
21+
[global::Microsoft.CodeAnalysis.EmbeddedAttribute]
22+
#endif
23+
#if PolyPublic
24+
public
25+
#endif
26+
sealed class RequiresAssemblyFilesAttribute :
27+
Attribute
28+
{
29+
/// <summary>
30+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class.
31+
/// </summary>
32+
public RequiresAssemblyFilesAttribute()
33+
{
34+
}
35+
36+
/// <summary>
37+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class
38+
/// with the specified message.
39+
/// </summary>
40+
public RequiresAssemblyFilesAttribute(string message) =>
41+
Message = message;
42+
43+
/// <summary>
44+
/// Gets an optional message that contains information about the requirement for assembly files to be on disk.
45+
/// </summary>
46+
public string? Message { get; }
47+
48+
/// <summary>
49+
/// Gets or sets an optional URL that contains more information about the member,
50+
/// why it requires assembly files to be on disk, and what options a consumer has to deal with it.
51+
/// </summary>
52+
public string? Url { get; set; }
53+
}
54+
#else
55+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresAssemblyFilesAttribute))]
56+
#endif

src/Split/net10.0/TypeForwardeds.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute))]
6565
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes))]
6666
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute))]
67+
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresAssemblyFilesAttribute))]
6768
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute))]
6869
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute))]
6970
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute))]

src/Split/net11.0/TypeForwardeds.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute))]
6565
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes))]
6666
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute))]
67+
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresAssemblyFilesAttribute))]
6768
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute))]
6869
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute))]
6970
[assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute))]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
#nullable enable
4+
namespace System.Diagnostics.CodeAnalysis;
5+
using Targets = AttributeTargets;
6+
/// <summary>
7+
/// Indicates that the specified member requires assembly files to be on disk.
8+
/// </summary>
9+
[ExcludeFromCodeCoverage]
10+
[DebuggerNonUserCode]
11+
[AttributeUsage(
12+
validOn: Targets.Constructor |
13+
Targets.Event |
14+
Targets.Method |
15+
Targets.Property,
16+
Inherited = false)]
17+
#if PolyUseEmbeddedAttribute
18+
[global::Microsoft.CodeAnalysis.EmbeddedAttribute]
19+
#endif
20+
#if PolyPublic
21+
public
22+
#endif
23+
sealed class RequiresAssemblyFilesAttribute :
24+
Attribute
25+
{
26+
/// <summary>
27+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class.
28+
/// </summary>
29+
public RequiresAssemblyFilesAttribute()
30+
{
31+
}
32+
/// <summary>
33+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class
34+
/// with the specified message.
35+
/// </summary>
36+
public RequiresAssemblyFilesAttribute(string message) =>
37+
Message = message;
38+
/// <summary>
39+
/// Gets an optional message that contains information about the requirement for assembly files to be on disk.
40+
/// </summary>
41+
public string? Message { get; }
42+
/// <summary>
43+
/// Gets or sets an optional URL that contains more information about the member,
44+
/// why it requires assembly files to be on disk, and what options a consumer has to deal with it.
45+
/// </summary>
46+
public string? Url { get; set; }
47+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
#nullable enable
4+
namespace System.Diagnostics.CodeAnalysis;
5+
using Targets = AttributeTargets;
6+
/// <summary>
7+
/// Indicates that the specified member requires assembly files to be on disk.
8+
/// </summary>
9+
[ExcludeFromCodeCoverage]
10+
[DebuggerNonUserCode]
11+
[AttributeUsage(
12+
validOn: Targets.Constructor |
13+
Targets.Event |
14+
Targets.Method |
15+
Targets.Property,
16+
Inherited = false)]
17+
#if PolyUseEmbeddedAttribute
18+
[global::Microsoft.CodeAnalysis.EmbeddedAttribute]
19+
#endif
20+
#if PolyPublic
21+
public
22+
#endif
23+
sealed class RequiresAssemblyFilesAttribute :
24+
Attribute
25+
{
26+
/// <summary>
27+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class.
28+
/// </summary>
29+
public RequiresAssemblyFilesAttribute()
30+
{
31+
}
32+
/// <summary>
33+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class
34+
/// with the specified message.
35+
/// </summary>
36+
public RequiresAssemblyFilesAttribute(string message) =>
37+
Message = message;
38+
/// <summary>
39+
/// Gets an optional message that contains information about the requirement for assembly files to be on disk.
40+
/// </summary>
41+
public string? Message { get; }
42+
/// <summary>
43+
/// Gets or sets an optional URL that contains more information about the member,
44+
/// why it requires assembly files to be on disk, and what options a consumer has to deal with it.
45+
/// </summary>
46+
public string? Url { get; set; }
47+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
#nullable enable
4+
namespace System.Diagnostics.CodeAnalysis;
5+
using Targets = AttributeTargets;
6+
/// <summary>
7+
/// Indicates that the specified member requires assembly files to be on disk.
8+
/// </summary>
9+
[ExcludeFromCodeCoverage]
10+
[DebuggerNonUserCode]
11+
[AttributeUsage(
12+
validOn: Targets.Constructor |
13+
Targets.Event |
14+
Targets.Method |
15+
Targets.Property,
16+
Inherited = false)]
17+
#if PolyUseEmbeddedAttribute
18+
[global::Microsoft.CodeAnalysis.EmbeddedAttribute]
19+
#endif
20+
#if PolyPublic
21+
public
22+
#endif
23+
sealed class RequiresAssemblyFilesAttribute :
24+
Attribute
25+
{
26+
/// <summary>
27+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class.
28+
/// </summary>
29+
public RequiresAssemblyFilesAttribute()
30+
{
31+
}
32+
/// <summary>
33+
/// Initializes a new instance of the <see cref="RequiresAssemblyFilesAttribute"/> class
34+
/// with the specified message.
35+
/// </summary>
36+
public RequiresAssemblyFilesAttribute(string message) =>
37+
Message = message;
38+
/// <summary>
39+
/// Gets an optional message that contains information about the requirement for assembly files to be on disk.
40+
/// </summary>
41+
public string? Message { get; }
42+
/// <summary>
43+
/// Gets or sets an optional URL that contains more information about the member,
44+
/// why it requires assembly files to be on disk, and what options a consumer has to deal with it.
45+
/// </summary>
46+
public string? Url { get; set; }
47+
}

0 commit comments

Comments
 (0)