public bool Equals(IFactKey other) { // Switch expression: compare in case of FactKey, else return false; return(other switch { FactKey otherFactKey => Guid.EmptyInsensitiveEquals(otherFactKey.Guid), _ => false });
public bool ContainsKey(IFactKey factKey) { if (factKey == null) { return(false); } return(_facts.ContainsKey(factKey)); }
public IFact Get(IFactKey factKey) { if (factKey == null) { return(default);
public bool Validate(IFactKey factKey, IFact fact) { return(factKey != null && fact is MoistureFact); }