Class DataContextSwitcher
Represents data context switcher.
Inheritance
System.Object
DataContextSwitcher
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 13.30.0Syntax
public class DataContextSwitcher : IDisposable
Remarks
DataContextSwitcher allows to return to previous data context automatically.
Constructors
DataContextSwitcher(DataContext)
Initializes a new instance of the DataContextSwitcher class.
Declaration
public DataContextSwitcher(DataContext newContext)
Parameters
Type | Name | Description |
---|---|---|
DataContext | newContext |
Properties
CurrentContext
Gets the current context.
Declaration
public DataContext CurrentContext { get; }
Property Value
Type | Description |
---|---|
DataContext | The current context. |
PreviousContext
Gets the previous context.
Declaration
public DataContext PreviousContext { get; }
Property Value
Type | Description |
---|---|
DataContext | The previous context. |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the specified disposing.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | if set to |
RestoreContext()
Restores the context.
Declaration
public void RestoreContext()
Implements
System.IDisposable