WorkflowRuntime.GetAllServices メソッド

定義

オーバーロード

GetAllServices(Type)

ワークフロー ランタイム エンジンに追加されたサービスのうち、指定した Type を実装したサービスまたはそれから派生したサービスをすべて取得します。

GetAllServices<T>()

ワークフロー ランタイム エンジンに追加されたサービスのうち、指定したジェネリック型を実装したサービスまたはそれから派生したサービスをすべて取得します。

GetAllServices(Type)

ワークフロー ランタイム エンジンに追加されたサービスのうち、指定した Type を実装したサービスまたはそれから派生したサービスをすべて取得します。

public:
 System::Collections::ObjectModel::ReadOnlyCollection<System::Object ^> ^ GetAllServices(Type ^ serviceType);
public System.Collections.ObjectModel.ReadOnlyCollection<object> GetAllServices (Type serviceType);
member this.GetAllServices : Type -> System.Collections.ObjectModel.ReadOnlyCollection<obj>
Public Function GetAllServices (serviceType As Type) As ReadOnlyCollection(Of Object)

パラメーター

serviceType
Type

返されるサービスが実装している必要がある Type

戻り値

ReadOnlyCollection<Object>

指定した Type を実装したサービスまたはそれから派生したサービス。

例外

serviceType が null 参照 (Visual Basic の場合は Nothing) です。

WorkflowRuntime は破棄されています。

指定した型のすべてのサービスを WorkflowRuntime オブジェクトから取得する方法を次の例に示します。

// Create a new workflow runtime
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Obtain the type of the TrackingService abstract class
Type serviceType = typeof(TrackingService);
// Create a services collection
ReadOnlyCollection<object> services;
// Fetch a collection of all services that match the given type
services = workflowRuntime.GetAllServices(serviceType);
' Create a new workflow runtime
Dim workflowRuntime As New WorkflowRuntime()
' Obtain the type of the TrackingService abstract class
Dim serviceType As Type = GetType(TrackingService)
' Create a services collection
Dim services As ReadOnlyCollection(Of Object)
' Fetch a collection of all services that match the given type
services = workflowRuntime.GetAllServices(serviceType)

注釈

空の ReadOnlyCollection<T> は、指定した Type を実装したサービスまたはそれから派生したサービスはワークフロー ランタイム エンジンに追加されていないことを示します。

適用対象

GetAllServices<T>()

ワークフロー ランタイム エンジンに追加されたサービスのうち、指定したジェネリック型を実装したサービスまたはそれから派生したサービスをすべて取得します。

public:
generic <typename T>
 System::Collections::ObjectModel::ReadOnlyCollection<T> ^ GetAllServices();
public System.Collections.ObjectModel.ReadOnlyCollection<T> GetAllServices<T> ();
member this.GetAllServices : unit -> System.Collections.ObjectModel.ReadOnlyCollection<'T>
Public Function GetAllServices(Of T) () As ReadOnlyCollection(Of T)

型パラメーター

T

サービスの型。

戻り値

ReadOnlyCollection<T>

指定したジェネリック型を実装したサービスまたはそれから派生したサービス。

例外

WorkflowRuntime は破棄されています。

指定した型のすべてのサービスを WorkflowRuntime オブジェクトから取得する方法を次の例に示します。

// Create a new workflow runtime
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Obtain the type of the TrackingService abstract class
Type serviceType = typeof(TrackingService);
// Create a services collection
ReadOnlyCollection<TrackingService> services;
// Fetch a collection of all services that match the given type
services = workflowRuntime.GetAllServices<TrackingService>();
' Create a new workflow runtime
Dim workflowRuntime As New WorkflowRuntime()
' Obtain the type of the TrackingService abstract class
Dim serviceType As Type = GetType(TrackingService)
' Create a services collection
Dim services As ReadOnlyCollection(Of TrackingService)
' Fetch a collection of all services that match the given type
services = workflowRuntime.GetAllServices(Of TrackingService)()

注釈

空の ReadOnlyCollection<T> は、指定したジェネリック型を実装したサービスまたはそれから派生したサービスはワークフロー ランタイム エンジンに追加されていないことを示します。

適用対象