示例#1
0
        private void ThrowIfNullOrInvalid(InfoBase infoArgument)
        {
            if (infoArgument == null)
            {
                throw new ArgumentNullException(infoArgument.GetType().Name);
            }

            if (!infoArgument.IsValid())
            {
                throw new ArgumentException($"Ошибка в данных {infoArgument.GetType().Name}.");
            }
        }
示例#2
0
 public virtual bool Equals(InfoBase other)
 {
     return((null != other) && this.GetType() == other.GetType());
 }