System.InvalidOperationException: "Sequence contains no elements" (#2530)
* do not create a new Scope - reuse workflowExecutionContext's scope * Upgrade Rebus.ServiceProvider to 7.0 * fixing System.InvalidOperationException: "Sequence contains no elements" Co-authored-by: Martin <mp@prakom.net>
This commit is contained in:
parent
eb705b301c
commit
072db97d39
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Elsa.Activities.Http.Models;
|
||||
|
|
@ -19,13 +19,13 @@ namespace Elsa.Activities.Http.JavaScript
|
|||
|
||||
foreach (var activityDefinition in httpEndpointActivities)
|
||||
{
|
||||
var targetTypeName = activityDefinition.Properties.First(x => x.Name == nameof(HttpEndpoint.TargetType)).Expressions.Values.First();
|
||||
var targetTypeName = activityDefinition.Properties.First(x => x.Name == nameof(HttpEndpoint.TargetType)).Expressions.Values.FirstOrDefault();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(targetTypeName))
|
||||
continue;
|
||||
|
||||
var type = Type.GetType(targetTypeName);
|
||||
|
||||
|
||||
if (type != null)
|
||||
yield return type;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue