SaaS CMS has officially launched! Learn more now.

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
System.Object
ConnectionScope
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: EPiServer.Data.Providers
Assembly: EPiServer.Data.dll
Version: 7.19.2
Syntax
public sealed class ConnectionScope : 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

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.

Implements

System.IDisposable

Extension Methods