Removed untyped contructor from ComponentRegistration and add a protected setter.
[castle.git] / InversionOfControl / Castle.Windsor.Tests / Components / CircularDependencyComponents.cs
blob8615b96cd1e28565b9b9d5745ca222b63160132a
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.Windsor.Tests.Components
17 public interface IView
19 void Display();
21 IController Controller { get; set; }
24 public interface IController
26 void Process();
29 public class View : IView
31 private IController controller;
33 public IController Controller
35 get { return controller; }
36 set { controller = value; }
39 public void Display()
44 public class Controller : IController
46 private IView view;
48 public Controller(IView view)
50 this.view = view;
53 public IView View
55 get { return view; }
58 public void Process()
63 public class CompA
65 public CompA(CompB compb)
70 public class CompB
72 public CompB(CompC compC)
77 public class CompC
79 public CompC(CompD compD)
84 public class CompD
86 public CompD(CompA compA)