ConnectionHelpers.cs 408 B

1234567891011
  1. namespace RackPeek.Domain.Resources.Connections;
  2. public static class ConnectionHelpers {
  3. public static bool Matches(PortReference a, PortReference b) {
  4. return a.Resource == b.Resource
  5. && a.PortGroup == b.PortGroup
  6. && a.PortIndex == b.PortIndex;
  7. }
  8. public static bool Contains(Connection c, PortReference port) => Matches(c.A, port) || Matches(c.B, port);
  9. }