Share via


ChannelCacheSettings Classe

Définition

Représente des paramètres qui définissent les caractéristiques opérationnelles d'un cache de canaux.

public ref class ChannelCacheSettings
public class ChannelCacheSettings
type ChannelCacheSettings = class
Public Class ChannelCacheSettings
Héritage
ChannelCacheSettings

Exemples

L'exemple suivant montre comment créer une instance ChannelCacheSettings.


//sharing a channel cache between two workflow applications in a single app-domain.
sharedChannelCache = new SendMessageChannelCache(new ChannelCacheSettings { MaxItemsInCache = 5 }, new ChannelCacheSettings { MaxItemsInCache = 5 });

WorkflowApplication workflowApp1 = new WorkflowApplication(workflow);
workflowApp1.Completed = new Action<WorkflowApplicationCompletedEventArgs>(OnCompleted);
workflowApp1.Extensions.Add(sharedChannelCache);

WorkflowApplication workflowApp2 = new WorkflowApplication(workflow);
workflowApp2.Completed = new Action<WorkflowApplicationCompletedEventArgs>(OnCompleted);
workflowApp2.Extensions.Add(sharedChannelCache);

//disabling the channel cache so that channels are closed after being used.
SendMessageChannelCache disabledChannelCache = new SendMessageChannelCache(new ChannelCacheSettings { MaxItemsInCache = 0 }, new ChannelCacheSettings { MaxItemsInCache = 0 });

WorkflowApplication workflowApp3 = new WorkflowApplication(workflow);
workflowApp3.Completed = new Action<WorkflowApplicationCompletedEventArgs>(OnCompleted);
workflowApp3.Extensions.Add(disabledChannelCache);

Constructeurs

ChannelCacheSettings()

Crée une instance de la classe ChannelCacheSettings.

Propriétés

IdleTimeout

Obtient l'intervalle de temps maximal pendant lequel l'objet peut rester inactif dans le cache avant d'être supprimé.

LeaseTimeout

Obtient l'intervalle de temps après lequel un objet est supprimé du cache.

MaxItemsInCache

Obtient le nombre maximal d'objets dans le cache.

Méthodes

Equals(Object)

Détermine si l'objet spécifié est égal à l'objet actuel.

(Hérité de Object)
GetHashCode()

Fait office de fonction de hachage par défaut.

(Hérité de Object)
GetType()

Obtient le Type de l'instance actuelle.

(Hérité de Object)
MemberwiseClone()

Crée une copie superficielle du Object actuel.

(Hérité de Object)
ToString()

Retourne une chaîne qui représente l'objet actuel.

(Hérité de Object)

S’applique à