WorkflowRuntime.GetAllServices Yöntem

Tanım

Aşırı Yüklemeler

GetAllServices(Type)

Belirtilen Typeöğesini uygulayan veya bu altyapıdan türetilen iş akışı çalışma zamanı altyapısına eklenen tüm hizmetleri alır.

GetAllServices<T>()

Belirtilen genel türü uygulayan veya türetilen iş akışı çalışma zamanı altyapısına eklenen tüm hizmetleri alır.

GetAllServices(Type)

Belirtilen Typeöğesini uygulayan veya bu altyapıdan türetilen iş akışı çalışma zamanı altyapısına eklenen tüm hizmetleri alır.

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)

Parametreler

serviceType
Type

Bu Type hizmetlerin döndürülebilmesi için uygulanması gerekir.

Döndürülenler

ReadOnlyCollection<Object>

Belirtilen Typeöğesini uygulayan veya bu hizmetten türetilen hizmetler.

Özel durumlar

serviceTypenull başvurudur (NothingVisual Basic).

Örnekler

Aşağıdaki örnek, belirli bir türdeki tüm hizmetlerin bir WorkflowRuntime nesneden nasıl alınduğunu gösterir.

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

Açıklamalar

Boş ReadOnlyCollection<T> değeri, belirtilenleri Type uygulayan veya bu hizmetten türetilen hiçbir hizmetin iş akışı çalışma zamanı altyapısına eklenmediğini gösterir.

Şunlara uygulanır

GetAllServices<T>()

Belirtilen genel türü uygulayan veya türetilen iş akışı çalışma zamanı altyapısına eklenen tüm hizmetleri alır.

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ür Parametreleri

T

Hizmet türü.

Döndürülenler

ReadOnlyCollection<T>

Belirtilen genel türü uygulayan veya türeten hizmetler.

Özel durumlar

Örnekler

Aşağıdaki örnek, belirli bir türdeki tüm hizmetlerin bir WorkflowRuntime nesneden nasıl alınduğunu gösterir.

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

Açıklamalar

Boş ReadOnlyCollection<T> değeri, belirtilen genel türü uygulayan veya bu türlerden türetilen iş akışı çalışma zamanı altyapısına hiçbir hizmet eklenmediğini gösterir.

Şunlara uygulanır