Share via


IReadWriteLocator 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 and written to.

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

Syntax

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

Remarks

A locator is 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

IReadWriteLocator Members

Microsoft.Practices.ObjectBuilder2 Namespace