same static method

bool same(
  1. Identity a,
  2. Identity b
)

Implementation

static bool same(Identity a, Identity b) => a.type == b.type && a.id == b.id;