AppBuilderExtensions.CreateDataProtector Method
Creates a data protector.
Namespace: Microsoft.Owin.Security.DataProtection
Assembly: Microsoft.Owin.Security (in Microsoft.Owin.Security.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function CreateDataProtector ( _
app As IAppBuilder, _
ParamArray purposes As String() _
) As IDataProtector
'Usage
Dim app As IAppBuilder
Dim purposes As String()
Dim returnValue As IDataProtector
returnValue = app.CreateDataProtector(purposes)
public static IDataProtector CreateDataProtector(
this IAppBuilder app,
params string[] purposes
)
[ExtensionAttribute]
public:
static IDataProtector^ CreateDataProtector(
IAppBuilder^ app,
... array<String^>^ purposes
)
static member CreateDataProtector :
app:IAppBuilder *
purposes:string[] -> IDataProtector
public static function CreateDataProtector(
app : IAppBuilder,
... purposes : String[]
) : IDataProtector
Parameters
- app
Type: IAppBuilder
The application builder.
- purposes
Type: System.String[]
A list of purposes for creating the data protector.
Return Value
Type: Microsoft.Owin.Security.DataProtection.IDataProtector
The created IDataProtector.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IAppBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).