Class ConnectionScope
This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Helper class to control the scope of a connection, built for the "using-pattern".
Inheritance
Inherited Members
Namespace: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 8.11.0Syntax
public sealed class ConnectionScope : IAsyncConnectionScope, IConnectionScope, IDisposable
Constructors
ConnectionScope(IConnectionContext, Boolean)
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public ConnectionScope(IConnectionContext context, bool isOwner)
Parameters
Type | Name | Description |
---|---|---|
IConnectionContext | context | The connection context on which the scope operates |
System.Boolean | isOwner | If this scope is the owner of connection |
ConnectionScope(IConnectionContext, Boolean, Action)
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public ConnectionScope(IConnectionContext context, bool isOwner, Action completeAction)
Parameters
Type | Name | Description |
---|---|---|
IConnectionContext | context | |
System.Boolean | isOwner | |
System.Action | completeAction |
Properties
Context
This class supports the EPiServer infrastructure and is not intended to be used directly from your code. The connection on which this scope of operating on.
Declaration
public IConnectionContext Context { get; }
Property Value
Type | Description |
---|---|
IConnectionContext |
IsOwner
This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Determines if the callee owns the connection/transaction and should close it.
Declaration
public bool IsOwner { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Complete()
This class supports the EPiServer infrastructure and is not intended to be used directly from your code. Complete is called when all actions on the connection has been completed for a scope
Declaration
public void Complete()
Dispose()
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public void Dispose()
Remarks
Dispose is called when the connection goes out of scope, if complete has not been called the transaction will be rolled back if one exist.
Explicit Interface Implementations
IAsyncConnectionScope.Context
This class supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
IAsyncConnectionContext IAsyncConnectionScope.Context { get; }
Returns
Type | Description |
---|---|
IAsyncConnectionContext |