mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-19 07:02:16 +08:00
Simplify token-activated subscription (channel is always ISecureChannel) (CA1508)
This commit is contained in:
@@ -87,10 +87,7 @@ namespace Opc.Ua.Bindings.Pcap.Bindings
|
||||
// offline decoder receives the derived key material alongside
|
||||
// the wire bytes. Subscribing here once per channel is
|
||||
// cheaper than subscribing at every send/receive site.
|
||||
if (channel is ISecureChannel secureChannel)
|
||||
{
|
||||
secureChannel.OnTokenActivated += OnChannelTokenActivated;
|
||||
}
|
||||
((ISecureChannel)channel).OnTokenActivated += OnChannelTokenActivated;
|
||||
return channel;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user