Click or drag to resize
BroccoliSharp BroSet Class
Represents a Bro set implemented as an ISet<BroValue>.
Inheritance Hierarchy
SystemObject
  BroccoliSharpBroSet

Namespace: BroccoliSharp
Assembly: BroccoliSharp (in BroccoliSharp.dll) Version: 1.0.5434.15853
Syntax
public class BroSet : ISet<BroValue>, 
	ICollection<BroValue>, IEnumerable<BroValue>, IEnumerable, 
	IDisposable

The BroSet type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAdd(BroValue)
Adds value to this BroSet.
Public methodAdd(Object, BroType, String)
Adds value of type to this BroSet.
Public methodClear
Removes all items from this BroSet.
Public methodClone
Gets a clone of this BroSet.
Public methodContains(BroValue)
Determines whether this BroSet contains specified value.
Public methodContains(Object, BroType, String)
Determines whether this BroSet contains specified value of type.
Public methodCopyTo
Copies the elements of this BroSet to an Array, starting at a particular Array index.
Public methodDispose
Releases all the resources used by this BroSet object.
Protected methodDispose(Boolean)
Releases the unmanaged resources used by this BroSet object and optionally releases the managed resources.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExceptWith
Removes all elements in the specified collection from the current set.
Protected methodFinalize
Releases the unmanaged resources before this BroSet object is reclaimed by GC.
(Overrides ObjectFinalize.)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIntersectWith
Modifies the current set so that it contains only elements that are also in a specified collection.
Public methodIsProperSubsetOf
Determines whether the current set is a proper (strict) subset of a specified collection.
Public methodIsProperSupersetOf
Determines whether the current set is a proper (strict) superset of a specified collection.
Public methodIsSubsetOf
Determines whether a set is a subset of a specified collection.
Public methodIsSupersetOf
Determines whether the current set is a superset of a specified collection.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOverlaps
Determines whether the current set overlaps with the specified collection.
Public methodRemove
Removes the first occurrence of the specified BroValue from this BroSet.
Public methodSetEquals
Determines whether the current set and the specified collection contain the same elements.
Public methodSymmetricExceptWith
Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.
Public methodToList
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnionWith
Modifies the current set so that it contains all elements that are present in either the current set or the specified collection.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of elements contained in this BroSet.
Public propertyIsReadOnly
Gets a value indicating whether this BroSet is read-only.
Public propertyType
Gets the BroType of this BroSet.
Top
Remarks

Handling Sets

The functionality of a BroSet is virtually identical to that of a .NET HashSetT with a type implementation of a BroValue.

From the perspective of the Broccoli API, a set essentially a BroTable with void value types. Consequently, in BroccoliSharp you can actually implicitly cast a BroTable to a BroSet and the resulting new BroSet will be loaded with all the Keys of the table.

Thread Safety
Implementation of BroSet is not synchronized, as a result, enumerating through the set will intrinsically not be a thread-safe procedure. In cases where enumeration contends with write accesses, set should be locked during the entire enumeration. To allow the set to be accessed by multiple threads for reading and writing, synchronization will be required.
See Also