Was this page helpful?

DreamContext Class

    Table of contents
    1. 1. Members
      1. 1.1. Constructors
      2. 1.2. Fields
      3. 1.3. Properties
      4. 1.4. Methods
    Table of Contents
    public class DreamContext
    Namespace: MindTouch.Dream
    Assembly: mindtouch.dream
    Type Hierarchy:
    • object
      • DreamContext
    Implements:
    Provides request context information for MindTouch.Dream.DreamFeature request processing.

    Members

    Fields

    Visibility Description
    Public Env Dream environment.
    Public ID Unique Identifier of the request.
    Public Verb Request Http Verb.
    Public Uri Request Uri.
    Public Feature Dream feature responsible for handling the request.
    Public Request Incoming request message.
    Public StartTime Time the request started.
    Public CacheKeyAndTimeout Caching information for request.

    Properties

    Visibility Description
    Public Current Singleton accessor for the current request context.
    Public CurrentOrNull Singleton accessor to current request context or null, if none is defined.
    Public Service Dream Service handling the request.
    Public HasState True if the context has state attached to it.
    Public ServiceLicense Service license for this request.
    Public IsTaskEnvDisposed True if the underlying Task environment has disposed this context.
    Public PublicUri Uri by which the host is known publicly in the context of this request.
    Public Culture Culture of the request.
    Public ServerUri Uri the Dream Host is registered for.
    Public User User, if any, authenticated for this request.

    Methods

    Visibility Description
    Public DiscardCurrent() Discard the context from the current environment.
    Public SetPublicUriOverride(XUri publicUri) Override the DreamContext.PublicUri for this request.
    Public ClearPublicUriOverride() Remove any DreamContext.PublicUri override.
    Public GetSuffixCount() Number of suffixes for this feature path.
    Public GetSuffix(int index, UriPathFormat format) Get a suffix.
    Public GetSuffixes(UriPathFormat format) Get all suffixes.
    Public GetParams() Request parameters.
    Public GetParam(string key) Get a named parameter.
    Public GetParam(string key) Get a named parameter.
    Public GetParam(string key, string def) Get a named parameter.
    Public GetParam(string key, T def) Get a named parameter.
    Public Relay(Plug plug, DreamMessage request, Result<DreamMessage> response) Relay a request to another service using the current query parameters, service cookies and verb.
    Public Relay(Plug plug, string verb, DreamMessage request, Result<DreamMessage> response) Relay a request to another service using the current query parameters and service cookies.
    Public GetState() Get a typed state variable
    Public SetState(T value) Store a typed state variable.
    Public GetState(string key) Get a typed state variable by key.
    Public SetState(string key, T value) Store a typed state variable by key.
    Public AsLocalUri(XUri uri) Convert a Uri to a host local Uri, if possible.
    Public AsPublicUri(XUri uri) Convert a Uri to uri relative to the requests public uri, if possible.
    Public AsServerUri(XUri uri) Convert a Uri to uri relative to the server's public uri, if possible.
    Public CloneStateFromContext(DreamContext context) Replace the context's own state with a clone of the state of another context.
    Public ToString() (Inherited from Object)
    Public Equals(object obj) (Inherited from Object)
    Public GetHashCode() (Inherited from Object)
    Public GetType() (Inherited from Object)
    Protected MemberwiseClone() (Inherited from Object)
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by