Click or drag to resize
MPInstanceScope Class
Provides a context for accessing a MatchPoint instance.
Inheritance Hierarchy
SystemObject
  Colygon.MatchPoint.CoreMPInstanceScope

Namespace: Colygon.MatchPoint.Core
Assembly: Colygon.MatchPoint (in Colygon.MatchPoint.dll) Version: 2013.11.0.0
Syntax
C#
public sealed class MPInstanceScope : IDisposable

The MPInstanceScope type exposes the following members.

Constructors
  NameDescription
Public methodMPInstanceScope
Initializes a new MPInstanceScope instance.
Top
Properties
  NameDescription
Public propertyStatic memberCurrent
Returns the MPInstanceScope of the Current.
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the MPInstanceScope
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
By using this class you can ensure that MPInstance.Current returns a correct MatchPoint instance, i.e. if no HttpContext is available.

An instance scope also holds instances of all disposable objects (only if assigned by using the MatchPoint API, i.e. OpenWeb(String, SPUserToken, Boolean). These objects will be automatically disposed when the instance scope is disposed. This functionality is used i.e. within the expression engine since it is not possible to dispose objects within a MatchPoint expression.

See Also