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:
noxe 2021-11-26 20:57:33 +01:00 committed by GitHub
parent eb705b301c
commit 072db97d39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}