My favorites | Sign in
Project Logo
                
Changes to /trunk/src/Extensions/AutoWiring/AutoWiringModule.cs
r67 vs. r87   Edit
  Compare: vs.   Format:
Revision r87
Go to: 
Project members, sign in to write a code review
/trunk/src/Extensions/AutoWiring/AutoWiringModule.cs   r67 /trunk/src/Extensions/AutoWiring/AutoWiringModule.cs   r87
1 #region License 1 #region License
2 // 2 //
3 // Author: Nate Kohari <nkohari@gmail.com> 3 // Author: Nate Kohari <nkohari@gmail.com>
4 // Copyright (c) 2007-2008, Enkari, Ltd. 4 // Copyright (c) 2007-2008, Enkari, Ltd.
5 // 5 //
6 // Licensed under the Apache License, Version 2.0 (the "License"); 6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License. 7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at 8 // You may obtain a copy of the License at
9 // 9 //
10 // http://www.apache.org/licenses/LICENSE-2.0 10 // http://www.apache.org/licenses/LICENSE-2.0
11 // 11 //
12 // Unless required by applicable law or agreed to in writing, software 12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS, 13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and 15 // See the License for the specific language governing permissions and
16 // limitations under the License. 16 // limitations under the License.
17 // 17 //
18 #endregion 18 #endregion
19 #region Using Directives 19 #region Using Directives
20 using System; 20 using System;
21 using Ninject.Core; 21 using Ninject.Core;
22 using Ninject.Core.Planning.Heuristics; 22 using Ninject.Core.Planning.Heuristics;
23 using Ninject.Extensions.AutoWiring.Infrastructure; 23 using Ninject.Extensions.AutoWiring.Infrastructure;
24 #endregion 24 #endregion
25 25
26 namespace Ninject.Extensions.AutoWiring 26 namespace Ninject.Extensions.AutoWiring
27 { 27 {
28 /// <summary> 28 /// <summary>
29 /// Adds functionality to the kernel to support auto-wiring of dependencies. 29 /// Adds functionality to the kernel to support auto-wiring of dependencies.
30 /// </summary> 30 /// </summary>
31 public class AutoWiringModule : StandardModule 31 public class AutoWiringModule : StandardModule
32 { 32 {
33 /*----------------------------------------------------------------------------------------*/ 33 /*----------------------------------------------------------------------------------------*/
34 /// <summary> 34 /// <summary>
35 /// Prepares the module for being loaded. Can be used to connect component dependencies. 35 /// Loads the module into the kernel.
36 /// </summary> 36 /// </summary>
37 public override void BeforeLoad() 37 public override void Load()
38 { 38 {
39 Kernel.Components.Connect<IConstructorHeuristic>(new AutoWiringConstructorHeuristic()); 39 Kernel.Components.Connect<IConstructorHeuristic>(new AutoWiringConstructorHeuristic());
40 Kernel.Components.Connect<IPropertyHeuristic>(new AutoWiringPropertyHeuristic()); 40 Kernel.Components.Connect<IPropertyHeuristic>(new AutoWiringPropertyHeuristic());
41 Kernel.Components.Connect<IMethodHeuristic>(new AutoWiringMethodHeuristic()); 41 Kernel.Components.Connect<IMethodHeuristic>(new AutoWiringMethodHeuristic());
42 Kernel.Components.Connect<IFieldHeuristic>(new AutoWiringFieldHeuristic()); 42 Kernel.Components.Connect<IFieldHeuristic>(new AutoWiringFieldHeuristic());
43 } 43 }
44 /*----------------------------------------------------------------------------------------*/
45 /// <summary>
46 /// Loads the module into the kernel.
47 /// </summary>
48 public override void Load()
49 {
50 }
51 /*----------------------------------------------------------------------------------------*/ 44 /*----------------------------------------------------------------------------------------*/
52 } 45 }
53 } 46 }
Hosted by Google Code