IModelHost.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using InABox.Core;
  3. namespace InABox.Avalonia
  4. {
  5. // public class TransportConnectedEventArgs : EventArgs
  6. // {
  7. //
  8. // }
  9. // public delegate void TransportConnectedEvent(object sender, TransportConnectedEventArgs args);
  10. //
  11. // public class TransportDisconnectedEventArgs : EventArgs
  12. // {
  13. //
  14. // }
  15. // public delegate void TransportDisconnectedEvent(object sender, TransportDisconnectedEventArgs args);
  16. public delegate void BackgroundUpdateStatusEvent(object sender, EventArgs args);
  17. public enum ConnectionStatus
  18. {
  19. Disconnected,
  20. Connecting,
  21. Connected
  22. }
  23. public interface IModelHost
  24. {
  25. ConnectionStatus Status { get; }
  26. bool IsBackgroundUpdateStatusActive { get; }
  27. event BackgroundUpdateStatusEvent BackgroundUpdateStatusChanged;
  28. void AddUpdateQueue<TEntity>(QueueUpdater<TEntity> queueUpdater) where TEntity : Entity, IPersistent, IRemotable, new();
  29. void RemoveUpdateQueue<TEntity>(QueueUpdater<TEntity> queueUpdater) where TEntity : Entity, IPersistent, IRemotable, new();
  30. }
  31. }