LoadContext

LoadContext class

Defines load context.

public sealed class LoadContext

Properties

Name Description
Attempt { get; } The load attempt this call is for: 1 for the first attempt, 2 when the delegate is asked again after the first attempt failed.
FailedLoadOptions { get; } A copy of the load options the failed attempt used, or null on the first attempt. Changing it never changes the options returned earlier; return it, changed, to load the document again with it.
HierarchyLevel { get; } Hierarchy level.
ItemIndex { get; } Item index.
LoadFailure { get; } The failure of the previous load attempt, or null on the first attempt.
SourceFileName { get; } Source file name.
SourceFormat { get; } Source format: the format the document’s name gives, or the format its content shows when the name gives no known format or names an XML or HTML document. The content is read when this property is first read, so load options that state the format without reading it add no detection.
SourceStream { get; } Source stream: the document’s content, at position 0. null when the load options are asked again for an archive entry that could not be extracted, since there is no content yet.

See Also