1+ // -------------------------------------------------------------------------------------------------
2+ // <copyright file="OwinHttpApplicationPlugin.cs" company="Ninject Project Contributors">
3+ // Copyright (c) 2010-2011 bbv Software Services AG.
4+ // Copyright (c) 2011-2017 Ninject Project Contributors. All rights reserved.
5+ //
6+ // Dual-licensed under the Apache License, Version 2.0, and the Microsoft Public License (Ms-PL).
7+ // You may not use this file except in compliance with one of the Licenses.
8+ // You may obtain a copy of the License at
9+ //
10+ // http://www.apache.org/licenses/LICENSE-2.0
11+ // or
12+ // http://www.microsoft.com/opensource/licenses.mspx
13+ //
14+ // Unless required by applicable law or agreed to in writing, software
15+ // distributed under the License is distributed on an "AS IS" BASIS,
16+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+ // See the License for the specific language governing permissions and
18+ // limitations under the License.
19+ // </copyright>
20+ // -------------------------------------------------------------------------------------------------
21+
22+ namespace Ninject . Web . Common . Owin
23+ {
24+ using System . Runtime . Remoting . Messaging ;
25+
26+ using Ninject . Activation ;
27+
28+ /// <summary>
29+ /// The Owin Http Application plugin.
30+ /// </summary>
31+ public class OwinHttpApplicationPlugin : INinjectHttpApplicationPlugin
32+ {
33+ /// <summary>
34+ /// Gets or sets the <see cref="INinjectSettings"/>.
35+ /// </summary>
36+ public INinjectSettings Settings { get ; set ; }
37+
38+ /// <summary>
39+ /// Disposes the instances.
40+ /// </summary>
41+ public void Dispose ( )
42+ {
43+ }
44+
45+ /// <summary>
46+ /// Gets the owin request scope.
47+ /// </summary>
48+ /// <param name="context">The context.</param>
49+ /// <returns>The request scope.</returns>
50+ public object GetRequestScope ( IContext context )
51+ {
52+ return CallContext . GetData ( OwinBootstrapper . NinjectOwinRequestScope ) ;
53+ }
54+
55+ /// <summary>
56+ /// Starts the instance.
57+ /// </summary>
58+ public void Start ( )
59+ {
60+ }
61+
62+ /// <summary>
63+ /// Stops the instance.
64+ /// </summary>
65+ public void Stop ( )
66+ {
67+ }
68+ }
69+ }
0 commit comments