Method GetAggregations
- Namespace
- TantivyDotNet
- Assembly
- TantivyDotNet.dll
GetAggregations<T>(JsonTypeInfo<T>)
Deserializes Aggregations into T (AOT-safe).
public T? GetAggregations<T>(JsonTypeInfo<T> typeInfo)
Parameters
typeInfoJsonTypeInfo<T>Source-generated metadata for
T, for exampleMyJsonContext.Default.MyAggs.
Returns
- T
Type Parameters
T
Exceptions
- InvalidOperationException
No aggregations were requested.
GetAggregations<T>()
Deserializes Aggregations into T with reflection-based
System.Text.Json. For trimmed or NativeAOT apps, use GetAggregations<T>(JsonTypeInfo<T>).
[RequiresUnreferencedCode("Reflection-based JSON deserialization. Use GetAggregations<T>(JsonTypeInfo<T>) for trimmed apps.")]
[RequiresDynamicCode("Reflection-based JSON deserialization. Use GetAggregations<T>(JsonTypeInfo<T>) for NativeAOT apps.")]
public T? GetAggregations<T>()
Returns
- T
Type Parameters
T
Exceptions
- InvalidOperationException
No aggregations were requested.