WorkflowRuntime.GetAllServices Metodo

Definizione

Overload

GetAllServices(Type)

Recupera tutti i servizi che vengono aggiunti al motore di runtime del flusso di lavoro, implementati o derivati dal Type specificato.

GetAllServices<T>()

Recupera tutti i servizi aggiunti al motore di runtime del flusso di lavoro che sono stati implementati o derivati dal tipo generico specificato.

GetAllServices(Type)

Recupera tutti i servizi che vengono aggiunti al motore di runtime del flusso di lavoro, implementati o derivati dal Type specificato.

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)

Parametri

serviceType
Type

Type che i servizi devono implementare per essere restituiti.

Restituisce

ReadOnlyCollection<Object>

Servizi implementati o derivati dal Type specificato.

Eccezioni

serviceType è un riferimento null (Nothing in Visual Basic).

Esempio

Nell'esempio seguente viene illustrato come recuperare tutti i servizi di un determinato tipo da un oggetto 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)

Commenti

Un ReadOnlyCollection<T> vuoto indica che non sono stati aggiunti servizi al motore di runtime del flusso di lavoro che sono stati implementati o derivati dal Type specificato.

Si applica a

GetAllServices<T>()

Recupera tutti i servizi aggiunti al motore di runtime del flusso di lavoro che sono stati implementati o derivati dal tipo generico specificato.

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)

Parametri di tipo

T

Tipo di servizio.

Restituisce

ReadOnlyCollection<T>

Servizi implementati o derivati dal tipo generico specificato.

Eccezioni

Esempio

Nell'esempio seguente viene illustrato come recuperare tutti i servizi di un determinato tipo da un oggetto 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)()

Commenti

Un ReadOnlyCollection<T> vuoto indica che non sono stati aggiunti servizi al motore di runtime del flusso di lavoro che sono stati implementati o derivati dal tipo generico specificato.

Si applica a