Pip-Services-Commons-Dotnet
Public Member Functions | List of all members
PipServices3.Commons.Refer.IReferenceable Interface Reference

Interface for components that depends on other components. More...

Inheritance diagram for PipServices3.Commons.Refer.IReferenceable:
PipServices3.Commons.Refer.DependencyResolver

Public Member Functions

void SetReferences (IReferences references)
 Sets references to dependent components. More...
 

Detailed Description

Interface for components that depends on other components.

If component requires explicit notification to unset references it shall additionally implement IUnreferenceable interface.

public class MyController: IReferenceable
{
public IMyPersistence _persistence;
...
public void SetReferences(IReferences references)
{
this._persistence = references.getOneRequired<IMyPersistence>(
new Descriptor("mygroup", "persistence", "*", "*", "1.0")
);
}
...
}

See IReferences, IUnreferenceable, Referencer

Member Function Documentation

◆ SetReferences()

void PipServices3.Commons.Refer.IReferenceable.SetReferences ( IReferences  references)

Sets references to dependent components.

Parameters
referencesreferences to locate the component dependencies.

See IReferences

Implemented in PipServices3.Commons.Refer.DependencyResolver.


The documentation for this interface was generated from the following file: