Share via


ScopeStorage.CreateTransientScope Method (IDictionary<Object, Object>)

Returns a dictionary that is used to store data in a transient scope.

Namespace:  System.Web.WebPages.Scope
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Shared Function CreateTransientScope ( _
    context As IDictionary(Of Object, Object) _
) As IDisposable
'Usage
Dim context As IDictionary(Of Object, Object)
Dim returnValue As IDisposable 

returnValue = ScopeStorage.CreateTransientScope(context)
public static IDisposable CreateTransientScope(
    IDictionary<Object, Object> context
)
public:
static IDisposable^ CreateTransientScope(
    IDictionary<Object^, Object^>^ context
)
static member CreateTransientScope : 
        context:IDictionary<Object, Object> -> IDisposable
public static function CreateTransientScope(
    context : IDictionary<Object, Object>
) : IDisposable

Parameters

Return Value

Type: System.IDisposable
The dictionary that stores transient scope data.

Remarks

The transient dictionary will hold data until it is disposed. After the transient dictionary is disposed, the context dictionary will revert to the dictionary that was assigned to the CurrentProvider property prior to calling the CreateTransientScope(IDictionary<Object, Object>) method.

See Also

Reference

ScopeStorage Class

CreateTransientScope Overload

System.Web.WebPages.Scope Namespace