Partager via


WorkflowPersistenceService Constructeur

Définition

Lors de l'implémentation dans une classe dérivée, initialise une nouvelle instance de la classe WorkflowPersistenceService.

protected:
 WorkflowPersistenceService();
protected WorkflowPersistenceService ();
Protected Sub New ()

Exemples

L'exemple suivant illustre la création d'une instance de la classe SqlWorkflowPersistenceService (dérivée de WorkflowPersistenceService). Il provient de l'exemple du Kit de développement Nested Exception Handlers et provient du fichier Program.cs. Pour plus d’informations, consultez l’exemple de gestionnaires d’exceptions imbriqués.

// A workflow is always run asychronously; the main thread waits on this event so the program
// doesn't exit before the workflow completes
workflowRuntime.AddService(new SqlWorkflowPersistenceService("Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;"));
' A workflow is always run asychronously the main thread waits on Me event so the program
' doesn't exit before the workflow completes
WorkflowRuntime.AddService(New SqlWorkflowPersistenceService("Initial Catalog=SqlPersistenceServiceData Source=localhostIntegrated Security=SSPI"))

S’applique à