forked from Azure/azure-functions-powershell-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return results from Start-DurableExternalEventListener (Azure#685)
- Loading branch information
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