PresenterCollection.cs 628 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Uestc.Auto6.Dso.Core
  7. {
  8. public class PresenterCollection : Collection
  9. {
  10. public event EventHandler<CustomEventArg>? PublisherChanged;
  11. public PresenterCollection(string id, IBroadcaster pub) : base(id, pub)
  12. {
  13. IBroadcaster.StaticPublisherChanged += HandleCustomEvent;
  14. }
  15. public override void HandleCustomEvent(object? sender, CustomEventArg e)
  16. {
  17. PublisherChanged?.Invoke(sender, e);
  18. return;
  19. }
  20. }
  21. }