WorkflowApplication.PersistableIdle Proprietà

Definizione

Ottiene o imposta il delegato che viene richiamato quando l'istanza del flusso di lavoro corrente è inattiva e può essere salvata in modo permanente.

public:
 property Func<System::Activities::WorkflowApplicationIdleEventArgs ^, System::Activities::PersistableIdleAction> ^ PersistableIdle { Func<System::Activities::WorkflowApplicationIdleEventArgs ^, System::Activities::PersistableIdleAction> ^ get(); void set(Func<System::Activities::WorkflowApplicationIdleEventArgs ^, System::Activities::PersistableIdleAction> ^ value); };
public Func<System.Activities.WorkflowApplicationIdleEventArgs,System.Activities.PersistableIdleAction> PersistableIdle { get; set; }
member this.PersistableIdle : Func<System.Activities.WorkflowApplicationIdleEventArgs, System.Activities.PersistableIdleAction> with get, set
Public Property PersistableIdle As Func(Of WorkflowApplicationIdleEventArgs, PersistableIdleAction)

Valore della proprietà

Delegato richiamato quando l'istanza del flusso di lavoro corrente è inattiva e può essere mantenuta.

Esempio

Nell'esempio seguente viene gestito il gestore PersistableIdle e viene impostato il runtime affinché renda persistente e scarichi il flusso di lavoro.

wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Instruct the runtime to persist and unload the workflow
    return PersistableIdleAction.Unload;
};

Commenti

Quando un flusso di lavoro diventa inattivo e può essere reso persistente, vengono richiamati sia Idle che PersistableIdle, nell'ordine indicato. Il gestore PersistableIdle restituisce uno dei valori di enumerazione PersistableIdleAction di None, Persist o Unload.

Si applica a