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