public virtual void InheritsFrom(TypeUsageInfo info) { if (Inherits.Any(t => t.Equals(info))) { throw new ArgumentOutOfRangeException("info", string.Format("Type already inherits from this type {0}", info)); } if (IsGeneric && info.IsGeneric) { if (info.TypeArguments.Where(t => t.IsTypeArgument).Any(t => !TypeArguments.Contains(t))) { throw new ArgumentOutOfRangeException("info", string.Format("Trying inherit from type {0} with unknown type argument", info)); } } CheckInherits(info); _inherits.Add(info); }