This commit is contained in:
oguzhankoral
2024-11-29 19:17:27 +03:00
parent dbfdce568f
commit 00404c9b27
2 changed files with 6 additions and 5 deletions
@@ -52,7 +52,12 @@ public sealed class AutocadReceiveBinding : IReceiveBinding
public void CancelReceive(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
public async Task Receive(string modelCardId)
public async Task Receive(string modelCardId) =>
await Parent
.RunOnMainThreadAsync(async () => await ReceiveInternal(modelCardId).ConfigureAwait(false))
.ConfigureAwait(false);
public async Task ReceiveInternal(string modelCardId)
{
using var scope = _serviceProvider.CreateScope();
scope
@@ -127,10 +127,6 @@ public class AutocadHostObjectBuilder : IHostObjectBuilder
{
string objectId = atomicObject.applicationId ?? atomicObject.id;
onOperationProgressed.Report(new("Converting objects", (double)++count / atomicObjects.Count));
if (count % 50 == 0)
{
await Task.Delay(10).ConfigureAwait(true);
}
try
{
List<Entity> convertedObjects = ConvertObject(atomicObject, layerPath, baseLayerPrefix);