ChannelCacheSettings Classe
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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
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);
Channel |
Crée une instance de la classe ChannelCacheSettings. |
Idle |
Obtient l'intervalle de temps maximal pendant lequel l'objet peut rester inactif dans le cache avant d'être supprimé. |
Lease |
Obtient l'intervalle de temps après lequel un objet est supprimé du cache. |
Max |
Obtient le nombre maximal d'objets dans le cache. |
Equals(Object) |
Détermine si l'objet spécifié est égal à l'objet actuel. (Hérité de Object) |
Get |
Fait office de fonction de hachage par défaut. (Hérité de Object) |
Get |
Obtient le Type de l'instance actuelle. (Hérité de Object) |
Memberwise |
Crée une copie superficielle du Object actuel. (Hérité de Object) |
To |
Retourne une chaîne qui représente l'objet actuel. (Hérité de Object) |
Produit | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :