แก้ไข

แชร์ผ่าน


ServiceDomain Class

Definition

Allows a code segment identified by Enter(ServiceConfig) and Leave() to run in its own context and behave as if it were a method that is called on an object created within the context. This class cannot be inherited.

public ref class ServiceDomain sealed
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class ServiceDomain
[<System.Runtime.InteropServices.ComVisible(false)>]
type ServiceDomain = class
Public NotInheritable Class ServiceDomain
Inheritance
ServiceDomain
Attributes

Remarks

The Enter and Leave methods are used in pairs to surround code that can then use COM+ services. Code that is enclosed between calls to Enter and Leave runs in its own context and behaves as if it were a method that is called on an object created within the context. The Enter and Leave pairs can be nested. It is up to the user to make sure that pairs of calls are balanced so that every call to Leave matches a previous call to Enter.

Methods

Enter(ServiceConfig)

Creates the context specified by the ServiceConfig object and pushes it onto the context stack to become the current context.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Leave()

Triggers the server and then the client side policies as if a method call were returning. The current context is then popped from the context stack, and the context that was running when Enter(ServiceConfig) was called becomes the current context.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to