次の方法で共有


ChannelManagerService コンストラクター

定義

ChannelManagerService クラスの新しいインスタンスを初期化します。

オーバーロード

ChannelManagerService()

ChannelManagerService クラスの新しいインスタンスを初期化します。

ChannelManagerService(IList<ServiceEndpoint>)

ChannelManagerService クラスの新しいインスタンスを初期化します。

ChannelManagerService(NameValueCollection)

ChannelManagerService クラスの新しいインスタンスを初期化します。

ChannelManagerService(ChannelPoolSettings)

ChannelManagerService クラスの新しいインスタンスを初期化します。

ChannelManagerService(ChannelPoolSettings, IList<ServiceEndpoint>)

ChannelManagerService クラスの新しいインスタンスを初期化します。

ChannelManagerService()

ChannelManagerService クラスの新しいインスタンスを初期化します。

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

ChannelManagerService オブジェクトの新しいインスタンスを作成する方法を次の例に示します。 この例は、SequentialWorkflowService SDK サンプルを作成し直したものです。

// Add ChannelManager.
ChannelManagerService channelmgr = new ChannelManagerService();
workflowRuntime.AddService(channelmgr);
' Add ChannelManager.
Dim channelmgr As New ChannelManagerService()
workflowRuntime.AddService(channelmgr)

適用対象

ChannelManagerService(IList<ServiceEndpoint>)

ChannelManagerService クラスの新しいインスタンスを初期化します。

public:
 ChannelManagerService(System::Collections::Generic::IList<System::ServiceModel::Description::ServiceEndpoint ^> ^ endpoints);
public ChannelManagerService (System.Collections.Generic.IList<System.ServiceModel.Description.ServiceEndpoint> endpoints);
new System.Workflow.Runtime.Hosting.ChannelManagerService : System.Collections.Generic.IList<System.ServiceModel.Description.ServiceEndpoint> -> System.Workflow.Runtime.Hosting.ChannelManagerService
Public Sub New (endpoints As IList(Of ServiceEndpoint))

パラメーター

endpoints
IList<ServiceEndpoint>

サービス エンドポイントのコレクション。

ChannelManagerService オブジェクトの新しいインスタンスを作成する方法を次の例に示します。 この例は、WorkflowServiceUtility SDK サンプルを作成し直したものです。

contextFileName = localServiceHost.Description.ServiceType.Name + contextFileExtension;

// add local client endpoints
workflowRuntime = this.Description.Behaviors.Find<WorkflowRuntimeBehavior>().WorkflowRuntime;
workflowRuntime.AddService(new ChannelManagerService(localServiceHost.ClientEndpoints));

localServiceHost.Open();
contextFileName = localServiceHost.Description.ServiceType.Name & contextFileExtension

' add local client endpoints.
workflowRuntime = Me.Description.Behaviors.Find(Of WorkflowRuntimeBehavior)().WorkflowRuntime
workflowRuntime.AddService(New ChannelManagerService(localServiceHost.ClientEndpoints))

localServiceHost.Open()

注釈

ChannelManagerService クラスのインスタンスは、通常、構成ファイルを使用したランタイムによって作成されます。

サービスのコンストラクターで定義されたエンドポイントを使用すると、ChannelToken の構成名に一致するチャネルを作成できます。 コードで追加されたサービス エンドポイントが、構成ファイルのように同じ名前とコントラクトの型を持ち、コードで定義されたエンドポイントを使用しない場合は、構成で定義されたエンドポイントはコードで定義されたエンドポイントより優先されます。

適用対象

ChannelManagerService(NameValueCollection)

ChannelManagerService クラスの新しいインスタンスを初期化します。

public:
 ChannelManagerService(System::Collections::Specialized::NameValueCollection ^ parameters);
public ChannelManagerService (System.Collections.Specialized.NameValueCollection parameters);
new System.Workflow.Runtime.Hosting.ChannelManagerService : System.Collections.Specialized.NameValueCollection -> System.Workflow.Runtime.Hosting.ChannelManagerService
Public Sub New (parameters As NameValueCollection)

パラメーター

parameters
NameValueCollection

サービスの構成パラメーター。

ChannelManagerService オブジェクトの新しいインスタンスを作成する方法を次の例に示します。

NameValueCollection parameters = new NameValueCollection();
parameters.Add("idleTimeout", TimeSpan.FromMinutes(10).ToString());
parameters.Add("leaseTimeout", TimeSpan.FromMinutes(1).ToString());
parameters.Add("maxIdleChannelsPerEndpoint", "10");
ChannelManagerService service = new ChannelManagerService(parameters);
Dim parameters As New NameValueCollection()
With parameters
    .Add("idleTimeout", TimeSpan.FromMinutes(10).ToString())
    .Add("leaseTimeout", TimeSpan.FromMinutes(1).ToString())
    .Add("maxIdleChannelsPerEndpoint", "10")
