Function TypeBasedContainer.set

Save an object factory in TypeBasedContainer by identity.

TypeBasedContainer set (
  ObjectFactory factory,
  string identity
);

Save an object factory in TypeBasedContainer by identity. The object factory, and subsequent objects are registered as candidates for use for any interface or base class they implement, when no suitable solution is found in decorated container.

Parameters

NameDescription
identity identity of object factory in TypeBasedContainer.
factory object factory which is to be saved in TypeBasedContainer.

Return

TypeBasedContainer