System.Collections.Immutable
Defined on a generic collection that hashes its contents using an .
The type of element hashed in the collection.
Gets the comparer used to obtain hash codes for the keys and check equality.
Defined on a generic collection that sorts its contents using an .
The type of element sorted in the collection.
Gets the comparer used to sort keys.
An adapter that allows a single foreach loop in C# to avoid
boxing an enumerator when possible, but fall back to boxing when necessary.
The type of value to be enumerated.
The type of the enumerator struct.
The enumerator object to use if not null.
The enumerator struct to use if is null.
This field must NOT be readonly because the field's value is a struct and must be able to mutate
in-place. A readonly keyword would cause any mutation to take place in a copy rather than the field.
Initializes a new instance of the struct
for enumerating over a strongly typed struct enumerator.
The initialized enumerator struct.
Initializes a new instance of the struct
for enumerating over a (boxed) enumerator.
The initialized enumerator object.
Gets the current enumerated value.
Moves to the next value.
Disposes the underlying enumerator.
Returns a copy of this struct.
This member is here so that it can be used in C# foreach loops.
An interface for binary tree nodes that allow our common enumerator to walk the graph.
Gets the depth of the tree below this node.
Gets a value indicating whether this node is empty.
Gets the number of non-empty nodes at this node and below.
Thrown if the implementation does not store this value at the node.
Gets the left branch of this node.
Gets the right branch of this node.
An interface for binary tree nodes that allow our common enumerator to walk the graph.
The type of value for each node.
Gets the value represented by the current node.
Gets the left branch of this node.
Gets the right branch of this node.
An internal non-generic interface implemented by
that allows for recognition of an instance and access
to its underlying array, without actually knowing the type of value
stored in it.
Casting to this interface requires a boxed instance of the struct,
and as such should be avoided. This interface is useful, however, where the value
is already boxed and we want to try to reuse immutable arrays instead of copying them.
** This interface is INTENTIONALLY INTERNAL, as it gives access to the inner array. **
Gets an untyped reference to the array.
An immutable key-value dictionary.
The type of the key.
The type of the value.
Gets an empty dictionary with equivalent ordering and key/value comparison rules.
Adds the specified key and value to the dictionary.
The key of the entry to add.
The value of the entry to add.
The new dictionary containing the additional key-value pair.
Thrown when the given key already exists in the dictionary but has a different value.
If the given key-value pair are already in the dictionary, the existing instance is returned.
Adds the specified key-value pairs to the dictionary.
The pairs.
The new dictionary containing the additional key-value pairs.
Thrown when one of the given keys already exists in the dictionary but has a different value.
Sets the specified key and value to the dictionary, possibly overwriting an existing value for the given key.
The key of the entry to add.
The value of the entry to add.
The new dictionary containing the additional key-value pair.
If the given key-value pair are already in the dictionary, the existing instance is returned.
If the key already exists but with a different value, a new instance with the overwritten value will be returned.
Applies a given set of key=value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary.
The key=value pairs to set on the dictionary. Any keys that conflict with existing keys will overwrite the previous values.
An immutable dictionary.
Removes the specified keys from the dictionary with their associated values.
The keys to remove.
A new dictionary with those keys removed; or this instance if those keys are not in the dictionary.
Removes the specified key from the dictionary with its associated value.
The key to remove.
A new dictionary with the matching entry removed; or this instance if the key is not in the dictionary.
Determines whether this dictionary contains the specified key-value pair.
The key value pair.
true if this dictionary contains the key-value pair; otherwise, false.
Searches the dictionary for a given key and returns the equal key it finds, if any.
The key to search for.
The key from the dictionary that the search found, or if the search yielded no match.
A value indicating whether the search was successful.
This can be useful when you want to reuse a previously stored reference instead of
a newly constructed one (so that more sharing of references can occur) or to look up
the canonical value, or a value that has more complete data than the value you currently have,
although their comparer functions indicate they are equal.
Determines whether the
contains an element with the specified value.
The value to locate in the .
The value can be null for reference types.
true if the contains
an element with the specified value; otherwise, false.
A list of elements that can only be modified by creating a new instance of the list.
The type of element stored in the list.
Mutations on this list generate new lists. Incremental changes to a list share as much memory as possible with the prior versions of a list,
while allowing garbage collection to clean up any unique list data that is no longer being referenced.
Gets an empty list that retains the same sort semantics that this instance has.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the
that starts at the specified index and contains the specified number of elements.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The number of elements in the section to search.
The equality comparer to use in the search.
If null, is used.
The zero-based index of the first occurrence of item within the range of
elements in the that starts at index and
contains count number of elements, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the
that contains the specified number of elements and ends at the specified
index.
The object to locate in the . The value
can be null for reference types.
The starting position of the search. The search proceeds from toward the beginning of this instance.
The number of elements in the section to search.
The equality comparer to use in the search.
If null, is used.
The zero-based index of the last occurrence of within the range of elements
in the that contains number of elements
and ends at , if found; otherwise, -1.
Adds the specified value to this list.
The value to add.
A new list with the element added.
Adds the specified values to this list.
The values to add.
A new list with the elements added.
Inserts the specified value at the specified index.
The index at which to insert the value.
The element to insert.
The new immutable list.
Inserts the specified values at the specified index.
The index at which to insert the value.
The elements to insert.
The new immutable list.
Removes the specified value from this list.
The value to remove.
The equality comparer to use in the search.
If null, is used.
A new list with the element removed, or this list if the element is not in this list.
Removes all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to remove.
The new list.
Removes the specified values from this list.
The items to remove if matches are found in this list.
The equality comparer to use in the search.
If null, is used.
A new list with the elements removed.
Removes the specified values from this list.
The starting index to begin removal.
The number of elements to remove.
A new list with the elements removed.
Removes the element at the specified index.
The index.
A new list with the elements removed.
Replaces an element in the list at a given position with the specified element.
The position in the list of the element to replace.
The element to replace the old element with.
The new list -- even if the value being replaced is equal to the new value for that position.
Replaces the first equal element in the list with the specified element.
The element to replace.
The element to replace the old element with.
The equality comparer to use in the search.
If null, is used.
The new list -- even if the value being replaced is equal to the new value for that position.
Thrown when the old value does not exist in the list.
An interface that describes the methods that the and types have in common.
The type of element in the collection.
Converts the elements in the current to
another type, and returns a list containing the converted elements.
A delegate that converts each element from
one type to another type.
The type of the elements of the target array.
A of the target type containing the converted
elements from the current .
Performs the specified action on each element of the list.
The delegate to perform on each element of the list.
Creates a shallow copy of a range of elements in the source .
The zero-based index at which the range
starts.
The number of elements in the range.
A shallow copy of a range of elements in the source .
Copies the entire to a compatible one-dimensional
array, starting at the beginning of the target array.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
Copies the entire to a compatible one-dimensional
array, starting at the specified index of the target array.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
The zero-based index in at which copying begins.
Copies a range of elements from the to
a compatible one-dimensional array, starting at the specified index of the
target array.
The zero-based index in the source at
which copying begins.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
The zero-based index in at which copying begins.
The number of elements to copy.
Determines whether the contains elements
that match the conditions defined by the specified predicate.
The delegate that defines the conditions of the elements
to search for.
true if the contains one or more elements
that match the conditions defined by the specified predicate; otherwise,
false.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the first occurrence within the entire .
The delegate that defines the conditions of the element
to search for.
The first element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type .
Retrieves all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to search for.
A containing all the elements that match
the conditions defined by the specified predicate, if found; otherwise, an
empty .
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the entire .
The delegate that defines the conditions of the element
to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the that extends
from the specified index to the last element.
The zero-based starting index of the search.
The delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the that starts
at the specified index and contains the specified number of elements.
The zero-based starting index of the search.
The number of elements in the section to search.
The delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the last occurrence within the entire .
The delegate that defines the conditions of the element
to search for.
The last element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type .
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the entire .
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the that extends
from the first element to the specified index.
The zero-based starting index of the backward search.
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the that contains
the specified number of elements and ends at the specified index.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Determines whether every element in the
matches the conditions defined by the specified predicate.
The delegate that defines the conditions to check against
the elements.
true if every element in the matches the
conditions defined by the specified predicate; otherwise, false. If the list
has no elements, the return value is true.
Searches the entire sorted for an element
using the default comparer and returns the zero-based index of the element.
The object to locate. The value can be null for reference types.
The zero-based index of in the sorted ,
if is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than or, if there is
no larger element, the bitwise complement of .
The default comparer cannot
find an implementation of the generic interface or
the interface for type .
Searches the entire sorted for an element
using the specified comparer and returns the zero-based index of the element.
The object to locate. The value can be null for reference types.
The implementation to use when comparing
elements.-or-null to use the default comparer .
The zero-based index of in the sorted ,
if is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than or, if there is
no larger element, the bitwise complement of .
is null, and the default comparer
cannot find an implementation of the generic interface
or the interface for type .
Searches a range of elements in the sorted
for an element using the specified comparer and returns the zero-based index
of the element.
The zero-based starting index of the range to search.
The length of the range to search.
The object to locate. The value can be null for reference types.
The implementation to use when comparing
elements, or null to use the default comparer .
The zero-based index of in the sorted ,
if is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than or, if there is
no larger element, the bitwise complement of .
is less than 0.-or- is less than 0.
and do not denote a valid range in the .
is null, and the default comparer
cannot find an implementation of the generic interface
or the interface for type .
An immutable queue.
The type of elements in the queue.
Gets a value indicating whether this is the empty queue.
true if this queue is empty; otherwise, false.
Gets an empty queue.
Gets the element at the front of the queue.
The element at the front of the queue.
Thrown when the queue is empty.
Adds an element to the back of the queue.
The value.
The new queue.
Returns a queue that is missing the front element.
A queue; never null.
Thrown when the queue is empty.
A set of elements that can only be modified by creating a new instance of the set.
The type of element stored in the set.
Mutations on this set generate new sets. Incremental changes to a set share as much memory as possible with the prior versions of a set,
while allowing garbage collection to clean up any unique set data that is no longer being referenced.
Gets an empty set that retains the same sort or unordered semantics that this instance has.
Determines whether this set contains the specified value.
The value.
true if the set contains the specified value; otherwise, false.
Adds the specified value to this set.
The value to add.
A new set with the element added, or this set if the element is already in this set.
Removes the specified value from this set.
The value to remove.
A new set with the element removed, or this set if the element is not in this set.
Searches the set for a given value and returns the equal value it finds, if any.
The value to search for.
The value from the set that the search found, or if the search yielded no match.
A value indicating whether the search was successful.
This can be useful when you want to reuse a previously stored reference instead of
a newly constructed one (so that more sharing of references can occur) or to look up
a value that has more complete data than the value you currently have, although their
comparer functions indicate they are equal.
Produces a set that contains elements that exist in both this set and the specified set.
The set to intersect with this one.
A new set that contains any elements that exist in both sets.
Removes a given set of items from this set.
The items to remove from this set.
The new set with the items removed; or the original set if none of the items were in the set.
Produces a set that contains elements either in this set or a given sequence, but not both.
The other sequence of items.
The new set.
Adds a given set of items to this set.
The items to add.
The new set with the items added; or the original set if all the items were already in the set.
Checks whether a given sequence of items entirely describe the contents of this set.
The sequence of items to check against this set.
A value indicating whether the sets are equal.
Determines whether the current set is a proper (strict) subset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct subset of other; otherwise, false.
Determines whether the current set is a proper superset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct superset of other; otherwise, false.
Determines whether a set is a subset of a specified collection.
The collection to compare to the current set.
true if the current set is a subset of other; otherwise, false.
Determines whether the current set is a superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of other; otherwise, false.
Determines whether the current set overlaps with the specified collection.
The collection to compare to the current set.
true if the current set and other share at least one common element; otherwise, false.
An immutable stack.
The type of elements stored in the stack.
Gets a value indicating whether this is the empty stack.
true if this stack is empty; otherwise, false.
Gets an empty stack.
Pushes an element onto a stack and returns the new stack.
The element to push onto the stack.
The new stack.
Pops the top element off the stack.
The new stack; never null
Thrown when the stack is empty.
Gets the element on the top of the stack.
Thrown when the stack is empty.
An interface that must be implemented by collections that want to avoid
boxing their own enumerators when using the
method.
The type of value to be enumerated.
The type of the enumerator struct.
Gets the strongly-typed enumerator.
An -like interface that does not derive from .
The type of value to be enumerated.
This interface is useful because some enumerator struct types do not want to implement
since it increases the size of the generated code in foreach.
Returns the current element.
Advances to the next element.
A node in the AVL tree storing key/value pairs with Int32 keys.
This is a trimmed down version of
with TKey fixed to be . This avoids multiple interface-based dispatches while examining
each node in the tree during a lookup: an interface call to the comparer's method,
and then an interface call to 's method as part of
the 's implementation.
The default empty node.
The Int32 key associated with this node.
The value associated with this node.
Sadly, this field could be readonly but doing so breaks serialization due to bug:
http://connect.microsoft.com/VisualStudio/feedback/details/312970/weird-argumentexception-when-deserializing-field-in-typedreferences-cannot-be-static-or-init-only
A value indicating whether this node has been frozen (made immutable).
Nodes must be frozen before ever being observed by a wrapping collection type
to protect collections from further mutations.
The depth of the tree beneath this node.
The left tree.
The right tree.
Initializes a new instance of the class that is pre-frozen.
Initializes a new instance of the class that is not yet frozen.
The key.
The value.
The left.
The right.
Whether this node is prefrozen.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the height of the tree beneath this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the number of elements contained by this node and below.
Gets the value represented by the current node.
Gets the values.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Adds the specified key.
The key.
The value.
The value comparer.
Receives a value indicating whether an existing value was replaced.
Receives a value indicating whether this node tree has mutated because of this operation.
Removes the specified key.
The key.
Receives a value indicating whether this node tree has mutated because of this operation.
The new AVL tree.
Gets the value or default.
The key.
The value.
Tries to get the value.
The key.
The value.
True if the key was found.
Freezes this node and all descendant nodes so that any mutations require a new instance of the nodes.
AVL rotate left operation.
The tree.
The rotated tree.
AVL rotate right operation.
The tree.
The rotated tree.
AVL rotate double-left operation.
The tree.
The rotated tree.
AVL rotate double-right operation.
The tree.
The rotated tree.
Returns a value indicating whether the tree is in balance.
The tree.
0 if the tree is in balance, a positive integer if the right side is heavy, or a negative integer if the left side is heavy.
Determines whether the specified tree is right heavy.
The tree.
true if [is right heavy] [the specified tree]; otherwise, false.
Determines whether the specified tree is left heavy.
Balances the specified tree.
The tree.
A balanced tree.
Adds the specified key. Callers are expected to have validated arguments.
The key.
The value.
The value comparer.
if true, an existing key=value pair will be overwritten with the new one.
Receives a value indicating whether an existing value was replaced.
Receives a value indicating whether this node tree has mutated because of this operation.
The new AVL tree.
Removes the specified key. Callers are expected to validate arguments.
The key.
Receives a value indicating whether this node tree has mutated because of this operation.
The new AVL tree.
Creates a node mutation, either by mutating this node (if not yet frozen) or by creating a clone of this node
with the described changes.
The left branch of the mutated node.
The right branch of the mutated node.
The mutated (or created) node.
Searches the specified key. Callers are expected to validate arguments.
The key.
Enumerates the contents of a binary tree.
This struct can and should be kept in exact sync with the other binary tree enumerators:
, , and .
CAUTION: when this enumerator is actually used as a valuetype (not boxed) do NOT copy it by assigning to a second variable
or by passing it to another method. When this enumerator is disposed of it returns a mutable reference type stack to a resource pool,
and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around) there is a risk
that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data
corruption and/or exceptions.
The resource pool of reusable mutable stacks for purposes of enumeration.
We utilize this resource pool to make "allocation free" enumeration achievable.
A unique ID for this instance of this enumerator.
Used to protect pooled objects from use after they are recycled.
The set being enumerated.
The stack to use for enumerating the binary tree.
The node currently selected.
Initializes an structure.
The root of the set to be enumerated.
The current element.
The current element.
Disposes of this enumerator and returns the stack reference to the resource pool.
Advances enumeration to the next element.
A value indicating whether there is another element in the enumeration.
Restarts enumeration.
Throws an if this enumerator has been disposed.
Pushes this node and all its Left descendants onto the stack.
The starting node to push onto the stack.
Describes an ordered collection of elements.
The type of element in the collection.
Gets the number of elements in the collection.
Gets the element in the collection at a given index.
A set of initialization methods for instances of .
A two element array useful for throwing exceptions the way LINQ does.
Creates an empty .
The type of element stored in the array.
An empty array.
Creates an with the specified element as its only member.
The type of element stored in the array.
The element to store in the array.
A 1-element array.
Creates an with the specified elements.
The type of element stored in the array.
The first element to store in the array.
The second element to store in the array.
A 2-element array.
Creates an with the specified elements.
The type of element stored in the array.
The first element to store in the array.
The second element to store in the array.
The third element to store in the array.
A 3-element array.
Creates an with the specified elements.
The type of element stored in the array.
The first element to store in the array.
The second element to store in the array.
The third element to store in the array.
The fourth element to store in the array.
A 4-element array.
Creates an populated with the contents of the specified sequence.
The type of element stored in the array.
The elements to store in the array.
An immutable array.
Creates an empty .
The type of element stored in the array.
The elements to store in the array.
An immutable array.
Initializes a new instance of the struct.
The array to initialize the array with. A defensive copy is made.
The index of the first element in the source array to include in the resulting array.
The number of elements from the source array to include in the resulting array.
This overload allows helper methods or custom builder classes to efficiently avoid paying a redundant
tax for copying an array when the new array is a segment of an existing array.
Initializes a new instance of the struct.
The array to initialize the array with.
The selected array segment may be copied into a new array.
The index of the first element in the source array to include in the resulting array.
The number of elements from the source array to include in the resulting array.
This overload allows helper methods or custom builder classes to efficiently avoid paying a redundant
tax for copying an array when the new array is a segment of an existing array.
Initializes a new instance of the struct.
The source array to initialize the resulting array with.
The function to apply to each element from the source array.
This overload allows efficient creation of an based on an existing
, where a mapping function needs to be applied to each element from
the source array.
Initializes a new instance of the struct.
The source array to initialize the resulting array with.
The index of the first element in the source array to include in the resulting array.
The number of elements from the source array to include in the resulting array.
The function to apply to each element from the source array included in the resulting array.
This overload allows efficient creation of an based on a slice of an existing
, where a mapping function needs to be applied to each element from the source array
included in the resulting array.
Initializes a new instance of the struct.
The source array to initialize the resulting array with.
The function to apply to each element from the source array.
An argument to be passed to the selector mapping function.
This overload allows efficient creation of an based on an existing
, where a mapping function needs to be applied to each element from
the source array.
Initializes a new instance of the struct.
The source array to initialize the resulting array with.
The index of the first element in the source array to include in the resulting array.
The number of elements from the source array to include in the resulting array.
The function to apply to each element from the source array included in the resulting array.
An argument to be passed to the selector mapping function.
This overload allows efficient creation of an based on a slice of an existing
, where a mapping function needs to be applied to each element from the source array
included in the resulting array.
Initializes a new instance of the class.
The type of elements stored in the array.
A new builder.
Initializes a new instance of the class.
The type of elements stored in the array.
The size of the initial array backing the builder.
A new builder.
Enumerates a sequence exactly once and produces an immutable array of its contents.
The type of element in the sequence.
The sequence to enumerate.
An immutable array.
Searches an entire one-dimensional sorted for a specific element,
using the generic interface implemented by each element
of the and by the specified object.
The type of element stored in the array.
The sorted, one-dimensional array to search.
The object to search for.
The index of the specified in the specified array, if is found.
If is not found and is less than one or more elements in array,
a negative number which is the bitwise complement of the index of the first
element that is larger than . If is not found and is greater
than any of the elements in array, a negative number which is the bitwise
complement of (the index of the last element plus 1).
does not implement the generic interface, and
the search encounters an element that does not implement the
generic interface.
Searches an entire one-dimensional sorted for a value using
the specified generic interface.
The type of element stored in the array.
The sorted, one-dimensional array to search.
The object to search for.
The implementation to use when comparing
elements; or null to use the implementation of each
element.
The index of the specified in the specified array, if is found.
If is not found and is less than one or more elements in array,
a negative number which is the bitwise complement of the index of the first
element that is larger than . If is not found and is greater
than any of the elements in array, a negative number which is the bitwise
complement of (the index of the last element plus 1).
is null, does not implement the generic interface, and
the search encounters an element that does not implement the
generic interface.
Searches a range of elements in a one-dimensional sorted for
a value, using the generic interface implemented by
each element of the and by the specified value.
The type of element stored in the array.
The sorted, one-dimensional array to search.
The starting index of the range to search.
The length of the range to search.
The object to search for.
The index of the specified in the specified , if is found.
If is not found and is less than one or more elements in ,
a negative number which is the bitwise complement of the index of the first
element that is larger than . If is not found and is greater
than any of the elements in , a negative number which is the bitwise
complement of (the index of the last element plus 1).
does not implement the generic interface, and
the search encounters an element that does not implement the
generic interface.
and do not specify a valid range in .
is less than the lower bound of . -or- is less than zero.
Searches a range of elements in a one-dimensional sorted for
a value, using the specified generic
interface.
The type of element stored in the array.
The sorted, one-dimensional array to search.
The starting index of the range to search.
The length of the range to search.
The object to search for.
The implementation to use when comparing
elements; or null to use the implementation of each
element.
The index of the specified in the specified , if is found.
If is not found and is less than one or more elements in ,
a negative number which is the bitwise complement of the index of the first
element that is larger than . If is not found and is greater
than any of the elements in , a negative number which is the bitwise
complement of (the index of the last element plus 1).
is null, does not implement the generic
interface, and the search encounters an element that does not implement the
generic interface.
and do not specify a valid range in .-or- is null,
and is of a type that is not compatible with the elements of .
is less than the lower bound of . -or- is less than zero.
Initializes a new instance of the struct.
The array from which to copy.
A readonly array with O(1) indexable lookup time.
The type of element stored by the array.
This type has a documented contract of being exactly one reference-type field in size.
Our own class depends on it, as well as others externally.
IMPORTANT NOTICE FOR MAINTAINERS AND REVIEWERS:
This type should be thread-safe. As a struct, it cannot protect its own fields
from being changed from one thread while its members are executing on other threads
because structs can change *in place* simply by reassigning the field containing
this struct. Therefore it is extremely important that
** Every member should only dereference this ONCE. **
If a member needs to reference the array field, that counts as a dereference of this.
Calling other instance members (properties or methods) also counts as dereferencing this.
Any member that needs to use this more than once must instead
assign this to a local variable and use that for the rest of the code instead.
This effectively copies the one field in the struct to a local variable so that
it is insulated from other threads.
A writable array accessor that can be converted into an
instance without allocating memory.
The backing array for the builder.
The number of initialized elements in the array.
Initializes a new instance of the class.
The initial capacity of the internal array.
Initializes a new instance of the class.
Get and sets the length of the internal array. When set the internal array is
reallocated to the given capacity if it is not already the specified length.
Gets or sets the length of the builder.
If the value is decreased, the array contents are truncated.
If the value is increased, the added elements are initialized to the default value of type .
Gets or sets the element at the specified index.
The index.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Returns an immutable copy of the current contents of this collection.
An immutable array.
Extracts the internal array as an and replaces it
with a zero length array.
When doesn't
equal .
Removes all items from the .
Inserts an item to the at the specified index.
The zero-based index at which should be inserted.
The object to insert into the .
Adds an item to the .
The object to add to the .
Adds the specified items to the end of the array.
The items.
Adds the specified items to the end of the array.
The items.
Adds the specified items to the end of the array.
The items.
Adds the specified items to the end of the array.
The items.
The number of elements from the source array to add.
Adds the specified items to the end of the array.
The items.
Adds the specified items to the end of the array.
The items.
The number of elements from the source array to add.
Adds the specified items to the end of the array.
The items.
Adds the specified items to the end of the array.
The items.
Adds the specified items to the end of the array.
The items.
Removes the specified element.
The element.
A value indicating whether the specified element was found and removed from the collection.
Removes the item at the specified index.
The zero-based index of the item to remove.
Determines whether the contains a specific value.
The object to locate in the .
true if is found in the ; otherwise, false.
Creates a new array with the current contents of this Builder.
Copies the current contents to the specified array.
The array to copy to.
The starting index of the target array.
Resizes the array to accommodate the specified capacity requirement.
The required capacity.
Determines the index of a specific item in the .
The object to locate in the .
The index of if found in the list; otherwise, -1.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The equality comparer to use in the search.
If null, is used.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The index at which to begin the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The equality comparer to use in the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Reverses the order of elements in the collection.
Sorts the array.
Sorts the elements in the entire array using
the specified .
The to use when comparing elements.
is null.
Sorts the array.
The comparer to use in sorting. If null, the default comparer is used.
Sorts the array.
The index of the first element to consider in the sort.
The number of elements to include in the sort.
The comparer to use in sorting. If null, the default comparer is used.
Returns an enumerator for the contents of the array.
An enumerator.
Returns an enumerator for the contents of the array.
An enumerator.
Returns an enumerator for the contents of the array.
An enumerator.
Adds items to this collection.
The type of source elements.
The source array.
The number of elements to add to this array.
An array enumerator.
It is important that this enumerator does NOT implement .
We want the iterator to inline when we do foreach and to not result in
a try/finally frame in the client.
The array being enumerated.
The currently enumerated position.
-1 before the first call to .
>= this.array.Length after returns false.
Initializes a new instance of the struct.
The array to enumerate.
Gets the currently enumerated value.
Advances to the next value to be enumerated.
true if another item exists in the array; false otherwise.
An array enumerator that implements pattern (including ).
A shareable singleton for enumerating empty arrays.
The array being enumerated.
The currently enumerated position.
-1 before the first call to .
this.array.Length - 1 after MoveNext returns false.
Initializes a new instance of the class.
Gets the currently enumerated value.
Gets the currently enumerated value.
If another item exists in the array, advances to the next value to be enumerated.
true if another item exists in the array; false otherwise.
Resets enumeration to the start of the array.
Disposes this enumerator.
Currently has no action.
Creates an enumerator for the specified array.
An empty (initialized) instance of .
The backing field for this instance. References to this value should never be shared with outside code.
This would be private, but we make it internal so that our own extension methods can access it.
Initializes a new instance of the struct
*without making a defensive copy*.
The array to use. May be null for "default" arrays.
Checks equality between two instances.
The instance to the left of the operator.
The instance to the right of the operator.
true if the values' underlying arrays are reference equal; false otherwise.
Checks inequality between two instances.
The instance to the left of the operator.
The instance to the right of the operator.
true if the values' underlying arrays are reference not equal; false otherwise.
Checks equality between two instances.
The instance to the left of the operator.
The instance to the right of the operator.
true if the values' underlying arrays are reference equal; false otherwise.
Checks inequality between two instances.
The instance to the left of the operator.
The instance to the right of the operator.
true if the values' underlying arrays are reference not equal; false otherwise.
Gets the element at the specified index in the read-only list.
The zero-based index of the element to get.
The element at the specified index in the read-only list.
Gets or sets the element at the specified index in the read-only list.
The zero-based index of the element to get.
The element at the specified index in the read-only list.
Always thrown from the setter.
Thrown if the property returns true.
Gets a value indicating whether this instance is read only.
true if this instance is read only; otherwise, false.
Gets a value indicating whether this collection is empty.
Gets the number of array in the collection.
Gets the number of array in the collection.
Thrown if the property returns true.
Gets the number of array in the collection.
Thrown if the property returns true.
Gets the element at the specified index.
The index.
The element.
Thrown if the property returns true.
Gets a value indicating whether this struct was initialized without an actual array instance.
Gets a value indicating whether this struct is empty or uninitialized.
Gets an untyped reference to the array.
Gets the string to display in the debugger watches window for this instance.
Searches the array for the specified item.
The item to search for.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The equality comparer to use in the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The equality comparer to use in the search.
If null, is used.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The index at which to begin the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Searches the array for the specified item in reverse.
The item to search for.
The index at which to begin the search.
The number of elements to search.
The equality comparer to use in the search.
The 0-based index into the array where the item was found; or -1 if it could not be found.
Determines whether the specified item exists in the array.
The item to search for.
true if an equal value was found in the array; false otherwise.
Copies the contents of this array to the specified array.
The array to copy to.
Copies the contents of this array to the specified array.
The array to copy to.
The index into the destination array to which the first copied element is written.
Copies the contents of this array to the specified array.
The index into this collection of the first element to copy.
The array to copy to.
The index into the destination array to which the first copied element is written.
The number of elements to copy.
Returns a new array with the specified value inserted at the specified position.
The 0-based index into the array at which the new item should be added.
The item to insert at the start of the array.
A new array.
Inserts the specified values at the specified index.
The index at which to insert the value.
The elements to insert.
The new immutable collection.
Inserts the specified values at the specified index.
The index at which to insert the value.
The elements to insert.
The new immutable collection.
Returns a new array with the specified value inserted at the end.
The item to insert at the end of the array.
A new array.
Adds the specified values to this list.
The values to add.
A new list with the elements added.
Adds the specified values to this list.
The values to add.
A new list with the elements added.
Returns an array with the item at the specified position replaced.
The index of the item to replace.
The new item.
The new array.
Replaces the first equal element in the list with the specified element.
The element to replace.
The element to replace the old element with.
The new list -- even if the value being replaced is equal to the new value for that position.
Thrown when the old value does not exist in the list.
Replaces the first equal element in the list with the specified element.
The element to replace.
The element to replace the old element with.
The equality comparer to use in the search.
If null, is used.
The new list -- even if the value being replaced is equal to the new value for that position.
Thrown when the old value does not exist in the list.
Returns an array with the first occurrence of the specified element removed from the array.
If no match is found, the current array is returned.
The item to remove.
The new array.
Returns an array with the first occurrence of the specified element removed from the array.
If no match is found, the current array is returned.
The item to remove.
The equality comparer to use in the search.
If null, is used.
The new array.
Returns an array with the element at the specified position removed.
The 0-based index into the array for the element to omit from the returned array.
The new array.
Returns an array with the elements at the specified position removed.
The 0-based index into the array for the element to omit from the returned array.
The number of elements to remove.
The new array.
Removes the specified values from this list.
The items to remove if matches are found in this list.
A new list with the elements removed.
Removes the specified values from this list.
The items to remove if matches are found in this list.
The equality comparer to use in the search.
If null, is used.
A new list with the elements removed.
Removes the specified values from this list.
The items to remove if matches are found in this list.
A new list with the elements removed.
Removes the specified values from this list.
The items to remove if matches are found in this list.
The equality comparer to use in the search.
A new list with the elements removed.
Removes all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to remove.
The new list.
Returns an empty array.
Returns a sorted instance of this array.
Sorts the elements in the entire using
the specified .
The to use when comparing elements.
The sorted list.
is null.
Returns a sorted instance of this array.
The comparer to use in sorting. If null, the default comparer is used.
Returns a sorted instance of this array.
The index of the first element to consider in the sort.
The number of elements to include in the sort.
The comparer to use in sorting. If null, the default comparer is used.
Returns a builder that is populated with the same contents as this array.
The new builder.
Returns an enumerator for the contents of the array.
An enumerator.
Returns a hash code for this instance.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Determines whether the specified is equal to this instance.
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false.
Indicates whether the current object is equal to another object of the same type.
An object to compare with this object.
true if the current object is equal to the parameter; otherwise, false.
Initializes a new instance of the struct based on the contents
of an existing instance, allowing a covariant static cast to efficiently reuse the existing array.
The array to initialize the array with. No copy is made.
Covariant upcasts from this method may be reversed by calling the
or method.
Initializes a new instance of the struct by casting the underlying
array to an array of type .
Thrown if the cast is illegal.
Creates an immutable array for this array, cast to a different element type.
The type of array element to return.
A struct typed for the base element type. If the cast fails, an instance
is returned whose property returns true.
Arrays of derived elements types can be cast to arrays of base element types
without reallocating the array.
These upcasts can be reversed via this same method, casting an array of base
element types to their derived types. However, downcasting is only successful
when it reverses a prior upcasting operation.
Filters the elements of this array to those assignable to the specified type.
The type to filter the elements of the sequence on.
An that contains elements from
the input sequence of type .
Returns an enumerator for the contents of the array.
An enumerator.
Thrown if the property returns true.
Returns an enumerator for the contents of the array.
An enumerator.
Thrown if the property returns true.
See
See
See
See
See
See
See
See
See
See
See
See
Adds an item to the .
The object to add to the .
The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection,
Removes all items from the .
Determines whether the contains a specific value.
The object to locate in the .
true if the is found in the ; otherwise, false.
Determines the index of a specific item in the .
The object to locate in the .
The index of if found in the list; otherwise, -1.
Inserts an item to the at the specified index.
The zero-based index at which should be inserted.
The object to insert into the .
Gets a value indicating whether this instance is fixed size.
true if this instance is fixed size; otherwise, false.
Gets a value indicating whether this instance is read only.
true if this instance is read only; otherwise, false.
Gets the size of the array.
Thrown if the property returns true.
See the interface.
Gets the sync root.
Removes the first occurrence of a specific object from the .
The object to remove from the .
Removes the item at the specified index.
The zero-based index of the item to remove.
Gets or sets the at the specified index.
The .
The index.
Always thrown from the setter.
Thrown if the property returns true.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Determines whether an object is structurally equal to the current instance.
The object to compare with the current instance.
An object that determines whether the current instance and other are equal.
true if the two objects are equal; otherwise, false.
Returns a hash code for the current instance.
An object that computes the hash code of the current object.
The hash code for the current instance.
Determines whether the current collection object precedes, occurs in the
same position as, or follows another object in the sort order.
The object to compare with the current instance.
An object that compares members of the current collection object with the
corresponding members of other.
An integer that indicates the relationship of the current collection object
to other.
Throws a null reference exception if the array field is null.
Throws an if the field is null, i.e. the
property returns true. The
message specifies that the operation cannot be performed
on a default instance of .
This is intended for explicitly implemented interface method and property implementations.
Returns an array with items at the specified indexes removed.
A **sorted set** of indexes to elements that should be omitted from the returned array.
The new array.
Throws a if the specified array is uninitialized.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A set of initialization methods for instances of .
Returns an empty collection.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The immutable collection.
Returns an empty collection with the specified key comparer.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The immutable collection.
Returns an empty collection with the specified comparers.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The value comparer.
The immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The value comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable dictionary builder.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The new builder.
Creates a new immutable dictionary builder.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The new builder.
Creates a new immutable dictionary builder.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The value comparer.
The new builder.
Constructs an immutable dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The type of value in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The function that will produce the value for the map from each sequence element.
The key comparer to use for the map.
The value comparer to use for the map.
The immutable map.
Constructs an immutable dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The type of value in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The function that will produce the value for the map from each sequence element.
The key comparer to use for the map.
The immutable map.
Constructs an immutable dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The immutable map.
Constructs an immutable dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The key comparer to use for the map.
The immutable map.
Constructs an immutable dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The type of value in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The function that will produce the value for the map from each sequence element.
The immutable map.
Creates an immutable dictionary given a sequence of key=value pairs.
The type of key in the map.
The type of value in the map.
The sequence of key=value pairs.
The key comparer to use when building the immutable map.
The value comparer to use for the immutable map.
An immutable map.
Creates an immutable dictionary given a sequence of key=value pairs.
The type of key in the map.
The type of value in the map.
The sequence of key=value pairs.
The key comparer to use when building the immutable map.
An immutable map.
Creates an immutable dictionary given a sequence of key=value pairs.
The type of key in the map.
The type of value in the map.
The sequence of key=value pairs.
An immutable map.
Determines whether this map contains the specified key-value pair.
The type of key in the map.
The type of value in the map.
The map to search.
The key to check for.
The value to check for on a matching key, if found.
true if this map contains the key-value pair; otherwise, false.
Gets the value for a given key if a matching key exists in the dictionary.
The dictionary to retrieve the value from.
The key to search for.
The value for the key, or the default value of type if no matching key was found.
Gets the value for a given key if a matching key exists in the dictionary.
The type of the key.
The type of the value.
The dictionary to retrieve the value from.
The key to search for.
The default value to return if no matching key is found in the dictionary.
The value for the key, or if no matching key was found.
Contains the inner class.
Contains the inner class.
Contains the inner struct.
Contains the inner struct.
Contains the inner class.
Contains the inner class.
An immutable unordered dictionary implementation.
The type of the key.
The type of the value.
A dictionary that mutates with little or no memory allocations,
can produce and/or build on immutable dictionary instances very efficiently.
While
and other bulk change methods already provide fast bulk change operations on the collection, this class allows
multiple combinations of changes to be made to a set with equal efficiency.
Instance members of this class are not thread-safe.
The root of the binary tree that stores the collection. Contents are typically not entirely frozen.
The comparers.
The number of elements in this collection.
Caches an immutable instance that represents the current state of the collection.
Null if no immutable view has been created for the current version.
A number that increments every time the builder changes its contents.
The object callers may use to synchronize access to this collection.
Initializes a new instance of the class.
The map that serves as the basis for this Builder.
Gets or sets the key comparer.
The key comparer.
Gets or sets the value comparer.
The value comparer.
Gets the number of elements contained in the .
The number of elements contained in the .
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
See
Gets an containing the keys of the .
An containing the keys of the object that implements .
See
Gets an containing the values in the .
An containing the values in the object that implements .
Gets a value indicating whether the object has a fixed size.
true if the object has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Gets an containing the keys of the .
An containing the keys of the object that implements .
Gets an containing the values in the .
An containing the values in the object that implements .
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Adds an element with the provided key and value to the object.
The to use as the key of the element to add.
The to use as the value of the element to add.
Determines whether the object contains an element with the specified key.
The key to locate in the object.
true if the contains an element with the key; otherwise, false.
Returns an object for the object.
An object for the object.
Removes the element with the specified key from the object.
The key of the element to remove.
Gets or sets the element with the specified key.
The key.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Gets the current version of the contents of this builder.
Gets the initial data to pass to a query or mutation method.
Gets or sets the root of this data structure.
Gets or sets the element with the specified key.
The element with the specified key.
is null.
The property is retrieved and is not found.
The property is set and the is read-only.
Adds a sequence of values to this collection.
The items.
Removes any entries from the dictionaries with keys that match those found in the specified sequence.
The keys for entries to remove from the dictionary.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Gets the value for a given key if a matching key exists in the dictionary.
The key to search for.
The value for the key, or the default value of type if no matching key was found.
Gets the value for a given key if a matching key exists in the dictionary.
The key to search for.
The default value to return if no matching key is found in the dictionary.
The value for the key, or if no matching key was found.
Creates an immutable dictionary based on the contents of this instance.
An immutable map.
This method is an O(n) operation, and approaches O(1) time as the number of
actual mutations to the set since the last call to this method approaches 0.
Adds an element with the provided key and value to the .
The object to use as the key of the element to add.
The object to use as the value of the element to add.
is null.
An element with the same key already exists in the .
The is read-only.
Determines whether the contains an element with the specified key.
The key to locate in the .
true if the contains an element with the key; otherwise, false.
is null.
Determines whether the
contains an element with the specified value.
The value to locate in the .
The value can be null for reference types.
true if the contains
an element with the specified value; otherwise, false.
Removes the element with the specified key from the .
The key of the element to remove.
true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original .
is null.
The is read-only.
Gets the value associated with the specified key.
The key whose value to get.
When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value of the type . This parameter is passed uninitialized.
true if the object that implements contains an element with the specified key; otherwise, false.
is null.
See the interface.
Adds an item to the .
The object to add to the .
The is read-only.
Removes all items from the .
The is read-only.
Determines whether the contains a specific value.
The object to locate in the .
true if is found in the ; otherwise, false.
See the interface.
Removes the first occurrence of a specific object from the .
The object to remove from the .
true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
The is read-only.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Applies the result of some mutation operation to this instance.
The result.
A shareable container for the comparers used by an immutable dictionary.
To reduce allocations, we directly implement the and Key-Only comparers,
but we try to keep this an implementation detail by exposing properties that return
references for these particular facilities, that are implemented as returning "this".
The default instance to use when all the comparers used are their default values.
The equality comparer to use for the key.
The value comparer.
Initializes a new instance of the class.
The key only comparer.
The value comparer.
Gets the key comparer.
The key comparer.
Gets the key only comparer.
The key only comparer.
Gets the value comparer.
The value comparer.
Gets the equality comparer to use with hash buckets.
Determines whether the specified objects are equal.
The first object to compare.
The second object to compare.
true if the specified objects are equal; otherwise, false.
Returns a hash code for this instance.
The obj.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Determines whether the specified objects are equal.
The first object to compare.
The second object to compare.
true if the specified objects are equal; otherwise, false.
Returns a hash code for this instance.
The obj.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Gets an instance that refers to the specified combination of comparers.
The key comparer.
The value comparer.
An instance of
Returns an instance of that shares the same key comparers
with this instance, but uses the specified value comparer.
The new value comparer to use.
A new instance of
Enumerates the contents of the collection in an allocation-free manner.
The builder being enumerated, if applicable.
The enumerator over the sorted dictionary whose keys are hash values.
The enumerator in use within an individual .
The version of the builder (when applicable) that is being enumerated.
Initializes a new instance of the struct.
The root.
The builder, if applicable.
Gets the current element.
Gets the current element.
Advances the enumerator to the next element of the collection.
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
The collection was modified after the enumerator was created.
Sets the enumerator to its initial position, which is before the first element in the collection.
The collection was modified after the enumerator was created.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Throws an exception if the underlying builder's contents have been changed since enumeration started.
Thrown if the collection has changed.
Contains all the key/values in the collection that hash to the same value.
One of the values in this bucket.
Any other elements that hash to the same value.
This is null if and only if the entire bucket is empty (including ).
It's empty if has an element but no additional elements.
Initializes a new instance of the struct.
The first element.
The additional elements.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the first value in this bucket.
Gets the list of additional (hash collision) elements.
Returns an enumerator that iterates through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Throws an exception to catch any errors in comparing instances.
Adds the specified key.
The key to add.
The value to add.
The key comparer.
The value comparer.
The intended behavior for certain cases that may come up during the operation.
A description of the effect was on adding an element to this .
A new that contains the added value and any values already held by this .
Removes the specified value if it exists in the collection.
The key to remove.
The equality comparer.
A description of the effect was on adding an element to this .
A new that does not contain the removed value and any values already held by this .
Gets the value for the given key in the collection if one exists..
The key to search for.
The key comparer.
The value for the given key.
A value indicating whether the key was found.
Searches the dictionary for a given key and returns the equal key it finds, if any.
The key to search for.
The key comparer.
The key from the dictionary that the search found, or if the search yielded no match.
A value indicating whether the search was successful.
This can be useful when you want to reuse a previously stored reference instead of
a newly constructed one (so that more sharing of references can occur) or to look up
the canonical value, or a value that has more complete data than the value you currently have,
although their comparer functions indicate they are equal.
Freezes this instance so that any further mutations require new memory allocations.
Enumerates all the elements in this instance.
The bucket being enumerated.
The current position of this enumerator.
The enumerator that represents the current position over the of the .
Initializes a new instance of the struct.
The bucket.
Describes the positions the enumerator state machine may be in.
The first element has not yet been moved to.
We're at the of the containing bucket.
We're enumerating the in the bucket.
The end of enumeration has been reached.
Gets the current element.
Gets the current element.
Advances the enumerator to the next element of the collection.
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
The collection was modified after the enumerator was created.
Sets the enumerator to its initial position, which is before the first element in the collection.
The collection was modified after the enumerator was created.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Description of the current data structure as input into a
mutating or query method.
The root of the data structure for the collection.
The comparer used when comparing hash buckets.
The current number of elements in the collection.
Initializes a new instance of the struct.
The root.
The comparers.
The current number of elements in the collection.
Initializes a new instance of the struct.
The map.
Gets the root of the data structure for the collection.
Gets the key comparer.
Gets the key only comparer.
Gets the value comparer.
Gets the comparers.
Gets the current number of elements in the collection.
Describes the result of a mutation on the immutable data structure.
The root node of the data structure after the mutation.
The number of elements added or removed from the collection as a result of the operation (a negative number represents removed elements).
Initializes a new instance of the struct.
The unchanged input.
Initializes a new instance of the struct.
The root.
The count adjustment.
Gets the root node of the data structure after the mutation.
Gets the number of elements added or removed from the collection as a result of the operation (a negative number represents removed elements).
Returns an immutable dictionary that captures the result of this mutation.
The prior version of the map. Used to capture the equality comparer and previous count, when applicable.
The new collection.
An empty immutable dictionary with default equality comparers.
The singleton delegate that freezes the contents of hash buckets when the root of the data structure is frozen.
The number of elements in the collection.
The root node of the tree that stores this map.
The comparer used when comparing hash buckets.
Initializes a new instance of the class.
The root.
The comparers.
The number of elements in the map.
Initializes a new instance of the class.
The comparers.
How to respond when a key collision is discovered.
Sets the value for the given key, even if that overwrites an existing value.
Skips the mutating operation if a key conflict is detected.
Throw an exception if the key already exists with a different key.
Throw an exception if the key already exists regardless of its value.
The result of a mutation operation.
The change was applied and did not require a change to the number of elements in the collection.
The change required element(s) to be added or removed from the collection.
No change was required (the operation ended in a no-op).
See the interface.
Gets the number of elements in this collection.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the key comparer.
Gets the value comparer used to determine whether values are equal.
Gets the keys in the map.
Gets the values in the map.
Gets the empty instance.
Gets the keys.
Gets the values.
Gets a data structure that captures the current state of this map, as an input into a query or mutating function.
Gets the with the specified key.
Gets or sets the with the specified key.
Creates a collection with the same contents as this collection that
can be efficiently mutated across multiple operations using standard
mutable interfaces.
This is an O(1) operation and results in only a single (small) memory allocation.
The mutable collection that is returned is *not* thread-safe.
See the interface.
See the interface.
See the interface.
Applies a given set of key=value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary.
The key=value pairs to set on the map. Any keys that conflict with existing keys will overwrite the previous values.
An immutable dictionary.
See the interface.
See the interface.
Determines whether the specified key contains key.
The key.
true if the specified key contains key; otherwise, false.
Determines whether [contains] [the specified key value pair].
The key value pair.
true if [contains] [the specified key value pair]; otherwise, false.
See the interface.
See the interface.
See the interface.
See the interface.
Determines whether the
contains an element with the specified value.
The value to locate in the .
The value can be null for reference types.
true if the contains
an element with the specified value; otherwise, false.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
See the interface
See the interface
Applies a given set of key=value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary.
The key=value pairs to set on the map. Any keys that conflict with existing keys will overwrite the previous values.
An immutable dictionary.
See the interface
See the interface
See the interface
Adds an element with the provided key and value to the .
The object to use as the key of the element to add.
The object to use as the value of the element to add.
is null.
An element with the same key already exists in the .
The is read-only.
Removes the element with the specified key from the .
The key of the element to remove.
true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original .
is null.
The is read-only.
Gets a value indicating whether the object has a fixed size.
true if the object has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Gets an containing the keys of the .
An containing the keys of the object that implements .
Gets an containing the values in the .
An containing the values in the object that implements .
Gets the root node (for testing purposes).
Adds an element with the provided key and value to the object.
The to use as the key of the element to add.
The to use as the value of the element to add.
Determines whether the object contains an element with the specified key.
The key to locate in the object.
true if the contains an element with the key; otherwise, false.
Returns an object for the object.
An object for the object.
Removes the element with the specified key from the object.
The key of the element to remove.
Gets or sets the element with the specified key.
The key.
Clears this instance.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Gets an empty collection with the specified comparers.
The comparers.
The empty dictionary.
Attempts to discover an instance beneath some enumerable sequence
if one exists.
The sequence that may have come from an immutable map.
Receives the concrete typed value if one can be found.
true if the cast was successful; false otherwise.
Performs the operation on a given data structure.
Performs the operation on a given data structure.
Performs the operation on a given data structure.
Performs the operation on a given data structure.
Performs the operation on a given data structure.
Performs the operation on a given data structure.
Performs the operation on a given data structure.
Performs the set operation on a given data structure.
Wraps the specified data structure with an immutable collection wrapper.
The root of the data structure.
The comparers.
The number of elements in the data structure.
The immutable collection.
Wraps the specified data structure with an immutable collection wrapper.
The root of the data structure.
The adjusted count if the root has changed.
The immutable collection.
Bulk adds entries to the map.
The entries to add.
true when being called from to avoid .
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
Extension methods for immutable types.
Tries to divine the number of elements in a sequence without actually enumerating each element.
The type of elements in the sequence.
The enumerable source.
Receives the number of elements in the enumeration, if it could be determined.
true if the count could be determined; false otherwise.
Tries to divine the number of elements in a sequence without actually enumerating each element.
The type of elements in the sequence.
The enumerable source.
Receives the number of elements in the enumeration, if it could be determined.
true if the count could be determined; false otherwise.
Gets the number of elements in the specified sequence,
while guaranteeing that the sequence is only enumerated once
in total by this method and the caller.
The type of element in the collection.
The sequence.
The number of elements in the sequence.
Gets a copy of a sequence as an array.
The type of element.
The sequence to be copied.
The number of elements in the sequence.
The array.
This is more efficient than the extension method
because that only tries to cast the sequence to to determine
the count before it falls back to reallocating arrays as it enumerates.
Provides a known wrapper around a sequence of elements that provides the number of elements
and an indexer into its contents.
The type of elements in the collection.
The collection.
An ordered collection. May not be thread-safe. Never null.
Clears the specified stack. For empty stacks, it avoids the call to , which
avoids a call into the runtime's implementation of , helping performance,
in particular around inlining. typically gets inlined by today's JIT, while
and typically don't.
Specifies the type of data in the stack to be cleared.
The stack to clear.
Gets a disposable enumerable that can be used as the source for a C# foreach loop
that will not box the enumerator if it is of a particular type.
The type of value to be enumerated.
The type of the Enumerator struct.
The collection to be enumerated.
A struct that enumerates the collection.
Wraps a as an ordered collection.
The type of element in the collection.
The list being exposed.
Initializes a new instance of the class.
The collection.
Gets the count.
Gets the at the specified index.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Wraps any as an ordered, indexable list.
The type of element in the collection.
The original sequence.
The list-ified sequence.
Initializes a new instance of the class.
The sequence.
Gets the count.
Gets the at the specified index.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
A set of initialization methods for instances of .
Returns an empty collection.
The type of items stored by the collection.
The immutable collection.
Returns an empty collection.
The type of items stored by the collection.
The equality comparer.
The immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The equality comparer.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The equality comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The equality comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable hash set builder.
The type of items stored by the collection.
The immutable collection.
Creates a new immutable hash set builder.
The type of items stored by the collection.
The equality comparer.
The immutable collection.
Enumerates a sequence exactly once and produces an immutable set of its contents.
The type of element in the sequence.
The sequence to enumerate.
The equality comparer to use for initializing and adding members to the hash set.
An immutable set.
Enumerates a sequence exactly once and produces an immutable set of its contents.
The type of element in the sequence.
The sequence to enumerate.
An immutable set.
Contains the inner class.
Contains the inner class.
Contains the inner struct.
Contains the inner class.
Contains the inner class.
Contains the inner class.
An immutable unordered hash set implementation.
The type of elements in the set.
A hash set that mutates with little or no memory allocations,
can produce and/or build on immutable hash set instances very efficiently.
While and other bulk change methods
already provide fast bulk change operations on the collection, this class allows
multiple combinations of changes to be made to a set with equal efficiency.
Instance members of this class are not thread-safe.
The root of the binary tree that stores the collection. Contents are typically not entirely frozen.
The equality comparer.
The number of elements in this collection.
Caches an immutable instance that represents the current state of the collection.
Null if no immutable view has been created for the current version.
A number that increments every time the builder changes its contents.
Initializes a new instance of the class.
The set.
Gets the number of elements contained in the .
The number of elements contained in the .
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Gets or sets the key comparer.
The key comparer.
Gets the current version of the contents of this builder.
Gets the initial data to pass to a query or mutation method.
Gets or sets the root of this data structure.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Creates an immutable hash set based on the contents of this instance.
An immutable set.
This method is an O(n) operation, and approaches O(1) time as the number of
actual mutations to the set since the last call to this method approaches 0.
Adds the specified item.
The item.
True if the item did not already belong to the collection.
Removes the first occurrence of a specific object from the .
The object to remove from the .
true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
The is read-only.
Determines whether the contains a specific value.
The object to locate in the .
true if is found in the ; otherwise, false.
Removes all items from the .
The is read-only.
Removes all elements in the specified collection from the current set.
The collection of items to remove from the set.
Modifies the current set so that it contains only elements that are also in a specified collection.
The collection to compare to the current set.
Determines whether the current set is a proper (strict) subset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct subset of other; otherwise, false.
Determines whether the current set is a proper (strict) superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of other; otherwise, false.
Determines whether the current set is a subset of a specified collection.
The collection to compare to the current set.
true if the current set is a subset of other; otherwise, false.
Determines whether the current set is a superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of other; otherwise, false.
Determines whether the current set overlaps with the specified collection.
The collection to compare to the current set.
true if the current set and other share at least one common element; otherwise, false.
Determines whether the current set and the specified collection contain the same elements.
The collection to compare to the current set.
true if the current set is equal to other; otherwise, false.
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.
The collection to compare to the current set.
Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection.
The collection to compare to the current set.
Adds an item to the .
The object to add to the .
The is read-only.
See the interface.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Applies the result of some mutation operation to this instance.
The result.
Enumerates the contents of the collection in an allocation-free manner.
The builder being enumerated, if applicable.
The enumerator over the sorted dictionary whose keys are hash values.
The enumerator in use within an individual HashBucket.
The version of the builder (when applicable) that is being enumerated.
Initializes a new instance of the struct.
The root.
The builder, if applicable.
Gets the current element.
Gets the current element.
Advances the enumerator to the next element of the collection.
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
The collection was modified after the enumerator was created.
Sets the enumerator to its initial position, which is before the first element in the collection.
The collection was modified after the enumerator was created.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Throws an exception if the underlying builder's contents have been changed since enumeration started.
Thrown if the collection has changed.
The result of a mutation operation.
The change required element(s) to be added or removed from the collection.
No change was required (the operation ended in a no-op).
Contains all the keys in the collection that hash to the same value.
One of the values in this bucket.
Any other elements that hash to the same value.
This is null if and only if the entire bucket is empty (including ).
It's empty if has an element but no additional elements.
Initializes a new instance of the struct.
The first element.
The additional elements.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Returns an enumerator that iterates through the collection.
Adds the specified value.
The value.
The value comparer.
A description of the effect was on adding an element to this .
A new that contains the added value and any values already held by this .
Determines whether the contains the specified value.
The value.
The value comparer.
Searches the set for a given value and returns the equal value it finds, if any.
The value to search for.
The value comparer.
The value from the set that the search found, or the original value if the search yielded no match.
A value indicating whether the search was successful.
Removes the specified value if it exists in the collection.
The value.
The equality comparer.
A description of the effect was on adding an element to this .
A new that does not contain the removed value and any values already held by this .
Freezes this instance so that any further mutations require new memory allocations.
Enumerates all the elements in this instance.
The bucket being enumerated.
A value indicating whether this enumerator has been disposed.
The current position of this enumerator.
The enumerator that represents the current position over the of the .
Initializes a new instance of the struct.
The bucket.
Describes the positions the enumerator state machine may be in.
The first element has not yet been moved to.
We're at the of the containing bucket.
We're enumerating the in the bucket.
The end of enumeration has been reached.
Gets the current element.
Gets the current element.
Advances the enumerator to the next element of the collection.
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
The collection was modified after the enumerator was created.
Sets the enumerator to its initial position, which is before the first element in the collection.
The collection was modified after the enumerator was created.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Throws an if this enumerator has been disposed.
Description of the current data structure as input into a
mutating or query method.
The root of the data structure for the collection.
The equality comparer.
The current number of elements in the collection.
Initializes a new instance of the struct.
The set.
Initializes a new instance of the struct.
The root.
The equality comparer.
The count.
Gets the root of the data structure for the collection.
Gets the equality comparer.
Gets the current number of elements in the collection.
Interpretations for a member.
The member describes an adjustment to the previous count of the collection.
The member describes the actual count of the collection.
Describes the result of a mutation on the immutable data structure.
The root node of the data structure after the mutation.
Either the number of elements added or removed from the collection as a result of the operation (a negative number represents removed elements),
or the total number of elements in the collection after the mutation. The appropriate interpretation of this value is indicated by the
field.
Whether to consider the field to be a count adjustment or total count.
Initializes a new instance of the struct.
The root node of the result.
The total element count or a count adjustment.
The appropriate interpretation for the parameter.
Gets the root node of the data structure after the mutation.
Gets either the number of elements added or removed from the collection as a result of the operation (a negative number represents removed elements),
or the total number of elements in the collection after the mutation. The appropriate interpretation of this value is indicated by the
property.
Gets the appropriate interpretation for the property; whether to be a count adjustment or total count.
Returns an immutable hash set that captures the result of this mutation.
The prior version of the set. Used to capture the equality comparer and previous count, when applicable.
The new collection.
Enumerates over a sorted dictionary used for hash buckets.
The root of the sorted dictionary to enumerate.
Initializes a new instance of the struct.
The root.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
An empty immutable hash set with the default comparer for .
The singleton delegate that freezes the contents of hash buckets when the root of the data structure is frozen.
The equality comparer used to hash the elements in the collection.
The number of elements in this collection.
The sorted dictionary that this hash set wraps. The key is the hash code and the value is the bucket of all items that hashed to it.
Initializes a new instance of the class.
The equality comparer.
Initializes a new instance of the class.
The sorted set that this set wraps.
The equality comparer used by this instance.
The number of elements in this collection.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See .
See the interface.
Gets the root node (for testing purposes).
Gets a data structure that captures the current state of this map, as an input into a query or mutating function.
Creates a collection with the same contents as this collection that
can be efficiently mutated across multiple operations using standard
mutable interfaces.
This is an O(1) operation and results in only a single (small) memory allocation.
The mutable collection that is returned is *not* thread-safe.
See the interface.
See the interface.
Searches the set for a given value and returns the equal value it finds, if any.
The value to search for.
The value from the set that the search found, or the original value if the search yielded no match.
A value indicating whether the search was successful.
This can be useful when you want to reuse a previously stored reference instead of
a newly constructed one (so that more sharing of references can occur) or to look up
a value that has more complete data than the value you currently have, although their
comparer functions indicate they are equal.
See the interface.
See the interface.
See the interface.
Produces a set that contains elements either in this set or a given sequence, but not both.
The other sequence of items.
The new set.
Checks whether a given sequence of items entirely describe the contents of this set.
The sequence of items to check against this set.
A value indicating whether the sets are equal.
Determines whether the current set is a property (strict) subset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct subset of ; otherwise, false.
Determines whether the current set is a correct superset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct superset of ; otherwise, false.
Determines whether a set is a subset of a specified collection.
The collection to compare to the current set.
true if the current set is a subset of ; otherwise, false.
Determines whether the current set is a superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of ; otherwise, false.
Determines whether the current set overlaps with the specified collection.
The collection to compare to the current set.
true if the current set and share at least one common element; otherwise, false.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Produces a set that contains elements either in this set or a given sequence, but not both.
The other sequence of items.
The new set.
See the interface.
See the interface.
See
See
See
See
See
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Performs the set operation on a given data structure.
Wraps the specified data structure with an immutable collection wrapper.
The root of the data structure.
The equality comparer.
The number of elements in the data structure.
The immutable collection.
Wraps the specified data structure with an immutable collection wrapper.
The root of the data structure.
The adjusted count if the root has changed.
The immutable collection.
Bulk adds entries to the set.
The entries to add.
true when being called from to avoid .
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
Contains interlocked exchange mechanisms for immutable collections.
Mutates a value in-place with optimistic locking transaction semantics
via a specified transformation function.
The transformation is retried as many times as necessary to win the optimistic locking race.
The type of data.
The variable or field to be changed, which may be accessed by multiple threads.
A function that mutates the value. This function should be side-effect free,
as it may run multiple times when races occur with other threads.
true if the location's value is changed by applying the result of the
function;
false if the location's value remained the same because the last
invocation of returned the existing value.
Mutates a value in-place with optimistic locking transaction semantics
via a specified transformation function.
The transformation is retried as many times as necessary to win the optimistic locking race.
The type of data.
The type of argument passed to the .
The variable or field to be changed, which may be accessed by multiple threads.
A function that mutates the value. This function should be side-effect free,
as it may run multiple times when races occur with other threads.
The argument to pass to .
true if the location's value is changed by applying the result of the
function;
false if the location's value remained the same because the last
invocation of returned the existing value.
Assigns a field or variable containing an immutable array to the specified value and returns the previous value.
The type of element stored by the array.
The field or local variable to change.
The new value to assign.
The prior value at the specified .
Assigns a field or variable containing an immutable array to the specified value
if it is currently equal to another specified value. Returns the previous value.
The type of element stored by the array.
The field or local variable to change.
The new value to assign.
The value to check equality for before assigning.
The prior value at the specified .
Assigns a field or variable containing an immutable array to the specified value
if it is has not yet been initialized.
The type of element stored by the array.
The field or local variable to change.
The new value to assign.
True if the field was assigned the specified value; false if it was previously initialized.
Obtains the value for the specified key from a dictionary, or adds a new value to the dictionary where the key did not previously exist.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The type of argument supplied to the value factory.
The variable or field to atomically update if the specified is not in the dictionary.
The key for the value to retrieve or add.
The function to execute to obtain the value to insert into the dictionary if the key is not found.
The argument to pass to the value factory.
The value obtained from the dictionary or if it was not present.
Obtains the value for the specified key from a dictionary, or adds a new value to the dictionary where the key did not previously exist.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key for the value to retrieve or add.
The function to execute to obtain the value to insert into the dictionary if the key is not found.
This delegate will not be invoked more than once.
The value obtained from the dictionary or if it was not present.
Obtains the value for the specified key from a dictionary, or adds a new value to the dictionary where the key did not previously exist.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key for the value to retrieve or add.
The value to add to the dictionary if one is not already present.
The value obtained from the dictionary or if it was not present.
Obtains the value from a dictionary after having added it or updated an existing entry.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key for the value to add or update.
The function that receives the key and returns a new value to add to the dictionary when no value previously exists.
The function that receives the key and prior value and returns the new value with which to update the dictionary.
The added or updated value.
Obtains the value from a dictionary after having added it or updated an existing entry.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key for the value to add or update.
The value to use if no previous value exists.
The function that receives the key and prior value and returns the new value with which to update the dictionary.
The added or updated value.
Adds the specified key and value to the dictionary if no colliding key already exists in the dictionary.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key to add, if is not already defined in the dictionary.
The value to add.
true if the key was not previously set in the dictionary and the value was set; false otherwise.
Sets the specified key to the given value if the key already is set to a specific value.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key to update.
The new value to set.
The value that must already be set in the dictionary in order for the update to succeed.
true if the key and comparison value were present in the dictionary and the update was made; false otherwise.
Removes an entry from the dictionary with the specified key if it is defined and returns its value.
The type of key stored by the dictionary.
The type of value stored by the dictionary.
The variable or field to atomically update if the specified is not in the dictionary.
The key to remove.
Receives the value from the pre-existing entry, if one exists.
true if the key was found and removed; false otherwise.
Pushes a new element onto a stack.
The type of elements stored in the stack.
The variable or field to atomically update.
The value popped from the stack, if it was non-empty.
true if an element was removed from the stack; false otherwise.
Pushes a new element onto a stack.
The type of elements stored in the stack.
The variable or field to atomically update.
The value to push.
Atomically removes the element at the head of a queue and returns it to the caller, if the queue is not empty.
The type of element stored in the queue.
The variable or field to atomically update.
Receives the value from the head of the queue, if the queue is non-empty.
true if the queue was not empty and the head element was removed; false otherwise.
Atomically enqueues an element to the tail of a queue.
The type of element stored in the queue.
The variable or field to atomically update.
The value to enqueue.
A set of initialization methods for instances of .
Returns an empty collection.
The type of items stored by the collection.
The immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable list builder.
The type of items stored by the collection.
The immutable collection builder.
Enumerates a sequence exactly once and produces an immutable list of its contents.
The type of element in the sequence.
The sequence to enumerate.
An immutable list.
Replaces the first equal element in the list with the specified element.
The list to search.
The element to replace.
The element to replace the old element with.
The new list -- even if the value being replaced is equal to the new value for that position.
Thrown when the old value does not exist in the list.
Removes the specified value from this list.
The list to search.
The value to remove.
A new list with the element removed, or this list if the element is not in this list.
Removes the specified values from this list.
The list to search.
The items to remove if matches are found in this list.
A new list with the elements removed.
Searches for the specified object and returns the zero-based index of the
first occurrence within the .
The list to search.
The object to locate in the . The value
can be null for reference types.
The zero-based index of the first occurrence of item within the range of
elements in the that extends from index
to the last element, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the .
The list to search.
The object to locate in the . The value
can be null for reference types.
The equality comparer to use in the search.
The zero-based index of the first occurrence of item within the range of
elements in the that extends from index
to the last element, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the
that extends from the specified index to the last element.
The list to search.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The zero-based index of the first occurrence of item within the range of
elements in the that extends from index
to the last element, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the
that extends from the specified index to the last element.
The list to search.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The number of elements in the section to search.
The zero-based index of the first occurrence of item within the range of
elements in the that extends from index
to the last element, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the entire .
The list to search.
The object to locate in the . The value
can be null for reference types.
The zero-based index of the last occurrence of item within the entire the
, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the entire .
The list to search.
The object to locate in the . The value
can be null for reference types.
The equality comparer to use in the search.
The zero-based index of the last occurrence of item within the entire the
, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the
that extends from the first element to the specified index.
The list to search.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the backward search.
The zero-based index of the last occurrence of item within the range of elements
in the that extends from the first element
to index, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the
that extends from the first element to the specified index.
The list to search.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The zero-based index of the last occurrence of item within the range of elements
in the that extends from the first element
to index, if found; otherwise, -1.
Contains the inner Builder class.
An immutable list implementation.
The type of elements in the set.
A list that mutates with little or no memory allocations,
can produce and/or build on immutable list instances very efficiently.
While and other bulk change methods
already provide fast bulk change operations on the collection, this class allows
multiple combinations of changes to be made to a set with equal efficiency.
Instance members of this class are not thread-safe.
The binary tree used to store the contents of the list. Contents are typically not entirely frozen.
Caches an immutable instance that represents the current state of the collection.
Null if no immutable view has been created for the current version.
A number that increments every time the builder changes its contents.
The object callers may use to synchronize access to this collection.
Initializes a new instance of the class.
A list to act as the basis for a new list.
Gets the number of elements in this list.
Gets a value indicating whether this instance is read-only.
Always false.
Gets the current version of the contents of this builder.
Gets or sets the root node that represents the data in this collection.
Gets or sets the value for a given index into the list.
The index of the desired element.
The value at the specified index.
Gets the element in the collection at a given index.
See
See
See
See
See
See
See
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Performs the specified action on each element of the list.
The System.Action<T> delegate to perform on each element of the list.
Copies the entire ImmutableList<T> to a compatible one-dimensional
array, starting at the beginning of the target array.
The one-dimensional System.Array that is the destination of the elements
copied from ImmutableList<T>. The System.Array must have
zero-based indexing.
Copies the entire ImmutableList<T> to a compatible one-dimensional
array, starting at the specified index of the target array.
The one-dimensional System.Array that is the destination of the elements
copied from ImmutableList<T>. The System.Array must have
zero-based indexing.
The zero-based index in array at which copying begins.
Copies a range of elements from the ImmutableList<T> to
a compatible one-dimensional array, starting at the specified index of the
target array.
The zero-based index in the source ImmutableList<T> at
which copying begins.
The one-dimensional System.Array that is the destination of the elements
copied from ImmutableList<T>. The System.Array must have
zero-based indexing.
The zero-based index in array at which copying begins.
The number of elements to copy.
Creates a shallow copy of a range of elements in the source ImmutableList<T>.
The zero-based ImmutableList<T> index at which the range
starts.
The number of elements in the range.
A shallow copy of a range of elements in the source ImmutableList<T>.
Converts the elements in the current ImmutableList<T> to
another type, and returns a list containing the converted elements.
A System.Converter<TInput,TOutput> delegate that converts each element from
one type to another type.
The type of the elements of the target array.
A ImmutableList<T> of the target type containing the converted
elements from the current ImmutableList<T>.
Determines whether the ImmutableList<T> contains elements
that match the conditions defined by the specified predicate.
The System.Predicate<T> delegate that defines the conditions of the elements
to search for.
true if the ImmutableList<T> contains one or more elements
that match the conditions defined by the specified predicate; otherwise,
false.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the first occurrence within the entire ImmutableList<T>.
The System.Predicate<T> delegate that defines the conditions of the element
to search for.
The first element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type T.
Retrieves all the elements that match the conditions defined by the specified
predicate.
The System.Predicate<T> delegate that defines the conditions of the elements
to search for.
A ImmutableList<T> containing all the elements that match
the conditions defined by the specified predicate, if found; otherwise, an
empty ImmutableList<T>.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the entire ImmutableList<T>.
The System.Predicate<T> delegate that defines the conditions of the element
to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by match, if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the ImmutableList<T> that extends
from the specified index to the last element.
The zero-based starting index of the search.
The System.Predicate<T> delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by match, if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the ImmutableList<T> that starts
at the specified index and contains the specified number of elements.
The zero-based starting index of the search.
The number of elements in the section to search.
The System.Predicate<T> delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by match, if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the last occurrence within the entire ImmutableList<T>.
The System.Predicate<T> delegate that defines the conditions of the element
to search for.
The last element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type T.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the entire ImmutableList<T>.
The System.Predicate<T> delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by match, if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the ImmutableList<T> that extends
from the first element to the specified index.
The zero-based starting index of the backward search.
The System.Predicate<T> delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by match, if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the ImmutableList<T> that contains
the specified number of elements and ends at the specified index.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The System.Predicate<T> delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by match, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the ImmutableList<T>
that extends from the specified index to the last element.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The zero-based index of the first occurrence of item within the range of
elements in the ImmutableList<T> that extends from index
to the last element, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the ImmutableList<T>
that starts at the specified index and contains the specified number of elements.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The number of elements in the section to search.
The zero-based index of the first occurrence of item within the range of
elements in the ImmutableList<T> that starts at index and
contains count number of elements, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the ImmutableList<T>
that starts at the specified index and contains the specified number of elements.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The number of elements in the section to search.
The equality comparer to use in the search.
If null, is used.
The zero-based index of the first occurrence of item within the range of
elements in the ImmutableList<T> that starts at index and
contains count number of elements, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the ImmutableList<T>
that contains the specified number of elements and ends at the specified
index.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based index of the last occurrence of item within the range of elements
in the ImmutableList<T> that contains count number of elements
and ends at index, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the ImmutableList<T>
that contains the specified number of elements and ends at the specified
index.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based starting index of the backward search.
The zero-based index of the last occurrence of item within the range of elements
in the ImmutableList<T> that contains count number of elements
and ends at index, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the ImmutableList<T>
that contains the specified number of elements and ends at the specified
index.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The zero-based index of the last occurrence of item within the range of elements
in the ImmutableList<T> that contains count number of elements
and ends at index, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the ImmutableList<T>
that contains the specified number of elements and ends at the specified
index.
The object to locate in the ImmutableList<T>. The value
can be null for reference types.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The equality comparer to use in the search.
The zero-based index of the last occurrence of item within the range of elements
in the ImmutableList<T> that contains count number of elements
and ends at index, if found; otherwise, -1.
Determines whether every element in the ImmutableList<T>
matches the conditions defined by the specified predicate.
The System.Predicate<T> delegate that defines the conditions to check against
the elements.
true if every element in the ImmutableList<T> matches the
conditions defined by the specified predicate; otherwise, false. If the list
has no elements, the return value is true.
Adds the elements of a sequence to the end of this collection.
The sequence whose elements should be appended to this collection.
The sequence itself cannot be null, but it can contain elements that are
null, if type is a reference type.
Inserts the elements of a collection into the ImmutableList<T>
at the specified index.
The zero-based index at which the new elements should be inserted.
The collection whose elements should be inserted into the ImmutableList<T>.
The collection itself cannot be null, but it can contain elements that are
null, if type T is a reference type.
Removes all the elements that match the conditions defined by the specified
predicate.
The System.Predicate<T> delegate that defines the conditions of the elements
to remove.
The number of elements removed from the ImmutableList<T>
Reverses the order of the elements in the entire ImmutableList<T>.
Reverses the order of the elements in the specified range.
The zero-based starting index of the range to reverse.
The number of elements in the range to reverse.
Sorts the elements in the entire ImmutableList<T> using
the default comparer.
Sorts the elements in the entire ImmutableList<T> using
the specified System.Comparison<T>.
The to use when comparing elements.
is null.
Sorts the elements in the entire ImmutableList<T> using
the specified comparer.
The implementation to use when comparing
elements, or null to use .
Sorts the elements in a range of elements in ImmutableList<T>
using the specified comparer.
The zero-based starting index of the range to sort.
The length of the range to sort.
The implementation to use when comparing
elements, or null to use .
Searches the entire sorted System.Collections.Generic.List<T> for an element
using the default comparer and returns the zero-based index of the element.
The object to locate. The value can be null for reference types.
The zero-based index of item in the sorted System.Collections.Generic.List<T>,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of System.Collections.Generic.List<T>.Count.
The default comparer System.Collections.Generic.Comparer<T>.Default cannot
find an implementation of the System.IComparable<T> generic interface or
the System.IComparable interface for type T.
Searches the entire sorted System.Collections.Generic.List<T> for an element
using the specified comparer and returns the zero-based index of the element.
The object to locate. The value can be null for reference types.
The System.Collections.Generic.IComparer<T> implementation to use when comparing
elements.-or-null to use the default comparer System.Collections.Generic.Comparer<T>.Default.
The zero-based index of item in the sorted System.Collections.Generic.List<T>,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of System.Collections.Generic.List<T>.Count.
comparer is null, and the default comparer System.Collections.Generic.Comparer<T>.Default
cannot find an implementation of the System.IComparable<T> generic interface
or the System.IComparable interface for type T.
Searches a range of elements in the sorted System.Collections.Generic.List<T>
for an element using the specified comparer and returns the zero-based index
of the element.
The zero-based starting index of the range to search.
The length of the range to search.
The object to locate. The value can be null for reference types.
The System.Collections.Generic.IComparer<T> implementation to use when comparing
elements, or null to use the default comparer System.Collections.Generic.Comparer<T>.Default.
The zero-based index of item in the sorted System.Collections.Generic.List<T>,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of System.Collections.Generic.List<T>.Count.
index is less than 0.-or-count is less than 0.
index and count do not denote a valid range in the System.Collections.Generic.List<T>.
comparer is null, and the default comparer System.Collections.Generic.Comparer<T>.Default
cannot find an implementation of the System.IComparable<T> generic interface
or the System.IComparable interface for type T.
Creates an immutable list based on the contents of this instance.
An immutable list.
This method is an O(n) operation, and approaches O(1) time as the number of
actual mutations to the set since the last call to this method approaches 0.
Adds an item to the .
The object to add to the .
The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection,
Clears this instance.
Determines whether the contains a specific value.
The object to locate in the .
true if the is found in the ; otherwise, false.
Determines the index of a specific item in the .
The object to locate in the .
The index of if found in the list; otherwise, -1.
Inserts an item to the at the specified index.
The zero-based index at which should be inserted.
The object to insert into the .
Gets a value indicating whether the has a fixed size.
true if the has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Removes the first occurrence of a specific object from the .
The object to remove from the .
Gets or sets the at the specified index.
The .
The index.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
An empty immutable list.
The root node of the AVL tree that stores this set.
Initializes a new instance of the class.
Initializes a new instance of the class.
The root of the AVL tree with the contents of this set.
See the interface.
Searches the entire sorted for an element
using the default comparer and returns the zero-based index of the element.
The object to locate. The value can be null for reference types.
The zero-based index of item in the sorted ,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of .
The default comparer cannot
find an implementation of the generic interface or
the interface for type .
Searches the entire sorted for an element
using the specified comparer and returns the zero-based index of the element.
The object to locate. The value can be null for reference types.
The implementation to use when comparing
elements.-or-null to use the default comparer .
The zero-based index of item in the sorted ,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of .
is null, and the default comparer
cannot find an implementation of the generic interface
or the interface for type .
Searches a range of elements in the sorted
for an element using the specified comparer and returns the zero-based index
of the element.
The zero-based starting index of the range to search.
The length of the range to search.
The object to locate. The value can be null for reference types.
The implementation to use when comparing
elements, or null to use the default comparer .
The zero-based index of item in the sorted ,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of .
is less than 0.-or- is less than 0.
and do not denote a valid range in the .
is null, and the default comparer
cannot find an implementation of the generic interface
or the interface for type .
See the interface.
See the interface.
See the interface.
See .
See the interface.
Gets the element of the set at the given index.
The 0-based index of the element in the set to return.
The element at the given position.
Thrown from getter when is negative or not less than .
Gets the element in the collection at a given index.
Creates a collection with the same contents as this collection that
can be efficiently mutated across multiple operations using standard
mutable interfaces.
This is an O(1) operation and results in only a single (small) memory allocation.
The mutable collection that is returned is *not* thread-safe.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Removes the specified values from this list.
The starting index to begin removal.
The number of elements to remove.
A new list with the elements removed.
Removes the specified values from this list.
The items to remove if matches are found in this list.
A new list with the elements removed.
Removes the specified values from this list.
The items to remove if matches are found in this list.
The equality comparer to use in the search.
If null, is used.
A new list with the elements removed.
See the interface.
Removes all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to remove.
The new list.
See the interface.
See the interface.
See the interface.
Reverses the order of the elements in the entire .
The reversed list.
Reverses the order of the elements in the specified range.
The zero-based starting index of the range to reverse.
The number of elements in the range to reverse.
The reversed list.
Sorts the elements in the entire using
the default comparer.
Sorts the elements in the entire using
the specified .
The to use when comparing elements.
The sorted list.
is null.
Sorts the elements in the entire using
the specified comparer.
The implementation to use when comparing
elements, or null to use the default comparer .
The sorted list.
Sorts the elements in a range of elements in
using the specified comparer.
The zero-based starting index of the range to sort.
The length of the range to sort.
The implementation to use when comparing
elements, or null to use the default comparer .
The sorted list.
Performs the specified action on each element of the list.
The System.Action<T> delegate to perform on each element of the list.
Copies the entire to a compatible one-dimensional
array, starting at the beginning of the target array.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
Copies the entire to a compatible one-dimensional
array, starting at the specified index of the target array.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
The zero-based index in array at which copying begins.
Copies a range of elements from the to
a compatible one-dimensional array, starting at the specified index of the
target array.
The zero-based index in the source at
which copying begins.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
The zero-based index in array at which copying begins.
The number of elements to copy.
Creates a shallow copy of a range of elements in the source .
The zero-based index at which the range
starts.
The number of elements in the range.
A shallow copy of a range of elements in the source .
Converts the elements in the current to
another type, and returns a list containing the converted elements.
A delegate that converts each element from
one type to another type.
The type of the elements of the target array.
A of the target type containing the converted
elements from the current .
Determines whether the contains elements
that match the conditions defined by the specified predicate.
The delegate that defines the conditions of the elements
to search for.
true if the contains one or more elements
that match the conditions defined by the specified predicate; otherwise,
false.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the first occurrence within the entire .
The delegate that defines the conditions of the element
to search for.
The first element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type .
Retrieves all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to search for.
A containing all the elements that match
the conditions defined by the specified predicate, if found; otherwise, an
empty .
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the entire .
The delegate that defines the conditions of the element
to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the that extends
from the specified index to the last element.
The zero-based starting index of the search.
The delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the that starts
at the specified index and contains the specified number of elements.
The zero-based starting index of the search.
The number of elements in the section to search.
The delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the last occurrence within the entire .
The delegate that defines the conditions of the element
to search for.
The last element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type .
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the entire .
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the that extends
from the first element to the specified index.
The zero-based starting index of the backward search.
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the that contains
the specified number of elements and ends at the specified index.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the
that starts at the specified index and contains the specified number of elements.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The number of elements in the section to search.
The equality comparer to use in the search.
The zero-based index of the first occurrence of within the range of
elements in the that starts at and
contains number of elements, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the
that contains the specified number of elements and ends at the specified
index.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The equality comparer to use in the search.
The zero-based index of the last occurrence of within the range of elements
in the that contains number of elements
and ends at , if found; otherwise, -1.
Determines whether every element in the
matches the conditions defined by the specified predicate.
The delegate that defines the conditions to check against
the elements.
true if every element in the matches the
conditions defined by the specified predicate; otherwise, false. If the list
has no elements, the return value is true.
See the interface.
See the interface.
See the interface.
See the interface.
Inserts the specified value at the specified index.
The index at which to insert the value.
The element to add.
The new immutable list.
Inserts the specified value at the specified index.
The index at which to insert the value.
The elements to add.
The new immutable list.
See the interface.
See the interface.
See the interface.
See the interface.
Removes the element at the specified index.
The index.
A new list with the elements removed.
Replaces an element in the list at a given position with the specified element.
The position in the list of the element to replace.
The element to replace the old element with.
The new list.
Replaces an element in the list with the specified element.
The element to replace.
The element to replace the old element with.
The equality comparer to use in the search.
If null, is used.
The new list.
Thrown when the old value does not exist in the list.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Inserts the specified index.
The index.
The item.
Always thrown.
Removes the value at the specified index.
The index.
Always thrown.
Gets or sets the value at the specified index.
Thrown from getter when is negative or not less than .
Always thrown from the setter.
Adds the specified item.
The item.
Always thrown.
Clears this instance.
Always thrown.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Removes the specified item.
The item.
Nothing. An exception is always thrown.
Always thrown.
See the interface.
Adds an item to the .
The object to add to the .
Nothing. An exception is always thrown.
Always thrown.
Removes the item at the specified index.
The zero-based index of the item to remove.
Always thrown.
Clears this instance.
Always thrown.
Determines whether the contains a specific value.
The object to locate in the .
true if the is found in the ; otherwise, false.
Determines the index of a specific item in the .
The object to locate in the .
The index of if found in the list; otherwise, -1.
Inserts an item to the at the specified index.
The zero-based index at which should be inserted.
The object to insert into the .
Always thrown.
Gets a value indicating whether the has a fixed size.
true if the has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Removes the first occurrence of a specific object from the .
The object to remove from the .
Always thrown.
Gets or sets the at the specified index.
The .
The index.
The value at the specified index.
Thrown from getter when is negative or not less than .
Always thrown from the setter.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
CAUTION: when this enumerator is actually used as a valuetype (not boxed) do NOT copy it by assigning to a second variable
or by passing it to another method. When this enumerator is disposed of it returns a mutable reference type stack to a resource pool,
and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around) there is a risk
that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data
corruption and/or exceptions.
Returns the root of the list
Creates a new sorted set wrapper for a node tree.
The root of the collection.
The immutable sorted set instance.
Attempts to discover an instance beneath some enumerable sequence
if one exists.
The sequence that may have come from an immutable list.
Receives the concrete typed value if one can be found.
true if the cast was successful; false otherwise.
Tests whether a value is one that might be found in this collection.
The value to test.
true if this value might appear in the collection.
This implementation comes from .
Creates a wrapping collection type around a root node.
The root node to wrap.
A wrapping collection type for the new tree.
Creates an immutable list with the contents from a sequence of elements.
The sequence of elements from which to create the list.
The immutable list.
Enumerates the contents of a binary tree.
This struct can and should be kept in exact sync with the other binary tree enumerators:
, , and .
CAUTION: when this enumerator is actually used as a valuetype (not boxed) do NOT copy it by assigning to a second variable
or by passing it to another method. When this enumerator is disposed of it returns a mutable reference type stack to a resource pool,
and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around) there is a risk
that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data
corruption and/or exceptions.
The resource pool of reusable mutable stacks for purposes of enumeration.
We utilize this resource pool to make "allocation free" enumeration achievable.
The builder being enumerated, if applicable.
A unique ID for this instance of this enumerator.
Used to protect pooled objects from use after they are recycled.
The starting index of the collection at which to begin enumeration.
The number of elements to include in the enumeration.
The number of elements left in the enumeration.
A value indicating whether this enumerator walks in reverse order.
The set being enumerated.
The stack to use for enumerating the binary tree.
The node currently selected.
The version of the builder (when applicable) that is being enumerated.
Initializes an structure.
The root of the set to be enumerated.
The builder, if applicable.
The index of the first element to enumerate.
The number of elements in this collection.
true if the list should be enumerated in reverse order.
The current element.
The current element.
Disposes of this enumerator and returns the stack reference to the resource pool.
Advances enumeration to the next element.
A value indicating whether there is another element in the enumeration.
Restarts enumeration.
Resets the stack used for enumeration.
Obtains the right branch of the given node (or the left, if walking in reverse).
Obtains the left branch of the given node (or the right, if walking in reverse).
Throws an if this enumerator has been disposed.
Throws an exception if the underlying builder's contents have been changed since enumeration started.
Thrown if the collection has changed.
Pushes this node and all its Left descendants onto the stack.
The starting node to push onto the stack.
A node in the AVL tree storing this set.
The default empty node.
The key associated with this node.
A value indicating whether this node has been frozen (made immutable).
Nodes must be frozen before ever being observed by a wrapping collection type
to protect collections from further mutations.
The depth of the tree beneath this node.
The number of elements contained by this subtree starting at this node.
If this node would benefit from saving 4 bytes, we could have only a few nodes
scattered throughout the graph actually record the count of nodes beneath them.
Those without the count could query their descendants, which would often short-circuit
when they hit a node that *does* include a count field.
The left tree.
The right tree.
Initializes a new instance of the class
that is pre-frozen.
Initializes a new instance of the class
that is not yet frozen.
The value stored by this node.
The left branch.
The right branch.
Whether this node is prefrozen.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the height of the tree beneath this node.
Gets the left branch of this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the right branch of this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the value represented by the current node.
Gets the number of elements contained by this subtree starting at this node.
Gets the key.
Gets the element of the set at the given index.
The 0-based index of the element in the set to return.
The element at the given position.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
The builder, if applicable.
A that can be used to iterate through the collection.
Creates a node tree that contains the contents of a list.
An indexable list with the contents that the new node tree should contain.
The starting index within that should be captured by the node tree.
The number of elements from that should be captured by the node tree.
The root of the created node tree.
Adds the specified key to the tree.
The key.
The new tree.
Adds a value at a given index to this node.
The location for the new value.
The value to add.
The new tree.
Adds the specified keys to the tree.
The keys.
The new tree.
Adds a collection of values at a given index to this node.
The location for the new values.
The values to add.
The new tree.
Removes a value at a given index to this node.
The location for the new value.
The new tree.
Removes all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to remove.
The new node tree.
Replaces a value at a given index.
The location for the new value.
The new value for the node.
The new tree.
Reverses the order of the elements in the entire .
The reversed list.
Reverses the order of the elements in the specified range.
The zero-based starting index of the range to reverse.
The number of elements in the range to reverse.
The reversed list.
Sorts the elements in the entire using
the default comparer.
Sorts the elements in the entire using
the specified .
The to use when comparing elements.
The sorted list.
Sorts the elements in the entire using
the specified comparer.
The implementation to use when comparing
elements, or null to use the default comparer .
The sorted list.
Sorts the elements in a range of elements in
using the specified comparer.
The zero-based starting index of the range to sort.
The length of the range to sort.
The implementation to use when comparing
elements, or null to use the default comparer .
The sorted list.
Searches a range of elements in the sorted
for an element using the specified comparer and returns the zero-based index
of the element.
The zero-based starting index of the range to search.
The length of the range to search.
The object to locate. The value can be null for reference types.
The implementation to use when comparing
elements, or null to use the default comparer .
The zero-based index of item in the sorted ,
if item is found; otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or, if there is
no larger element, the bitwise complement of .
is less than 0.-or- is less than 0.
and do not denote a valid range in the .
is null, and the default comparer
cannot find an implementation of the generic interface
or the interface for type .
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the
that starts at the specified index and contains the specified number of elements.
The object to locate in the . The value
can be null for reference types.
The equality comparer to use for testing the match of two elements.
The zero-based index of the first occurrence of within the entire
, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
first occurrence within the range of elements in the
that starts at the specified index and contains the specified number of elements.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the search. 0 (zero) is valid in an empty
list.
The number of elements in the section to search.
The equality comparer to use in the search.
If null, is used.
The zero-based index of the first occurrence of within the range of
elements in the that starts at and
contains number of elements, if found; otherwise, -1.
Searches for the specified object and returns the zero-based index of the
last occurrence within the range of elements in the
that contains the specified number of elements and ends at the specified
index.
The object to locate in the . The value
can be null for reference types.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The equality comparer to use for testing the match of two elements.
The zero-based index of the last occurrence of within the range of elements
in the that contains number of elements
and ends at , if found; otherwise, -1.
Copies the entire to a compatible one-dimensional
array, starting at the beginning of the target array.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
Copies the entire to a compatible one-dimensional
array, starting at the specified index of the target array.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
The zero-based index in at which copying begins.
Copies a range of elements from the to
a compatible one-dimensional array, starting at the specified index of the
target array.
The zero-based index in the source at
which copying begins.
The one-dimensional that is the destination of the elements
copied from . The must have
zero-based indexing.
The zero-based index in at which copying begins.
The number of elements to copy.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Converts the elements in the current to
another type, and returns a list containing the converted elements.
A delegate that converts each element from
one type to another type.
The type of the elements of the target array.
A node tree with the transformed list.
Determines whether every element in the
matches the conditions defined by the specified predicate.
The delegate that defines the conditions to check against
the elements.
true if every element in the matches the
conditions defined by the specified predicate; otherwise, false. If the list
has no elements, the return value is true.
Determines whether the contains elements
that match the conditions defined by the specified predicate.
The delegate that defines the conditions of the elements
to search for.
true if the contains one or more elements
that match the conditions defined by the specified predicate; otherwise,
false.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the first occurrence within the entire .
The delegate that defines the conditions of the element
to search for.
The first element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type .
Retrieves all the elements that match the conditions defined by the specified
predicate.
The delegate that defines the conditions of the elements
to search for.
A containing all the elements that match
the conditions defined by the specified predicate, if found; otherwise, an
empty .
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the entire .
The delegate that defines the conditions of the element
to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the that extends
from the specified index to the last element.
The zero-based starting index of the search.
The delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the first occurrence within
the range of elements in the that starts
at the specified index and contains the specified number of elements.
The zero-based starting index of the search.
The number of elements in the section to search.
The delegate that defines the conditions of the element to search for.
The zero-based index of the first occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the last occurrence within the entire .
The delegate that defines the conditions of the element
to search for.
The last element that matches the conditions defined by the specified predicate,
if found; otherwise, the default value for type .
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the entire .
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the that extends
from the first element to the specified index.
The zero-based starting index of the backward search.
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Searches for an element that matches the conditions defined by the specified
predicate, and returns the zero-based index of the last occurrence within
the range of elements in the that contains
the specified number of elements and ends at the specified index.
The zero-based starting index of the backward search.
The number of elements in the section to search.
The delegate that defines the conditions of the element
to search for.
The zero-based index of the last occurrence of an element that matches the
conditions defined by , if found; otherwise, -1.
Freezes this node and all descendant nodes so that any mutations require a new instance of the nodes.
AVL rotate left operation.
The tree.
The rotated tree.
AVL rotate right operation.
The tree.
The rotated tree.
AVL rotate double-left operation.
The tree.
The rotated tree.
AVL rotate double-right operation.
The tree.
The rotated tree.
Returns a value indicating whether the tree is in balance.
The tree.
0 if the tree is in balance, a positive integer if the right side is heavy, or a negative integer if the left side is heavy.
Determines whether the specified tree is right heavy.
The tree.
true if [is right heavy] [the specified tree]; otherwise, false.
Determines whether the specified tree is left heavy.
Balances the specified tree.
The tree.
A balanced tree.
Balance the specified node. Allows for a large imbalance between left and
right nodes, but assumes left and right nodes are individually balanced.
The node.
A balanced node
Creates a node mutation, either by mutating this node (if not yet frozen) or by creating a clone of this node
with the described changes.
The left branch of the mutated node.
The right branch of the mutated node.
The mutated (or created) node.
Creates a node mutation, either by mutating this node (if not yet frozen) or by creating a clone of this node
with the described changes.
The new value for this node.
The mutated (or created) node.
A simple view of the immutable list that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The list to display in the debugger
Gets a simple debugger-viewable list.
A simple view of the immutable list that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The list to display in the debugger
Gets a simple debugger-viewable list.
A set of initialization methods for instances of .
Returns an empty collection.
The type of items stored by the collection.
The immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Retrieves the item at the head of the queue, and returns a queue with the head element removed.
The type of elements stored in the queue.
The queue to dequeue from.
Receives the value from the head of the queue.
The new queue with the head element removed.
Thrown when the stack is empty.
An immutable queue.
The type of elements stored in the queue.
The singleton empty queue.
Additional instances representing the empty queue may exist on deserialized instances.
Actually since this queue is a struct, instances don't even apply and there are no singletons.
The end of the queue that enqueued elements are pushed onto.
The end of the queue from which elements are dequeued.
Backing field for the property.
Initializes a new instance of the class.
The forward stack.
The backward stack.
Gets the empty queue.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the empty queue.
Gets an empty queue.
Gets the reversed stack.
Gets the element at the front of the queue.
Thrown when the queue is empty.
Adds an element to the back of the queue.
The value.
The new queue.
Adds an element to the back of the queue.
The value.
The new queue.
Returns a queue that is missing the front element.
A queue; never null.
Thrown when the queue is empty.
Retrieves the item at the head of the queue, and returns a queue with the head element removed.
Receives the value from the head of the queue.
The new queue with the head element removed.
Thrown when the queue is empty.
Returns a queue that is missing the front element.
A queue; never null.
Thrown when the queue is empty.
Returns an enumerator that iterates through the collection.
An that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
A memory allocation-free enumerator of .
The original queue being enumerated.
The remaining forwards stack of the queue being enumerated.
The remaining backwards stack of the queue being enumerated.
Its order is reversed when the field is first initialized.
Initializes a new instance of the struct.
The queue to enumerate.
The current element.
Advances enumeration to the next element.
A value indicating whether there is another element in the enumeration.
A memory allocation-free enumerator of .
The original queue being enumerated.
The remaining forwards stack of the queue being enumerated.
The remaining backwards stack of the queue being enumerated.
Its order is reversed when the field is first initialized.
A value indicating whether this enumerator has been disposed.
Initializes a new instance of the struct.
The queue to enumerate.
The current element.
The current element.
Advances enumeration to the next element.
A value indicating whether there is another element in the enumeration.
Restarts enumeration.
Disposes this instance.
Throws an if this
enumerator has already been disposed.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A set of initialization methods for instances of .
Returns an empty collection.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The immutable collection.
Returns an empty collection.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The immutable collection.
Returns an empty collection.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The value comparer.
The immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The value comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable sorted dictionary builder.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The immutable collection builder.
Creates a new immutable sorted dictionary builder.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The immutable collection builder.
Creates a new immutable sorted dictionary builder.
The type of keys stored by the dictionary.
The type of values stored by the dictionary.
The key comparer.
The value comparer.
The immutable collection builder.
Constructs an immutable sorted dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The type of value in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The function that will produce the value for the map from each sequence element.
The key comparer to use for the map.
The value comparer to use for the map.
The immutable map.
Constructs an immutable sorted dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The type of value in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The function that will produce the value for the map from each sequence element.
The key comparer to use for the map.
The immutable map.
Constructs an immutable sorted dictionary based on some transformation of a sequence.
The type of element in the sequence.
The type of key in the resulting map.
The type of value in the resulting map.
The sequence to enumerate to generate the map.
The function that will produce the key for the map from each sequence element.
The function that will produce the value for the map from each sequence element.
The immutable map.
Creates an immutable sorted dictionary given a sequence of key=value pairs.
The type of key in the map.
The type of value in the map.
The sequence of key=value pairs.
The key comparer to use when building the immutable map.
The value comparer to use for the immutable map.
An immutable map.
Creates an immutable sorted dictionary given a sequence of key=value pairs.
The type of key in the map.
The type of value in the map.
The sequence of key=value pairs.
The key comparer to use when building the immutable map.
An immutable map.
Creates an immutable sorted dictionary given a sequence of key=value pairs.
The type of key in the map.
The type of value in the map.
The sequence of key=value pairs.
An immutable map.
Contains the inner class.
An immutable sorted dictionary implementation.
The type of the key.
The type of the value.
A sorted dictionary that mutates with little or no memory allocations,
can produce and/or build on immutable sorted dictionary instances very efficiently.
This class allows multiple combinations of changes to be made to a set with equal efficiency.
Instance members of this class are not thread-safe.
The binary tree used to store the contents of the map. Contents are typically not entirely frozen.
The key comparer.
The value comparer.
The number of entries in the map.
Caches an immutable instance that represents the current state of the collection.
Null if no immutable view has been created for the current version.
A number that increments every time the builder changes its contents.
The object callers may use to synchronize access to this collection.
Initializes a new instance of the class.
A map to act as the basis for a new map.
See
See
See
See
Gets the number of elements in this map.
Gets a value indicating whether this instance is read-only.
Always false.
Gets the current version of the contents of this builder.
Gets or sets the root node that represents the data in this collection.
Gets or sets the value for a given key.
The key.
The value associated with the given key.
Gets a value indicating whether the object has a fixed size.
true if the object has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Gets an containing the keys of the .
An containing the keys of the object that implements .
Gets an containing the values in the .
An containing the values in the object that implements .
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Gets or sets the key comparer.
The key comparer.
Gets or sets the value comparer.
The value comparer.
Adds an element with the provided key and value to the object.
The to use as the key of the element to add.
The to use as the value of the element to add.
Determines whether the object contains an element with the specified key.
The key to locate in the object.
true if the contains an element with the key; otherwise, false.
Returns an object for the object.
An object for the object.
Removes the element with the specified key from the object.
The key of the element to remove.
Gets or sets the element with the specified key.
The key.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
See
See
See
See
See the interface.
See
See
See
See
See
See
See
See
Determines whether the
contains an element with the specified value.
The value to locate in the .
The value can be null for reference types.
true if the contains
an element with the specified value; otherwise, false.
Removes any entries from the dictionaries with keys that match those found in the specified sequence.
The keys for entries to remove from the dictionary.
Removes any entries from the dictionaries with keys that match those found in the specified sequence.
The keys for entries to remove from the dictionary.
Gets the value for a given key if a matching key exists in the dictionary.
The key to search for.
The value for the key, or the default value for type if no matching key was found.
Gets the value for a given key if a matching key exists in the dictionary.
The key to search for.
The default value to return if no matching key is found in the dictionary.
The value for the key, or if no matching key was found.
Creates an immutable sorted dictionary based on the contents of this instance.
An immutable map.
This method is an O(n) operation, and approaches O(1) time as the number of
actual mutations to the set since the last call to this method approaches 0.
An empty sorted dictionary with default sort and equality comparers.
The root node of the AVL tree that stores this map.
The number of elements in the set.
The comparer used to sort keys in this map.
The comparer used to detect equivalent values in this map.
Initializes a new instance of the class.
The key comparer.
The value comparer.
Initializes a new instance of the class.
The root of the tree containing the contents of the map.
The number of elements in this map.
The key comparer.
The value comparer.
See the interface.
Gets the value comparer used to determine whether values are equal.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Gets the keys.
Gets the values.
See the interface.
Gets the root node (for testing purposes).
Gets the with the specified key.
Gets or sets the with the specified key.
Creates a collection with the same contents as this collection that
can be efficiently mutated across multiple operations using standard
mutable interfaces.
This is an O(1) operation and results in only a single (small) memory allocation.
The mutable collection that is returned is *not* thread-safe.
See the interface.
See the interface.
Applies a given set of key=value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary.
The key=value pairs to set on the map. Any keys that conflict with existing keys will overwrite the previous values.
An immutable dictionary.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Determines whether the
contains an element with the specified value.
The value to locate in the .
The value can be null for reference types.
true if the contains
an element with the specified value; otherwise, false.
See the interface.
See the interface.
Applies a given set of key=value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary.
The key=value pairs to set on the map. Any keys that conflict with existing keys will overwrite the previous values.
An immutable dictionary.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Adds an element with the provided key and value to the .
The object to use as the key of the element to add.
The object to use as the value of the element to add.
is null.
An element with the same key already exists in the .
The is read-only.
Removes the element with the specified key from the .
The key of the element to remove.
true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original .
is null.
The is read-only.
Gets a value indicating whether the object has a fixed size.
true if the object has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
Gets an containing the keys of the .
An containing the keys of the object that implements .
Gets an containing the values in the .
An containing the values in the object that implements .
Adds an element with the provided key and value to the object.
The to use as the key of the element to add.
The to use as the value of the element to add.
Determines whether the object contains an element with the specified key.
The key to locate in the object.
true if the contains an element with the key; otherwise, false.
Returns an object for the object.
An object for the object.
Removes the element with the specified key from the object.
The key of the element to remove.
Gets or sets the element with the specified key.
The key.
Clears this instance.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Creates a new sorted set wrapper for a node tree.
The root of the collection.
The number of elements in the map.
The key comparer to use for the map.
The value comparer to use for the map.
The immutable sorted set instance.
Attempts to discover an instance beneath some enumerable sequence
if one exists.
The sequence that may have come from an immutable map.
Receives the concrete typed value if one can be found.
true if the cast was successful; false otherwise.
Bulk adds entries to the map.
The entries to add.
true to allow the sequence to include duplicate keys and let the last one win; false to throw on collisions.
true when being called from to avoid .
Creates a wrapping collection type around a root node.
The root node to wrap.
The number of elements in the new tree, assuming it's different from the current tree.
A wrapping collection type for the new tree.
Efficiently creates a new collection based on the contents of some sequence.
Enumerates the contents of a binary tree.
This struct can and should be kept in exact sync with the other binary tree enumerators:
, , and .
CAUTION: when this enumerator is actually used as a valuetype (not boxed) do NOT copy it by assigning to a second variable
or by passing it to another method. When this enumerator is disposed of it returns a mutable reference type stack to a resource pool,
and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around) there is a risk
that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data
corruption and/or exceptions.
The resource pool of reusable mutable stacks for purposes of enumeration.
We utilize this resource pool to make "allocation free" enumeration achievable.
The builder being enumerated, if applicable.
A unique ID for this instance of this enumerator.
Used to protect pooled objects from use after they are recycled.
The set being enumerated.
The stack to use for enumerating the binary tree.
The node currently selected.
The version of the builder (when applicable) that is being enumerated.
Initializes an structure.
The root of the set to be enumerated.
The builder, if applicable.
The current element.
The current element.
Disposes of this enumerator and returns the stack reference to the resource pool.
Advances enumeration to the next element.
A value indicating whether there is another element in the enumeration.
Restarts enumeration.
Throws an if this enumerator has been disposed.
Throws an exception if the underlying builder's contents have been changed since enumeration started.
Thrown if the collection has changed.
Pushes this node and all its Left descendants onto the stack.
The starting node to push onto the stack.
A node in the AVL tree storing this map.
The default empty node.
The key associated with this node.
The value associated with this node.
Sadly this field could be readonly but doing so breaks serialization due to bug:
http://connect.microsoft.com/VisualStudio/feedback/details/312970/weird-argumentexception-when-deserializing-field-in-typedreferences-cannot-be-static-or-init-only
A value indicating whether this node has been frozen (made immutable).
Nodes must be frozen before ever being observed by a wrapping collection type
to protect collections from further mutations.
The depth of the tree beneath this node.
The left tree.
The right tree.
Initializes a new instance of the class
that is pre-frozen.
Initializes a new instance of the class
that is not yet frozen.
The key.
The value.
The left.
The right.
Whether this node is prefrozen.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the height of the tree beneath this node.
Gets the left branch of this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the right branch of this node.
Gets the value represented by the current node.
Gets the number of elements contained by this node and below.
Gets the keys.
Gets the values.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
The builder, if applicable.
A that can be used to iterate through the collection.
See
See
Creates a node tree from an existing (mutable) collection.
The collection.
The root of the node tree.
Adds the specified key.
The key.
The value.
The key comparer.
The value comparer.
Receives a value indicating whether this node tree has mutated because of this operation.
Adds the specified key.
The key.
The value.
The key comparer.
The value comparer.
Receives a value indicating whether an existing value was replaced.
Receives a value indicating whether this node tree has mutated because of this operation.
Removes the specified key.
The key.
The key comparer.
Receives a value indicating whether this node tree has mutated because of this operation.
The new AVL tree.
Gets the value or default.
The key.
The key comparer.
The value.
Tries to get the value.
The key.
The key comparer.
The value.
True if the key was found.
Searches the dictionary for a given key and returns the equal key it finds, if any.
The key to search for.
The key comparer.
The key from the dictionary that the search found, or if the search yielded no match.
A value indicating whether the search was successful.
This can be useful when you want to reuse a previously stored reference instead of
a newly constructed one (so that more sharing of references can occur) or to look up
the canonical value, or a value that has more complete data than the value you currently have,
although their comparer functions indicate they are equal.
Determines whether the specified key contains key.
The key.
The key comparer.
true if the specified key contains key; otherwise, false.
Determines whether the
contains an element with the specified value.
The value to locate in the .
The value can be null for reference types.
The value comparer to use.
true if the contains
an element with the specified value; otherwise, false.
Determines whether [contains] [the specified pair].
The pair.
The key comparer.
The value comparer.
true if [contains] [the specified pair]; otherwise, false.
Freezes this node and all descendant nodes so that any mutations require a new instance of the nodes.
AVL rotate left operation.
The tree.
The rotated tree.
AVL rotate right operation.
The tree.
The rotated tree.
AVL rotate double-left operation.
The tree.
The rotated tree.
AVL rotate double-right operation.
The tree.
The rotated tree.
Returns a value indicating whether the tree is in balance.
The tree.
0 if the tree is in balance, a positive integer if the right side is heavy, or a negative integer if the left side is heavy.
Determines whether the specified tree is right heavy.
The tree.
true if [is right heavy] [the specified tree]; otherwise, false.
Determines whether the specified tree is left heavy.
Balances the specified tree.
The tree.
A balanced tree.
Creates a node tree that contains the contents of a list.
An indexable list with the contents that the new node tree should contain.
The starting index within that should be captured by the node tree.
The number of elements from that should be captured by the node tree.
The root of the created node tree.
Adds the specified key. Callers are expected to have validated arguments.
The key.
The value.
The key comparer.
The value comparer.
if true, an existing key=value pair will be overwritten with the new one.
Receives a value indicating whether an existing value was replaced.
Receives a value indicating whether this node tree has mutated because of this operation.
The new AVL tree.
Removes the specified key. Callers are expected to validate arguments.
The key.
The key comparer.
Receives a value indicating whether this node tree has mutated because of this operation.
The new AVL tree.
Creates a node mutation, either by mutating this node (if not yet frozen) or by creating a clone of this node
with the described changes.
The left branch of the mutated node.
The right branch of the mutated node.
The mutated (or created) node.
Searches the specified key. Callers are expected to validate arguments.
The key.
The key comparer.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A set of initialization methods for instances of .
Returns an empty collection.
The type of items stored by the collection.
The immutable collection.
Returns an empty collection.
The type of items stored by the collection.
The comparer.
The immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The comparer.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The comparer.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The comparer.
The items to prepopulate.
The new immutable collection.
Returns an empty collection.
The type of items stored by the collection.
The immutable collection.
Returns an empty collection.
The type of items stored by the collection.
The comparer.
The immutable collection.
Enumerates a sequence exactly once and produces an immutable set of its contents.
The type of element in the sequence.
The sequence to enumerate.
The comparer to use for initializing and adding members to the sorted set.
An immutable set.
Enumerates a sequence exactly once and produces an immutable set of its contents.
The type of element in the sequence.
The sequence to enumerate.
An immutable set.
Contains the inner class.
An immutable sorted set implementation.
The type of elements in the set.
We implement because it adds an ordinal indexer.
We implement because it gives us , which is important for some folks.
A sorted set that mutates with little or no memory allocations,
can produce and/or build on immutable sorted set instances very efficiently.
While and other bulk change methods
already provide fast bulk change operations on the collection, this class allows
multiple combinations of changes to be made to a set with equal efficiency.
Instance members of this class are not thread-safe.
The root of the binary tree that stores the collection. Contents are typically not entirely frozen.
The comparer to use for sorting the set.
Caches an immutable instance that represents the current state of the collection.
Null if no immutable view has been created for the current version.
A number that increments every time the builder changes its contents.
The object callers may use to synchronize access to this collection.
Initializes a new instance of the class.
A set to act as the basis for a new set.
Gets the number of elements in this set.
Gets a value indicating whether this instance is read-only.
Always false.
Gets the element of the set at the given index.
The 0-based index of the element in the set to return.
The element at the given position.
No index setter is offered because the element being replaced may not sort
to the same position in the sorted collection as the replacing element.
Gets the maximum value in the collection, as defined by the comparer.
The maximum value in the set.
Gets the minimum value in the collection, as defined by the comparer.
The minimum value in the set.
Gets or sets the object that is used to determine equality for the values in the .
The comparer that is used to determine equality for the values in the set.
When changing the comparer in such a way as would introduce collisions, the conflicting elements are dropped,
leaving only one of each matching pair in the collection.
Gets the current version of the contents of this builder.
Gets or sets the root node that represents the data in this collection.
Adds an element to the current set and returns a value to indicate if the
element was successfully added.
The element to add to the set.
true if the element is added to the set; false if the element is already in the set.
Removes all elements in the specified collection from the current set.
The collection of items to remove from the set.
Modifies the current set so that it contains only elements that are also in a specified collection.
The collection to compare to the current set.
Determines whether the current set is a proper (strict) subset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct subset of other; otherwise, false.
Determines whether the current set is a proper (strict) superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of other; otherwise, false.
Determines whether the current set is a subset of a specified collection.
The collection to compare to the current set.
true if the current set is a subset of other; otherwise, false.
Determines whether the current set is a superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of other; otherwise, false.
Determines whether the current set overlaps with the specified collection.
The collection to compare to the current set.
true if the current set and other share at least one common element; otherwise, false.
Determines whether the current set and the specified collection contain the same elements.
The collection to compare to the current set.
true if the current set is equal to other; otherwise, false.
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.
The collection to compare to the current set.
Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection.
The collection to compare to the current set.
Adds an element to the current set and returns a value to indicate if the
element was successfully added.
The element to add to the set.
Removes all elements from this set.
Determines whether the set contains a specific value.
The object to locate in the set.
true if item is found in the set; false otherwise.
See
Removes the first occurrence of a specific object from the set.
The object to remove from the set.
true if the item was removed from the set; false if the item was not found in the set.
Returns an enumerator that iterates through the collection.
A enumerator that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A enumerator that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A enumerator that can be used to iterate through the collection.
Returns an that iterates over this
collection in reverse order.
An enumerator that iterates over the
in reverse order.
Creates an immutable sorted set based on the contents of this instance.
An immutable set.
This method is an O(n) operation, and approaches O(1) time as the number of
actual mutations to the set since the last call to this method approaches 0.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
This is the factor between the small collection's size and the large collection's size in a bulk operation,
under which recreating the entire collection using a fast method rather than some incremental update
(that requires tree rebalancing) is preferable.
An empty sorted set with the default sort comparer.
The root node of the AVL tree that stores this set.
The comparer used to sort elements in this set.
Initializes a new instance of the class.
The comparer.
Initializes a new instance of the class.
The root of the AVL tree with the contents of this set.
The comparer.
See the interface.
Gets the maximum value in the collection, as defined by the comparer.
The maximum value in the set.
Gets the minimum value in the collection, as defined by the comparer.
The minimum value in the set.
See the interface.
See the interface.
See the interface.
Gets the root node (for testing purposes).
Gets the element of the set at the given index.
The 0-based index of the element in the set to return.
The element at the given position.
Creates a collection with the same contents as this collection that
can be efficiently mutated across multiple operations using standard
mutable interfaces.
This is an O(1) operation and results in only a single (small) memory allocation.
The mutable collection that is returned is *not* thread-safe.
See the interface.
See the interface.
Searches the set for a given value and returns the equal value it finds, if any.
The value to search for.
The value from the set that the search found, or the original value if the search yielded no match.
A value indicating whether the search was successful.
This can be useful when you want to reuse a previously stored reference instead of
a newly constructed one (so that more sharing of references can occur) or to look up
a value that has more complete data than the value you currently have, although their
comparer functions indicate they are equal.
See the interface.
See the interface.
Produces a set that contains elements either in this set or a given sequence, but not both.
The other sequence of items.
The new set.
See the interface.
See the interface.
Checks whether a given sequence of items entirely describe the contents of this set.
The sequence of items to check against this set.
A value indicating whether the sets are equal.
Determines whether the current set is a property (strict) subset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct subset of other; otherwise, false.
Determines whether the current set is a correct superset of a specified collection.
The collection to compare to the current set.
true if the current set is a correct superset of other; otherwise, false.
Determines whether a set is a subset of a specified collection.
The collection to compare to the current set.
true if the current set is a subset of other; otherwise, false.
Determines whether the current set is a superset of a specified collection.
The collection to compare to the current set.
true if the current set is a superset of other; otherwise, false.
Determines whether the current set overlaps with the specified collection.
The collection to compare to the current set.
true if the current set and other share at least one common element; otherwise, false.
Returns an that iterates over this
collection in reverse order.
An enumerator that iterates over the
in reverse order.
Gets the position within this set that the specified value does or would appear.
The value whose position is being sought.
The index of the specified in the sorted set,
if is found. If is not
found and is less than one or more elements in this set,
a negative number which is the bitwise complement of the index of the first
element that is larger than value. If is not found
and is greater than any of the elements in the set,
a negative number which is the bitwise complement of (the index of the last
element plus 1).
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Produces a set that contains elements either in this set or a given sequence, but not both.
The other sequence of items.
The new set.
See the interface.
See
See
See
See
See
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
See the interface.
Gets a value indicating whether the has a fixed size.
true if the has a fixed size; otherwise, false.
Gets a value indicating whether the is read-only.
true if the is read-only; otherwise, false.
See .
See the interface.
Adds an item to the .
The object to add to the .
The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection,
Clears this instance.
Determines whether the contains a specific value.
The object to locate in the .
true if the is found in the ; otherwise, false.
Determines the index of a specific item in the .
The object to locate in the .
The index of if found in the list; otherwise, -1.
Inserts an item to the at the specified index.
The zero-based index at which should be inserted.
The object to insert into the .
Removes the first occurrence of a specific object from the .
The object to remove from the .
Removes at.
The index.
Gets or sets the at the specified index.
The .
The index.
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
CAUTION: when this enumerator is actually used as a valuetype (not boxed) do NOT copy it by assigning to a second variable
or by passing it to another method. When this enumerator is disposed of it returns a mutable reference type stack to a resource pool,
and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around) there is a risk
that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data
corruption and/or exceptions.
Discovers an immutable sorted set for a given value, if possible.
Creates a new sorted set wrapper for a node tree.
The root of the collection.
The comparer used to build the tree.
The immutable sorted set instance.
Adds items to this collection using the standard spine rewrite and tree rebalance technique.
The items to add.
The new collection.
This method is least demanding on memory, providing the great chance of memory reuse
and does not require allocating memory large enough to store all items contiguously.
It's performance is optimal for additions that do not significantly dwarf the existing
size of this collection.
Creates a wrapping collection type around a root node.
The root node to wrap.
A wrapping collection type for the new tree.
Creates an immutable sorted set with the contents from this collection and a sequence of elements.
The sequence of elements to add to this set.
The immutable sorted set.
Enumerates the contents of a binary tree.
This struct can and should be kept in exact sync with the other binary tree enumerators:
, , and .
CAUTION: when this enumerator is actually used as a valuetype (not boxed) do NOT copy it by assigning to a second variable
or by passing it to another method. When this enumerator is disposed of it returns a mutable reference type stack to a resource pool,
and if the value type enumerator is copied (which can easily happen unintentionally if you pass the value around) there is a risk
that a stack that has already been returned to the resource pool may still be in use by one of the enumerator copies, leading to data
corruption and/or exceptions.
The resource pool of reusable mutable stacks for purposes of enumeration.
We utilize this resource pool to make "allocation free" enumeration achievable.
The builder being enumerated, if applicable.
A unique ID for this instance of this enumerator.
Used to protect pooled objects from use after they are recycled.
A flag indicating whether this enumerator works in reverse sort order.
The set being enumerated.
The stack to use for enumerating the binary tree.
We use as a wrapper to avoid paying the cost of covariant checks whenever
the underlying array that the class uses is written to.
We've recognized this as a perf win in ETL traces for these stack frames:
clr!JIT_Stelem_Ref
clr!ArrayStoreCheck
clr!ObjIsInstanceOf
The node currently selected.
The version of the builder (when applicable) that is being enumerated.
Initializes an structure.
The root of the set to be enumerated.
The builder, if applicable.
true to enumerate the collection in reverse.
The current element.
The current element.
Disposes of this enumerator and returns the stack reference to the resource pool.
Advances enumeration to the next element.
A value indicating whether there is another element in the enumeration.
Restarts enumeration.
Throws an if this enumerator has been disposed.
Throws an exception if the underlying builder's contents have been changed since enumeration started.
Thrown if the collection has changed.
Pushes this node and all its Left (or Right, if reversed) descendants onto the stack.
The starting node to push onto the stack.
An reverse enumerable of a sorted set.
The root node to enumerate.
Initializes a new instance of the class.
The root of the data structure to reverse enumerate.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
A node in the AVL tree storing this set.
The default empty node.
The key associated with this node.
A value indicating whether this node has been frozen (made immutable).
Nodes must be frozen before ever being observed by a wrapping collection type
to protect collections from further mutations.
The depth of the tree beneath this node.
The number of elements contained by this subtree starting at this node.
If this node would benefit from saving 4 bytes, we could have only a few nodes
scattered throughout the graph actually record the count of nodes beneath them.
Those without the count could query their descendants, which would often short-circuit
when they hit a node that *does* include a count field.
The left tree.
The right tree.
Initializes a new instance of the class
that is pre-frozen.
Initializes a new instance of the class
that is not yet frozen.
The value stored by this node.
The left branch.
The right branch.
Whether this node is prefrozen.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the height of the tree beneath this node.
Gets the left branch of this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the right branch of this node.
Gets the left branch of this node.
Gets the right branch of this node.
Gets the value represented by the current node.
Gets the number of elements contained by this subtree starting at this node.
Gets the key.
Gets the maximum value in the collection, as defined by the comparer.
The maximum value in the set.
Gets the minimum value in the collection, as defined by the comparer.
The minimum value in the set.
Gets the element of the set at the given index.
The 0-based index of the element in the set to return.
The element at the given position.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
The builder, if applicable.
A that can be used to iterate through the collection.
See the interface.
See the interface.
Adds the specified key to the tree.
The key.
The comparer.
Receives a value indicating whether this node tree has mutated because of this operation.
The new tree.
Removes the specified key from the tree.
The key.
The comparer.
Receives a value indicating whether this node tree has mutated because of this operation.
The new tree.
Determines whether the specified key is in this tree.
The key.
The comparer.
true if the tree contains the specified key; otherwise, false.
Freezes this node and all descendant nodes so that any mutations require a new instance of the nodes.
Searches for the specified key.
The key to search for.
The comparer.
The matching node, or if no match was found.
Searches for the specified key.
The key to search for.
The comparer.
The matching node, or if no match was found.
Returns an that iterates over this
collection in reverse order.
An enumerator that iterates over the
in reverse order.
AVL rotate left operation.
The tree.
The rotated tree.
AVL rotate right operation.
The tree.
The rotated tree.
AVL rotate double-left operation.
The tree.
The rotated tree.
AVL rotate double-right operation.
The tree.
The rotated tree.
Returns a value indicating whether the tree is in balance.
The tree.
0 if the tree is in balance, a positive integer if the right side is heavy, or a negative integer if the left side is heavy.
Determines whether the specified tree is right heavy.
The tree.
true if [is right heavy] [the specified tree]; otherwise, false.
Determines whether the specified tree is left heavy.
Balances the specified tree.
The tree.
A balanced tree.
Creates a node tree that contains the contents of a list.
An indexable list with the contents that the new node tree should contain.
The starting index within that should be captured by the node tree.
The number of elements from that should be captured by the node tree.
The root of the created node tree.
Creates a node mutation, either by mutating this node (if not yet frozen) or by creating a clone of this node
with the described changes.
The left branch of the mutated node.
The right branch of the mutated node.
The mutated (or created) node.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A set of initialization methods for instances of .
Returns an empty collection.
The type of items stored by the collection.
The immutable collection.
Creates a new immutable collection prefilled with the specified item.
The type of items stored by the collection.
The item to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Creates a new immutable collection prefilled with the specified items.
The type of items stored by the collection.
The items to prepopulate.
The new immutable collection.
Pops the top element off the stack.
The type of values contained in the stack.
The stack to modify.
The value that was removed from the stack.
A stack; never null
Thrown when the stack is empty.
An immutable stack.
The type of element stored by the stack.
The singleton empty stack.
Additional instances representing the empty stack may exist on deserialized stacks.
The element on the top of the stack.
A stack that contains the rest of the elements (under the top element).
Initializes a new instance of the class
that acts as the empty stack.
Initializes a new instance of the class.
The head element on the stack.
The rest of the elements on the stack.
Gets the empty stack, upon which all stacks are built.
Gets the empty stack, upon which all stacks are built.
Gets an empty stack.
Gets a value indicating whether this instance is empty.
true if this instance is empty; otherwise, false.
Gets the element on the top of the stack.
The element on the top of the stack.
Thrown when the stack is empty.
Pushes an element onto a stack and returns the new stack.
The element to push onto the stack.
The new stack.
Pushes an element onto a stack and returns the new stack.
The element to push onto the stack.
The new stack.
Returns a stack that lacks the top element on this stack.
A stack; never null
Thrown when the stack is empty.
Pops the top element off the stack.
The value that was removed from the stack.
A stack; never null
Returns a stack that lacks the top element on this stack.
A stack; never null
Thrown when the stack is empty.
Returns an enumerator that iterates through the collection.
An that can be used to iterate through the collection.
Returns an enumerator that iterates through the collection.
A that can be used to iterate through the collection.
Returns an enumerator that iterates through a collection.
An object that can be used to iterate through the collection.
Reverses the order of a stack.
The reversed stack.
Enumerates a stack with no memory allocations.
The original stack being enumerated.
The remaining stack not yet enumerated.
Initializes a new instance of the struct.
The stack to enumerator.
Gets the current element.
Moves to the first or next element.
A value indicating whether there are any more elements.
Enumerates a stack with no memory allocations.
The original stack being enumerated.
The remaining stack not yet enumerated.
A flag indicating whether this enumerator has been disposed.
Initializes a new instance of the class.
The stack to enumerator.
Gets the current element.
Gets the current element.
Moves to the first or next element.
A value indicating whether there are any more elements.
Resets the position to just before the first element in the list.
Disposes this instance.
Throws an if this
enumerator has already been disposed.
A simple view of the immutable collection that the debugger can show to the developer.
The collection to be enumerated.
The simple view of the collection.
Initializes a new instance of the class.
The collection to display in the debugger
Gets a simple debugger-viewable collection.
A thin wrapper around the or enumerators so they look like a collection.
The type of key in the dictionary.
The type of value in the dictionary.
Either TKey or TValue.
The underlying wrapped dictionary.
The key or value enumerable that this instance wraps.
Initializes a new instance of the class.
The dictionary to base on.
The keys or values enumeration to wrap as a collection.
See
See
The number of elements contained in the .
Gets the wrapped dictionary.
See
See
See
See
See
See
See
Copies the elements of the to an , starting at a particular index.
The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
The zero-based index in at which copying begins.
Gets a value indicating whether access to the is synchronized (thread safe).
true if access to the is synchronized (thread safe); otherwise, false.
Gets an object that can be used to synchronize access to the .
An object that can be used to synchronize access to the .
A lightweight collection view over and IEnumerable of keys.
Initializes a new instance of the class.
See
A lightweight collection view over and IEnumerable of values.
Initializes a new instance of the class.
See
A simple struct we wrap reference types inside when storing in arrays to
bypass the CLR's covariant checks when writing to arrays.
We use as a wrapper to avoid paying the cost of covariant checks whenever
the underlying array that the class uses is written to.
We've recognized this as a perf win in ETL traces for these stack frames:
clr!JIT_Stelem_Ref
clr!ArrayStoreCheck
clr!ObjIsInstanceOf
Initializes a new instance of the struct.
The value.
Object pooling utilities.
The ever-incrementing (and wrap-on-overflow) integer for owner id's.
The ID reserved for unassigned objects.
Returns a new ID.
Gets or sets the current owner of this recyclable object.
Returns the recyclable value if it hasn't been reclaimed already.
The type of renter of the object.
The renter of the object.
The rented object.
Thrown if is no longer the renter of the value.
Common runtime checks that throw upon failure.
Throws an exception if the specified parameter's value is null.
The type of the parameter.
The value of the argument.
The name of the parameter to include in any thrown exception.
Thrown if is null
Throws an exception if the specified parameter's value is null. It passes through the specified value back as a return value.
The type of the parameter.
The value of the argument.
The name of the parameter to include in any thrown exception.
The value of the parameter.
Thrown if is null
Throws an exception if the specified parameter's value is null.
The type of the parameter.
The value of the argument.
The name of the parameter to include in any thrown exception.
Thrown if is null
This method exists for callers who themselves only know the type as a generic parameter which
may or may not be a class, but certainly cannot be null.
Throws an .
The name of the parameter that was null.
Throws an if a condition does not evaluate to true.
Throws an .
Throws an if a condition does not evaluate to true.
Throws an if a condition does not evaluate to true.
Throws an for a disposed object.
Specifies the type of the disposed object.
The disposed object.
Indicates to Code Analysis that a method validates a particular parameter.
LINQ extension method overrides that offer greater efficiency for than the standard LINQ methods
Projects each element of a sequence into a new form.
The type of element contained by the collection.
The type of the result element.
The immutable array.
The selector.
Projects each element of a sequence to an ,
flattens the resulting sequences into one sequence, and invokes a result
selector function on each element therein.
The type of the elements of .
The type of the intermediate elements collected by .
The type of the elements of the resulting sequence.
The immutable array.
A transform function to apply to each element of the input sequence.
A transform function to apply to each element of the intermediate sequence.
An whose elements are the result
of invoking the one-to-many transform function on each
element of and then mapping each of those sequence elements and their
corresponding source element to a result element.
Filters a sequence of values based on a predicate.
The type of element contained by the collection.
Gets a value indicating whether any elements are in this collection.
The type of element contained by the collection.
Gets a value indicating whether any elements are in this collection
that match a given condition.
The type of element contained by the collection.
The predicate.
Gets a value indicating whether all elements in this collection
match a given condition.
The type of element contained by the collection.
The predicate.
true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.
Determines whether two sequences are equal according to an equality comparer.
The type of element in the compared array.
The type of element contained by the collection.
Determines whether two sequences are equal according to an equality comparer.
The type of element in the compared array.
The type of element contained by the collection.
Determines whether two sequences are equal according to an equality comparer.
The type of element in the compared array.
The type of element contained by the collection.
Applies an accumulator function over a sequence.
The type of element contained by the collection.
Applies an accumulator function over a sequence.
The type of the accumulated value.
The type of element contained by the collection.
Applies an accumulator function over a sequence.
The type of the accumulated value.
The type of result returned by the result selector.
The type of element contained by the collection.
Returns the element at a specified index in a sequence.
The type of element contained by the collection.
Returns the element at a specified index in a sequence or a default value if the index is out of range.
The type of element contained by the collection.
Returns the first element in a sequence that satisfies a specified condition.
The type of element contained by the collection.
Returns the first element in a sequence that satisfies a specified condition.
The type of element contained by the collection.
Returns the first element of a sequence, or a default value if the sequence contains no elements.
The type of element contained by the collection.
Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
The type of element contained by the collection.
Returns the last element of a sequence.
The type of element contained by the collection.
Returns the last element of a sequence that satisfies a specified condition.
The type of element contained by the collection.
Returns the last element of a sequence, or a default value if the sequence contains no elements.
The type of element contained by the collection.
Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
The type of element contained by the collection.
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
The type of element contained by the collection.
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.
The type of element contained by the collection.
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
The type of element contained by the collection.
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
The type of element contained by the collection.
Creates a dictionary based on the contents of this array.
The type of the key.
The type of element contained by the collection.
The key selector.
The newly initialized dictionary.
Creates a dictionary based on the contents of this array.
The type of the key.
The type of the element.
The type of element contained by the collection.
The key selector.
The element selector.
The newly initialized dictionary.
Creates a dictionary based on the contents of this array.
The type of the key.
The type of element contained by the collection.
The key selector.
The comparer to initialize the dictionary with.
The newly initialized dictionary.
Creates a dictionary based on the contents of this array.
The type of the key.
The type of the element.
The type of element contained by the collection.
The key selector.
The element selector.
The comparer to initialize the dictionary with.
The newly initialized dictionary.
Copies the contents of this array to a mutable array.
The type of element contained by the collection.
The newly instantiated array.
Returns the first element in the collection.
Thrown if the collection is empty.
Returns the first element in the collection, or the default value if the collection is empty.
Returns the last element in the collection.
Thrown if the collection is empty.
Returns the last element in the collection, or the default value if the collection is empty.
Returns a value indicating whether this collection contains any elements.
Provides the core iterator implementation of .