15 lines
779 B
C#
15 lines
779 B
C#
namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip;
|
|
|
|
/// <summary>Maps an <see cref="AbCipTransport"/> to the matching trio of runtime factories.</summary>
|
|
internal static class AbCipTransportFactories
|
|
{
|
|
/// <summary>Returns the tag, enumerator and template-reader factories for <paramref name="transport"/>.</summary>
|
|
public static (IAbCipTagFactory Tags, IAbCipTagEnumeratorFactory Enumerators, IAbCipTemplateReaderFactory Templates)
|
|
For(AbCipTransport transport) => transport switch
|
|
{
|
|
AbCipTransport.Native => (new NativeAbCipTagFactory(), new NativeAbCipTagEnumeratorFactory(),
|
|
new NativeAbCipTemplateReaderFactory()),
|
|
_ => (new LibplctagTagFactory(), new LibplctagTagEnumeratorFactory(), new LibplctagTemplateReaderFactory()),
|
|
};
|
|
}
|