Condividi tramite


ScriptPosition Class

Definition

Represents a single point in a script. The script may come from a file or interactive input.

public ref class ScriptPosition sealed : System::Management::Automation::Language::IScriptPosition
public sealed class ScriptPosition : System.Management.Automation.Language.IScriptPosition
type ScriptPosition = class
    interface IScriptPosition
Public NotInheritable Class ScriptPosition
Implements IScriptPosition
Inheritance
ScriptPosition
Implements

Constructors

ScriptPosition(String, Int32, Int32, String)

Creates a new script position, which represents a point in a script.

ScriptPosition(String, Int32, Int32, String, String)

Creates a new script position, which represents a point in a script.

Properties

ColumnNumber

The column number of the position, with the value 1 being the first column.

File

The name of the file, or if the script did not come from a file, then null.

Line

The complete text of the line that this position is included on.

LineNumber

The line number of the position, with the value 1 being the first line.

Offset

The offset from the beginning of the script, always return 0.

Methods

GetFullScript()

The complete script that this position is included in.

Applies to