/// <summary> /// Initializes a new instance of the <see cref="HanAdapterContainer"/> class. /// </summary> /// <param name="hanAdapterInfo">The HAN adapter information.</param> /// <param name="deviceId">The device identifier.</param> public HanAdapterContainer(HanAdapterInfo hanAdapterInfo, string deviceId) { this.DeviceId = deviceId; this.hanAdapterInfo = hanAdapterInfo; if (this.hanAdapterInfo.Name == nameof(HanAdapterExample)) { this.Adapter = new HanAdapterExample(Program.CommandLineArguments.TestConfiguration); } else { this.Adapter = hanAdapterInfo.CreateInstance(); } }
/// <summary> /// Initializes a new instance of the <see cref="DigestItem"/> class. /// </summary> /// <param name="adapter">The adapter.</param> public DigestItem(HanAdapterInfo adapter) { this.Digest = adapter.Hash; this.Filename = adapter.Assembly.GetName().Name + $"_{adapter.ManufacturerName}"; }