Open sandboxFocus

Property IsDefault

IsDefault

Gets a value indicating whether this key is the default value, which identifies no document. This is the key under which a design-time cache files what belongs to the compilation rather than to any document.

Declaration
public bool IsDefault { get; }
Property Value
Type Description
bool
Remarks

The default key cannot collide with a document, which is the reason it, rather than a key over the empty path, marks the absence of one. It wraps a null path, and no key of a document can: FromPath(string) rejects null and FromSyntaxTree(SyntaxTree) reads FilePath, which Roslyn never returns as null. The empty path carries no such guarantee, because a syntax tree may have one.