/// <summary> /// Removes a reference to a dependent. /// </summary> /// <param name="d">The object that no longer depends on this feature</param> internal void CutReference(IFeatureDependent d) { if (m_References != null) { m_References.Remove(d); if (m_References.Count == 0) { m_References = null; } } }
/// <summary> /// References this feature to the specified dependent. /// </summary> /// <param name="d">The object that depends on this feature.</param> internal void AddReference(IFeatureDependent d) { if (m_References == null) { m_References = new List <IFeatureDependent>(1); } if (!m_References.Contains(d)) { m_References.Add(d); } }