共用方式為


ReliableSession 建構函式

定義

初始化 ReliableSession 類別的新執行個體。

多載

ReliableSession()

初始化 ReliableSession 類別的新執行個體。

ReliableSession(ReliableSessionBindingElement)

從可靠工作階段繫結項目,初始化 ReliableSession 類別的新執行個體。

ReliableSession()

來源:
ReliableSession.cs
來源:
ReliableSession.cs
來源:
ReliableSession.cs

初始化 ReliableSession 類別的新執行個體。

public:
 ReliableSession();
public ReliableSession ();
Public Sub New ()

適用於

ReliableSession(ReliableSessionBindingElement)

來源:
ReliableSession.cs
來源:
ReliableSession.cs
來源:
ReliableSession.cs

從可靠工作階段繫結項目,初始化 ReliableSession 類別的新執行個體。

public:
 ReliableSession(System::ServiceModel::Channels::ReliableSessionBindingElement ^ reliableSessionBindingElement);
public ReliableSession (System.ServiceModel.Channels.ReliableSessionBindingElement reliableSessionBindingElement);
new System.ServiceModel.ReliableSession : System.ServiceModel.Channels.ReliableSessionBindingElement -> System.ServiceModel.ReliableSession
Public Sub New (reliableSessionBindingElement As ReliableSessionBindingElement)

參數

reliableSessionBindingElement
ReliableSessionBindingElement

ReliableSessionBindingElement,使用其屬性值初始化可靠工作階段。

例外狀況

reliableSessionBindingElementnull

範例

// 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)

適用於