public BasicExecutionContext(IHastlayer hastlayer, string deviceName, string communicationChannelName, Dictionary <string, object> customConfiguration = null) { HardwareRepresentation = hastlayer.GenerateHardware(new Assembly[] { Assembly.GetExecutingAssembly() }, new HardwareGenerationConfiguration(deviceName)).Result; ProxyGenerationConfiguration = new ProxyGenerationConfiguration() { CommunicationChannelName = communicationChannelName, CustomConfiguration = customConfiguration ?? new Dictionary <string, object>(), VerifyHardwareResults = false }; }
/// <summary> /// Generates and implements a hardware representation of the given assemblies. /// </summary> /// <param name="assemblies">The assemblies that should be implemented as hardware.</param> /// <param name="configuration">Configuration for how the hardware generation should happen.</param> /// <returns>The representation of the assemblies implemented as hardware.</returns> /// <exception cref="HastlayerException"> /// Thrown if any lower-level exception or other error happens during hardware generation. /// </exception> public static Task <IHardwareRepresentation> GenerateHardware( this IHastlayer hastlayer, IEnumerable <Assembly> assemblies, IHardwareGenerationConfiguration configuration) => hastlayer.GenerateHardware(assemblies.Select(assembly => assembly.Location), configuration);