End With
Dim service As New ChannelManagerService(parameters)

注釈

サポートされているパラメーターは次のとおりです。

  • idleTimeout: キャッシュされたチャネルをアイドル状態にできる最大値 TimeSpan

  • leaseTimeout: キャッシュされたチャネルが TimeSpan でチェックアウトされるか使用中の場合の最大 SendActivity

  • maxIdleChannelsPerEndpoint: 任意の時点でキャッシュできる 1 つのエンドポイントに一致するアイドル チャネルの最大数。

ChannelManagerService クラスのインスタンスは、通常、構成ファイルを使用したランタイムによって作成されます。

適用対象

ChannelManagerService(ChannelPoolSettings)

ChannelManagerService クラスの新しいインスタンスを初期化します。

public:
 ChannelManagerService(System::ServiceModel::Channels::ChannelPoolSettings ^ settings);
public ChannelManagerService (System.ServiceModel.Channels.ChannelPoolSettings settings);
new System.Workflow.Runtime.Hosting.ChannelManagerService : System.ServiceModel.Channels.ChannelPoolSettings -> System.Workflow.Runtime.Hosting.ChannelManagerService
Public Sub New (settings As ChannelPoolSettings)

パラメーター

settings
ChannelPoolSettings

このサービスで管理されているチャネルのプールに対するクォータの設定。

ChannelManagerService オブジェクトの新しいインスタンスを作成する方法を次の例に示します。

ChannelPoolSettings settings = new ChannelPoolSettings();
settings.IdleTimeout = TimeSpan.FromMinutes(10);
settings.LeaseTimeout = TimeSpan.FromMinutes(1);
settings.MaxOutboundChannelsPerEndpoint = 10;
ChannelManagerService service = new ChannelManagerService(settings);
Dim settings As New ChannelPoolSettings()
With settings
    .IdleTimeout = TimeSpan.FromMinutes(10)
    .LeaseTimeout = TimeSpan.FromMinutes(1)
    .MaxOutboundChannelsPerEndpoint = 10
End With
Dim service As New ChannelManagerService(settings)

適用対象

ChannelManagerService(ChannelPoolSettings, IList<ServiceEndpoint>)

ChannelManagerService クラスの新しいインスタンスを初期化します。

public:
 ChannelManagerService(System::ServiceModel::Channels::ChannelPoolSettings ^ settings, System::Collections::Generic::IList<System::ServiceModel::Description::ServiceEndpoint ^> ^ endpoints);
public ChannelManagerService (System.ServiceModel.Channels.ChannelPoolSettings settings, System.Collections.Generic.IList<System.ServiceModel.Description.ServiceEndpoint> endpoints);
new System.Workflow.Runtime.Hosting.ChannelManagerService : System.ServiceModel.Channels.ChannelPoolSettings * System.Collections.Generic.IList<System.ServiceModel.Description.ServiceEndpoint> -> System.Workflow.Runtime.Hosting.ChannelManagerService
Public Sub New (settings As ChannelPoolSettings, endpoints As IList(Of ServiceEndpoint))

パラメーター

settings
ChannelPoolSettings

このサービスで管理されているチャネルのプールに対するクォータの設定。

endpoints
IList<ServiceEndpoint>

サービス エンドポイントのコレクション。

ChannelManagerService オブジェクトの新しいインスタンスを作成する方法を次の例に示します。

ChannelPoolSettings settings = new ChannelPoolSettings();
settings.IdleTimeout = TimeSpan.FromMinutes(10);
settings.LeaseTimeout = TimeSpan.FromMinutes(1);
settings.MaxOutboundChannelsPerEndpoint = 10;
IList<ServiceEndpoint> endpoints = new List<ServiceEndpoint>();
endpoints.Add(new ServiceEndpoint(contractDescription));
ChannelManagerService service = new ChannelManagerService(settings, endpoints);
Dim settings As New ChannelPoolSettings()
With settings
    settings.IdleTimeout = TimeSpan.FromMinutes(10)
    settings.LeaseTimeout = TimeSpan.FromMinutes(1)
    settings.MaxOutboundChannelsPerEndpoint = 10
End With
Dim endpoints As IList(Of ServiceEndpoint) = New List(Of ServiceEndpoint)()
endpoints.Add(New ServiceEndpoint(contractDescription))
Dim service As New ChannelManagerService(settings, endpoints)

適用対象