AppBuilderExtensions.CreatePerOwinContext Method
Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetch via context.Get.
Namespace: Owin
Assembly: Microsoft.AspNet.Identity.Owin (in Microsoft.AspNet.Identity.Owin.dll)
Overload List
Name | Description | |
---|---|---|
CreatePerOwinContext<T>(IAppBuilder, Func<T>) | Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetch via context.Get. |
|
CreatePerOwinContext<T>(IAppBuilder, Func<IdentityFactoryOptions<T>, IOwinContext, T>) | Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetch via context.Get. |
|
CreatePerOwinContext<T>(IAppBuilder, Func<IdentityFactoryOptions<T>, IOwinContext, T>, Action<IdentityFactoryOptions<T>, T>) | Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetched via context.Get |
See Also
AppBuilderExtensions Class
Owin Namespace
Return to top
AppBuilderExtensions.CreatePerOwinContext<T> Method (IAppBuilder, Func<T>)
Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetch via context.Get.
Syntax
public static IAppBuilder CreatePerOwinContext<T>(
this IAppBuilder app,
Func<T> createCallback
)
where T : class, IDisposable
public:
generic<typename T>
where T : ref class, IDisposable
[ExtensionAttribute]
static IAppBuilder^ CreatePerOwinContext(
IAppBuilder^ app,
Func<T>^ createCallback
)
static member CreatePerOwinContext<'T when 'T : not struct and IDisposable> :
app:IAppBuilder *
createCallback:Func<'T> -> IAppBuilder
<ExtensionAttribute>
Public Shared Function CreatePerOwinContext(Of T As { Class, IDisposable }) (
app As IAppBuilder,
createCallback As Func(Of T)
) As IAppBuilder
Parameters
app
Type: Owin.IAppBuilderThe IAppBuilder passed to the configuration method.
createCallback
Type: System.Func<T>The callback function that is invoked to create an instance of T.
Return Value
Type: Owin.IAppBuilder
The updated IAppBuilder.
Type Parameters
- T
The type of the context.
See Also
Return to top
AppBuilderExtensions.CreatePerOwinContext<T> Method (IAppBuilder, Func<IdentityFactoryOptions<T>, IOwinContext, T>)
Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetch via context.Get.
Syntax
public static IAppBuilder CreatePerOwinContext<T>(
this IAppBuilder app,
Func<IdentityFactoryOptions<T>, IOwinContext, T> createCallback
)
where T : class, IDisposable
public:
generic<typename T>
where T : ref class, IDisposable
[ExtensionAttribute]
static IAppBuilder^ CreatePerOwinContext(
IAppBuilder^ app,
Func<IdentityFactoryOptions<T>^, IOwinContext^, T>^ createCallback
)
static member CreatePerOwinContext<'T when 'T : not struct and IDisposable> :
app:IAppBuilder *
createCallback:Func<IdentityFactoryOptions<'T>, IOwinContext, 'T> -> IAppBuilder
<ExtensionAttribute>
Public Shared Function CreatePerOwinContext(Of T As { Class, IDisposable }) (
app As IAppBuilder,
createCallback As Func(Of IdentityFactoryOptions(Of T), IOwinContext, T)
) As IAppBuilder
Parameters
app
Type: Owin.IAppBuilderThe application builder.
createCallback
Type: System.Func<IdentityFactoryOptions<T>, IOwinContext, T>The callback function that is invoked to create an instance of T.
Return Value
Type: Owin.IAppBuilder
The updated IAppBuilder.
Type Parameters
- T
The type of the context.
See Also
Return to top
AppBuilderExtensions.CreatePerOwinContext<T> Method (IAppBuilder, Func<IdentityFactoryOptions<T>, IOwinContext, T>, Action<IdentityFactoryOptions<T>, T>)
Registers a callback that will be invoked to create an instance of type T that will be stored in the OwinContext which can fetched via context.Get
Syntax
public static IAppBuilder CreatePerOwinContext<T>(
this IAppBuilder app,
Func<IdentityFactoryOptions<T>, IOwinContext, T> createCallback,
Action<IdentityFactoryOptions<T>, T> disposeCallback
)
where T : class, IDisposable
public:
generic<typename T>
where T : ref class, IDisposable
[ExtensionAttribute]
static IAppBuilder^ CreatePerOwinContext(
IAppBuilder^ app,
Func<IdentityFactoryOptions<T>^, IOwinContext^, T>^ createCallback,
Action<IdentityFactoryOptions<T>^, T>^ disposeCallback
)
static member CreatePerOwinContext<'T when 'T : not struct and IDisposable> :
app:IAppBuilder *
createCallback:Func<IdentityFactoryOptions<'T>, IOwinContext, 'T> *
disposeCallback:Action<IdentityFactoryOptions<'T>, 'T> -> IAppBuilder
<ExtensionAttribute>
Public Shared Function CreatePerOwinContext(Of T As { Class, IDisposable }) (
app As IAppBuilder,
createCallback As Func(Of IdentityFactoryOptions(Of T), IOwinContext, T),
disposeCallback As Action(Of IdentityFactoryOptions(Of T), T)
) As IAppBuilder
Parameters
- app
Type: Owin.IAppBuilder
- createCallback
Type: System.Func<IdentityFactoryOptions<T>, IOwinContext, T>
- disposeCallback
Type: System.Action<IdentityFactoryOptions<T>, T>
Return Value
Type: Owin.IAppBuilder
Type Parameters
- T
Return to top