powershell-es/docs/api/index.md
fwastring baa0056244
Some checks are pending
CI Tests / dotnet (push) Waiting to run
CI Tests / dotnet-1 (push) Waiting to run
CI Tests / dotnet-2 (push) Waiting to run
Emacs End-to-End Tests / ert (push) Waiting to run
Vim End-to-End Tests / themis (push) Waiting to run
initial
2026-02-17 13:06:31 +01:00

28 lines
1.4 KiB
Markdown

# API Reference
The .NET API for PowerShell Editor Services is organized in a way that allows
you to easily get started using all of its services but also giving you the
option to only use the services you care about in your application.
The best starting point is the @Microsoft.PowerShell.EditorServices.EditorSession
class which can start up all of the following services for use in a single editing
session.
Use the @Microsoft.PowerShell.EditorServices.LanguageService to provide language
intelligence behaviors like finding the references or definition of a cmdlet or variable.
Use the @Microsoft.PowerShell.EditorServices.AnalysisService to provide rule-based
analysis of scripts using [PowerShell Script Analyzer](https://github.com/PowerShell/PSScriptAnalyzer).
Use the @Microsoft.PowerShell.EditorServices.DebugService to easily interact with
the PowerShell debugger.
Use the @Microsoft.PowerShell.EditorServices.Console.ConsoleService to provide interactive
console support in the user's editor.
Use the @Microsoft.PowerShell.EditorServices.Services.ExtensionService to allow
the user to extend the host editor with new capabilities using PowerShell code.
The core of all the services is the @Microsoft.PowerShell.EditorServices.PowerShellContext
class. This class manages a session's runspace and handles script and command
execution no matter what state the runspace is in.