ChannelCacheSettings Classe

Définition

Représente les paramètres qui définissent les caractéristiques opérationnelles d’un cache de canal.

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 ChannelCacheSettings instance.


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

Nom Description
ChannelCacheSettings()

Crée une instance de la ChannelCacheSettings classe.

Propriétés

Nom Description
IdleTimeout

Obtient l’intervalle maximal de temps 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 pouvant se trouver dans le cache.

Méthodes

Nom Description
Equals(Object)

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

(Hérité de Object)
GetHashCode()

Sert de fonction de hachage par défaut.

(Hérité de Object)
GetType()

Obtient la Type de l’instance actuelle.

(Hérité de Object)
MemberwiseClone()

Crée une copie superficielle du Objectactuel.

(Hérité de Object)
ToString()

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

(Hérité de Object)

S’applique à