Click or drag to resize

MPContextFaker Class

Makes it possible to change or create a / the "current MatchPoint context" (i.e. the SPContext.Current, the HttpContext.Current and the MPInstanceScope.Current). A good example usage for this class is, to create a Workspace via PowerShell or within a timer job (ITimerJob) when the workspace template contains HTTP/SharePoint-context specific expressions.
Inheritance Hierarchy
SystemObject
  Colygon.MatchPoint.CoreMPContextFaker

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

The MPContextFaker type exposes the following members.

Constructors
  NameDescription
Public methodMPContextFaker
Initializes an instance of the faker. The current windows account is used to open the SPSite.
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the MPContextFaker
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 methodSetGlobalVariable
Allows to set a global MatchPoint variable which can be used within expressions. Useful if you have expressions which access (global) variables which would otherwise not be defined.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also