File tree 1 file changed +4
-2
lines changed
src/Worker.Extensions.DurableTask
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,13 @@ public ValueTask<ConversionResult> ConvertAsync(ConverterContext context)
58
58
// We only convert if:
59
59
// 1. The "Source" is null - IE: there are no declared binding parameters.
60
60
// 2. We have a cached input.
61
- // 3. The TargetType matches our cached type.
61
+ // 3. The TargetType is either:
62
+ // a. TargetType is in the inheritance hierarchy of the cached input (i.e. an ancestor type),
63
+ // b. TargetType is an interface implemented by the cached input.
62
64
// If these are met, then we assume this parameter is the orchestration input.
63
65
if ( context . Source is null
64
66
&& context . FunctionContext . Items . TryGetValue ( OrchestrationInputKey , out object ? value )
65
- && context . TargetType == value ? . GetType ( ) )
67
+ && context . TargetType . IsInstanceOfType ( value ) )
66
68
{
67
69
// Remove this from the items so we bind this only once.
68
70
context . FunctionContext . Items . Remove ( OrchestrationInputKey ) ;
You can’t perform that action at this time.
0 commit comments