|
Revision 427, 0.6 KB
(checked in by serialseb, 7 months ago)
|
|
trunk changes pre-RC
|
| Line | |
|---|
| 1 | using System; |
|---|
| 2 | using Microsoft.Practices.Unity; |
|---|
| 3 | using Microsoft.Practices.Unity.ObjectBuilder; |
|---|
| 4 | using OpenRasta.DI.Unity.Extensions.Strategies; |
|---|
| 5 | |
|---|
| 6 | namespace OpenRasta.DI.Unity.Extensions |
|---|
| 7 | { |
|---|
| 8 | /// <summary> |
|---|
| 9 | /// Adds early detection of circular references to prevent <see cref="StackOverflowException"/>s. |
|---|
| 10 | /// </summary> |
|---|
| 11 | internal class CycleDetector : UnityContainerExtension |
|---|
| 12 | { |
|---|
| 13 | protected override void Initialize() |
|---|
| 14 | { |
|---|
| 15 | Context.Strategies.AddNew<CycleDetectionStrategy>(UnityBuildStage.PreCreation); |
|---|
| 16 | } |
|---|
| 17 | } |
|---|
| 18 | } |
|---|