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