1 instantiation of NullabilityInfo
Microsoft.Extensions.AI.Abstractions (1)
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (1)
390
return new
NullabilityInfo
(type, state, state, elementState, genericArgumentsState);
38 references to NullabilityInfo
Microsoft.Extensions.AI.Abstractions (38)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
282
NullabilityInfo
nullabilityInfo = ReflectionHelpers.GetMemberNullability(state.NullabilityInfoContext, memberInfo);
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
177
public static
NullabilityInfo
GetMemberNullability(NullabilityInfoContext context, MemberInfo memberInfo)
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfo.cs (6)
18
NullabilityInfo
? elementType,
NullabilityInfo
[] typeArguments)
44
/// If the member type is an array, gives the <see cref="
NullabilityInfo
" /> of the elements of the array, null otherwise.
46
public
NullabilityInfo
? ElementType { get; }
49
/// If the member type is a generic type, gives the array of <see cref="
NullabilityInfo
" /> for each type parameter.
51
public
NullabilityInfo
[] GenericTypeArguments { get; }
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (30)
67
/// Populates <see cref="
NullabilityInfo
" /> for the given <see cref="ParameterInfo" />.
73
/// <returns><see cref="
NullabilityInfo
" />.</returns>
74
public
NullabilityInfo
Create(ParameterInfo parameterInfo)
80
NullabilityInfo
nullability = GetNullabilityInfo(parameterInfo.Member, parameterInfo.ParameterType, parser);
91
private void CheckParameterMetadataType(ParameterInfo parameter,
NullabilityInfo
nullability)
145
private static void CheckNullabilityAttributes(
NullabilityInfo
nullability, IList<CustomAttributeData> attributes)
190
/// Populates <see cref="
NullabilityInfo
" /> for the given <see cref="PropertyInfo" />.
196
/// <returns><see cref="
NullabilityInfo
" />.</returns>
197
public
NullabilityInfo
Create(PropertyInfo propertyInfo)
204
NullabilityInfo
nullability = GetNullabilityInfo(propertyInfo, propertyInfo.PropertyType, parser);
239
/// Populates <see cref="
NullabilityInfo
" /> for the given <see cref="EventInfo" />.
245
/// <returns><see cref="
NullabilityInfo
" />.</returns>
246
public
NullabilityInfo
Create(EventInfo eventInfo)
252
/// Populates <see cref="
NullabilityInfo
" /> for the given <see cref="FieldInfo" />
258
/// <returns><see cref="
NullabilityInfo
" />.</returns>
259
public
NullabilityInfo
Create(FieldInfo fieldInfo)
263
NullabilityInfo
nullability = GetNullabilityInfo(fieldInfo, fieldInfo.FieldType, parser);
323
private
NullabilityInfo
GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser)
326
NullabilityInfo
nullability = GetNullabilityInfo(memberInfo, type, parser, ref index);
336
private
NullabilityInfo
GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser, ref int index)
339
NullabilityInfo
? elementState = null;
340
NullabilityInfo
[] genericArgumentsState = Array.Empty<
NullabilityInfo
>();
382
genericArgumentsState = new
NullabilityInfo
[genericArguments.Length];
408
private void TryLoadGenericMetaTypeNullability(MemberInfo memberInfo,
NullabilityInfo
nullability)
448
private void CheckGenericParameters(
NullabilityInfo
nullability, MemberInfo metaMember, Type metaType, Type? reflectedType)
482
private bool TryUpdateGenericParameterNullability(
NullabilityInfo
nullability, Type genericParameter, Type? reflectedType)
516
private bool TryUpdateGenericTypeParameterNullabilityFromReflectedType(
NullabilityInfo
nullability, Type genericParameter, Type context, Type reflectedType)
578
private static bool TryPopulateNullabilityInfo(
NullabilityInfo
nullability, NullableAttributeStateParser parser, ref int index)
601
foreach (
NullabilityInfo
genericTypeArgumentNullability in nullability.GenericTypeArguments)