fix DynamicallyAccessedMembers warnings (Trimming)
This commit is contained in:
parent
b361959f53
commit
2a1e7cce93
|
@ -5,7 +5,7 @@ using static System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes;
|
|||
|
||||
namespace InnovEnergy.Lib.Protocols.Modbus.Slaves;
|
||||
|
||||
public class ModbusDevice<R> where R : notnull
|
||||
public class ModbusDevice<[DynamicallyAccessedMembers(All)] R> where R : notnull
|
||||
{
|
||||
private readonly IReadOnlyList<Batch<R>> _Batches;
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class ModbusDevice<R> where R : notnull
|
|||
return Read(r);
|
||||
}
|
||||
|
||||
public R Read([DynamicallyAccessedMembers(All)] R record)
|
||||
public R Read(R record)
|
||||
{
|
||||
foreach (var batch in _Batches)
|
||||
batch.Read(record);
|
||||
|
@ -43,7 +43,7 @@ public class ModbusDevice<R> where R : notnull
|
|||
return record;
|
||||
}
|
||||
|
||||
public void Write([DynamicallyAccessedMembers(All)] R record)
|
||||
public void Write(R record)
|
||||
{
|
||||
foreach (var batch in _Batches)
|
||||
batch.Write(record);
|
||||
|
|
Loading…
Reference in New Issue