private void InnerAdd <TFact>(TFact fact, IEqualityComparer <IFact> comparer) where TFact : IFact { IFactType factType = fact.GetFactType(); if (ContainerList.Contains(fact, comparer)) { throw CommonHelper.CreateException(ErrorCode.InvalidData, $"The fact container already contains '{factType.FactName}' fact."); } ContainerList.Add(fact); }
/// <inheritdoc/> public virtual bool Contains <TFact>(TFact fact) where TFact : IFact { IFactType factType = fact.GetFactType(); return(ContainerList.Contains(fact, GetEqualityComparer())); }