IReadableLocator Interface

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Unity Application Block information can be found at the Unity Application Block site.

Represents a locator that can be read from.

Namespace:  Microsoft.Practices.ObjectBuilder2
Assembly:  Microsoft.Practices.ObjectBuilder2 (in Microsoft.Practices.ObjectBuilder2.dll)

Syntax

'Declaration
Public Interface IReadableLocator _
    Implements IEnumerable(Of KeyValuePair(Of Object, Object)),  _
    IEnumerable
public interface IReadableLocator : IEnumerable<KeyValuePair<Object, Object>>, 
    IEnumerable
public interface class IReadableLocator : IEnumerable<KeyValuePair<Object^, Object^>>, 
    IEnumerable
public interface IReadableLocator extends IEnumerable<KeyValuePair<Object, Object>>, IEnumerable

Remarks

A locator is a dictionary of keys to values, but it keeps the values with weak references, so that locating an object does not keep it alive. If you want to keep the object alive too, you should consider using an ILifetimeContainer.

Locators have a built-in concept of hierarchy, so you can ask questions of a locator and tell it whether to return results from the current locator only, or whether to ask the parent locator when local lookups fail.

See Also

IReadableLocator Members

Microsoft.Practices.ObjectBuilder2 Namespace