Creates an immutable array from the specified document collection and removes null items.
Syntax
public static ImmutableArray<TDocument> ToImmutableDocumentArray<TDocument>(this IEnumerable<TDocument> documents)
where TDocument : IDocument
Type Parameters
| Name |
Description |
| TDocument |
The document type. |
Parameters
| Name |
Type |
Description |
| documents |
IEnumerable<TDocument> |
The documents to convert to an immutable array. |
Return Value
| Type |
Description |
| ImmutableArray<TDocument> |
An immutable array of documents. |