Share via


Context Class

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2013, Dynamics CRM 2015, Dynamics CRM 2016

Represents the context class used to track contextual information, wrapped in an object.

Namespace:   Microsoft.Uii.Csr
Assembly:  Microsoft.Uii.Csr.Core (in Microsoft.Uii.Csr.Core.dll)

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    Microsoft.Uii.Csr.Context
      Microsoft.Uii.Csr.ContextState

Syntax

public class Context : MarshalByRefObject, IContext
Public Class Context
    Inherits MarshalByRefObject
    Implements IContext

Constructors

Name Description
System_CAPS_pubmethod Context()

Initializes a new instance of the Context class.

System_CAPS_pubmethod Context(String)

Type: String

Properties

Name Description
System_CAPS_pubproperty ContextInformation

Gets or sets the context with an XML context

System_CAPS_pubpropertySystem_CAPS_static ContextRoot

Gets the context root value.

System_CAPS_pubproperty Count

Gets the number of items in the context.

System_CAPS_pubpropertySystem_CAPS_static EmptyContext

Gets an empty context

System_CAPS_pubproperty Item[String]

Gets or sets the value associated with the specified key.

Methods

Name Description
System_CAPS_pubmethod Clear()

Clears the context.

System_CAPS_pubmethod CreateObjRef(Type)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetContext()

Get the XML context string from the context.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod InitializeLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone(Boolean)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethod SetContext(String)

Sets the context with an XML context.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

Works in a manner simuliar to the ASP.Net session. UII used to use the conext in a more string oriented manner. For backward compatibility that will still work but use the Context object for the framework and new applications. Use the GetContext or SetConext methods or the ContextInformation property to transfer the context back and forth between XML and the object.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Uii.Csr Namespace

Return to top

Unified Service Desk 2.0

© 2016 Microsoft. All rights reserved. Copyright