2018-02-13 09:23:53 -08:00
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
// Licensed under the MIT License.
|
2016-07-29 13:02:49 -07:00
|
|
|
|
2016-03-30 14:20:52 -07:00
|
|
|
using System.Management.Automation.Internal;
|
|
|
|
|
|
|
|
|
|
namespace System.Management.Automation
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Derives InternalCommand for Native Commands
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal sealed class NativeCommand : InternalCommand
|
|
|
|
|
{
|
2016-07-29 13:02:49 -07:00
|
|
|
private NativeCommandProcessor _myCommandProcessor;
|
2016-03-30 14:20:52 -07:00
|
|
|
internal NativeCommandProcessor MyCommandProcessor
|
|
|
|
|
{
|
2016-07-29 13:02:49 -07:00
|
|
|
get { return _myCommandProcessor; }
|
|
|
|
|
set { _myCommandProcessor = value; }
|
2016-03-30 14:20:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Implement the stop functionality for native commands...
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal override void DoStopProcessing()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2016-07-29 13:02:49 -07:00
|
|
|
if (_myCommandProcessor != null)
|
|
|
|
|
_myCommandProcessor.StopProcessing();
|
2016-03-30 14:20:52 -07:00
|
|
|
}
|
2016-11-01 15:24:07 -07:00
|
|
|
catch (Exception)
|
2016-03-30 14:20:52 -07:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|