Ejemplo n.º 1
0
 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
     });
Ejemplo n.º 2
0
        public bool ContainsKey(IFactKey factKey)
        {
            if (factKey == null)
            {
                return(false);
            }

            return(_facts.ContainsKey(factKey));
        }
Ejemplo n.º 3
0
 public IFact Get(IFactKey factKey)
 {
     if (factKey == null)
     {
         return(default);
Ejemplo n.º 4
0
 public bool Validate(IFactKey factKey, IFact fact)
 {
     return(factKey != null && fact is MoistureFact);
 }