ReliableSession Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides convenient access to the properties of a reliable session binding element that are available when using one of the system-provided bindings.
public ref class ReliableSession
public class ReliableSession
type ReliableSession = class
Public Class ReliableSession
- Inheritance
-
ReliableSession
- Derived
The following example shows how to create a new reliable session, and access and change the property values of that session. The ReliableSession class allows you to write:
// Create a new reliable session object
ReliableSessionBindingElement bindingElement = new ReliableSessionBindingElement();
ReliableSession reliableSession = new ReliableSession(bindingElement);
// Now you can access property values
Console.WriteLine("Ordered: {0}", reliableSession.Ordered);
Console.WriteLine("InactivityTimeout: {0}", reliableSession.InactivityTimeout);
reliableSession.Ordered = false;
Console.WriteLine("The new value for the Ordered property is: {0}", reliableSession.Ordered);
' Create a new reliable session object
Dim bindingElement As ReliableSessionBindingElement = New ReliableSessionBindingElement()
Dim reliableSession As ReliableSession = New ReliableSession(bindingElement)
' Now you can access property values
Console.WriteLine("Ordered: {0}", reliableSession.Ordered)
Console.WriteLine("InactivityTimeout: {0}", reliableSession.InactivityTimeout)
ReliableSession.Ordered = False
Console.WriteLine("The new value for the Ordered property is: {0}", ReliableSession.Ordered)
The properties contained in the ReliableSession class are the subset of those contained in the ReliableSessionBindingElement that are accessible from a predefined binding. This subset consists of the InactivityTimeout and Ordered properties. The ReliableSession class references the same objects as does the ReliableSessionBindingElement, so changing the value of one changes the value of the other too. This class gathers these two properties of reliable session binding element together for better discoverability.
Reliable |
Initializes a new instance of the ReliableSession class. |
Reliable |
Initializes a new instance of the ReliableSession class from a reliable session binding element. |
Inactivity |
Gets or sets an interval of time that a service can remain inactive before closing. |
Ordered |
Gets or sets a value that indicates whether message delivery must preserve the order in which messages are sent. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Produkt | Versioner |
---|---|
.NET | 8 (package-provided) |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Feedback om .NET
.NET är ett öppen källkod projekt. Välj en länk för att ge feedback: