using System.Threading.Tasks; namespace ZB.MOM.WW.CBDDC.Core.Network; /// /// Represents a method that handles peer node configuration change notifications. /// /// The source of the event. /// The updated peer node configuration. public delegate void PeerNodeConfigurationChangedEventHandler(object? sender, PeerNodeConfiguration newConfig); /// /// Defines a contract for retrieving and monitoring configuration settings for a peer node. /// /// /// Implementations of this interface provide access to the current configuration and notify subscribers /// when configuration changes occur. This interface is typically used by components that require up-to-date /// configuration information for peer-to-peer networking scenarios. /// public interface IPeerNodeConfigurationProvider { /// /// Asynchronously retrieves the current configuration settings for the peer node. /// /// /// A task that represents the asynchronous operation. The task result contains the current /// . /// public Task GetConfiguration(); /// /// Occurs when the configuration of the peer node changes. /// /// /// Subscribe to this event to be notified when any configuration settings for the peer node are /// modified. Event handlers can use this notification to update dependent components or respond to configuration /// changes as needed. /// public event PeerNodeConfigurationChangedEventHandler? ConfigurationChanged; }