/// <summary> /// Assigns references to components that implement IReferenceable interface /// </summary> /// <param name="references">references to be assigned</param> /// <param name="components">a list of components to assign references</param> public static void SetReferences(IReferences references, IEnumerable components = null) { components = components ?? references.GetAll(); foreach (var component in components) { SetReferencesForOne(references, component); } }
/// <summary> /// Clears references for components that implement IUnreferenceable interface /// </summary> /// <param name="references">a list of components to clear references</param> public static void UnsetReferences(IReferences references) { var components = references.GetAll(); foreach (var component in components) { UnsetReferencesForOne(component); } }