Share via


FileContext Class

Definition

Describes the context a file may belong to, such as a compilation unit for a source file, a consuming HTML page for a .js file, etc.

public ref class FileContext : Microsoft::VisualStudio::Workspace::INotifyFileContextChanged
[Windows::Foundation::Metadata::WebHostHidden]
class FileContext : Microsoft::VisualStudio::Workspace::INotifyFileContextChanged
public class FileContext : Microsoft.VisualStudio.Workspace.INotifyFileContextChanged
type FileContext = class
    interface INotifyFileContextChanged
Public Class FileContext
Implements INotifyFileContextChanged
Inheritance
FileContext
Implements

Remarks

An instance of this type may be shared across many files, or members of the context.

Constructors

FileContext(Guid, Guid, Object, IReadOnlyCollection<String>, String, INotifyFileContextChanged)

Initializes a new instance of the FileContext class.

Fields

EmptyFileContexts

Empty file contexts

Properties

Context

Gets the information a language service would need to fully initialize for a member of this context.

ContextType

Gets an identifier for the type of object and data represented in Context. This may be used to match with a compatible language service provider.

DependentTasks

Gets and sets the list of tasks that file context may depend on.

DisplayName

Gets the name for this context (if any) that may be displayed to the user to pick among several available contexts.

InputFiles

Gets the set of workspace-relative paths to files that served as inputs to computing this context. This is not the set of source files that would go into a compilation unit, but rather the set of files read to determine how to assemble the context.

Label

Gets and sets the label of the file context.

NotifyFileContextChanged

Return or set the current file context changed

OnFileContextChanged

When the File Context has changed

ProviderType

The Provider source for this Context

Methods

CreateFileContexts(FileContext[])

Return a file context collection

GetContext<T>()

Get the context assuming a type expected

IsContextTypeOf<T>()

If the contained Context is of a certain type

Applies to