private NodeStatsEventType GetSyncEventType(SyncEvent syncEvent) { switch (syncEvent) { case SyncEvent.InitCompleted: return(NodeStatsEventType.SyncInitCompleted); case SyncEvent.InitCancelled: return(NodeStatsEventType.SyncInitCancelled); case SyncEvent.InitFailed: return(NodeStatsEventType.SyncInitFailed); case SyncEvent.Started: return(NodeStatsEventType.SyncStarted); case SyncEvent.Completed: return(NodeStatsEventType.SyncCompleted); case SyncEvent.Failed: return(NodeStatsEventType.SyncFailed); case SyncEvent.Cancelled: return(NodeStatsEventType.SyncCancelled); } throw new Exception($"SyncStatus not supported: {syncEvent.ToString()}"); }