Edit

Share via


NullabilityInfoContext.Create Method

Definition

Overloads

Create(EventInfo)

Populates a NullabilityInfo for the given EventInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

Create(FieldInfo)

Populates a NullabilityInfo for the given FieldInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

Create(ParameterInfo)

Populates a NullabilityInfo for the given ParameterInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

Create(PropertyInfo)

Populates a NullabilityInfo for the given PropertyInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

Create(EventInfo)

Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs

Populates a NullabilityInfo for the given EventInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

public:
 System::Reflection::NullabilityInfo ^ Create(System::Reflection::EventInfo ^ eventInfo);
public System.Reflection.NullabilityInfo Create (System.Reflection.EventInfo eventInfo);
member this.Create : System.Reflection.EventInfo -> System.Reflection.NullabilityInfo
Public Function Create (eventInfo As EventInfo) As NullabilityInfo

Parameters

eventInfo
EventInfo

The event for which to populate nullability information.

Returns

A NullabilityInfo instance.

Exceptions

eventInfo is null.

Applies to

Create(FieldInfo)

Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs

Populates a NullabilityInfo for the given FieldInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

public:
 System::Reflection::NullabilityInfo ^ Create(System::Reflection::FieldInfo ^ fieldInfo);
public System.Reflection.NullabilityInfo Create (System.Reflection.FieldInfo fieldInfo);
member this.Create : System.Reflection.FieldInfo -> System.Reflection.NullabilityInfo
Public Function Create (fieldInfo As FieldInfo) As NullabilityInfo

Parameters

fieldInfo
FieldInfo

The field for which to populate the nullability information.

Returns

A NullabilityInfo instance.

Exceptions

fieldInfo is null.

Applies to

Create(ParameterInfo)

Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs

Populates a NullabilityInfo for the given ParameterInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

public:
 System::Reflection::NullabilityInfo ^ Create(System::Reflection::ParameterInfo ^ parameterInfo);
public System.Reflection.NullabilityInfo Create (System.Reflection.ParameterInfo parameterInfo);
member this.Create : System.Reflection.ParameterInfo -> System.Reflection.NullabilityInfo
Public Function Create (parameterInfo As ParameterInfo) As NullabilityInfo

Parameters

parameterInfo
ParameterInfo

The parameter for which to populate the nullability information.

Returns

A NullabilityInfo instance.

Exceptions

parameterInfo is null.

Applies to

Create(PropertyInfo)

Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs
Source:
NullabilityInfoContext.cs

Populates a NullabilityInfo for the given PropertyInfo. If the nullablePublicOnly feature is set for an assembly, like it does in the .NET SDK, the private and/or internal member's nullability attributes are omitted, and the API will return the Unknown state.

public:
 System::Reflection::NullabilityInfo ^ Create(System::Reflection::PropertyInfo ^ propertyInfo);
public System.Reflection.NullabilityInfo Create (System.Reflection.PropertyInfo propertyInfo);
member this.Create : System.Reflection.PropertyInfo -> System.Reflection.NullabilityInfo
Public Function Create (propertyInfo As PropertyInfo) As NullabilityInfo

Parameters

propertyInfo
PropertyInfo

The property for which to populate the nullability information.

Returns

A NullabilityInfo instance.

Exceptions

propertyInfo is null.

Applies to