Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
using Hast.Common.Validation;
using Hast.Synthesis.Models;
using System.Collections.Generic;
using System.Linq;
namespace Hast.Synthesis.Services;
public class HardwareImplementationComposerSelector : IHardwareImplementationComposerSelector
{
private readonly IEnumerable<IHardwareImplementationComposer> _hardwareImplementationComposers;
public HardwareImplementationComposerSelector(IEnumerable<IHardwareImplementationComposer> hardwareImplementationComposers) =>
_hardwareImplementationComposers = hardwareImplementationComposers;
public IHardwareImplementationComposer GetHardwareImplementationComposer(IHardwareImplementationCompositionContext context)
{
Argument.ThrowIfNull(context, nameof(context));
return _hardwareImplementationComposers.FirstOrDefault(composer => composer.CanCompose(context));
}
}
a4519e7a0This file is pinned to the selected release. Download the original to open it in your design tool.