| File: src\roslyn\src\Dependencies\Contracts\SetsRequiredMembersAttribute.cs | Web Access |
| Project: src\roslyn\src\CodeStyle\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj (Microsoft.CodeAnalysis.CodeStyle) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable enable // Copied from: // https://github.com/dotnet/runtime/blob/fdd104ec5e1d0d2aa24a6723995a98d0124f724b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/SetsRequiredMembersAttribute.cs #if NET8_0_OR_GREATER using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; #pragma warning disable RS0016 // Add public types and members to the declared API (this is a supporting forwarder for an internal polyfill API) [assembly: TypeForwardedTo(typeof(SetsRequiredMembersAttribute))] #pragma warning restore RS0016 // Add public types and members to the declared API #else namespace System.Diagnostics.CodeAnalysis { /// <summary> /// Specifies that this constructor sets all required members for the current type, and callers /// do not need to set any required members themselves. /// </summary> [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] internal sealed class SetsRequiredMembersAttribute : Attribute { } } #endif