ToImmutableDocumentArray<TDocument>(IEnumerable<TDocument>) Method
Creates an immutable array from the specified document collection and removes null items.
Namespace
Statiq.Common
Containing Type
IDocumentEnumerableExtensions

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.