mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-19 13:44:50 +00:00
* Update TestService * Update WebListener * Update Controllers * Update ExpTest * Update MyApp * Update Logic * Update Logic * Update MyApp * Update Microsoft.Management.Infrastructure.CimCmdlets * Update Microsoft.PowerShell.Commands.Diagnostics * Update Microsoft.PowerShell.ScheduledJob * Update Microsoft.WSMan.Management * Update Microsoft.WSMan.Runtime * Update ResGen * Update TypeCatalogGen * Update commands * Update Eventing * Update Reader * Update utility * Update ShowCommand * Update trace * Update WebCmdlet * Update Common * Update CoreCLR * Update common * Update format-object * Update format-wide * Update out-file * Update out-printer * Update out-string * Update OutGridView * Update LocalAccounts * Update Commands * Update security * Update CoreCLR * Update DscSupport * Update engine * Update help * Update logging * Update namespaces * Update security * Update utils * Update config * Update perfCounters * Update tracing * Update cmdletization * Update other * Update cim * Update xml * Update CoreCLR * Update common * Update DefaultFormatters * Update out-console * Update out-textInterface * Update DisplayDatabase * Update Utilities * Update COM * Update ComInterop * Update CommandCompletion * Update debugger * Update ExperimentalFeature * Update hostifaces * Update interpreter * Update lang * Update Modules * Update parser * Update runtime * Update client * Update commands * Update common * Update fanin * Update server * Update WireDataFormat * Update Binding * Update Operations * Update interface * Update cmdletization * Update cim * Update management * Update WindowsTaskbarJumpList * Update msh
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
/* ****************************************************************************
|
|
*
|
|
* Copyright (c) Microsoft Corporation.
|
|
*
|
|
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
|
|
* copy of the license can be found in the License.html file at the root of this distribution. If
|
|
* you cannot locate the Apache License, Version 2.0, please send an email to
|
|
* dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
|
|
* by the terms of the Apache License, Version 2.0.
|
|
*
|
|
* You must not remove this notice, or any other, from this software.
|
|
*
|
|
*
|
|
* ***************************************************************************/
|
|
|
|
namespace System.Management.Automation.Interpreter
|
|
{
|
|
internal class UpdatePositionInstruction : Instruction
|
|
{
|
|
private readonly int _sequencePoint;
|
|
private readonly bool _checkBreakpoints;
|
|
|
|
private UpdatePositionInstruction(bool checkBreakpoints, int sequencePoint)
|
|
{
|
|
_checkBreakpoints = checkBreakpoints;
|
|
_sequencePoint = sequencePoint;
|
|
}
|
|
|
|
public override int Run(InterpretedFrame frame)
|
|
{
|
|
var functionContext = frame.FunctionContext;
|
|
var context = frame.ExecutionContext;
|
|
|
|
functionContext._currentSequencePointIndex = _sequencePoint;
|
|
if (_checkBreakpoints)
|
|
{
|
|
if (context._debuggingMode > 0)
|
|
{
|
|
context.Debugger.OnSequencePointHit(functionContext);
|
|
}
|
|
}
|
|
|
|
return +1;
|
|
}
|
|
|
|
public static Instruction Create(int sequencePoint, bool checkBreakpoints)
|
|
{
|
|
return new UpdatePositionInstruction(checkBreakpoints, sequencePoint);
|
|
}
|
|
}
|
|
}
|