-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90c196a
commit c06aad4
Showing
6 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...mbeddedResources/RuntimeSupported/System.Runtime.CompilerServices.InlineArrayAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// <auto-generated/> | ||
#pragma warning disable | ||
#nullable enable annotations | ||
|
||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Runtime.CompilerServices2 | ||
{ | ||
/// <summary> | ||
/// Indicates that the instance's storage is sequentially replicated "length" times. | ||
/// </summary> | ||
/// <remarks> | ||
/// <para> | ||
/// This attribute can be used to annotate a <see langword="struct"/> type with a single field. | ||
/// The runtime will replicate that field in the actual type layout as many times as is specified. | ||
/// </para> | ||
/// <para> | ||
/// Here's an example of how an inline array type with 8 <see cref="float"/> values can be declared: | ||
/// <code lang="csharp"> | ||
/// [InlineArray(8)] | ||
/// struct Float8InlineArray | ||
/// { | ||
/// private float _value; | ||
/// } | ||
/// </code> | ||
/// </para> | ||
/// </remarks> | ||
[global::System.AttributeUsage(global::System.AttributeTargets.Struct, AllowMultiple = false)] | ||
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")] | ||
public sealed class InlineArrayAttribute : global::System.Attribute | ||
{ | ||
/// <summary>Creates a new <see cref="global::System.Runtime.CompilerServices2.InlineArrayAttribute"/> instance with the specified length.</summary> | ||
/// <param name="length">The number of sequential fields to replicate in the inline array type.</param> | ||
public InlineArrayAttribute(int length) | ||
{ | ||
Length = length; | ||
} | ||
|
||
/// <summary>Gets the number of sequential fields to replicate in the inline array type.</summary> | ||
public int Length { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters