NullContent Class
A special IContentProvider that you can use to indicate that a null content provider should be used instead of the existing content provider when cloning documents (because otherwise if null is passed in as the content provider the one from the existing document will be used in the cloned document).
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IContentProvider"] click Interface0 "/api/Statiq.Common/IContentProvider" Type-.->Interface1["ICacheCode"] click Interface1 "/api/Statiq.Common/ICacheCode" Type["NullContent"] class Type type-node


public sealed class NullContent : IContentProvider, ICacheCode



Name Property Type Summary
MediaType string
Gets the media type of the content.


Name Return Value Summary
CloneWithMediaType(string) IContentProvider
Clones the current content provider with a new media type.
GetCacheCodeAsync() Task<int>
Gets a deterministic hash appropriate for caching.
GetLength() long
Gets the length of the content in bytes.
GetStream() Stream
Gets the content stream. The returned stream should be disposed after use.
GetTextReader() TextReader
Gets an appropriate TextReader for the content. This is prefered over reading the stream as text since it might be optimized for text-based use cases. The returned TextReader should be disposed after use.

Extension Methods