Edytuj

Udostępnij za pośrednictwem


AvailabilityBaseAttribute Class

Definition

Describes the availability of a member or type.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Enum | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Event | System.AttributeTargets.Interface | System.AttributeTargets.Delegate, AllowMultiple=true)]
public abstract class AvailabilityBaseAttribute : Attribute
type AvailabilityBaseAttribute = class
    inherit Attribute
Inheritance
AvailabilityBaseAttribute
Derived
Attributes

Remarks

This attribute is used to annotate when a type or member of a type was introduced, deprecated, obsolete or is unavailable. This is done on a per-platform basis (one attribute per platform, which can be either iOS, tvOS, watchOS or macOS).

The information is only accurate for active versions of the operating systems, the information is removed as soon as operating systems are deprecated or no longer supported by Apple.

It is the managed equivalent of Clang's availability __attribute__, which is the underlying mechanism that Apple uses to perform these annotations.

Properties

Architecture

The architectures the attribute applies to (either only 32-bit, only 64-bit or both 32-bit and 64-bit architectures).

AvailabilityKind

The type of availability information this attribute contains.

Message

Additional information related to the availability information.

Platform

The platform this availability attribute applies to.

Version

The version when the API was introduced, deprecated, obsoleted or became unavailable.

Methods

ToString()

Returns a human readable version of the availability attribute.

Applies to