Referencer

Helper class that allows you to set and unset references to components.

Description

The Referencer class allows you to set and unset references to components.

Static methods

SetReferences

Sets references to multiple components.

To set references components must implement IReferenceable interface. If they don’t the call to this method has no effect.

public static void SetReferences(IReferenceable references, IEnumerable components = null)

  • references: IReferences - the references to be set.
  • component: IEnumerable - a list of components to set the references to.

SetReferencesForOne

Sets references to specific component.

To set references components must implement IReferenceable interface. If they don’t the call to this method has no effect.

public static void SetReferencesForOne(IReferences references, object component)

  • references: IReferences - the references to be set.
  • component: object - the component to set references to.

UnsetReferences

Unsets references in multiple components. To unset references components must implement IUnreferenceable interface. If they don’t the call to this method has no effect.

public static void UnsetReferences(IEnumerable components)

  • components: IEnumerable - the list of components, whose references must be cleared.

UnsetReferences

Unsets references in multiple components. To unset references components must implement IUnreferenceable interface. If they don’t the call to this method has no effect.

public static void UnsetReferences(IReferences components)

  • components: IReferences - the list of components, whose references must be cleared.

UnsetReferencesForOne

Unsets references in specific component.

To unset references components must implement IUnreferenceable interface. If they don’t the call to this method has no effect.

public static void UnsetReferencesForOne(object component)

  • component: object - the component to unset references.

See also