다음을 통해 공유


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: 모든 지점에서 캐시할 수 있는 단일 엔드포인트와 일치하는 최대 유휴 채널 수입니다.

클래스의 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)

적용 대상