/// <summary> /// Initializes a new instance of the <see cref="DistributedSet{T}" /> class. /// </summary> /// <param name="name"> /// The name of the collection. /// </param> internal DistributedSet(string name) { Should.NotBeNull(name, nameof(name)); Should.BeSerializable(typeof(T), "T"); this.Name = name; this.items = new HashSet <T>(); }
/// <summary> /// Initializes a new instance of the <see cref="DistributedDictionary{TKey, TValue}" /> class. /// </summary> /// <param name="name"> /// The name of the collection. /// </param> internal DistributedDictionary(string name) { Should.NotBeNull(name, nameof(name)); Should.BeSerializable(typeof(TKey), "TKey"); Should.BeSerializable(typeof(TValue), "TKey"); this.Name = name; this.dictionary = new ConcurrentDictionary <TKey, TValue>(); }
/// <summary> /// Initializes a new instance of the <see cref="DistributedQueue{T}" /> class. /// </summary> /// <param name="name"> /// The name of the collection. /// </param> /// <param name="parentNode"> /// The parent node of the collection. /// </param> internal DistributedQueue(string name, INode parentNode) { Should.NotBeNull(name, nameof(name)); Should.NotBeNull(parentNode, nameof(parentNode)); Should.BeSerializable(typeof(T), "T"); this.Name = name; this.ParentNode = parentNode; this.queue = new Queue <T>(); }
/// <summary> /// Initializes a new instance of the <see cref="DistributedSet{T}" /> class. /// </summary> /// <param name="name"> /// The name of the collection. /// </param> /// <param name="parentNode"> /// The parent node of the collection. /// </param> internal DistributedSet(string name, INode parentNode) { Should.NotBeNull(name, nameof(name)); Should.NotBeNull(parentNode, nameof(parentNode)); Should.BeSerializable(typeof(T), "T"); this.Name = name; this.ParentNode = parentNode; this.set = new HashSet <T>(); }
/// <summary> /// Initializes a new instance of the <see cref="DistributedDictionary{TKey, TValue}" /> class. /// </summary> /// <param name="name"> /// The name of the collection. /// </param> /// <param name="parentNode"> /// The parent node of the collection. /// </param> public DistributedDictionary(string name, INode parentNode) { Should.NotBeNull(name, nameof(name)); Should.NotBeNull(parentNode, nameof(parentNode)); Should.BeSerializable(typeof(TKey), "TKey"); Should.BeSerializable(typeof(TValue), "TKey"); this.Name = name; this.ParentNode = parentNode; this.dictionary = new ConcurrentDictionary <TKey, TValue>(); }