-
Notifications
You must be signed in to change notification settings - Fork 5
SafeContainer
SafeContainer is a dependency container that detects injections to its instances.
The security mode any of the SafeContainer can be disabled via calling container.SetProtectionMode(SafeContainerProtectionMode.NonProtection) for the instance. It can also be re-enabled by calling container.SetProtectionMode(SafeContainerProtectionMode.FullProtection).
This class is used widely in SafeOrbit for dependency injection pattern, you can change the inner injection protection of SafeOrbit as well.
SafeContainer saves the information (code, state) of the object. This operation is called stamping (IStamp) and handled by IStamper.
Each stamp is hashed with salts. Stamps are created depending of the instance life time.
SafeContainer protects the stamps via SafeObject instance.
It uses InjectionProtector to protect its instances and instance creation logic.