Workspace.RegisterDocumentOpenedHandler Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a handler that is fired when a Document is opened in the editor.
public Microsoft.CodeAnalysis.WorkspaceEventRegistration RegisterDocumentOpenedHandler(Action<Microsoft.CodeAnalysis.DocumentEventArgs> handler, Microsoft.CodeAnalysis.WorkspaceEventOptions? options = default);
member this.RegisterDocumentOpenedHandler : Action<Microsoft.CodeAnalysis.DocumentEventArgs> * Nullable<Microsoft.CodeAnalysis.WorkspaceEventOptions> -> Microsoft.CodeAnalysis.WorkspaceEventRegistration
Public Function RegisterDocumentOpenedHandler (handler As Action(Of DocumentEventArgs), Optional options As Nullable(Of WorkspaceEventOptions) = Nothing) As WorkspaceEventRegistration
Parameters
- handler
- Action<DocumentEventArgs>
- options
- Nullable<WorkspaceEventOptions>