-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Greg Roll <[email protected]>
- Loading branch information
1 parent
e189677
commit 3bd961c
Showing
9 changed files
with
79 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member 'member' | ||
|
||
namespace Microsoft.Azure.Functions.PowerShellWorker.Durable.Commands | ||
{ | ||
using System.Collections; | ||
using System.Management.Automation; | ||
using Microsoft.Azure.Functions.PowerShellWorker.Durable.Tasks; | ||
|
||
[Cmdlet("Get", "DurableTaskResult")] | ||
public class GetDurableTaskResultCommand : PSCmdlet | ||
{ | ||
[Parameter(Mandatory = true)] | ||
[ValidateNotNull] | ||
public DurableTask[] Task { get; set; } | ||
|
||
private readonly DurableTaskHandler _durableTaskHandler = new DurableTaskHandler(); | ||
|
||
protected override void EndProcessing() | ||
{ | ||
var privateData = (Hashtable)MyInvocation.MyCommand.Module.PrivateData; | ||
var context = (OrchestrationContext)privateData[SetFunctionInvocationContextCommand.ContextKey]; | ||
|
||
_durableTaskHandler.GetTaskResult(Task, context, WriteObject); | ||
} | ||
|
||
protected override void StopProcessing() | ||
{ | ||
_durableTaskHandler.Stop(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters