diff --git a/recovered/2012/#Testing Area/saved.xml b/recovered/2012/#Testing Area/saved.xml
new file mode 100755
index 0000000..8e15438
--- /dev/null
+++ b/recovered/2012/#Testing Area/saved.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/TibisMathematicsSuite - Release/MatrixCalculator.exe.config b/recovered/2012/TibisMathematicsSuite - Release/MatrixCalculator.exe.config
new file mode 100755
index 0000000..4716e74
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite - Release/MatrixCalculator.exe.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+ True
+
+
+ ,;
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/TibisMathematicsSuite - Release/MatrixCalculator.vshost.exe.config b/recovered/2012/TibisMathematicsSuite - Release/MatrixCalculator.vshost.exe.config
new file mode 100755
index 0000000..4716e74
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite - Release/MatrixCalculator.vshost.exe.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+ True
+
+
+ ,;
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/TibisMathematicsSuite - Release/System.Data.SQLite.dll.config b/recovered/2012/TibisMathematicsSuite - Release/System.Data.SQLite.dll.config
new file mode 100644
index 0000000..45f9645
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite - Release/System.Data.SQLite.dll.config
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
diff --git a/recovered/2012/TibisMathematicsSuite - Release/System.Threading.xml b/recovered/2012/TibisMathematicsSuite - Release/System.Threading.xml
new file mode 100644
index 0000000..3aff7f6
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite - Release/System.Threading.xml
@@ -0,0 +1,19811 @@
+
+
+
+ System.Threading
+
+
+
+
+ A stub version of .NET 4.0 contracts.
+
+
+
+
+ A dummy class that implements GetResourceString. Environment.GetResourceString(string) is an internal
+ method in mscorlib.dll.
+
+
+
+
+ An interface similar to the one added in .NET 4.0.
+
+
+
+
+ .NET 4.0 Monitor class supports new overloads that return a boolean value
+ representing whether the lock was successfully taken or not. The return value
+ is meant to be accurate even in the presence of thread aborts.
+
+ Monitor2 implements these methods as simple wrappers over the .NET 3.5 methods,
+ but without making the guarantees related to thread aborts.
+
+
+
+
+ This internal class from mscorlib.dll is used by ConcurrentDictionary.
+
+
+
+
+ OperationCanceledException is changing from .NET 3.5 to .NET 4.0. To make Parallel Extensions work,
+ we include the new version as OperationCanceledException2.
+
+
+
+
+ A convenience class for common platform-related logic.
+
+
+
+
+ Gets the number of available processors available to this process on the current machine.
+
+
+
+
+ A dummy replacement for the .NET 4.0 SecuritySafeCriticalAttribute. The dummy attribute makes the
+ code compile, but we are likely losing the ability to be called from a partial trust environment.
+
+
+
+
+ A dummy replacement for the .NET internal class StackCrawlMark.
+
+
+
+
+ Represents a thread-safe collection of keys and values.
+
+ The type of the keys in the dictionary.
+ The type of the values in the dictionary.
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads.
+
+
+
+
+ Initializes a new instance of the
+ class that is empty, has the default concurrency level, has the default initial capacity, and
+ uses the default comparer for the key type.
+
+
+
+
+ Initializes a new instance of the
+ class that is empty, has the specified concurrency level and capacity, and uses the default
+ comparer for the key type.
+
+ The estimated number of threads that will update the
+ concurrently.
+ The initial number of elements that the
+ can contain.
+ is
+ less than 1.
+ is less than
+ 0.
+
+
+
+ Initializes a new instance of the
+ class that contains elements copied from the specified , has the default concurrency
+ level, has the default initial capacity, and uses the default comparer for the key type.
+
+ The whose elements are copied to
+ the new
+ .
+ is a null reference
+ (Nothing in Visual Basic).
+ contains one or more
+ duplicate keys.
+
+
+
+ Initializes a new instance of the
+ class that is empty, has the specified concurrency level and capacity, and uses the specified
+ .
+
+ The
+ implementation to use when comparing keys.
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Initializes a new instance of the
+ class that contains elements copied from the specified , has the default concurrency level, has the default
+ initial capacity, and uses the specified
+ .
+
+ The whose elements are copied to
+ the new
+ .
+ The
+ implementation to use when comparing keys.
+ is a null reference
+ (Nothing in Visual Basic). -or-
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Initializes a new instance of the
+ class that contains elements copied from the specified ,
+ has the specified concurrency level, has the specified initial capacity, and uses the specified
+ .
+
+ The estimated number of threads that will update the
+ concurrently.
+ The whose elements are copied to the new
+ .
+ The implementation to use
+ when comparing keys.
+
+ is a null reference (Nothing in Visual Basic).
+ -or-
+ is a null reference (Nothing in Visual Basic).
+
+
+ is less than 1.
+
+ contains one or more duplicate keys.
+
+
+
+ Initializes a new instance of the
+ class that is empty, has the specified concurrency level, has the specified initial capacity, and
+ uses the specified .
+
+ The estimated number of threads that will update the
+ concurrently.
+ The initial number of elements that the
+ can contain.
+ The
+ implementation to use when comparing keys.
+
+ is less than 1. -or-
+ is less than 0.
+
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Attempts to add the specified key and value to the .
+
+ The key of the element to add.
+ The value of the element to add. The value can be a null reference (Nothing
+ in Visual Basic) for reference types.
+ true if the key/value pair was added to the
+ successfully; otherwise, false.
+ is null reference
+ (Nothing in Visual Basic).
+ The
+ contains too many elements.
+
+
+
+ Determines whether the contains the specified
+ key.
+
+ The key to locate in the .
+ true if the contains an element with
+ the specified key; otherwise, false.
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Attempts to remove and return the the value with the specified key from the
+ .
+
+ The key of the element to remove and return.
+ When this method returns, contains the object removed from the
+ or the default value of
+ if the operation failed.
+ true if an object was removed successfully; otherwise, false.
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Removes the specified key from the dictionary if it exists and returns its associated value.
+ If matchValue flag is set, the key will be removed only if is associated with a particular
+ value.
+
+ The key to search for and remove if it exists.
+ The variable into which the removed value, if found, is stored.
+ Whether removal of the key is conditional on its value.
+ The conditional value to compare against if is true
+
+
+
+
+ Attempts to get the value associated with the specified key from the .
+
+ The key of the value to get.
+ When this method returns, contains the object from
+ the
+ with the spedified key or the default value of
+ , if the operation failed.
+ true if the key was found in the ;
+ otherwise, false.
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Compares the existing value for the specified key with a specified value, and if they’re equal,
+ updates the key with a third value.
+
+ The key whose value is compared with and
+ possibly replaced.
+ The value that replaces the value of the element with if the comparison results in equality.
+ The value that is compared to the value of the element with
+ .
+ true if the value with was equal to and replaced with ; otherwise,
+ false.
+ is a null
+ reference.
+
+
+
+ Removes all keys and values from the .
+
+
+
+
+ Copies the elements of the to an array of
+ type , starting at the
+ specified array index.
+
+ The one-dimensional array of type
+ that is the destination of the elements copied from the . The array must have zero-based indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference
+ (Nothing in Visual Basic).
+ is less than
+ 0.
+ is equal to or greater than
+ the length of the . -or- The number of elements in the source
+ is greater than the available space from to the end of the destination
+ .
+
+
+
+ Copies the key and value pairs stored in the to a
+ new array.
+
+ A new array containing a snapshot of key and value pairs copied from the .
+
+
+
+ Copy dictionary contents to an array - shared implementation between ToArray and CopyTo.
+
+ Important: the caller must hold all locks in m_locks before calling CopyToPairs.
+
+
+
+
+ Copy dictionary contents to an array - shared implementation between ToArray and CopyTo.
+
+ Important: the caller must hold all locks in m_locks before calling CopyToEntries.
+
+
+
+
+ Copy dictionary contents to an array - shared implementation between ToArray and CopyTo.
+
+ Important: the caller must hold all locks in m_locks before calling CopyToObjects.
+
+
+
+ Returns an enumerator that iterates through the .
+ An enumerator for the .
+
+ The enumerator returned from the dictionary is safe to use concurrently with
+ reads and writes to the dictionary, however it does not represent a moment-in-time snapshot
+ of the dictionary. The contents exposed through the enumerator may contain modifications
+ made to the dictionary after was called.
+
+
+
+
+ Shared internal implementation for inserts and updates.
+ If key exists, we always return false; and if updateIfExists == true we force update with value;
+ If key doesn't exist, we always add value and return true;
+
+
+
+
+ Adds a key/value pair to the
+ if the key does not already exist.
+
+ The key of the element to add.
+ The function used to generate a value for the key
+ is a null reference
+ (Nothing in Visual Basic).
+ is a null reference
+ (Nothing in Visual Basic).
+ The dictionary contains too many
+ elements.
+ The value for the key. This will be either the existing value for the key if the
+ key is already in the dictionary, or the new value for the key as returned by valueFactory
+ if the key was not in the dictionary.
+
+
+
+ Adds a key/value pair to the
+ if the key does not already exist.
+
+ The key of the element to add.
+ the value to be added, if the key does not already exist
+ is a null reference
+ (Nothing in Visual Basic).
+ The dictionary contains too many
+ elements.
+ The value for the key. This will be either the existing value for the key if the
+ key is already in the dictionary, or the new value if the key was not in the dictionary.
+
+
+
+ Adds a key/value pair to the if the key does not already
+ exist, or updates a key/value pair in the if the key
+ already exists.
+
+ The key to be added or whose value should be updated
+ The function used to generate a value for an absent key
+ The function used to generate a new value for an existing key
+ based on the key's existing value
+ is a null reference
+ (Nothing in Visual Basic).
+ is a null reference
+ (Nothing in Visual Basic).
+ is a null reference
+ (Nothing in Visual Basic).
+ The dictionary contains too many
+ elements.
+ The new value for the key. This will be either be the result of addValueFactory (if the key was
+ absent) or the result of updateValueFactory (if the key was present).
+
+
+
+ Adds a key/value pair to the if the key does not already
+ exist, or updates a key/value pair in the if the key
+ already exists.
+
+ The key to be added or whose value should be updated
+ The value to be added for an absent key
+ The function used to generate a new value for an existing key based on
+ the key's existing value
+ is a null reference
+ (Nothing in Visual Basic).
+ is a null reference
+ (Nothing in Visual Basic).
+ The dictionary contains too many
+ elements.
+ The new value for the key. This will be either be the result of addValueFactory (if the key was
+ absent) or the result of updateValueFactory (if the key was present).
+
+
+
+ Adds the specified 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 a null reference
+ (Nothing in Visual Basic).
+ The dictionary contains too many
+ elements.
+
+ An element with the same key already exists in the .
+
+
+
+ Removes the element with the specified key from the .
+
+ The key of the element to remove.
+ true if the element is successfully remove; otherwise false. This method also returns
+ false if
+ was not found in the original .
+
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Adds the specified value to the
+ with the specified key.
+
+ The
+ structure representing the key and value to add to the .
+ The of is null.
+ The
+ contains too many elements.
+ An element with the same key already exists in the
+
+
+
+
+ Determines whether the
+ contains a specific key and value.
+
+ The
+ structure to locate in the .
+ true if the is found in the ; otherwise, false.
+
+
+
+ Removes a key and value from the dictionary.
+
+ The
+ structure representing the key and value to remove from the .
+ true if the key and value represented by is successfully
+ found and removed; otherwise, false.
+ The Key property of is a null reference (Nothing in Visual Basic).
+
+
+ Returns an enumerator that iterates through the .
+ An enumerator for the .
+
+ The enumerator returned from the dictionary is safe to use concurrently with
+ reads and writes to the dictionary, however it does not represent a moment-in-time snapshot
+ of the dictionary. The contents exposed through the enumerator may contain modifications
+ made to the dictionary after was called.
+
+
+
+
+ Adds the specified key and value to the dictionary.
+
+ The object to use as the key.
+ The object to use as the value.
+ is a null reference
+ (Nothing in Visual Basic).
+ The dictionary contains too many
+ elements.
+
+ is of a type that is not assignable to the key type of the . -or-
+ is of a type that is not assignable to ,
+ the type of values in the .
+ -or- A value with the same key already exists in the .
+
+
+
+
+ Gets whether the contains an
+ element with the specified key.
+
+ The key to locate in the .
+ true if the contains
+ an element with the specified key; otherwise, false.
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+ Provides an for the
+ .
+ An for the .
+
+
+
+ Removes the element with the specified key from the .
+
+ The key of the element to remove.
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Copies the elements of the to an array, starting
+ at the specified array index.
+
+ The one-dimensional array that is the destination of the elements copied from
+ the . The array must have zero-based
+ indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference
+ (Nothing in Visual Basic).
+ is less than
+ 0.
+ is equal to or greater than
+ the length of the . -or- The number of elements in the source
+ is greater than the available space from to the end of the destination
+ .
+
+
+
+ Replaces the internal table with a larger one. To prevent multiple threads from resizing the
+ table as a result of races, the table of buckets that was deemed too small is passed in as
+ an argument to GrowTable(). GrowTable() obtains a lock, and then checks whether the bucket
+ table has been replaced in the meantime or not.
+
+ Reference to the bucket table that was deemed too small.
+
+
+
+ Computes the bucket and lock number for a particular key.
+
+
+
+
+ Acquires all locks for this hash table, and increments locksAcquired by the number
+ of locks that were successfully acquired. The locks are acquired in an increasing
+ order.
+
+
+
+
+ Acquires a contiguous range of locks for this hash table, and increments locksAcquired
+ by the number of locks that were successfully acquired. The locks are acquired in an
+ increasing order.
+
+
+
+
+ Releases a contiguous range of locks.
+
+
+
+
+ Gets a collection containing the keys in the dictionary.
+
+
+
+
+ Gets a collection containing the values in the dictionary.
+
+
+
+
+ A helper method for asserts.
+
+
+
+
+ A helper function to obtain the string for a particular resource key.
+
+
+
+
+
+
+ Get the data array to be serialized
+
+
+
+
+ Construct the dictionary from a previously seiralized one
+
+
+
+
+ Gets or sets the value associated with the specified key.
+
+ The key of the value to get or set.
+ The value associated with the specified key. If the specified key is not found, a get
+ operation throws a
+ , and a set operation creates a new
+ element with the specified key.
+ is a null reference
+ (Nothing in Visual Basic).
+ The property is retrieved and
+
+ does not exist in the collection.
+
+
+
+ Gets the number of key/value pairs contained in the .
+
+ The dictionary contains too many
+ elements.
+ The number of key/value paris contained in the .
+ Count has snapshot semantics and represents the number of items in the
+ at the moment when Count was accessed.
+
+
+
+ Gets a value that indicates whether the is empty.
+
+ true if the is empty; otherwise,
+ false.
+
+
+
+ Gets a collection containing the keys in the .
+
+ An containing the keys in the
+ .
+
+
+
+ Gets a collection containing the values in the .
+
+ An containing the values in
+ the
+ .
+
+
+
+ Gets a value indicating whether the dictionary is read-only.
+
+ true if the is
+ read-only; otherwise, false. For , this property always returns
+ false.
+
+
+
+ Gets a value indicating whether the has a fixed size.
+
+ true if the has a
+ fixed size; otherwise, false. For , this property always
+ returns false.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is
+ read-only; otherwise, false. For , this property always
+ returns false.
+
+
+
+ Gets an containing the keys of the .
+
+ An containing the keys of the .
+
+
+
+ Gets an containing the values in the .
+
+ An containing the values in the .
+
+
+
+ Gets or sets the value associated with the specified key.
+
+ The key of the value to get or set.
+ The value associated with the specified key, or a null reference (Nothing in Visual Basic)
+ if is not in the dictionary or is of a type that is
+ not assignable to the key type of the .
+ is a null reference
+ (Nothing in Visual Basic).
+
+ A value is being assigned, and is of a type that is not assignable to the
+ key type of the . -or- A value is being
+ assigned, and is of a type that is not assignable to the value type
+ of the
+
+
+
+
+ Gets a value indicating whether access to the is
+ synchronized with the SyncRoot.
+
+ true if access to the is synchronized
+ (thread safe); otherwise, false. For , this property always
+ returns false.
+
+
+
+ Gets an object that can be used to synchronize access to the . This property is not supported.
+
+ The SyncRoot property is not supported.
+
+
+
+ The number of concurrent writes for which to optimize by default.
+
+
+
+
+ A node in a singly-linked list representing a particular hash table bucket.
+
+
+
+
+ A private class to represent enumeration over the dictionary that implements the
+ IDictionaryEnumerator interface.
+
+
+
+
+ Represents a thread-safe first-in, first-out collection of objects.
+
+ Specifies the type of elements in the queue.
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads.
+
+
+
+
+ Defines methods to manipulate thread-safe collections intended for producer/consumer usage.
+
+ Specifies the type of elements in the collection.
+
+ All implementations of this interface must enable all members of this interface
+ to be used concurrently from multiple threads.
+
+
+
+
+ Copies the elements of the to
+ an
+ , starting at a specified index.
+
+ The one-dimensional that is the destination of
+ the elements copied from the .
+ The array must have zero-based indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+ is equal to or greater than the
+ length of the
+ -or- The number of elements in the source is greater than the
+ available space from to the end of the destination .
+
+
+
+
+ Attempts to add an object to the .
+
+ The object to add to the .
+ true if the object was added successfully; otherwise, false.
+ The was invalid for this collection.
+
+
+
+ Attempts to remove and return an object from the .
+
+
+ When this method returns, if the object was removed and returned successfully, contains the removed object. If no object was available to be removed, the value is
+ unspecified.
+
+ true if an object was removed and returned successfully; otherwise, false.
+
+
+
+ Copies the elements contained in the to a new array.
+
+ A new array containing the elements copied from the .
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes the contents of the queue from an existing collection.
+
+ A collection from which to copy elements.
+
+
+
+ Initializes a new instance of the
+ class that contains elements copied from the specified collection
+
+ The collection whose elements are copied to the new .
+ The argument is
+ null.
+
+
+
+ Get the data array to be serialized
+
+
+
+
+ Construct the queue from a previously seiralized one
+
+
+
+
+ Copies the elements of the to an , starting at a particular
+ index.
+
+ The one-dimensional Array that is the
+ destination of the elements copied from the
+ . The Array must have zero-based indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+
+ is multidimensional. -or-
+ does not have zero-based indexing. -or-
+ is equal to or greater than the length of the
+ -or- The number of elements in the source is
+ greater than the available space from to the end of the destination
+ . -or- The type of the source cannot be cast automatically to the type of the
+ destination .
+
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+ An that can be used to iterate through the collection.
+
+
+
+ Attempts to add an object to the .
+
+ The object to add to the . The value can be a null
+ reference (Nothing in Visual Basic) for reference types.
+
+ true if the object was added successfully; otherwise, false.
+ For , this operation will always add the object to the
+ end of the
+ and return true.
+
+
+
+ Attempts to remove and return an object from the .
+
+
+ When this method returns, if the operation was successful, contains the
+ object removed. If no object was available to be removed, the value is unspecified.
+
+ true if an element was removed and returned succesfully; otherwise, false.
+ For , this operation will attempt to remove the object
+ from the beginning of the .
+
+
+
+
+ Copies the elements stored in the to a new array.
+
+ A new array containing a snapshot of elements copied from the .
+
+
+
+ Copies the elements to a new .
+
+ A new containing a snapshot of
+ elements copied from the .
+
+
+
+ Store the position of the current head and tail positions.
+
+ return the head segment
+ return the tail segment
+ return the head offset
+ return the tail offset
+
+
+
+ Copies the elements to an existing one-dimensional Array, starting at the specified array index.
+
+ The one-dimensional Array that is the
+ destination of the elements copied from the
+ . The Array must have zero-based
+ indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+ is equal to or greater than the
+ length of the
+ -or- The number of elements in the source is greater than the
+ available space from to the end of the destination .
+
+
+
+
+ Returns an enumerator that iterates through the .
+
+ An enumerator for the contents of the .
+
+ The enumeration represents a moment-in-time snapshot of the contents
+ of the queue. It does not reflect any updates to the collection after
+ was called. The enumerator is safe to use
+ concurrently with reads from and writes to the queue.
+
+
+
+
+ Adds an object to the end of the .
+
+ The object to add to the end of the . The value can be a null reference
+ (Nothing in Visual Basic) for reference types.
+
+
+
+
+ Attempts to remove and return the object at the beginning of the .
+
+
+ When this method returns, if the operation was successful, contains the
+ object removed. If no object was available to be removed, the value is unspecified.
+
+ true if an element was removed and returned from the beggining of the
+ succesfully; otherwise, false.
+
+
+
+ Attempts to return an object from the beginning of the
+ without removing it.
+
+ When this method returns, contains an object from
+ the beginning of the or an
+ unspecified value if the operation failed.
+ true if and object was returned successfully; otherwise, false.
+
+
+
+ Gets a value indicating whether access to the is
+ synchronized with the SyncRoot.
+
+ true if access to the is synchronized
+ with the SyncRoot; otherwise, false. For , this property always
+ returns false.
+
+
+
+ Gets an object that can be used to synchronize access to the . This property is not supported.
+
+ The SyncRoot property is not supported.
+
+
+
+ Gets a value that indicates whether the is empty.
+
+ true if the is empty; otherwise, false.
+
+ For determining whether the collection contains any items, use of this property is recommended
+ rather than retrieving the number of items from the property and comparing it
+ to 0. However, as this collection is intended to be accessed concurrently, it may be the case
+ that another thread will modify the collection after returns, thus invalidating
+ the result.
+
+
+
+
+ Gets the number of elements contained in the .
+
+ The number of elements contained in the .
+
+ For determining whether the collection contains any items, use of the
+ property is recommended rather than retrieving the number of items from the
+ property and comparing it to 0.
+
+
+
+
+ private class for ConcurrentQueue.
+ a queue is a linked list of small arrays, each node is called a segment.
+ A segment contains an array, a pointer to the next segment, and m_low, m_high indices recording
+ the first and last valid elements of the array.
+
+
+
+
+ Create and initialize a segment with the specified index.
+
+
+
+
+ Add an element to the tail of the current segment
+ exclusively called by ConcurrentQueue.InitializedFromCollection
+ InitializeFromCollection is responsible to guaratee that there is no index overflow,
+ and there is no contention
+
+
+
+
+
+ Create a new segment and append to the current one
+ Does not update the m_tail pointer
+ exclusively called by ConcurrentQueue.InitializedFromCollection
+ InitializeFromCollection is responsible to guaratee that there is no index overflow,
+ and there is no contention
+
+ the reference to the new Segment
+
+
+
+ Create a new segment and append to the current one
+ Update the m_tail pointer
+ This method is called when there is no contention
+
+
+
+
+ Try to append an element at the end of this segment.
+
+ the element to append
+ The tail.
+ true if the element is appended, false if the current segment is full
+ if appending the specified element succeeds, and after which the segment is full,
+ then grow the segment
+
+
+
+ try to remove an element from the head of current segment
+
+ The result.
+ The head.
+ return false only if the current segment is empty
+
+
+
+ try to peek the current segment
+
+ holds the return value of the element at the head position,
+ value set to default(T) if there is no such an element
+ true if there are elements in the current segment, false otherwise
+
+
+
+ Convert part or all of the current segment into a List
+
+ the start position
+ the end position
+ the result list
+
+
+
+ return the next segment
+
+
+
+
+ return true if the current segment is empty (doesn't have any element available to dequeue,
+ false otherwise
+
+
+
+
+ return the position of the head of the current segment
+
+
+
+
+ return the logical position of the tail of the current segment
+
+
+
+
+ Represents a thread-safe last-in, first-out collection of objects.
+
+ Specifies the type of elements in the stack.
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads.
+
+
+
+
+ Initializes a new instance of the
+ class.
+
+
+
+
+ Initializes a new instance of the
+ class that contains elements copied from the specified collection
+
+ The collection whose elements are copied to the new .
+ The argument is
+ null.
+
+
+
+ Initializes the contents of the stack from an existing collection.
+
+ A collection from which to copy elements.
+
+
+
+ Get the data array to be serialized
+
+
+
+
+ Construct the stack from a previously seiralized one
+
+
+
+
+ Removes all objects from the .
+
+
+
+
+ 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
+ . The must
+ have zero-based indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+
+ is multidimensional. -or-
+ does not have zero-based indexing. -or-
+ is equal to or greater than the length of the
+ -or- The number of elements in the source is
+ greater than the available space from to the end of the destination
+ . -or- The type of the source cannot be cast automatically to the type of the
+ destination .
+
+
+
+
+ Copies the elements to an existing one-dimensional , starting at the specified array index.
+
+ The one-dimensional that is the destination of
+ the elements copied from the
+ . The must have zero-based
+ indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+ is equal to or greater than the
+ length of the
+ -or- The number of elements in the source is greater than the
+ available space from to the end of the destination .
+
+
+
+
+ Inserts an object at the top of the .
+
+ The object to push onto the . The value can be
+ a null reference (Nothing in Visual Basic) for reference types.
+
+
+
+
+ Inserts multiple objects at the top of the atomically.
+
+ The objects to push onto the .
+ is a null reference
+ (Nothing in Visual Basic).
+
+ When adding multiple items to the stack, using PushRange is a more efficient
+ mechanism than using one item at a time. Additionally, PushRange
+ guarantees that all of the elements will be added atomically, meaning that no other threads will
+ be able to inject elements between the elements being pushed. Items at lower indices in
+ the array will be pushed before items at higher indices.
+
+
+
+
+ Inserts multiple objects at the top of the atomically.
+
+ The objects to push onto the .
+ The zero-based offset in at which to begin
+ inserting elements onto the top of the .
+ The number of elements to be inserted onto the top of the .
+ is a null reference
+ (Nothing in Visual Basic).
+ or is negative. Or is greater than or equal to the length
+ of .
+ + is
+ greater than the length of .
+
+ When adding multiple items to the stack, using PushRange is a more efficient
+ mechanism than using one item at a time. Additionally, PushRange
+ guarantees that all of the elements will be added atomically, meaning that no other threads will
+ be able to inject elements between the elements being pushed. Items at lower indices in the
+ array will be pushed before items at higher indices.
+
+
+
+
+ Push one or many nodes into the stack, if head and tails are equal then push one node to the stack other wise push the list between head
+ and tail to the stack
+
+ The head pointer to the new list
+ The tail pointer to the new list
+
+
+
+ Local helper function to validate the Pop Push range methods input
+
+
+
+
+ Attempts to add an object to the .
+
+ The object to add to the . The value can be a null
+ reference (Nothing in Visual Basic) for reference types.
+
+ true if the object was added successfully; otherwise, false.
+ For , this operation
+ will always insert the object onto the top of the
+ and return true.
+
+
+
+ Attempts to return an object from the top of the
+ without removing it.
+
+ When this method returns, contains an object from
+ the top of the or an
+ unspecified value if the operation failed.
+ true if and object was returned successfully; otherwise, false.
+
+
+
+ Attempts to pop and return the object at the top of the .
+
+
+ When this method returns, if the operation was successful, contains the
+ object removed. If no object was available to be removed, the value is unspecified.
+
+ true if an element was removed and returned from the top of the
+ succesfully; otherwise, false.
+
+
+
+ Attempts to pop and return multiple objects from the top of the
+ atomically.
+
+
+ The to which objects popped from the top of the will be added.
+
+ The number of objects successfully popped from the top of the and inserted in
+ .
+ is a null argument (Nothing
+ in Visual Basic).
+
+ When popping multiple items, if there is little contention on the stack, using
+ TryPopRange can be more efficient than using
+ once per item to be removed. Nodes fill the
+ with the first node to be popped at the startIndex, the second node to be popped
+ at startIndex + 1, and so on.
+
+
+
+
+ Attempts to pop and return multiple objects from the top of the
+ atomically.
+
+
+ The to which objects popped from the top of the will be added.
+
+ The zero-based offset in at which to begin
+ inserting elements from the top of the .
+ The number of elements to be popped from top of the and inserted into .
+ is a null reference
+ (Nothing in Visual Basic).
+ or is negative. Or is greater than or equal to the length
+ of .
+ + is
+ greater than the length of .
+
+ When popping multiple items, if there is little contention on the stack, using
+ TryPopRange can be more efficient than using
+ once per item to be removed. Nodes fill the
+ with the first node to be popped at the startIndex, the second node to be popped
+ at startIndex + 1, and so on.
+
+
+
+
+ Local helper function to Pop an item from the stack, slow path
+
+ The popped item
+ True if succeeded, false otherwise
+
+
+
+ Slow path helper for TryPop. This method assumes an initial attempt to pop an element
+ has already occurred and failed, so it begins spinning right away.
+
+ The number of items to pop.
+
+ When this method returns, if the pop succeeded, contains the removed object. If no object was
+ available to be removed, the value is unspecified. This parameter is passed uninitialized.
+
+ True if an element was removed and returned; otherwise, false.
+
+
+
+ Local helper function to copy the poped elements into a given collection
+
+ The head of the list to be copied
+ The collection to place the popped items in
+ the beginning of index of where to place the popped items
+ The number of nodes.
+
+
+
+ Attempts to remove and return an object from the .
+
+
+ When this method returns, if the operation was successful, contains the
+ object removed. If no object was available to be removed, the value is unspecified.
+
+ true if an element was removed and returned succesfully; otherwise, false.
+ For , this operation will attempt to pope the object at
+ the top of the .
+
+
+
+
+ Copies the items stored in the to a new array.
+
+ A new array containing a snapshot of elements copied from the .
+
+
+
+ Returns an array containing a snapshot of the list's contents, using
+ the target list node as the head of a region in the list.
+
+ An array of the list's contents.
+
+
+
+ Returns an enumerator that iterates through the .
+
+ An enumerator for the .
+
+ The enumeration represents a moment-in-time snapshot of the contents
+ of the stack. It does not reflect any updates to the collection after
+ was called. The enumerator is safe to use
+ concurrently with reads from and writes to the stack.
+
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+ An that can be used to iterate through
+ the collection.
+
+ The enumeration represents a moment-in-time snapshot of the contents of the stack. It does not
+ reflect any updates to the collection after
+ was called. The enumerator is safe to use concurrently with reads
+ from and writes to the stack.
+
+
+
+
+ Gets a value that indicates whether the is empty.
+
+ true if the is empty; otherwise, false.
+
+ For determining whether the collection contains any items, use of this property is recommended
+ rather than retrieving the number of items from the property and comparing it
+ to 0. However, as this collection is intended to be accessed concurrently, it may be the case
+ that another thread will modify the collection after returns, thus invalidating
+ the result.
+
+
+
+
+ Gets the number of elements contained in the .
+
+ The number of elements contained in the .
+
+ For determining whether the collection contains any items, use of the
+ property is recommended rather than retrieving the number of items from the
+ property and comparing it to 0.
+
+
+
+
+ Gets a value indicating whether access to the is
+ synchronized with the SyncRoot.
+
+ true if access to the is synchronized
+ with the SyncRoot; otherwise, false. For , this property always
+ returns false.
+
+
+
+ Gets an object that can be used to synchronize access to the . This property is not supported.
+
+ The SyncRoot property is not supported
+
+
+
+ A simple (internal) node type used to store elements of concurrent stacks and queues.
+
+
+
+
+ Constructs a new node with the specified value and no next node.
+
+ The value of the node.
+
+
+
+ A debugger view of the IProducerConsumerCollection that makes it simple to browse the
+ collection's contents at a point in time.
+
+ The type of elements stored within.
+
+
+
+ Constructs a new debugger view object for the provided collection object.
+
+ A collection to browse in the debugger.
+
+
+
+ Returns a snapshot of the underlying collection's elements.
+
+
+
+
+ Represents a particular manner of splitting an orderable data source into multiple partitions.
+
+ Type of the elements in the collection.
+
+
+ Each element in each partition has an integer index associated with it, which determines the relative
+ order of that element against elements in other partitions.
+
+
+ Inheritors of must adhere to the following rules:
+
+
All indices must be unique, such that there may not be duplicate indices. If all indices are not
+ unique, the output ordering may be scrambled.
+
All indices must be non-negative. If any indices are negative, consumers of the implementation
+ may throw exceptions.
+
and should throw a
+ if the requested partition count is less than or
+ equal to zero.
+
and should always return a number
+ of enumerables equal to the requested partition count. If the partitioner runs out of data and cannot
+ create as many partitions as requested, an empty enumerator should be returned for each of the
+ remaining partitions. If this rule is not followed, consumers of the implementation may throw a .
+
, ,
+ , and
+ should never return null. If null is returned, a consumer of the implementation may throw a
+ .
+
, ,
+ , and
+ should always return partitions that can fully and uniquely enumerate the input data source. All of
+ the data and only the data contained in the input source should be enumerated, with no duplication
+ that was not already in the input, unless specifically required by the particular partitioner's
+ design. If this is not followed, the output ordering may be scrambled.
+
If returns true, each partition must return elements
+ with increasing key indices.
+
If returns true, all the keys in partition numbered N
+ must be larger than all the keys in partition numbered N-1.
+
If returns true, all indices must be monotonically increasing from
+ 0, though not necessarily within a single partition.
+
+
+
+
+
+
+ Represents a particular manner of splitting a data source into multiple partitions.
+
+ Type of the elements in the collection.
+
+
+ Inheritors of must adhere to the following rules:
+
+
should throw a
+ if the requested partition count is less than or
+ equal to zero.
+
should always return a number of enumerables equal to the requested
+ partition count. If the partitioner runs out of data and cannot create as many partitions as
+ requested, an empty enumerator should be returned for each of the remaining partitions. If this rule
+ is not followed, consumers of the implementation may throw a .
+
and
+ should never return null. If null is returned, a consumer of the implementation may throw a
+ .
+
and should always return
+ partitions that can fully and uniquely enumerate the input data source. All of the data and only the
+ data contained in the input source should be enumerated, with no duplication that was not already in
+ the input, unless specifically required by the particular partitioner's design. If this is not
+ followed, the output ordering may be scrambled.
+
+
+
+
+
+
+ Partitions the underlying collection into the given number of partitions.
+
+ The number of partitions to create.
+ A list containing enumerators.
+
+
+
+ Creates an object that can partition the underlying collection into a variable number of
+ partitions.
+
+
+
+ The returned object implements the interface. Calling GetEnumerator on the
+ object creates another partition over the sequence.
+
+
+ The method is only supported if the
+ property returns true.
+
+
+ An object that can create partitions over the underlying data source.
+ Dynamic partitioning is not supported by this
+ partitioner.
+
+
+
+ Gets whether additional partitions can be created dynamically.
+
+
+ true if the can create partitions dynamically as they are
+ requested; false if the can only allocate
+ partitions statically.
+
+
+
+ If a derived class does not override and implement ,
+ should return false. The value of should not vary over the lifetime of this instance.
+
+
+
+
+
+ Initializes a new instance of the class with the
+ specified constraints on the index keys.
+
+
+ Indicates whether the elements in each partition are yielded in the order of
+ increasing keys.
+
+
+ Indicates whether elements in an earlier partition always come before
+ elements in a later partition. If true, each element in partition 0 has a smaller order key than
+ any element in partition 1, each element in partition 1 has a smaller order key than any element
+ in partition 2, and so on.
+
+
+ Indicates whether keys are normalized. If true, all order keys are distinct
+ integers in the range [0 .. numberOfElements-1]. If false, order keys must still be dictinct, but
+ only their relative order is considered, not their absolute values.
+
+
+
+
+ Partitions the underlying collection into the specified number of orderable partitions.
+
+
+ Each partition is represented as an enumerator over key-value pairs.
+ The value of the pair is the element itself, and the key is an integer which determines
+ the relative ordering of this element against other elements in the data source.
+
+ The number of partitions to create.
+ A list containing enumerators.
+
+
+
+ Creates an object that can partition the underlying collection into a variable number of
+ partitions.
+
+
+
+ The returned object implements the interface. Calling GetEnumerator on the
+ object creates another partition over the sequence.
+
+
+ Each partition is represented as an enumerator over key-value pairs. The value in the pair is the element
+ itself, and the key is an integer which determines the relative ordering of this element against
+ other elements.
+
+
+ The method is only supported if the SupportsDynamicPartitions
+ property returns true.
+
+
+ An object that can create partitions over the underlying data source.
+ Dynamic partitioning is not supported by this
+ partitioner.
+
+
+
+ Partitions the underlying collection into the given number of ordered partitions.
+
+
+ The default implementation provides the same behavior as except
+ that the returned set of partitions does not provide the keys for the elements.
+
+ The number of partitions to create.
+ A list containing enumerators.
+
+
+
+ Creates an object that can partition the underlying collection into a variable number of
+ partitions.
+
+
+
+ The returned object implements the interface. Calling GetEnumerator on the
+ object creates another partition over the sequence.
+
+
+ The default implementation provides the same behavior as except
+ that the returned set of partitions does not provide the keys for the elements.
+
+
+ The method is only supported if the
+ property returns true.
+
+
+ An object that can create partitions over the underlying data source.
+ Dynamic partitioning is not supported by this
+ partitioner.
+
+
+
+ Gets whether elements in each partition are yielded in the order of increasing keys.
+
+
+
+
+ Gets whether elements in an earlier partition always come before elements in a later partition.
+
+
+ If returns true, each element in partition 0 has a
+ smaller order key than any element in partition 1, each element in partition 1 has a smaller
+ order key than any element in partition 2, and so on.
+
+
+
+
+ Gets whether order keys are normalized.
+
+
+ If returns true, all order keys are distinct integers in the range
+ [0 .. numberOfElements-1]. If the property returns false, order keys must still be dictinct, but
+ only their relative order is considered, not their absolute values.
+
+
+
+
+ Converts an enumerable over key-value pairs to an enumerable over values.
+
+
+
+
+ Provides common partitioning strategies for arrays, lists, and enumerables.
+
+
+
+ The static methods on are all thread-safe and may be used concurrently
+ from multiple threads. However, while a created partitioner is in use, the underlying data source
+ should not be modified, whether from the same thread that's using a partitioner or from a separate
+ thread.
+
+
+
+
+
+ Creates an orderable partitioner from an
+ instance.
+
+ Type of the elements in source list.
+ The list to be partitioned.
+
+ A Boolean value that indicates whether the created partitioner should dynamically
+ load balance between partitions rather than statically partition.
+
+
+ An orderable partitioner based on the input list.
+
+
+
+
+ Creates an orderable partitioner from a instance.
+
+ Type of the elements in source array.
+ The array to be partitioned.
+
+ A Boolean value that indicates whether the created partitioner should dynamically load balance
+ between partitions rather than statically partition.
+
+
+ An orderable partitioner based on the input array.
+
+
+
+
+ Creates an orderable partitioner from a instance.
+
+ Type of the elements in source enumerable.
+ The enumerable to be partitioned.
+
+ An orderable partitioner based on the input array.
+
+
+ The ordering used in the created partitioner is determined by the natural order of the elements
+ as retrieved from the source enumerable.
+
+
+
+
+ DynamicPartitionEnumerator_Abstract defines the enumerator for each partition for the dynamic load-balance
+ partitioning algorithm.
+ - Partition is an enumerator of KeyValuePairs, each corresponding to an item in the data source:
+ the key is the index in the source collection; the value is the item itself.
+ - a set of such partitions share a reader over data source. The type of the reader is specified by
+ TSourceReader.
+ - each partition requests a contiguous chunk of elements at a time from the source data. The chunk
+ size is initially 1, and doubles every time until it reaches the maximum chunk size.
+ The implementation for GrabNextChunk() method has two versions: one for data source of IndexRange
+ types (IList and the array), one for data source of IEnumerable.
+ - The method "Reset" is not supported for any partitioning algorithm.
+ - The implementation for MoveNext() method is same for all dynanmic partitioners, so we provide it
+ in this abstract class.
+
+ Type of the elements in the data source
+ Type of the reader on the data source
+
+
+
+ Abstract method to request a contiguous chunk of elements from the source collection
+
+ specified number of elements requested
+
+ true if we successfully reserved at least one element (up to #=requestedChunkSize)
+ false if all elements in the source collection have been reserved.
+
+
+
+
+ Dispose is abstract, and depends on the type of the source data:
+ - For source data type IList and Array, the type of the shared reader is just the dataitself.
+ We don't do anything in Dispose method for IList and Array.
+ - For source data type IEnumerable, the type of the shared reader is an enumerator we created.
+ Thus we need to dispose this shared reader enumerator, when there is no more active partitions
+ left.
+
+
+
+
+ Reset on partitions is not supported
+
+
+
+
+ Moves to the next element if any.
+ Try current chunk first, if the current chunk do not have any elements left, then we
+ attempt to grab a chunk from the source collection.
+
+
+ true if successfully moving to the next position;
+ false otherwise, if and only if there is no more elements left in the current chunk
+ AND the source collection is exhausted.
+
+
+
+
+ Abstract property, returns whether or not the shared reader has already read the last
+ element of the source data
+
+
+
+
+ Get the current element in the current partition. Property required by IEnumerator interface
+ This property is abstract because the implementation is different depending on the type
+ of the source data: IList, Array or IEnumerable
+
+
+
+
+ Get the current element in the current partition. Property required by IEnumerator interface
+
+
+
+
+ Inherits from DynamicPartitioners
+ Provides customized implementation of GetOrderableDynamicPartitions_Factory method, to return an instance
+ of EnumerableOfPartitionsForIEnumerator defined internally
+
+ Type of elements in the source data
+
+
+
+ Overrides OrderablePartitioner.GetOrderablePartitions.
+ Partitions the underlying collection into the given number of orderable partitions.
+
+ number of partitions requested
+ A list containing enumerators.
+
+
+
+ Overrides OrderablePartitioner.GetOrderableDyanmicPartitions
+
+ a enumerable collection of orderable partitions
+
+
+
+ Whether additional partitions can be created dynamically.
+
+
+
+
+ Provides customized implementation for source data of IEnumerable
+ Different from the counterpart for IList/Array, this enumerable maintains several additional fields
+ shared by the partitions it owns, including a boolean "m_hasNoElementsLef", a shared lock, and a
+ shared count "m_activePartitionCount"
+
+
+
+
+ Inherits from DynamicPartitionEnumerator_Abstract directly
+ Provides customized implementation for: GrabNextChunk, HasNoElementsLeft, Current, Dispose
+
+
+
+
+ Reserves a contiguous range of elements from source data
+
+ specified number of elements requested
+
+ true if we successfully reserved at least one element (up to #=requestedChunkSize)
+ false if all elements in the source collection have been reserved.
+
+
+
+
+ If the current partition is to be disposed, we decrement the number of active partitions
+ for the shared reader.
+ If the number of active partitions becomes 0, we need to dispose the shared reader we created
+
+
+
+
+ Returns whether or not the shared reader has already read the last
+ element of the source data
+
+
+ We cannot call m_sharedReader.MoveNext(), to see if it hits the last element
+ or not, because we can't undo MoveNext(). Thus we need to maintain a shared
+ boolean value m_hasNoElementsLeft across all partitions
+
+
+
+
+ Dynamic load-balance partitioner. This class is abstract and to be derived from by
+ the customized partitioner classes for IList, Array, and IEnumerable
+
+ Type of the elements in the source data
+ Type of the source data collection
+
+
+
+ Constructs a new orderable partitioner
+
+ source data collection
+
+
+
+ Partition the source data and create an enumerable over the resulting partitions.
+
+ the source data collection
+ an enumerable of partitions of
+
+
+
+ Overrides OrderablePartitioner.GetOrderablePartitions.
+ Partitions the underlying collection into the given number of orderable partitions.
+
+ number of partitions requested
+ A list containing enumerators.
+
+
+
+ Overrides OrderablePartitioner.GetOrderableDyanmicPartitions
+
+ a enumerable collection of orderable partitions
+
+
+
+ Whether additional partitions can be created dynamically.
+
+
+
+
+ Defines dynamic partition for source data of IList and Array.
+ This class inherits DynamicPartitionEnumerator_Abstract
+ - implements GrabNextChunk, HasNoElementsLeft, and Dispose methods for IList and Array
+ - Current property still remains abstract, implementation is different for IList and Array
+ - introduces another abstract method SourceCount, which returns the number of elements in
+ the source data. Implementation differs for IList and Array
+
+ Type of the elements in the data source
+ Type of the reader on the source data
+
+
+
+ Reserves a contiguous range of elements from source data
+
+ specified number of elements requested
+
+ true if we successfully reserved at least one element (up to #=requestedChunkSize)
+ false if all elements in the source collection have been reserved.
+
+
+
+
+ For source data type IList and Array, the type of the shared reader is just the data itself.
+ We don't do anything in Dispose method for IList and Array.
+
+
+
+
+ Get the number of elements from the source reader.
+ It calls IList.Count or Array.Length
+
+
+
+
+ Returns whether or not the shared reader has already read the last
+ element of the source data
+
+
+
+
+ Inherits from DynamicPartitioners
+ Provides customized implementation of GetOrderableDynamicPartitions_Factory method, to return an instance
+ of EnumerableOfPartitionsForIList defined internally
+
+ Type of elements in the source data
+
+
+
+ Inherits from PartitionList_Abstract
+ Provides customized implementation for source data of IList
+
+
+
+
+ Inherits from DynamicPartitionEnumeratorForIndexRange_Abstract
+ Provides customized implementation of SourceCount property and Current property for IList
+
+
+
+
+ return a KeyValuePair of the current element and its key
+
+
+
+
+ Inherits from DynamicPartitioners
+ Provides customized implementation of GetOrderableDynamicPartitions_Factory method, to return an instance
+ of EnumerableOfPartitionsForArray defined internally
+
+ Type of elements in the source data
+
+
+
+ Inherits from PartitionList_Abstract
+ Provides customized implementation for source data of Array
+
+
+
+
+ Inherits from DynamicPartitionEnumeratorForIndexRange_Abstract
+ Provides customized implementation of SourceCount property and Current property for Array
+
+
+
+
+ Static partitioning over IList.
+ - dynamic and load-balance
+ - Keys are ordered within each partition
+ - Keys are ordered across partitions
+ - Keys are normalized
+ - Number of partitions is fixed once specified, and the elements of the source data are
+ distributed to each partition as evenly as possible.
+
+ type of the elements
+ Type of the source data collection
+
+
+
+ Abstract method to create a partition that covers a range over source data,
+ starting from "startIndex", ending at "endIndex"
+
+ start index of the current partition on the source data
+ end index of the current partition on the source data
+ a partition enumerator over the specified range
+
+
+
+ Overrides OrderablePartitioner.GetOrderablePartitions
+ Return a list of partitions, each of which enumerate a fixed part of the source data
+ The elements of the source data are distributed to each partition as evenly as possible.
+ Specifically, if the total number of elements is N, and number of partitions is x, and N = a*x +b,
+ where a is the quotient, and b is the remainder. Then the first b partitions each has a + 1 elements,
+ and the last x-b partitions each has a elements.
+ For example, if N=10, x =3, then
+ partition 0 ranges [0,3],
+ partition 1 ranges [4,6],
+ partition 2 ranges [7,9].
+ This also takes care of the situation of (x>N), the last x-N partitions are empty enumerators.
+ An empty enumerator is indicated by
+ (m_startIndex == list.Count && m_endIndex == list.Count -1)
+
+ specified number of partitions
+ a list of partitions
+
+
+
+ Abstract method to return the number of elements in the source data
+
+
+
+
+ Static Partition for IList/Array.
+ This class implements all methods required by IEnumerator interface, except for the Current property.
+ Current Property is different for IList and Array. Arrays calls 'ldelem' instructions for faster element
+ retrieval.
+
+
+
+
+ Constructs an instance of StaticIndexRangePartition
+
+ the start index in the source collection for the current partition
+ the end index in the source collection for the current partition
+
+
+
+ We don't dispose the source for IList and array
+
+
+
+
+ Moves to the next item
+ Before the first MoveNext is called: m_offset == m_startIndex-1;
+
+ true if successful, false if there is no item left
+
+
+
+ Current Property is different for IList and Array. Arrays calls 'ldelem' instructions for faster
+ element retrieval.
+
+
+
+
+ Inherits from StaticIndexRangePartitioner
+ Provides customized implementation of SourceCount and CreatePartition
+
+
+
+
+
+ Inherits from StaticIndexRangePartition
+ Provides customized implementation of Current property
+
+
+
+
+
+ Inherits from StaticIndexRangePartitioner
+ Provides customized implementation of SourceCount and CreatePartition for Array
+
+
+
+
+ Inherits from StaticIndexRangePartitioner
+ Provides customized implementation of SourceCount and CreatePartition
+
+
+
+
+ A very simple primitive that allows us to share a value across multiple threads.
+
+
+
+
+ Represents one or more errors that occur during application execution.
+
+ is used to consolidate multiple failures into a single, throwable
+ exception object.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with
+ a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class with a specified error
+ message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception.
+ The argument
+ is null.
+
+
+
+ Initializes a new instance of the class with
+ references to the inner exceptions that are the cause of this exception.
+
+ The exceptions that are the cause of the current exception.
+ The argument
+ is null.
+ An element of is
+ null.
+
+
+
+ Initializes a new instance of the class with
+ references to the inner exceptions that are the cause of this exception.
+
+ The exceptions that are the cause of the current exception.
+ The argument
+ is null.
+ An element of is
+ null.
+
+
+
+ Initializes a new instance of the class with a specified error
+ message and references to the inner exceptions that are the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exceptions that are the cause of the current exception.
+ The argument
+ is null.
+ An element of is
+ null.
+
+
+
+ Initializes a new instance of the class with a specified error
+ message and references to the inner exceptions that are the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exceptions that are the cause of the current exception.
+ The argument
+ is null.
+ An element of is
+ null.
+
+
+
+ Allocates a new aggregate exception with the specified message and list of inner exceptions.
+
+ The error message that explains the reason for the exception.
+ The exceptions that are the cause of the current exception.
+ The argument
+ is null.
+ An element of is
+ null.
+
+
+
+ Initializes a new instance of the class with serialized data.
+
+ The that holds
+ the serialized object data about the exception being thrown.
+ The that
+ contains contextual information about the source or destination.
+ The argument is null.
+ The exception could not be deserialized correctly.
+
+
+
+ Sets the with information about
+ the exception.
+
+ The that holds
+ the serialized object data about the exception being thrown.
+ The that
+ contains contextual information about the source or destination.
+ The argument is null.
+
+
+
+ Returns the that is the root cause of this exception.
+
+
+
+
+ Invokes a handler on each contained by this .
+
+ The predicate to execute for each exception. The predicate accepts as an
+ argument the to be processed and returns a Boolean to indicate
+ whether the exception was handled.
+
+ Each invocation of the returns true or false to indicate whether the
+ was handled. After all invocations, if any exceptions went
+ unhandled, all unhandled exceptions will be put into a new
+ which will be thrown. Otherwise, the method simply returns. If any
+ invocations of the throws an exception, it will halt the processing
+ of any more exceptions and immediately propagate the thrown exception as-is.
+
+ An exception contained by this was not handled.
+ The argument is
+ null.
+
+
+
+ Flattens an instances into a single, new instance.
+
+ A new, flattened .
+
+ If any inner exceptions are themselves instances of
+ , this method will recursively flatten all of them. The
+ inner exceptions returned in the new
+ will be the union of all of the the inner exceptions from exception tree rooted at the provided
+ instance.
+
+
+
+
+ Creates and returns a string representation of the current .
+
+ A string representation of the current exception.
+
+
+
+ Gets a read-only collection of the instances that caused the
+ current exception.
+
+
+
+
+ Encapsulates a method that has five parameters and returns a value of the type specified by the TResult parameter.
+
+
+
+
+ Propogates notification that operations should be canceled.
+
+
+
+ A may be created directly in an unchangeable canceled or non-canceled state
+ using the CancellationToken's constructors. However, to have a CancellationToken that can change
+ from a non-canceled to a canceled state,
+ CancellationTokenSource must be used.
+ CancellationTokenSource exposes the associated CancellationToken that may be canceled by the source through its
+ Token property.
+
+
+ Once canceled, a token may not transition to a non-canceled state, and a token whose
+ is false will never change to one that can be canceled.
+
+
+ All members of this struct are thread-safe and may be used concurrently from multiple threads.
+
+
+
+
+
+ Internal constructor only a CancellationTokenSource should create a CancellationToken
+
+
+
+
+ Initializes the CancellationToken.
+
+
+ The canceled state for the token.
+
+
+ Tokens created with this constructor will remain in the canceled state specified
+ by the parameter. If is false,
+ both and will be false.
+ If is true,
+ both and will be true.
+
+
+
+
+ Registers a delegate that will be called when this CancellationToken is canceled.
+
+
+
+ If this token is already in the canceled state, the
+ delegate will be run immediately and synchronously. Any exception the delegate generates will be
+ propogated out of this method call.
+
+
+ The current ExecutionContext, if one exists, will be captured
+ along with the delegate and will be used when executing it.
+
+
+ The delegate to be executed when the CancellationToken is canceled.
+ The instance that can
+ be used to deregister the callback.
+ is null.
+ The associated CancellationTokenSource has been disposed.
+
+
+
+ Registers a delegate that will be called when this
+ CancellationToken is canceled.
+
+
+
+ If this token is already in the canceled state, the
+ delegate will be run immediately and synchronously. Any exception the delegate generates will be
+ propogated out of this method call.
+
+
+ The current ExecutionContext, if one exists, will be captured
+ along with the delegate and will be used when executing it.
+
+
+ The delegate to be executed when the CancellationToken is canceled.
+ A Boolean value that indicates whether to capture
+ the current SynchronizationContext and use it
+ when invoking the .
+ The instance that can
+ be used to deregister the callback.
+ is null.
+ The associated CancellationTokenSource has been disposed.
+
+
+
+ Registers a delegate that will be called when this
+ CancellationToken is canceled.
+
+
+
+ If this token is already in the canceled state, the
+ delegate will be run immediately and synchronously. Any exception the delegate generates will be
+ propogated out of this method call.
+
+
+ The current ExecutionContext, if one exists, will be captured
+ along with the delegate and will be used when executing it.
+
+
+ The delegate to be executed when the CancellationToken is canceled.
+ The state to pass to the when the delegate is invoked. This may be null.
+ The instance that can
+ be used to deregister the callback.
+ is null.
+ The associated CancellationTokenSource has been disposed.
+
+
+
+ Registers a delegate that will be called when this
+ CancellationToken is canceled.
+
+
+
+ If this token is already in the canceled state, the
+ delegate will be run immediately and synchronously. Any exception the delegate generates will be
+ propogated out of this method call.
+
+
+ The current ExecutionContext, if one exists,
+ will be captured along with the delegate and will be used when executing it.
+
+
+ The delegate to be executed when the CancellationToken is canceled.
+ The state to pass to the when the delegate is invoked. This may be null.
+ A Boolean value that indicates whether to capture
+ the current SynchronizationContext and use it
+ when invoking the .
+ The instance that can
+ be used to deregister the callback.
+ is null.
+ The associated CancellationTokenSource has been disposed.
+
+
+
+ Determines whether the current CancellationToken instance is equal to the
+ specified token.
+
+ The other CancellationToken to which to compare this
+ instance.
+ True if the instances are equal; otherwise, false. Two tokens are equal if they are associated
+ with the same CancellationTokenSource or if they were both constructed
+ from public CancellationToken constructors and their values are equal.
+
+
+
+ Determines whether the current CancellationToken instance is equal to the
+ specified .
+
+ The other object to which to compare this instance.
+ True if is a CancellationToken
+ and if the two instances are equal; otherwise, false. Two tokens are equal if they are associated
+ with the same CancellationTokenSource or if they were both constructed
+ from public CancellationToken constructors and their values are equal.
+ An associated CancellationTokenSource has been disposed.
+
+
+
+ Serves as a hash function for a CancellationToken.
+
+ A hash code for the current CancellationToken instance.
+
+
+
+ Determines whether two CancellationToken instances are equal.
+
+ The first instance.
+ The second instance.
+ True if the instances are equal; otherwise, false.
+ An associated CancellationTokenSource has been disposed.
+
+
+
+ Determines whether two CancellationToken instances are not equal.
+
+ The first instance.
+ The second instance.
+ True if the instances are not equal; otherwise, false.
+ An associated CancellationTokenSource has been disposed.
+
+
+
+ Throws a OperationCanceledException if
+ this token has had cancellation requested.
+
+
+ This method provides functionality equivalent to:
+
+ if (token.IsCancellationRequested)
+ throw new OperationCanceledException(token);
+
+
+ The token has had cancellation requested.
+ The associated CancellationTokenSource has been disposed.
+
+
+
+ Returns an empty CancellationToken value.
+
+
+ The value returned by this property will be non-cancelable by default.
+
+
+
+
+ Gets whether cancellation has been requested for this token.
+
+ Whether cancellation has been requested for this token.
+
+
+ This property indicates whether cancellation has been requested for this token,
+ either through the token initially being construted in a canceled state, or through
+ calling Cancel
+ on the token's associated .
+
+
+ If this property is true, it only guarantees that cancellation has been requested.
+ It does not guarantee that every registered handler
+ has finished executing, nor that cancellation requests have finished propagating
+ to all registered handlers. Additional synchronization may be required,
+ particularly in situations where related objects are being canceled concurrently.
+
+
+
+
+
+ Gets whether this token is capable of being in the canceled state.
+
+
+ If CanBeCanceled returns false, it is guaranteed that the token will never transition
+ into a canceled state, meaning that will never
+ return true.
+
+
+
+
+ Gets a that is signaled when the token is canceled.
+
+ Accessing this property causes a WaitHandle
+ to be instantiated. It is preferable to only use this property when necessary, and to then
+ dispose the associated instance at the earliest opportunity (disposing
+ the source will dispose of this allocated handle). The handle should not be closed or disposed directly.
+
+ The associated CancellationTokenSource has been disposed.
+
+
+
+ Represents a callback delegate that has been registered with a CancellationToken.
+
+
+ To unregister a callback, dispose the corresponding Registration instance.
+
+
+
+
+ Attempts to deregister the item. If it's already being run, this may fail.
+ Entails a full memory fence.
+
+ True if the callback was found and deregistered, false otherwise.
+
+
+
+ Disposes of the registration and unregisters the target callback from the associated
+ CancellationToken.
+ If the target callback is currently executing this method will wait until it completes, except
+ in the degenerate cases where a callback method deregisters itself.
+
+
+
+
+ Determines whether two CancellationTokenRegistration
+ instances are equal.
+
+ The first instance.
+ The second instance.
+ True if the instances are equal; otherwise, false.
+
+
+
+ Determines whether two CancellationTokenRegistration instances are not equal.
+
+ The first instance.
+ The second instance.
+ True if the instances are not equal; otherwise, false.
+
+
+
+ Determines whether the current CancellationTokenRegistration instance is equal to the
+ specified .
+
+ The other object to which to compare this instance.
+ True, if both this and are equal. False, otherwise.
+ Two CancellationTokenRegistration instances are equal if
+ they both refer to the output of a single call to the same Register method of a
+ CancellationToken.
+
+
+
+
+ Determines whether the current CancellationToken instance is equal to the
+ specified .
+
+ The other CancellationTokenRegistration to which to compare this instance.
+ True, if both this and are equal. False, otherwise.
+ Two CancellationTokenRegistration instances are equal if
+ they both refer to the output of a single call to the same Register method of a
+ CancellationToken.
+
+
+
+
+ Serves as a hash function for a CancellationTokenRegistration..
+
+ A hash code for the current CancellationTokenRegistration instance.
+
+
+
+ Signals to a that it should be canceled.
+
+
+
+ is used to instantiate a
+ (via the source's Token property)
+ that can be handed to operations that wish to be notified of cancellation or that can be used to
+ register asynchronous operations for cancellation. That token may have cancellation requested by
+ calling to the source's Cancel
+ method.
+
+
+ All members of this class, except Dispose, are thread-safe and may be used
+ concurrently from multiple threads.
+
+
+
+
+ The ID of the thread currently executing the main body of CTS.Cancel()
+ this helps us to know if a call to ctr.Dispose() is running 'within' a cancellation callback.
+ This is updated as we move between the main thread calling cts.Cancel() and any syncContexts that are used to
+ actually run the callbacks.
+
+
+
+ Initializes the .
+
+
+
+
+ Communicates a request for cancellation.
+
+
+
+ The associated will be
+ notified of the cancellation and will transition to a state where
+ IsCancellationRequested returns true.
+ Any callbacks or cancelable operations
+ registered with the will be executed.
+
+
+ Cancelable operations and callbacks registered with the token should not throw exceptions.
+ However, this overload of Cancel will aggregate any exceptions thrown into a ,
+ such that one callback throwing an exception will not prevent other registered callbacks from being executed.
+
+
+ The that was captured when each callback was registered
+ will be reestablished when the callback is invoked.
+
+
+ An aggregate exception containing all the exceptions thrown
+ by the registered callbacks on the associated .
+ This has been disposed.
+
+
+
+ Communicates a request for cancellation.
+
+
+
+ The associated will be
+ notified of the cancellation and will transition to a state where
+ IsCancellationRequested returns true.
+ Any callbacks or cancelable operations
+ registered with the will be executed.
+
+
+ Cancelable operations and callbacks registered with the token should not throw exceptions.
+ If is true, an exception will immediately propagate out of the
+ call to Cancel, preventing the remaining callbacks and cancelable operations from being processed.
+ If is false, this overload will aggregate any
+ exceptions thrown into a ,
+ such that one callback throwing an exception will not prevent other registered callbacks from being executed.
+
+
+ The that was captured when each callback was registered
+ will be reestablished when the callback is invoked.
+
+
+ Specifies whether exceptions should immediately propagate.
+ An aggregate exception containing all the exceptions thrown
+ by the registered callbacks on the associated .
+ This has been disposed.
+
+
+
+ Releases the resources used by this .
+
+
+ This method is not thread-safe for any other concurrent calls.
+
+
+
+
+ Throws an exception if the source has been disposed.
+
+
+
+
+ InternalGetStaticSource()
+
+ Whether the source should be set.
+ A static source to be shared among multiple tokens.
+
+
+
+ Registers a callback object. If cancellation has already occurred, the
+ callback will have been run by the time this method returns.
+
+
+
+
+
+
+
+
+
+ Invoke the Canceled event.
+
+
+ The handlers are invoked synchronously in LIFO order.
+
+
+
+
+ Creates a CancellationTokenSource that will be in the canceled state
+ when any of the source tokens are in the canceled state.
+
+ The first CancellationToken to observe.
+ The second CancellationToken to observe.
+ A CancellationTokenSource that is linked
+ to the source tokens.
+ A CancellationTokenSource associated with
+ one of the source tokens has been disposed.
+
+
+
+ Creates a CancellationTokenSource that will be in the canceled state
+ when any of the source tokens are in the canceled state.
+
+ The CancellationToken instances to observe.
+ A CancellationTokenSource that is linked
+ to the source tokens.
+ is null.
+ A CancellationTokenSource associated with
+ one of the source tokens has been disposed.
+
+
+
+ Gets whether cancellation has been requested for this CancellationTokenSource.
+
+ Whether cancellation has been requested for this CancellationTokenSource.
+
+
+ This property indicates whether cancellation has been requested for this token source, such as
+ due to a call to its
+ Cancel method.
+
+
+ If this property returns true, it only guarantees that cancellation has been requested. It does not
+ guarantee that every handler registered with the corresponding token has finished executing, nor
+ that cancellation requests have finished propagating to all registered handlers. Additional
+ synchronization may be required, particularly in situations where related objects are being
+ canceled concurrently.
+
+
+
+
+
+ A simple helper to determine whether cancellation has finished.
+
+
+
+
+ A simple helper to determine whether disposal has occured.
+
+
+
+
+ The ID of the thread that is running callbacks.
+
+
+
+
+ Gets the CancellationToken
+ associated with this .
+
+ The CancellationToken
+ associated with this .
+ The token source has been
+ disposed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The currently executing callback
+
+
+
+
+ A helper class for collating the various bits of information required to execute
+ cancellation callbacks.
+
+
+
+
+ InternalExecuteCallbackSynchronously_GeneralPath
+ This will be called on the target synchronization context, however, we still need to restore the required execution context
+
+
+
+
+ A sparsely populated array. Elements can be sparse and some null, but this allows for
+ lock-free additions and growth, and also for constant time removal (by nulling out).
+
+ The kind of elements contained within.
+
+
+
+ Allocates a new array with the given initial size.
+
+ How many array slots to pre-allocate.
+
+
+
+ Adds an element in the first available slot, beginning the search from the tail-to-head.
+ If no slots are available, the array is grown. The method doesn't return until successful.
+
+ The element to add.
+ Information about where the add happened, to enable O(1) deregistration.
+
+
+
+ The head of the doubly linked list.
+
+
+
+
+ The tail of the doubly linked list.
+
+
+
+
+ A struct to hold a link to the exact spot in an array an element was inserted, enabling
+ constant time removal later on.
+
+
+
+
+ A fragment of a sparsely populated array, doubly linked.
+
+ The kind of elements contained within.
+
+
+
+ Represents a synchronization primitive that is signaled when its count reaches zero.
+
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads, with the exception of Dispose, which
+ must only be used when all other operations on the have
+ completed, and Reset, which should only be used when no other threads are
+ accessing the event.
+
+
+
+
+ Initializes a new instance of class with the
+ specified count.
+
+ The number of signals required to set the .
+ is less
+ than 0.
+
+
+
+ Releases all resources used by the current instance of .
+
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ When overridden in a derived class, releases the unmanaged resources used by the
+ , and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources; false to release
+ only unmanaged resources.
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ Registers a signal with the , decrementing its
+ count.
+
+ true if the signal caused the count to reach zero and the event was set; otherwise,
+ false.
+ The current instance is already set.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Registers multiple signals with the ,
+ decrementing its count by the specified amount.
+
+ The number of signals to register.
+ true if the signals caused the count to reach zero and the event was set; otherwise,
+ false.
+
+ The current instance is already set. -or- Or is greater than .
+
+ is less
+ than 1.
+ The current instance has already been
+ disposed.
+
+
+
+ Increments the 's current count by one.
+
+ The current instance is already
+ set.
+ is equal to .
+
+ The current instance has already been disposed.
+
+
+
+
+ Attempts to increment the 's current count by one.
+
+ true if the increment succeeded; otherwise, false. If is
+ already at zero. this will return false.
+ is equal to .
+ The current instance has already been
+ disposed.
+
+
+
+ Increments the 's current count by a specified
+ value.
+
+ The value by which to increase .
+ is less than
+ 0.
+ The current instance is already
+ set.
+ is equal to .
+ The current instance has already been
+ disposed.
+
+
+
+ Attempts to increment the 's current count by a
+ specified value.
+
+ The value by which to increase .
+ true if the increment succeeded; otherwise, false. If is
+ already at zero this will return false.
+ is less
+ than 0.
+ The current instance is already
+ set.
+ is equal to .
+ The current instance has already been
+ disposed.
+
+
+
+ Resets the to the value of .
+
+
+ Unlike most of the members of , Reset is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+ The current instance has already been
+ disposed..
+
+
+
+ Resets the to a specified value.
+
+ The number of signals required to set the .
+
+ Unlike most of the members of , Reset is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+ is
+ less than 0.
+ The current instance has alread been disposed.
+
+
+
+ Blocks the current thread until the is set.
+
+
+ The caller of this method blocks indefinitely until the current instance is set. The caller will
+ return immediately if the event is currently in a set state.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Blocks the current thread until the is set, while
+ observing a .
+
+ The to
+ observe.
+
+ The caller of this method blocks indefinitely until the current instance is set. The caller will
+ return immediately if the event is currently in a set state. If the
+ CancellationToken being observed
+ is canceled during the wait operation, an
+ will be thrown.
+
+ has been
+ canceled.
+ The current instance has already been
+ disposed.
+
+
+
+ Blocks the current thread until the is set, using a
+ to measure the time interval.
+
+ A that represents the number of
+ milliseconds to wait, or a that represents -1 milliseconds to
+ wait indefinitely.
+ true if the was set; otherwise,
+ false.
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than .
+ The current instance has already been
+ disposed.
+
+
+
+ Blocks the current thread until the is set, using
+ a to measure the time interval, while observing a
+ .
+
+ A that represents the number of
+ milliseconds to wait, or a that represents -1 milliseconds to
+ wait indefinitely.
+ The to
+ observe.
+ true if the was set; otherwise,
+ false.
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than .
+ The current instance has already been
+ disposed.
+ has
+ been canceled.
+
+
+
+ Blocks the current thread until the is set, using a
+ 32-bit signed integer to measure the time interval.
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ true if the was set; otherwise,
+ false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ The current instance has already been
+ disposed.
+
+
+
+ Blocks the current thread until the is set, using a
+ 32-bit signed integer to measure the time interval, while observing a
+ .
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ The to
+ observe.
+ true if the was set; otherwise,
+ false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ The current instance has already been
+ disposed.
+ has
+ been canceled.
+
+
+
+ Throws an exception if the latch has been disposed.
+
+
+
+
+ Gets the number of remaining signals required to set the event.
+
+
+ The number of remaining signals required to set the event.
+
+
+
+
+ Gets the numbers of signals initially required to set the event.
+
+
+ The number of signals initially required to set the event.
+
+
+
+
+ Determines whether the event is set.
+
+ true if the event is set; otherwise, false.
+
+
+
+ Gets a that is used to wait for the event to be set.
+
+ A that is used to wait for the event to be set.
+ The current instance has already been disposed.
+
+ should only be used if it's needed for integration with code bases
+ that rely on having a WaitHandle. If all that's needed is to wait for the
+ to be set, the method should be preferred.
+
+
+
+
+ Provides a slimmed down version of .
+
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads, with the exception of Dispose, which
+ must only be used when all other operations on the have
+ completed, and Reset, which should only be used when no other threads are
+ accessing the event.
+
+
+
+
+ Initializes a new instance of the
+ class with an initial state of nonsignaled.
+
+
+
+
+ Initializes a new instance of the
+ class with a Boolen value indicating whether to set the intial state to signaled.
+
+ true to set the initial state signaled; false to set the initial state
+ to nonsignaled.
+
+
+
+ Initializes a new instance of the
+ class with a Boolen value indicating whether to set the intial state to signaled and a specified
+ spin count.
+
+ true to set the initial state to signaled; false to set the initial state
+ to nonsignaled.
+ The number of spin waits that will occur before falling back to a true
+ wait.
+ is less than
+ 0 or greater than the maximum allowed value.
+
+
+
+ Initializes the internal state of the event.
+
+ Whether the event is set initially or not.
+ The spin count that decides when the event will block.
+
+
+
+ Helper to ensure the lock object is created before first use.
+
+
+
+
+ This method lazily initializes the event object. It uses CAS to guarantee that
+ many threads racing to call this at once don't result in more than one event
+ being stored and used. The event will be signaled or unsignaled depending on
+ the state of the thin-event itself, with synchronization taken into account.
+
+ True if a new event was created and stored, false otherwise.
+
+
+
+ Sets the state of the event to signaled, which allows one or more threads waiting on the event to
+ proceed.
+
+
+
+
+ Private helper to actually perform the Set.
+
+ Indicates whether we are calling Set() during cancellation.
+ The object has been canceled.
+
+
+
+ Sets the state of the event to nonsignaled, which causes threads to block.
+
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ Blocks the current thread until the current is set.
+
+
+ The maximum number of waiters has been exceeded.
+
+
+ The caller of this method blocks indefinitely until the current instance is set. The caller will
+ return immediately if the event is currently in a set state.
+
+
+
+
+ Blocks the current thread until the current receives a signal,
+ while observing a .
+
+ The to
+ observe.
+
+ The maximum number of waiters has been exceeded.
+
+ was
+ canceled.
+
+ The caller of this method blocks indefinitely until the current instance is set. The caller will
+ return immediately if the event is currently in a set state.
+
+
+
+
+ Blocks the current thread until the current is set, using a
+ to measure the time interval.
+
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ true if the was set; otherwise,
+ false.
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than .
+
+ The maximum number of waiters has been exceeded.
+
+
+
+
+ Blocks the current thread until the current is set, using a
+ to measure the time interval, while observing a .
+
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ The to
+ observe.
+ true if the was set; otherwise,
+ false.
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than .
+ was canceled.
+
+ The maximum number of waiters has been exceeded.
+
+
+
+
+ Blocks the current thread until the current is set, using a
+ 32-bit signed integer to measure the time interval.
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ true if the was set; otherwise,
+ false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+
+ The maximum number of waiters has been exceeded.
+
+
+
+
+ Blocks the current thread until the current is set, using a
+ 32-bit signed integer to measure the time interval, while observing a .
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ The to
+ observe.
+ true if the was set; otherwise,
+ false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+
+ The maximum number of waiters has been exceeded.
+
+ was canceled.
+
+
+
+ Releases all resources used by the current instance of .
+
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ When overridden in a derived class, releases the unmanaged resources used by the
+ , and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources;
+ false to release only unmanaged resources.
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ Throw ObjectDisposedException if the MRES is disposed
+
+
+
+
+ Private helper method to wake up waiters when a cancellationToken gets canceled.
+
+
+
+
+ Private helper method for updating parts of a bit-string state value.
+ Mainly called from the IsSet and Waiters properties setters
+
+
+ Note: the parameter types must be int as CompareExchange cannot take a Uint
+
+ The new value
+ The mask used to set the bits
+
+
+
+ Private helper method - performs Mask and shift, particular helpful to extract a field from a packed word.
+ eg ExtractStatePortionAndShiftRight(0x12345678, 0xFF000000, 24) => 0x12, ie extracting the top 8-bits as a simple integer
+
+ ?? is there a common place to put this rather than being private to MRES?
+
+
+
+
+
+
+
+
+ Performs a Mask operation, but does not perform the shift.
+ This is acceptable for boolean values for which the shift is unnecessary
+ eg (val & Mask) != 0 is an appropriate way to extract a boolean rather than using
+ ((val & Mask) >> shiftAmount) == 1
+
+ ?? is there a common place to put this rather than being private to MRES?
+
+
+
+
+
+
+ Helper function to measure and update the wait time
+
+ The first time (in Ticks) observed when the wait started.
+ The orginal wait timeoutout in milliseconds.
+ The new wait time in milliseconds, -1 if the time expired, -2 if overflow in counters
+ has occurred.
+
+
+
+ Gets the underlying object for this .
+
+ The underlying event object fore this .
+
+ Accessing this property forces initialization of an underlying event object if one hasn't
+ already been created. To simply wait on this ,
+ the public Wait methods should be preferred.
+
+
+
+
+ Gets whether the event is set.
+
+ true if the event has is set; otherwise, false.
+
+
+
+ Gets the number of spin waits that will be occur before falling back to a true wait.
+
+
+
+
+ How many threads are waiting.
+
+
+
+
+ Provides support for lazy initialization.
+
+ Specifies the type of element being laziliy initialized.
+
+
+ By default, all public and protected members of are thread-safe and may be used
+ concurrently from multiple threads. These thread-safety guarantees may be removed optionally and per instance
+ using parameters to the type's constructors.
+
+
+
+
+
+ Initializes a new instance of the class that
+ uses 's default constructor for lazy initialization.
+
+
+ An instance created with this constructor may be used concurrently from multiple threads.
+
+
+
+
+ Initializes a new instance of the class that uses a
+ specified initialization function.
+
+
+ The invoked to produce the lazily-initialized value when it is
+ needed.
+
+ is a null
+ reference (Nothing in Visual Basic).
+
+ An instance created with this constructor may be used concurrently from multiple threads.
+
+
+
+
+ Initializes a new instance of the
+ class that uses 's default constructor and a specified thread-safety mode.
+
+ true if this instance should be usable by multiple threads concurrently; false if the instance will only be used by one thread at a time.
+
+
+
+
+ Initializes a new instance of the
+ class that uses 's default constructor and a specified thread-safety mode.
+
+ The lazy thread-safety mode mode
+ mode contains an invalid valuee
+
+
+
+ Initializes a new instance of the class
+ that uses a specified initialization function and a specified thread-safety mode.
+
+
+ The invoked to produce the lazily-initialized value when it is needed.
+
+ true if this instance should be usable by multiple threads concurrently; false if the instance will only be used by one thread at a time.
+
+ is
+ a null reference (Nothing in Visual Basic).
+
+
+
+ Initializes a new instance of the class
+ that uses a specified initialization function and a specified thread-safety mode.
+
+
+ The invoked to produce the lazily-initialized value when it is needed.
+
+ The lazy thread-safety mode.
+ is
+ a null reference (Nothing in Visual Basic).
+ mode contains an invalid value.
+
+
+
+ Static helper function that returns an object based on the given mode. it also throws an exception if the mode is invalid
+
+
+
+ Forces initialization during serialization.
+ The StreamingContext for the serialization operation.
+
+
+ Creates and returns a string representation of this instance.
+ The result of calling on the .
+
+ The is null.
+
+
+
+
+ local helper method to initialize the value
+
+ The inititialized T value
+
+
+ Creates an instance of T using m_valueFactory in case its not null or use reflection to create a new T()
+ An instance of Boxed.
+
+
+ Gets the value of the Lazy<T> for debugging display purposes.
+
+
+
+ Gets a value indicating whether this instance may be used concurrently from multiple threads.
+
+
+
+
+ Gets whether the value creation is faulted or not
+
+
+
+ Gets a value indicating whether the has been initialized.
+
+ true if the instance has been initialized;
+ otherwise, false.
+
+ The initialization of a instance may result in either
+ a value being produced or an exception being thrown. If an exception goes unhandled during initialization,
+ will return false.
+
+
+
+
+
+ wrapper class to box the initialized value, this is mainly created to avoid boxing/unboxing the value each time the value is called in case T is
+ a value type
+
+
+
+
+ Wrapper class to wrap the excpetion thrown by the value factory
+
+
+
+ A debugger view of the Lazy<T> to surface additional debugging properties and
+ to ensure that the Lazy<T> does not become initialized if it was not already.
+
+
+ Constructs a new debugger view object for the provided Lazy object.
+ A Lazy object to browse in the debugger.
+
+
+ Returns whether the Lazy object is initialized or not.
+
+
+ Returns the value of the Lazy object.
+
+
+ Returns the execution mode of the Lazy object
+
+
+ Returns the execution mode of the Lazy object
+
+
+
+ Specifies how a instance should synchronize access among multiple threads.
+
+
+
+
+ This mode makes no guarantees around the thread-safety of the instance. If used from multiple threads, the behavior of the is undefined.
+ This mode should be used when a is guaranteed to never be initialized from more than one thread simultaneously and high performance is crucial.
+ If valueFactory throws an exception when the is initialized, the exception will be cached and returned on subsequent accesses to Value. Also, if valueFactory recursively
+ accesses Value on this instance, a will be thrown.
+
+
+
+
+ When multiple threads attempt to simultaneously initialize a instance, this mode allows each thread to execute the
+ valueFactory but only the first thread to complete initialization will be allowed to set the final value of the .
+ Once initialized successfully, any future calls to Value will return the cached result. If valueFactory throws an exception on any thread, that exception will be
+ propagated out of Value. If any thread executes valueFactory without throwing an exception and, therefore, successfully sets the value, that value will be returned on
+ subsequent accesses to Value from any thread. If no thread succeeds in setting the value, IsValueCreated will remain false and subsequent accesses to Value will result in
+ the valueFactory delegate re-executing. Also, if valueFactory recursively accesses Value on this instance, an exception will NOT be thrown.
+
+
+
+
+ This mode uses locks to ensure that only a single thread can initialize a instance in a thread-safe manner. In general,
+ taken if this mode is used in conjunction with a valueFactory delegate that uses locks internally, a deadlock can occur if not
+ handled carefully. If valueFactory throws an exception when the is initialized, the exception will be cached and returned on
+ subsequent accesses to Value. Also, if valueFactory recursively accesses Value on this instance, a will be thrown.
+
+
+
+
+ Provides lazy initialization routines.
+
+
+ These routines avoid needing to allocate a dedicated, lazy-initialization instance, instead using
+ references to ensure targets have been initialized as they are accessed.
+
+
+
+
+ Initializes a target reference type with the type's default constructor if the target has not
+ already been initialized.
+
+ The refence type of the reference to be initialized.
+ A reference of type to initialize if it has not
+ already been initialized.
+ The initialized reference of type .
+ Type does not have a default
+ constructor.
+
+ Permissions to access the constructor of type were missing.
+
+
+
+ This method may only be used on reference types. To ensure initialization of value
+ types, see other overloads of EnsureInitialized.
+
+
+ This method may be used concurrently by multiple threads to initialize .
+ In the event that multiple threads access this method concurrently, multiple instances of
+ may be created, but only one will be stored into . In such an occurrence, this method will not dispose of the
+ objects that were not stored. If such objects must be disposed, it is up to the caller to determine
+ if an object was not used and to then dispose of the object appropriately.
+
+
+
+
+
+ Initializes a target reference type using the specified function if it has not already been
+ initialized.
+
+ The reference type of the reference to be initialized.
+ The reference of type to initialize if it has not
+ already been initialized.
+ The invoked to initialize the
+ reference.
+ The initialized reference of type .
+ Type does not have a
+ default constructor.
+ returned
+ null.
+
+
+ This method may only be used on reference types, and may
+ not return a null reference (Nothing in Visual Basic). To ensure initialization of value types or
+ to allow null reference types, see other overloads of EnsureInitialized.
+
+
+ This method may be used concurrently by multiple threads to initialize .
+ In the event that multiple threads access this method concurrently, multiple instances of
+ may be created, but only one will be stored into . In such an occurrence, this method will not dispose of the
+ objects that were not stored. If such objects must be disposed, it is up to the caller to determine
+ if an object was not used and to then dispose of the object appropriately.
+
+
+
+
+
+ Initialize the target using the given delegate (slow path).
+
+ The reference type of the reference to be initialized.
+ The variable that need to be initialized
+ The delegate that will be executed to initialize the target
+ The initialized variable
+
+
+
+ Initializes a target reference or value type with its default constructor if it has not already
+ been initialized.
+
+ The type of the reference to be initialized.
+ A reference or value of type to initialize if it
+ has not already been initialized.
+ A reference to a boolean that determines whether the target has already
+ been initialized.
+ A reference to an object used as the mutually exclusive lock for initializing
+ .
+ The initialized value of type .
+
+
+
+ Initializes a target reference or value type with a specified function if it has not already been
+ initialized.
+
+ The type of the reference to be initialized.
+ A reference or value of type to initialize if it
+ has not already been initialized.
+ A reference to a boolean that determines whether the target has already
+ been initialized.
+ A reference to an object used as the mutually exclusive lock for initializing
+ .
+ The invoked to initialize the
+ reference or value.
+ The initialized value of type .
+
+
+
+ Ensure the target is initialized and return the value (slow path). This overload permits nulls
+ and also works for value type targets. Uses the supplied function to create the value.
+
+ The type of target.
+ A reference to the target to be initialized.
+ A reference to a location tracking whether the target has been initialized.
+ A reference to a location containing a mutual exclusive lock.
+
+ The to invoke in order to produce the lazily-initialized value.
+
+ The initialized object.
+
+
+
+ A seprate non generic class that contains a global counter for fast path instances for all Ts that has been created, and adds an upper limit for all instances
+ that uses the fast path, if this limit has been reached, all new instances will use the slow path
+
+
+
+
+ Provides thread-local storage of data.
+
+ Specifies the type of data stored per-thread.
+
+
+ With the exception of , all public and protected members of
+ are thread-safe and may be used
+ concurrently from multiple threads.
+
+
+
+
+
+ Initializes the instance.
+
+
+
+
+ Initializes the instance with the
+ specified function.
+
+
+ The invoked to produce a lazily-initialized value when
+ an attempt is made to retrieve without it having been previously initialized.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Releases the resources used by this instance.
+
+
+
+
+ Releases the resources used by this instance.
+
+
+ Unlike most of the members of , this method is not thread-safe.
+
+
+
+
+ Releases the resources used by this instance.
+
+
+ A Boolean value that indicates whether this method is being called due to a call to .
+
+
+ Unlike most of the members of , this method is not thread-safe.
+
+
+
+
+ Tries to get a unique index for the current instance of type T, it first tries to get it from the pool if it is not empty, otherwise it
+ increments the global counter if it is still below the maximum, otherwise it fails and returns -1
+
+ True if there is an index available, false otherwise
+
+
+
+ Gets an array of types that will be used as generic parameters for the GenericHolder class
+
+ The types array
+
+
+ Creates and returns a string representation of this instance for the current thread.
+ The result of calling on the .
+
+ The for the current thread is a null reference (Nothing in Visual Basic).
+
+
+ The initialization function referenced in an improper manner.
+
+
+ The instance has been disposed.
+
+
+ Calling this method forces initialization for the current thread, as is the
+ case with accessing directly.
+
+
+
+
+ Private helper function to lazily create the value using the calueSelector if specified in the constructor or the default parameterless constructor
+
+ Returns the boxed object
+
+
+
+ Gets or sets the value of this instance for the current thread.
+
+
+ The initialization function referenced in an improper manner.
+
+
+ The instance has been disposed.
+
+
+ If this instance was not previously initialized for the current thread,
+ accessing will attempt to initialize it. If an initialization function was
+ supplied during the construction, that initialization will happen by invoking the function
+ to retrieve the initial value for . Otherwise, the default value of
+ will be used.
+
+
+
+
+ Gets whether is initialized on the current thread.
+
+
+ The instance has been disposed.
+
+
+
+ Gets the value of the ThreadLocal<T> for debugging display purposes. It takes care of getting
+ the value for the current thread in the ThreadLocal mode.
+
+
+
+ The base abstract class for the holder
+
+
+
+
+ The TLS holder representation
+
+
+
+
+ The generic holder representation
+
+ Dummy param
+ Dummy param
+ Dummy param
+
+
+
+ wrapper to the actual value
+
+
+
+ A debugger view of the ThreadLocal<T> to surface additional debugging properties and
+ to ensure that the ThreadLocal<T> does not become initialized if it was not already.
+
+
+ Constructs a new debugger view object for the provided ThreadLocal object.
+ A ThreadLocal object to browse in the debugger.
+
+
+ Returns whether the ThreadLocal object is initialized or not.
+
+
+ Returns the value of the ThreadLocal object.
+
+
+
+ Limits the number of threads that can access a resource or pool of resources concurrently.
+
+
+
+ The provides a lightweight semaphore class that doesn't
+ use Windows kernel semaphores.
+
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads, with the exception of Dispose, which
+ must only be used when all other operations on the have
+ completed.
+
+
+
+
+
+ Initializes a new instance of the class, specifying
+ the initial number of requests that can be granted concurrently.
+
+ The initial number of requests for the semaphore that can be granted
+ concurrently.
+
+ is less than 0.
+
+
+
+ Initializes a new instance of the class, specifying
+ the initial and maximum number of requests that can be granted concurrently.
+
+ The initial number of requests for the semaphore that can be granted
+ concurrently.
+ The maximum number of requests for the semaphore that can be granted
+ concurrently.
+
+ is less than 0. -or-
+ is greater than . -or-
+ is less than 0.
+
+
+
+ Blocks the current thread until it can enter the .
+
+ The current instance has already been
+ disposed.
+
+
+
+ Blocks the current thread until it can enter the , while observing a
+ .
+
+ The token to
+ observe.
+ was
+ canceled.
+ The current instance has already been
+ disposed.
+
+
+
+ Blocks the current thread until it can enter the , using a to measure the time interval.
+
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ true if the current thread successfully entered the ;
+ otherwise, false.
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than .
+
+
+
+ Blocks the current thread until it can enter the , using a to measure the time interval, while observing a .
+
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ The to
+ observe.
+ true if the current thread successfully entered the ;
+ otherwise, false.
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than .
+ was canceled.
+
+
+
+ Blocks the current thread until it can enter the , using a 32-bit
+ signed integer to measure the time interval.
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ true if the current thread successfully entered the ;
+ otherwise, false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+
+
+
+ Blocks the current thread until it can enter the ,
+ using a 32-bit signed integer to measure the time interval,
+ while observing a .
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+ The to observe.
+ true if the current thread successfully entered the ; otherwise, false.
+ is a negative number other than -1,
+ which represents an infinite time-out.
+ was canceled.
+
+
+
+ Local helper function, waits on the monitor until the monitor recieves signal or the
+ timeout is expired
+
+ The maximum timeout
+ The start ticks to calculate the elapsed time
+ The CancellationToken to observe.
+ true if the monitor recieved a signal, false if the timeout expired
+
+
+
+ Exits the once.
+
+ The previous count of the .
+ The current instance has already been
+ disposed.
+
+
+
+ Exits the a specified number of times.
+
+ The number of times to exit the semaphore.
+ The previous count of the .
+ is less
+ than 1.
+ The has
+ already reached its maximum size.
+ The current instance has already been
+ disposed.
+
+
+
+ Releases all resources used by the current instance of .
+
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ When overridden in a derived class, releases the unmanaged resources used by the
+ , and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources;
+ false to release only unmanaged resources.
+
+ Unlike most of the members of , is not
+ thread-safe and may not be used concurrently with other members of this instance.
+
+
+
+
+ Helper function to measure and update the wait time
+
+ The first time (in Ticks) observed when the wait started
+ The orginal wait timeoutout in milliseconds
+ The new wait time in milliseconds, -1 if the time expired
+
+
+
+ Private helper method to wake up waiters when a cancellationToken gets canceled.
+
+
+
+
+ Checks the dispose status by checking the lock object, if it is null means that object
+ has been disposed and throw ObjectDisposedException
+
+
+
+
+ local helper function to retrieve the exception string message from the resource file
+
+ The key string
+
+
+
+ Gets the current count of the .
+
+ The current count of the .
+
+
+
+ Returns a that can be used to wait on the semaphore.
+
+ A that can be used to wait on the
+ semaphore.
+
+ A successful wait on the does not imply a successful wait on
+ the itself, nor does it decrement the semaphore's
+ count. exists to allow a thread to block waiting on multiple
+ semaphores, but such a wait should be followed by a true wait on the target semaphore.
+
+ The has been disposed.
+
+
+
+ Provides support for spin-based waiting.
+
+
+
+ encapsulates common spinning logic. On single-processor machines, yields are
+ always used instead of busy waits, and on computers with Intel™ processors employing Hyper-Threading™
+ technology, it helps to prevent hardware thread starvation. SpinWait encapsulates a good mixture of
+ spinning and true yielding.
+
+
+ is a value type, which means that low-level code can utilize SpinWait without
+ fear of unnecessary allocation overheads. SpinWait is not generally useful for ordinary applications.
+ In most cases, you should use the synchronization classes provided by the .NET Framework, such as
+ . For most purposes where spin waiting is required, however,
+ the type should be preferred over the method.
+
+
+ While SpinWait is designed to be used in concurrent applications, it is not designed to be
+ used from multiple threads concurrently. SpinWait's members are not thread-safe. If multiple
+ threads must spin, each should use its own instance of SpinWait.
+
+
+
+
+
+ Performs a single spin.
+
+
+ This is typically called in a loop, and may change in behavior based on the number of times a
+ has been called thus far on this instance.
+
+
+
+
+ Resets the spin counter.
+
+
+ This makes and behave as though no calls
+ to had been issued on this instance. If a instance
+ is reused many times, it may be useful to reset it to avoid yielding too soon.
+
+
+
+
+ Spins until the specified condition is satisfied.
+
+ A delegate to be executed over and over until it returns true.
+ The argument is null.
+
+
+
+ Spins until the specified condition is satisfied or until the specified timeout is expired.
+
+ A delegate to be executed over and over until it returns true.
+
+ A that represents the number of milliseconds to wait,
+ or a TimeSpan that represents -1 milliseconds to wait indefinitely.
+ True if the condition is satisfied within the timeout; otherwise, false
+ The argument is null.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than
+ .
+
+
+
+ Spins until the specified condition is satisfied or until the specified timeout is expired.
+
+ A delegate to be executed over and over until it returns true.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ True if the condition is satisfied within the timeout; otherwise, false
+ The argument is null.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+
+
+
+ Gets the number of times has been called on this instance.
+
+
+
+
+ Gets whether the next call to will yield the processor, triggering a
+ forced context switch.
+
+ Whether the next call to will yield the processor, triggering a
+ forced context switch.
+
+ On a single-CPU machine, always yields the processor. On machines with
+ multiple CPUs, may yield after an unspecified number of calls.
+
+
+
+
+ A helper class to get the number of preocessors, it updates the numbers of processors every sampling interval
+
+
+
+
+ Gets the number of available processors
+
+
+
+
+ Gets whether the current machine has only a single processor.
+
+
+
+
+ Provides a mutual exclusion lock primitive where a thread trying to acquire the lock waits in a loop
+ repeatedly checking until the lock becomes available.
+
+
+
+ Spin locks can be used for leaf-level locks where the object allocation implied by using a , in size or due to garbage collection pressure, is overly
+ expensive. Avoiding blocking is another reason that a spin lock can be useful, however if you expect
+ any significant amount of blocking, you are probably best not using spin locks due to excessive
+ spinning. Spinning can be beneficial when locks are fine grained and large in number (for example, a
+ lock per node in a linked list) as well as when lock hold times are always extremely short. In
+ general, while holding a spin lock, one should avoid blocking, calling anything that itself may
+ block, holding more than one spin lock at once, making dynamically dispatched calls (interface and
+ virtuals), making statically dispatched calls into any code one doesn't own, or allocating memory.
+
+
+ should only be used when it's been determined that doing so will improve an
+ application's performance. It's also important to note that is a value type,
+ for performance reasons. As such, one must be very careful not to accidentally copy a SpinLock
+ instance, as the two instances (the original and the copy) would then be completely independent of
+ one another, which would likely lead to erroneous behavior of the application. If a SpinLock instance
+ must be passed around, it should be passed by reference rather than by value.
+
+
+ Do not store instances in readonly fields.
+
+
+ All members of are thread-safe and may be used from multiple threads
+ concurrently.
+
+
+
+
+
+ Initializes a new instance of the
+ structure with the option to track thread IDs to improve debugging.
+
+
+ The default constructor for tracks thread ownership.
+
+ Whether to capture and use thread IDs for debugging
+ purposes.
+
+
+
+ Initializes a new instance of the
+ structure with the option to track thread IDs to improve debugging.
+
+
+ The default constructor for tracks thread ownership.
+
+
+ Acquires the lock in a reliable manner, such that even if an exception occurs within the method
+ call, can be examined reliably to determine whether the lock was
+ acquired.
+
+
+ is a non-reentrant lock, meaning that if a thread holds the lock, it is
+ not allowed to enter the lock again. If thread ownership tracking is enabled (whether it's
+ enabled is available through ), an exception will be
+ thrown when a thread tries to re-enter a lock it already holds. However, if thread ownership
+ tracking is disabled, attempting to enter a lock already held will result in deadlock.
+
+ True if the lock is acquired; otherwise, false. must be initialized to false prior to calling this method.
+
+ Thread ownership tracking is enabled, and the current thread has already acquired this lock.
+
+
+ The argument must be initialized to false prior to calling Enter.
+
+
+
+
+ Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within
+ the method call, can be examined reliably to determine whether the
+ lock was acquired.
+
+
+ Unlike , TryEnter will not block waiting for the lock to be available. If the
+ lock is not available when TryEnter is called, it will return immediately without any further
+ spinning.
+
+ True if the lock is acquired; otherwise, false. must be initialized to false prior to calling this method.
+
+ Thread ownership tracking is enabled, and the current thread has already acquired this lock.
+
+
+ The argument must be initialized to false prior to calling TryEnter.
+
+
+
+
+ Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within
+ the method call, can be examined reliably to determine whether the
+ lock was acquired.
+
+
+ Unlike , TryEnter will not block indefinitely waiting for the lock to be
+ available. It will block until either the lock is available or until the
+ has expired.
+
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ True if the lock is acquired; otherwise, false. must be initialized to false prior to calling this method.
+
+ Thread ownership tracking is enabled, and the current thread has already acquired this lock.
+
+
+ The argument must be initialized to false prior to calling TryEnter.
+
+ is a negative
+ number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
+ than milliseconds.
+
+
+
+
+ Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within
+ the method call, can be examined reliably to determine whether the
+ lock was acquired.
+
+
+ Unlike , TryEnter will not block indefinitely waiting for the lock to be
+ available. It will block until either the lock is available or until the has expired.
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ True if the lock is acquired; otherwise, false. must be initialized to false prior to calling this method.
+
+ Thread ownership tracking is enabled, and the current thread has already acquired this lock.
+
+
+ The argument must be initialized to false prior to calling TryEnter.
+
+ is
+ a negative number other than -1, which represents an infinite time-out.
+
+
+
+ Try acquire the lock with long path, this is usually called after the first path in Enter and
+ TryEnter failed The reason for short path is to make it inline in the run time which improves the
+ performance. This method assumed that the parameter are validated in Enter ir TryENter method
+
+ The timeout milliseconds
+ The lockTaken param
+
+
+
+ decrements the waiters, in case of the timeout is expired
+
+
+
+
+ ContinueTryEnter for the thread tracking mode enabled
+
+
+
+
+ Helper function to validate the timeout
+
+ The start time in ticks
+ The orginal wait time
+ True if expired, false otherwise
+
+
+
+ Releases the lock.
+
+
+ The default overload of provides the same behavior as if calling using true as the argument.
+
+
+ Thread ownership tracking is enabled, and the current thread is not the owner of this lock.
+
+
+
+
+ Releases the lock.
+
+
+ A Boolean value that indicates whether a memory fence should be issued in order to immediately
+ publish the exit operation to other threads.
+
+
+ Calling with the argument set to
+ true will improve the fairness of the lock at the expense of some performance. The default
+ overload behaves as if specifying true for .
+
+
+ Thread ownership tracking is enabled, and the current thread is not the owner of this lock.
+
+
+
+
+ Gets whether the lock is currently held by any thread.
+
+
+
+
+ Gets whether the lock is currently held by any thread.
+
+
+ Gets whether the lock is held by the current thread.
+
+
+ If the lock was initialized to track owner threads, this will return whether the lock is acquired
+ by the current thread. It is invalid to use this property when the lock was initialized to not
+ track thread ownership.
+
+
+ Thread ownership tracking is disabled.
+
+
+
+ Gets whether thread ownership tracking is enabled for this instance.
+
+
+
+ Internal class used by debug type proxy attribute to display the owner thread ID
+
+
+
+
+ SystemThreading_SpinLockDebugView constructor
+
+ The SpinLock to be proxied.
+
+
+
+ Checks if the lock is held by the current thread or not
+
+
+
+
+ Gets the current owner thread, zero if it is released
+
+
+
+
+ Gets whether the lock is currently held by any thread or not.
+
+
+
+
+ Stores options that configure the operation of methods on the
+ Parallel class.
+
+
+ By default, methods on the Parallel class attempt to utilize all available processors, are non-cancelable, and target
+ the default TaskScheduler (TaskScheduler.Default). enables
+ overriding these defaults.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ This constructor initializes the instance with default values.
+ is initialized to -1, signifying that there is no upper bound set on how much parallelism should
+ be employed. is initialized to a non-cancelable token,
+ and is initialized to the default scheduler (TaskScheduler.Default).
+ All of these defaults may be overwritten using the property set accessors on the instance.
+
+
+
+
+ Gets or sets the TaskScheduler
+ associated with this instance. Setting this property to null
+ indicates that the current scheduler should be used.
+
+
+
+
+ Gets or sets the maximum degree of parallelism enabled by this ParallelOptions instance.
+
+
+ The limits the number of concurrent operations run by Parallel method calls that are passed this
+ ParallelOptions instance to the set value, if it is positive. If is -1, then there is no limit placed on the number of concurrently
+ running operations.
+
+
+ The exception that is thrown when this is set to 0 or some
+ value less than -1.
+
+
+
+
+ Gets or sets the CancellationToken
+ associated with this instance.
+
+
+ Providing a CancellationToken
+ to a Parallel method enables the operation to be
+ exited early. Code external to the operation may cancel the token, and if the operation observes the
+ token being set, it may exit early by throwing an
+ .
+
+
+
+
+ Provides support for parallel loops and regions.
+
+
+ The class provides library-based data parallel replacements
+ for common operations such as for loops, for each loops, and execution of a set of statements.
+
+
+
+
+ Executes each of the provided actions, possibly in parallel.
+
+ An array of Actions to execute.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null element.
+ The exception that is thrown when any
+ action in the array throws an exception.
+
+ This method can be used to execute a set of operations, potentially in parallel.
+ No guarantees are made about the order in which the operations execute or whether
+ they execute in parallel. This method does not return until each of the
+ provided operations has completed, regardless of whether completion
+ occurs due to normal or exceptional termination.
+
+
+
+
+ Executes each of the provided actions, possibly in parallel.
+
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ An array of Actions to execute.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null element.
+ The exception that is thrown when
+ the CancellationToken in the
+ is set.
+ The exception that is thrown when any
+ action in the array throws an exception.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+
+ This method can be used to execute a set of operations, potentially in parallel.
+ No guarantees are made about the order in which the operations execute or whether
+ the they execute in parallel. This method does not return until each of the
+ provided operations has completed, regardless of whether completion
+ occurs due to normal or exceptional termination.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the iteration count (an Int32) as a parameter.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the iteration count (an Int64) as a parameter.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the iteration count (an Int32) as a parameter.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the iteration count (an Int64) as a parameter.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int32),
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+ Calling ParallelLoopState.Break()
+ informs the For operation that iterations after the current one need not
+ execute. However, all iterations before the current one will still need to be executed if they have not already.
+ Therefore, calling Break is similar to using a break operation within a
+ conventional for loop in a language like C#, but it is not a perfect substitute: for example, there is no guarantee that iterations
+ after the current one will definitely not execute.
+
+
+ If executing all iterations before the current one is not necessary,
+ ParallelLoopState.Stop()
+ should be preferred to using Break. Calling Stop informs the For loop that it may abandon all remaining
+ iterations, regardless of whether they're for interations above or below the current,
+ since all required work has already been completed. As with Break, however, there are no guarantees regarding
+ which other iterations will not execute.
+
+
+ When a loop is ended prematurely, the that's returned will contain
+ relevant information about the loop's completion.
+
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int64),
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int32),
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The start index, inclusive.
+ The end index, exclusive.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int64),
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The type of the thread-local data.
+ The start index, inclusive.
+ The end index, exclusive.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int32),
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for loop in which iterations may run in parallel. Supports 64-bit indices.
+
+ The type of the thread-local data.
+ The start index, inclusive.
+ The end index, exclusive.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int64),
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The type of the thread-local data.
+ The start index, inclusive.
+ The end index, exclusive.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int32),
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for loop in which iterations may run in parallel.
+
+ The type of the thread-local data.
+ The start index, inclusive.
+ The end index, exclusive.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each value in the iteration range:
+ [fromInclusive, toExclusive). It is provided with the following parameters: the iteration count (an Int64),
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Performs the major work of the parallel for loop. It assumes that argument validation has already
+ been performed by the caller. This function's whole purpose in life is to enable as much reuse of
+ common implementation details for the various For overloads we offer. Without it, we'd end up
+ with lots of duplicate code. It handles: (1) simple for loops, (2) for loops that depend on
+ ParallelState, and (3) for loops with thread local data.
+
+ @TODO: at some point in the future, we may want to manually inline the interesting bits into the
+ specific overloads above. There is some overhead associated with the extra arguments passed to
+ the function, and various if-checks in the code. It is also more difficult to follow what the
+ code does as-is because it has to handle the three flavors.
+
+ The type of the local data.
+ The loop's start index, inclusive.
+ The loop's end index, exclusive.
+ A ParallelOptions instance.
+ The simple loop body.
+ The loop body for ParallelState overloads.
+ The loop body for thread local state overloads.
+ A selector function that returns new thread local state.
+ A cleanup function to destroy thread local state.
+ Only one of the body arguments may be supplied (i.e. they are exclusive).
+ A structure.
+
+
+
+ Performs the major work of the 64-bit parallel for loop. It assumes that argument validation has already
+ been performed by the caller. This function's whole purpose in life is to enable as much reuse of
+ common implementation details for the various For overloads we offer. Without it, we'd end up
+ with lots of duplicate code. It handles: (1) simple for loops, (2) for loops that depend on
+ ParallelState, and (3) for loops with thread local data.
+
+ @TODO: at some point in the future, we may want to manually inline the interesting bits into the
+ specific overloads above. There is some overhead associated with the extra arguments passed to
+ the function, and various if-checks in the code. It is also more difficult to follow what the
+ code does as-is because it has to handle the three flavors.
+
+ The type of the local data.
+ The loop's start index, inclusive.
+ The loop's end index, exclusive.
+ A ParallelOptions instance.
+ The simple loop body.
+ The loop body for ParallelState overloads.
+ The loop body for thread local state overloads.
+ A selector function that returns new thread local state.
+ A cleanup function to destroy thread local state.
+ Only one of the body arguments may be supplied (i.e. they are exclusive).
+ A structure.
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ An enumerable data source.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the current element as a parameter.
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ An enumerable data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the current element as a parameter.
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ An enumerable data source.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ An enumerable data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ An enumerable data source.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and the current element's index (an Int64).
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ An enumerable data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and the current element's index (an Int64).
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ The type of the thread-local data.
+ An enumerable data source.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ The type of the thread-local data.
+ An enumerable data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ The type of the thread-local data.
+ An enumerable data source.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, the current element's index (an Int64), and some local
+ state that may be shared amongst iterations that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for each operation on an
+ in which iterations may run in parallel.
+
+ The type of the data in the source.
+ The type of the thread-local data.
+ An enumerable data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The delegate is invoked once for each element in the
+ enumerable. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, the current element's index (an Int64), and some local
+ state that may be shared amongst iterations that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Performs the major work of the parallel foreach loop. It assumes that argument validation has
+ already been performed by the caller. This function's whole purpose in life is to enable as much
+ reuse of common implementation details for the various For overloads we offer. Without it, we'd
+ end up with lots of duplicate code. It handles: (1) simple foreach loops, (2) foreach loops that
+ depend on ParallelState, and (3) foreach loops that access indices, (4) foreach loops with thread
+ local data, and any necessary permutations thereof.
+
+ @TODO: at some point in the future, we may want to manually inline the interesting bits into the
+ specific overloads above. There is some overhead associated with the extra arguments passed to
+ the function, and various if-checks in the code. It is also more difficult to follow what the
+ code does as-is because it has to handle the all flavors.
+
+ The type of the source data.
+ The type of the local data.
+ An enumerable data source.
+ ParallelOptions instance to use with this ForEach-loop
+ The simple loop body.
+ The loop body for ParallelState overloads.
+ The loop body for ParallelState/indexed overloads.
+ The loop body for ParallelState/thread local state overloads.
+ The loop body for ParallelState/indexed/thread local state overloads.
+ A selector function that returns new thread local state.
+ A cleanup function to destroy thread local state.
+ Only one of the bodyXX arguments may be supplied (i.e. they are exclusive).
+ A structure.
+
+
+
+ A fast path for the more general ForEachWorker method above. This uses ldelem instructions to
+ access the individual elements of the array, which will be faster.
+
+ The type of the source data.
+ The type of the local data.
+ An array data source.
+ The options to use for execution.
+ The simple loop body.
+ The loop body for ParallelState overloads.
+ The loop body for indexed/ParallelLoopState overloads.
+ The loop body for local/ParallelLoopState overloads.
+ The loop body for the most generic overload.
+ A selector function that returns new thread local state.
+ A cleanup function to destroy thread local state.
+ A structure.
+
+
+
+ A fast path for the more general ForEachWorker method above. This uses IList<T>'s indexer
+ capabilities to access the individual elements of the list rather than an enumerator.
+
+ The type of the source data.
+ The type of the local data.
+ A list data source.
+ The options to use for execution.
+ The simple loop body.
+ The loop body for ParallelState overloads.
+ The loop body for indexed/ParallelLoopState overloads.
+ The loop body for local/ParallelLoopState overloads.
+ The loop body for the most generic overload.
+ A selector function that returns new thread local state.
+ A cleanup function to destroy thread local state.
+ A structure.
+
+
+
+ Executes a for each operation on a
+ Partitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The Partitioner that contains the original data source.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the Partitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the Partitioner return null.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner does not return
+ the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner returns an IList
+ with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() method in the Partitioner returns an
+ IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the current element as a parameter.
+
+
+
+
+
+ Executes a for each operation on a
+ Partitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The Partitioner that contains the original data source.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the Partitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the Partitioner return null.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner does not return
+ the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner returns an IList
+ with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() method in the Partitioner returns an
+ IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+
+ Executes a for each operation on a
+ OrderablePartitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The OrderablePartitioner that contains the original data source.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when the
+ KeysNormalized property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the OrderablePartitioner return null.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner do not return the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner return an IList with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() or GetDynamicOrderablePartitions() methods in the
+ OrderablePartitioner return an IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and the current element's index (an Int64).
+
+
+
+
+
+ Executes a for each operation on a
+ Partitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The type of the thread-local data.
+ The Partitioner that contains the original data source.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the Partitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the Partitioner return null.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner does not return
+ the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner returns an IList
+ with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() method in the Partitioner returns an
+ IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for each operation on a
+ OrderablePartitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The type of the thread-local data.
+ The OrderablePartitioner that contains the original data source.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when the
+ KeysNormalized property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the OrderablePartitioner return null.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner do not return the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner return an IList with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() or GetDynamicOrderablePartitions() methods in the
+ OrderablePartitioner return an IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, the current element's index (an Int64), and some local
+ state that may be shared amongst iterations that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for each operation on a
+ Partitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The Partitioner that contains the original data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the Partitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the Partitioner return null.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner does not return
+ the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner returns an IList
+ with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() method in the Partitioner returns an
+ IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the current element as a parameter.
+
+
+
+
+
+ Executes a for each operation on a
+ Partitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The Partitioner that contains the original data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the Partitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the Partitioner return null.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner does not return
+ the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner returns an IList
+ with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() method in the Partitioner returns an
+ IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ and a ParallelLoopState instance that may be
+ used to break out of the loop prematurely.
+
+
+
+
+
+ Executes a for each operation on a
+ OrderablePartitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The OrderablePartitioner that contains the original data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The delegate that is invoked once per iteration.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when the
+ KeysNormalized property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the OrderablePartitioner return null.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner do not return the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner return an IList with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() or GetDynamicOrderablePartitions() methods in the
+ OrderablePartitioner return an IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and the current element's index (an Int64).
+
+
+
+
+
+ Executes a for each operation on a
+ Partitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The type of the thread-local data.
+ The Partitioner that contains the original data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the Partitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the Partitioner return null.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner does not return
+ the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() method in the Partitioner returns an IList
+ with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() method in the Partitioner returns an
+ IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, and some local state that may be shared amongst iterations
+ that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Executes a for each operation on a
+ OrderablePartitioner in which iterations may run in parallel.
+
+ The type of the elements in .
+ The type of the thread-local data.
+ The OrderablePartitioner that contains the original data source.
+ A ParallelOptions
+ instance that configures the behavior of this operation.
+ The function delegate that returns the initial state of the local data
+ for each thread.
+ The delegate that is invoked once per iteration.
+ The delegate that performs a final action on the local state of each
+ thread.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ CancellationToken in the
+ argument is set
+ The exception that is thrown when the
+ SupportsDynamicPartitions property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when the
+ KeysNormalized property in the OrderablePartitioner returns
+ false.
+ The exception that is thrown when any
+ methods in the OrderablePartitioner return null.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner do not return the correct number of partitions.
+ The exception that is thrown when the
+ GetPartitions() or GetOrderablePartitions() methods in the
+ OrderablePartitioner return an IList with at least one null value.
+ The exception that is thrown when the
+ GetDynamicPartitions() or GetDynamicOrderablePartitions() methods in the
+ OrderablePartitioner return an IEnumerable whose GetEnumerator() method returns null.
+ The exception that is thrown to contain an exception
+ thrown from one of the specified delegates.
+ The exception that is thrown when the
+ the CancellationTokenSource associated with the
+ the CancellationToken in the
+ has been disposed.
+ A ParallelLoopResult structure
+ that contains information on what portion of the loop completed.
+
+
+ The Partitioner is used to retrieve
+ the elements to be processed, in place of the original data source. If the current element's
+ index is desired, the source must be an
+ OrderablePartitioner.
+
+
+ The delegate is invoked once for each element in the
+ Partitioner. It is provided with the following parameters: the current element,
+ a ParallelLoopState instance that may be
+ used to break out of the loop prematurely, the current element's index (an Int64), and some local
+ state that may be shared amongst iterations that execute on the same thread.
+
+
+ The delegate is invoked once for each thread that participates in the loop's
+ execution and returns the initial local state for each of those threads. These initial states are passed to the first
+ invocations on each thread. Then, every subsequent body invocation returns a possibly
+ modified state value that is passed to the next body invocation. Finally, the last body invocation on each thread returns a state value
+ that is passed to the delegate. The localFinally delegate is invoked once per thread to perform a final
+ action on each thread's local state.
+
+
+
+
+
+ Internal utility function that implements the OCE filtering behavior for all Parallel.* APIs.
+ Throws a single OperationCancelledException object with the token if the Exception collection only contains
+ OperationCancelledExceptions with the given CancellationToken.
+
+
+ The exception collection to filter
+ The CancellationToken expected on all inner exceptions
+
+
+
+
+ Enables iterations of loops to interact with
+ other iterations.
+
+
+
+
+ Communicates that the loop should cease execution at the system's earliest
+ convenience.
+
+
+ The method was previously called. and may not be used in combination by iterations of the same loop.
+
+
+
+ may be used to communicate to the loop that no other iterations need be run.
+ For long-running iterations that may already be executing, causes
+ to return true for all other iterations of the loop, such that another iteration may check and exit early if it's observed to be true.
+
+
+ is typically employed in search-based algorithms, where once a result is found,
+ no other iterations need be executed.
+
+
+
+
+
+ Communicates that the loop should cease execution at the system's earliest
+ convenience of iterations beyond the current iteration.
+
+
+ The method was previously called. and
+ may not be used in combination by iterations of the same loop.
+
+
+
+ may be used to communicate to the loop that no other iterations after the
+ current iteration need be run. For example, if is called from the 100th
+ iteration of a for loop iterating in parallel from 0 to 1000, all iterations less than 100 should
+ still be run, but the iterations from 101 through to 1000 are not necessary.
+
+
+ For long-running iterations that may already be executing, causes
+ to be set to the current iteration's index if the current index is less than the current value of
+ .
+
+
+ is typically employed in search-based algorithms where an ordering is
+ present in the data source.
+
+
+
+
+
+ Internal/virtual support for ShouldExitCurrentIteration.
+
+
+
+
+ Gets whether the current iteration of the loop should exit based
+ on requests made by this or other iterations.
+
+
+ When an iteration of a loop calls or , or
+ when one throws an exception, or when the loop is canceled, the class will proactively
+ attempt to prohibit additional iterations of the loop from starting execution.
+ However, there may be cases where it is unable to prevent additional iterations from starting.
+ It may also be the case that a long-running iteration has already begun execution. In such
+ cases, iterations may explicitly check the property and
+ cease execution if the property returns true.
+
+
+
+
+ Gets whether any iteration of the loop has called .
+
+
+
+
+ Gets whether any iteration of the loop has thrown an exception that went unhandled by that
+ iteration.
+
+
+
+
+ Internal/virtual support for LowestBreakIteration.
+
+
+
+
+ Gets the lowest iteration of the loop from which was called.
+
+
+ If no iteration of the loop called , this property will return null.
+
+
+
+
+ Internal constructor to ensure an instance isn't created by users.
+
+ A flag shared among all threads participating
+ in the execution of a certain loop.
+
+
+
+ Communicates that parallel tasks should stop when they reach a specified iteration element.
+ (which is CurrentIteration of the caller).
+
+ Break() called after Stop().
+
+ This is shared with all other concurrent threads in the system which are participating in the
+ loop's execution. After calling Break(), no additional iterations will be executed on
+ the current thread, and other worker threads will execute once they get beyond the calling iteration.
+
+
+
+
+ Tracks the current loop iteration for the owning task.
+ This is used to compute whether or not the task should
+ terminate early due to a Break() call.
+
+
+
+
+ Returns true if we should be exiting from the current iteration
+ due to Stop(), Break() or exception.
+
+
+
+
+ Returns the lowest iteration at which Break() has been called, or
+ null if Break() has not yet been called.
+
+
+
+
+ Allows independent iterations of a parallel loop to interact with other iterations.
+
+
+
+
+ Internal constructor to ensure an instance isn't created by users.
+
+ A flag shared among all threads participating
+ in the execution of a certain loop.
+
+
+
+ Communicates that parallel tasks should stop when they reach a specified iteration element.
+ (which is CurrentIteration of the caller).
+
+ Break() called after Stop().
+
+ Atomically sets shared StoppedBroken flag to BROKEN, then atomically sets shared
+ LowestBreakIteration to CurrentIteration, but only if CurrentIteration is less than
+ LowestBreakIteration.
+
+
+
+
+ Tracks the current loop iteration for the owning task.
+ This is used to compute whether or not the task should
+ terminate early due to a Break() call.
+
+
+
+
+ Returns true if we should be exiting from the current iteration
+ due to Stop(), Break() or exception.
+
+
+
+
+ Returns the lowest iteration at which Break() has been called, or
+ null if Break() has not yet been called.
+
+
+
+
+ State information that is common between ParallelStateFlags class
+ and ParallelStateFlags64 class.
+
+
+
+
+ An internal class used to share accounting information in 32-bit versions
+ of For()/ForEach() loops.
+
+
+
+
+ Lets the caller know whether or not to prematurely exit the For/ForEach loop.
+ If this returns true, then exit the loop. Otherwise, keep going.
+
+ The caller's current iteration point
+ in the loop.
+
+ The loop should exit on any one of the following conditions:
+ (1) Stop() has been called by one or more tasks.
+ (2) An exception has been raised by one or more tasks.
+ (3) Break() has been called by one or more tasks, and
+ CallerIteration exceeds the (lowest) iteration at which
+ Break() was called.
+ (4) The loop was canceled.
+
+
+
+
+ An internal class used to share accounting information in 64-bit versions
+ of For()/ForEach() loops.
+
+
+
+
+ Lets the caller know whether or not to prematurely exit the For/ForEach loop.
+ If this returns true, then exit the loop. Otherwise, keep going.
+
+ The caller's current iteration point
+ in the loop.
+
+ The loop should exit on any one of the following conditions:
+ (1) Stop() has been called by one or more tasks.
+ (2) An exception has been raised by one or more tasks.
+ (3) Break() has been called by one or more tasks, and
+ CallerIteration exceeds the (lowest) iteration at which
+ Break() was called.
+ (4) The loop has been canceled.
+
+
+
+
+ Provides completion status on the execution of a loop.
+
+
+ If returns true, then the loop ran to completion, such that all iterations
+ of the loop were executed. If returns false and returns null, a call to was used to end the loop prematurely. If returns false and returns a non-null integral
+ value, was used to end the loop prematurely.
+
+
+
+
+ Gets whether the loop ran to completion, such that all iterations of the loop were executed
+ and the loop didn't receive a request to end prematurely.
+
+
+
+
+ Gets the index of the lowest iteration from which
+ was called.
+
+
+ If was not employed, this property will
+ return null.
+
+
+
+
+ Utility class for allocating structs as heap variables
+
+
+
+
+ Represents an index range
+
+
+
+
+ The RangeWorker struct wraps the state needed by a task that services the parallel loop
+
+
+
+
+ Initializes a RangeWorker struct
+
+
+
+
+ Implements the core work search algorithm that will be used for this range worker.
+
+
+ Usage pattern is:
+ 1) the thread associated with this rangeworker calls FindNewWork
+ 2) if we return true, the worker uses the nFromInclusiveLocal and nToExclusiveLocal values
+ to execute the sequential loop
+ 3) if we return false it means there is no more work left. It's time to quit.
+
+
+
+
+ 32 bit integer version of FindNewWork. Assumes the ranges were initialized with 32 bit values.
+
+
+
+
+ Represents the entire loop operation, keeping track of workers and ranges.
+
+
+ The usage pattern is:
+ 1) The Parallel loop entry function (ForWorker) creates an instance of this class
+ 2) Every thread joining to service the parallel loop calls RegisterWorker to grab a
+ RangeWorker struct to wrap the state it will need to find and execute work,
+ and they keep interacting with that struct until the end of the loop
+
+
+
+ Initializes a RangeManager with the given loop parameters, and the desired number of outer ranges
+
+
+
+
+ The function that needs to be called by each new worker thread servicing the parallel loop
+ in order to get a RangeWorker struct that wraps the state for finding and executing indices
+
+
+
+
+ Represents an asynchronous operation that produces a result at some time in the future.
+
+
+ The type of the result produced by this .
+
+
+
+ instances may be created in a variety of ways. The most common approach is by
+ using the task's property to retrieve a instance that can be used to create tasks for several
+ purposes. For example, to create a that runs a function, the factory's StartNew
+ method may be used:
+
+ // C#
+ var t = Task<int>.Factory.StartNew(() => GenerateResult());
+ - or -
+ var t = Task.Factory.StartNew(() => GenerateResult());
+
+ ' Visual Basic
+ Dim t = Task<int>.Factory.StartNew(Function() GenerateResult())
+ - or -
+ Dim t = Task.Factory.StartNew(Function() GenerateResult())
+
+
+
+ The class also provides constructors that initialize the task but that do not
+ schedule it for execution. For performance reasons, the StartNew method should be the
+ preferred mechanism for creating and scheduling computational tasks, but for scenarios where creation
+ and scheduling must be separated, the constructors may be used, and the task's
+ Start
+ method may then be used to schedule the task for execution at a later time.
+
+
+ All members of , except for
+ Dispose, are thread-safe
+ and may be used from multiple threads concurrently.
+
+
+
+
+
+ Represents an asynchronous operation.
+
+
+
+ instances may be created in a variety of ways. The most common approach is by
+ using the Task type's property to retrieve a instance that can be used to create tasks for several
+ purposes. For example, to create a that runs an action, the factory's StartNew
+ method may be used:
+
+ // C#
+ var t = Task.Factory.StartNew(() => DoAction());
+
+ ' Visual Basic
+ Dim t = Task.Factory.StartNew(Function() DoAction())
+
+
+
+ The class also provides constructors that initialize the Task but that do not
+ schedule it for execution. For performance reasons, TaskFactory's StartNew method should be the
+ preferred mechanism for creating and scheduling computational tasks, but for scenarios where creation
+ and scheduling must be separated, the constructors may be used, and the task's
+ method may then be used to schedule the task for execution at a later time.
+
+
+ All members of , except for , are thread-safe
+ and may be used from multiple threads concurrently.
+
+
+ For operations that return values, the class
+ should be used.
+
+
+ For developers implementing custom debuggers, several internal and private members of Task may be
+ useful (these may change from release to release). The Int32 m_taskId field serves as the backing
+ store for the property, however accessing this field directly from a debugger may be
+ more efficient than accessing the same value through the property's getter method (the
+ s_taskIdCounter Int32 counter is used to retrieve the next available ID for a Task). Similarly, the
+ Int32 m_stateFlags field stores information about the current lifecycle stage of the Task,
+ information also accessible through the property. The m_action System.Object
+ field stores a reference to the Task's delegate, and the m_stateObject System.Object field stores the
+ async state passed to the Task by the developer. Finally, for debuggers that parse stack frames, the
+ InternalWait method serves a potential marker for when a Task is entering a wait operation.
+
+
+
+
+
+ A type initializer that runs with the appropriate permissions.
+
+
+
+
+ Initializes a new with the specified action.
+
+ The delegate that represents the code to execute in the Task.
+ The argument is null.
+
+
+
+ Initializes a new with the specified action and CancellationToken.
+
+ The delegate that represents the code to execute in the Task.
+ The CancellationToken
+ that will be assigned to the new Task.
+ The argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Initializes a new with the specified action and creation options.
+
+ The delegate that represents the code to execute in the task.
+
+ The TaskCreationOptions used to
+ customize the Task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+
+
+
+ Initializes a new with the specified action and creation options.
+
+ The delegate that represents the code to execute in the task.
+ The that will be assigned to the new task.
+
+ The TaskCreationOptions used to
+ customize the Task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Initializes a new with the specified action and state.
+
+ The delegate that represents the code to execute in the task.
+ An object representing data to be used by the action.
+
+ The argument is null.
+
+
+
+
+ Initializes a new with the specified action, state, snd options.
+
+ The delegate that represents the code to execute in the task.
+ An object representing data to be used by the action.
+ The that will be assigned to the new task.
+
+ The argument is null.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Initializes a new with the specified action, state, snd options.
+
+ The delegate that represents the code to execute in the task.
+ An object representing data to be used by the action.
+
+ The TaskCreationOptions used to
+ customize the Task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+
+
+
+ Initializes a new with the specified action, state, snd options.
+
+ The delegate that represents the code to execute in the task.
+ An object representing data to be used by the action.
+ The that will be assigned to the new task.
+
+ The TaskCreationOptions used to
+ customize the Task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ An internal constructor used by the factory methods on task and its descendent(s).
+ This variant does not capture the ExecutionContext; it is up to the caller to do that.
+
+ An action to execute.
+ Optional state to pass to the action.
+ Parent of Task.
+ A CancellationToken for the task.
+ A task scheduler under which the task will run.
+ Options to control its execution.
+ Internal options to control its execution
+
+
+
+ Common logic used by the following internal ctors:
+ Task()
+ Task(object action, object state, Task parent, TaskCreationOptions options, TaskScheduler taskScheduler)
+
+ ASSUMES THAT m_creatingTask IS ALREADY SET.
+
+
+ Action for task to execute.
+ Object to which to pass to action (may be null)
+ Task scheduler on which to run thread (only used by continuation tasks).
+ A CancellationToken for the Task.
+ Options to customize behavior of Task.
+ Internal options to customize behavior of Task.
+
+
+
+ Checks if we registered a CT callback during construction, and deregisters it.
+ This should be called when we know the registration isn't useful anymore. Specifically from Finish() if the task has completed
+ successfully or with an exception.
+
+
+
+
+ Captures the ExecutionContext so long as flow isn't suppressed.
+
+ A stack crawl mark pointing to the frame of the caller.
+
+
+
+ Internal function that will be called by a new child task to add itself to
+ the children list of the parent (this).
+
+ Since a child task can only be created from the thread executing the action delegate
+ of this task, reentrancy is neither required nor supported. This should not be called from
+ anywhere other than the task construction/initialization codepaths.
+
+
+
+
+ Starts the , scheduling it for execution to the current TaskScheduler.
+
+
+ A task may only be started and run only once. Any attempts to schedule a task a second time
+ will result in an exception.
+
+
+ The is not in a valid state to be started. It may have already been started,
+ executed, or canceled, or it may have been created in a manner that doesn't support direct
+ scheduling.
+
+
+ The instance has been disposed.
+
+
+
+
+ Starts the , scheduling it for execution to the specified TaskScheduler.
+
+
+ A task may only be started and run only once. Any attempts to schedule a task a second time will
+ result in an exception.
+
+
+ The TaskScheduler with which to associate
+ and execute this task.
+
+
+ The argument is null.
+
+
+ The is not in a valid state to be started. It may have already been started,
+ executed, or canceled, or it may have been created in a manner that doesn't support direct
+ scheduling.
+
+
+ The instance has been disposed.
+
+
+
+
+ Runs the synchronously on the current TaskScheduler.
+
+
+
+ A task may only be started and run only once. Any attempts to schedule a task a second time will
+ result in an exception.
+
+
+ Tasks executed with will be associated with the current TaskScheduler.
+
+
+ If the target scheduler does not support running this Task on the current thread, the Task will
+ be scheduled for execution on the scheduler, and the current thread will block until the
+ Task has completed execution.
+
+
+
+ The is not in a valid state to be started. It may have already been started,
+ executed, or canceled, or it may have been created in a manner that doesn't support direct
+ scheduling.
+
+
+ The instance has been disposed.
+
+
+
+
+ Runs the synchronously on the scheduler provided.
+
+
+
+ A task may only be started and run only once. Any attempts to schedule a task a second time will
+ result in an exception.
+
+
+ If the target scheduler does not support running this Task on the current thread, the Task will
+ be scheduled for execution on the scheduler, and the current thread will block until the
+ Task has completed execution.
+
+
+
+ The is not in a valid state to be started. It may have already been started,
+ executed, or canceled, or it may have been created in a manner that doesn't support direct
+ scheduling.
+
+
+ The instance has been disposed.
+
+ The parameter
+ is null.
+ The scheduler on which to attempt to run this task inline.
+
+
+
+ Throws an exception if the task has been disposed, and hence can no longer be accessed.
+
+ The task has been disposed.
+
+
+
+ Sets the internal completion event.
+
+
+
+
+ Disposes the , releasing all of its unmanaged resources.
+
+
+ Unlike most of the members of , this method is not thread-safe.
+ Also, may only be called on a that is in one of
+ the final states: RanToCompletion,
+ Faulted, or
+ Canceled.
+
+
+ The exception that is thrown if the is not in
+ one of the final states: RanToCompletion,
+ Faulted, or
+ Canceled.
+
+
+
+
+ Disposes the , releasing all of its unmanaged resources.
+
+
+ A Boolean value that indicates whether this method is being called due to a call to .
+
+
+ Unlike most of the members of , this method is not thread-safe.
+
+
+
+
+ Schedules the task for execution.
+
+ If true, TASK_STATE_STARTED bit is turned on in
+ an atomic fashion, making sure that TASK_STATE_CANCELED does not get set
+ underneath us. If false, TASK_STATE_STARTED bit is OR-ed right in. This
+ allows us to streamline things a bit for StartNew(), where competing cancellations
+ are not a problem.
+
+
+
+ Adds an exception to the list of exceptions this task has thrown.
+
+ An object representing either an Exception or a collection of Exceptions.
+
+
+
+ Returns a list of exceptions by aggregating the holder's contents. Or null if
+ no exceptions have been thrown.
+
+ Whether to include a TCE if cancelled.
+ An aggregate exception, or null if no exceptions have been caught.
+
+
+
+ Throws an aggregate exception if the task contains exceptions.
+
+
+
+
+ Checks whether this is an attached task, and whether we are being called by the parent task.
+ And sets the TASK_STATE_EXCEPTIONOBSERVEDBYPARENT status flag based on that.
+
+ This is meant to be used internally when throwing an exception, and when WaitAll is gathering
+ exceptions for tasks it waited on. If this flag gets set, the implicit wait on children
+ will skip exceptions to prevent duplication.
+
+ This should only be called when this task has completed with an exception
+
+
+
+
+
+ Signals completion of this particular task.
+
+ The bUserDelegateExecuted parameter indicates whether this Finish() call comes following the
+ full execution of the user delegate.
+
+ If bUserDelegateExecuted is false, it mean user delegate wasn't invoked at all (either due to
+ a cancellation request, or because this task is a promise style Task). In this case, the steps
+ involving child tasks (i.e. WaitForChildren) will be skipped.
+
+
+
+
+
+ FinishStageTwo is to be executed as soon as we known there are no more children to complete.
+ It can happen i) either on the thread that originally executed this task (if no children were spawned, or they all completed by the time this task's delegate quit)
+ ii) or on the thread that executed the last child.
+
+
+
+
+ Final stage of the task completion code path. Notifies the parent (if any) that another of its childre are done, and runs continuations.
+ This function is only separated out from FinishStageTwo because these two operations are also needed to be called from CancellationCleanupLogic()
+
+
+
+
+ This is called by children of this task when they are completed.
+
+
+
+
+ This is to be called just before the task does its final state transition.
+ It traverses the list of exceptional children, and appends their aggregate exceptions into this one's exception list
+
+
+
+
+ Special purpose Finish() entry point to be used when the task delegate throws a ThreadAbortedException
+ This makes a note in the state flags so that we avoid any costly synchronous operations in the finish codepath
+ such as inlined continuations
+
+
+ Indicates whether the ThreadAbortException was added to this task's exception holder.
+ This should always be true except for the case of non-root self replicating task copies.
+
+ Whether the delegate was executed.
+
+
+
+ Executes the task. This method will only be called once, and handles bookeeping associated with
+ self-replicating tasks, in addition to performing necessary exception marshaling.
+
+ The task has already been disposed.
+
+
+
+ IThreadPoolWorkItem override, which is the entry function for this task when the TP scheduler decides to run it.
+
+
+
+
+
+ The ThreadPool calls this if a ThreadAbortException is thrown while trying to execute this workitem. This may occur
+ before Task would otherwise be able to observe it.
+
+
+
+
+ Outermost entry function to execute this task. Handles all aspects of executing a task on the caller thread.
+ Currently this is called by IThreadPoolWorkItem.ExecuteWorkItem(), and TaskManager.TryExecuteInline.
+
+
+ Performs atomic updates to prevent double execution. Should only be set to true
+ in codepaths servicing user provided TaskSchedulers. The ConcRT or ThreadPool schedulers don't need this.
+
+
+
+ The actual code which invokes the body of the task. This can be overriden in derived types.
+
+
+
+
+ Alternate InnerInvoke prototype to be called from ExecuteSelfReplicating() so that
+ the Parallel Debugger can discover the actual task being invoked.
+ Details: Here, InnerInvoke is actually being called on the rootTask object while we are actually executing the
+ childTask. And the debugger needs to discover the childTask, so we pass that down as an argument.
+ The NoOptimization and NoInlining flags ensure that the childTask pointer is retained, and that this
+ function appears on the callstack.
+
+
+
+
+
+ Performs whatever handling is necessary for an unhandled exception. Normally
+ this just entails adding the exception to the holder object.
+
+ The exception that went unhandled.
+
+
+
+ Waits for the to complete execution.
+
+
+ The was canceled -or- an exception was thrown during
+ the execution of the .
+
+
+ The has been disposed.
+
+
+
+
+ Waits for the to complete execution.
+
+
+ A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+
+ true if the completed execution within the allotted time; otherwise, false.
+
+
+ The was canceled -or- an exception was thrown during the execution of the .
+
+
+ is a negative number other than -1 milliseconds, which represents an
+ infinite time-out -or- timeout is greater than
+ .
+
+
+ The has been disposed.
+
+
+
+
+ Waits for the to complete execution.
+
+
+ A to observe while waiting for the task to complete.
+
+
+ The was canceled.
+
+
+ The was canceled -or- an exception was thrown during the execution of the .
+
+
+ The
+ has been disposed.
+
+
+
+
+ Waits for the to complete execution.
+
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+ true if the completed execution within the allotted time; otherwise,
+ false.
+
+
+ is a negative number other than -1, which represents an
+ infinite time-out.
+
+
+ The was canceled -or- an exception was thrown during the execution of the .
+
+
+ The
+ has been disposed.
+
+
+
+
+ Waits for the to complete execution.
+
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+
+
+ A to observe while waiting for the task to complete.
+
+
+ true if the completed execution within the allotted time; otherwise, false.
+
+
+ The was canceled -or- an exception was thrown during the execution of the .
+
+
+ The
+ has been disposed.
+
+
+ is a negative number other than -1, which represents an
+ infinite time-out.
+
+
+ The was canceled.
+
+
+
+
+ The core wait function, which is only accesible internally. It's meant to be used in places in TPL code where
+ the current context is known or cached.
+
+
+
+
+ Cancels the .
+
+ Indiactes whether we should only cancel non-invoked tasks.
+ For the default scheduler this option will only be serviced through TryDequeue.
+ For custom schedulers we also attempt an atomic state transition.
+ true if the task was successfully canceled; otherwise, false.
+ The
+ has been disposed.
+
+
+
+ Sets the task's cancellation acknowledged flag.
+
+
+
+
+ Runs all of the continuations, as appropriate.
+
+
+
+
+ Helper function to determine whether the current task is in the state desired by the
+ continuation kind under evaluation. Three possibilities exist: the task failed with
+ an unhandled exception (OnFailed), the task was canceled before running (OnAborted),
+ or the task completed successfully (OnCompletedSuccessfully). Note that the last
+ one includes completing due to cancellation.
+
+ The continuation options under evaluation.
+ True if the continuation should be run given the task's current state.
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ The that will be assigned to the new continuation task.
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ The to associate with the continuation task and to use for its execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed. If the continuation criteria specified through the parameter are not met, the continuation task will be canceled
+ instead of scheduled.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+ The that will be assigned to the new continuation task.
+
+ The to associate with the continuation task and to use for its
+ execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed. If the criteria specified through the parameter
+ are not met, the continuation task will be canceled instead of scheduled.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ The that will be assigned to the new continuation task.
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ The to associate with the continuation task and to use for its execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed. If the continuation criteria specified through the parameter are not met, the continuation task will be canceled
+ instead of scheduled.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ The that will be assigned to the new continuation task.
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+
+ The to associate with the continuation task and to use for its
+ execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed. If the criteria specified through the parameter
+ are not met, the continuation task will be canceled instead of scheduled.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Converts TaskContinuationOptions to TaskCreationOptions, and also does
+ some validity checking along the way.
+
+ Incoming TaskContinuationOptions
+ Outgoing TaskCreationOptions
+ Outgoing InternalTaskOptions
+
+
+
+ Registers the continuation and possibly runs it (if the task is already finished).
+
+ The continuation task itself.
+ TaskScheduler with which to associate continuation task.
+ Restrictions on when the continuation becomes active.
+
+
+
+ Waits for all of the provided objects to complete execution.
+
+
+ An array of instances on which to wait.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ At least one of the instances was canceled -or- an exception was thrown during
+ the execution of at least one of the instances.
+
+
+ The has been disposed.
+
+
+
+
+ Waits for all of the provided objects to complete execution.
+
+
+ true if all of the instances completed execution within the allotted time;
+ otherwise, false.
+
+
+ An array of instances on which to wait.
+
+
+ A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ At least one of the instances was canceled -or- an exception was thrown during
+ the execution of at least one of the instances.
+
+
+ is a negative number other than -1 milliseconds, which represents an
+ infinite time-out -or- timeout is greater than
+ .
+
+
+ The has been disposed.
+
+
+
+
+ Waits for all of the provided objects to complete execution.
+
+
+ true if all of the instances completed execution within the allotted time;
+ otherwise, false.
+
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+ An array of instances on which to wait.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ At least one of the instances was canceled -or- an exception was thrown during
+ the execution of at least one of the instances.
+
+
+ The has been disposed.
+
+
+ is a negative number other than -1, which represents an
+ infinite time-out.
+
+
+
+
+ Waits for all of the provided objects to complete execution.
+
+
+ true if all of the instances completed execution within the allotted time;
+ otherwise, false.
+
+
+ An array of instances on which to wait.
+
+
+ A to observe while waiting for the tasks to complete.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ At least one of the instances was canceled -or- an exception was thrown during
+ the execution of at least one of the instances.
+
+
+ The was canceled.
+
+
+ The has been disposed.
+
+
+
+
+ Waits for all of the provided objects to complete execution.
+
+
+ true if all of the instances completed execution within the allotted time;
+ otherwise, false.
+
+
+ An array of instances on which to wait.
+
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+
+
+ A to observe while waiting for the tasks to complete.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ At least one of the instances was canceled -or- an exception was thrown during
+ the execution of at least one of the instances.
+
+
+ The has been disposed.
+
+
+ is a negative number other than -1, which represents an
+ infinite time-out.
+
+
+ The was canceled.
+
+
+
+
+ Waits for a set of handles in a STA-aware way. In other words, it will wait for each
+ of the events individually if we're on a STA thread, because MsgWaitForMultipleObjectsEx
+ can't do a true wait-all due to its hidden message queue event. This is not atomic,
+ of course, but we only wait on one-way (MRE) events anyway so this is OK.
+
+ An array of wait handles to wait on.
+ The timeout to use during waits.
+ The cancellationToken that enables a wait to be canceled.
+ True if all waits succeeded, false if a timeout occurred.
+
+
+
+ Internal WaitAll implementation which is meant to be used with small number of tasks,
+ optimized for Parallel.Invoke and other structured primitives.
+
+
+
+
+ This internal function is only meant to be called by WaitAll()
+ If the completed task is canceled or it has other exceptions, here we will add those
+ into the passed in exception list (which will be lazily initialized here).
+
+
+
+
+ Waits for any of the provided objects to complete execution.
+
+
+ An array of instances on which to wait.
+
+ The index of the completed task in the array argument.
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ The has been disposed.
+
+
+
+
+ Waits for any of the provided objects to complete execution.
+
+
+ An array of instances on which to wait.
+
+
+ A that represents the number of milliseconds to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+
+ The index of the completed task in the array argument, or -1 if the
+ timeout occurred.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ The has been disposed.
+
+
+ is a negative number other than -1 milliseconds, which represents an
+ infinite time-out -or- timeout is greater than
+ .
+
+
+
+
+ Waits for any of the provided objects to complete execution.
+
+
+ An array of instances on which to wait.
+
+
+ A to observe while waiting for a task to complete.
+
+
+ The index of the completed task in the array argument.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ The has been disposed.
+
+
+ The was canceled.
+
+
+
+
+ Waits for any of the provided objects to complete execution.
+
+
+ An array of instances on which to wait.
+
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+
+
+ The index of the completed task in the array argument, or -1 if the
+ timeout occurred.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ The has been disposed.
+
+
+ is a negative number other than -1, which represents an
+ infinite time-out.
+
+
+
+
+ Waits for any of the provided objects to complete execution.
+
+
+ An array of instances on which to wait.
+
+
+ The number of milliseconds to wait, or (-1) to
+ wait indefinitely.
+
+
+ A to observe while waiting for a task to complete.
+
+
+ The index of the completed task in the array argument, or -1 if the
+ timeout occurred.
+
+
+ The argument is null.
+
+
+ The argument contains a null element.
+
+
+ The has been disposed.
+
+
+ is a negative number other than -1, which represents an
+ infinite time-out.
+
+
+ The was canceled.
+
+
+
+
+ Gets a unique ID for this Task instance.
+
+
+ Task IDs are assigned on-demand and do not necessarily represent the order in the which Task
+ instances were created.
+
+
+
+
+ Returns the unique ID of the currently executing Task.
+
+
+
+
+ Gets the Task instance currently executing, or
+ null if none exists.
+
+
+
+
+ Gets the StackGuard object assigned to the current thread.
+
+
+
+
+ Gets the Exception that caused the Task to end prematurely. If the Task completed successfully or has not yet thrown any
+ exceptions, this will return null.
+
+
+ Tasks that throw unhandled exceptions store the resulting exception and propagate it wrapped in a
+ in calls to Wait
+ or in accesses to the property. Any exceptions not observed by the time
+ the Task instance is garbage collected will be propagated on the finalizer thread.
+
+
+ The Task
+ has been disposed.
+
+
+
+
+ Gets the TaskStatus of this Task.
+
+
+
+
+ Gets whether this Task instance has completed
+ execution due to being canceled.
+
+
+ A Task will complete in Canceled state either if its CancellationToken
+ was marked for cancellation before the task started executing, or if the task acknowledged the cancellation request on
+ its already signaled CancellationToken by throwing an
+ OperationCanceledException that bears the same
+ CancellationToken.
+
+
+
+
+ Returns true if this task has a cancellation token and it was signaled.
+ To be used internally in execute entry codepaths.
+
+
+
+
+ This internal property provides access to the CancellationToken that was set on the task
+ when it was constructed.
+
+
+
+
+ Gets whether this threw an OperationCanceledException while its CancellationToken was signaled.
+
+
+
+
+ Gets whether this Task has completed.
+
+
+ will return true when the Task is in one of the three
+ final states: RanToCompletion,
+ Faulted, or
+ Canceled.
+
+
+
+
+ Checks whether this task has been disposed.
+
+
+
+
+ Gets the TaskCreationOptions used
+ to create this task.
+
+
+
+
+ Gets a that can be used to wait for the task to
+ complete.
+
+
+ Using the wait functionality provided by
+ should be preferred over using for similar
+ functionality.
+
+
+ The has been disposed.
+
+
+
+
+ Gets the state object supplied when the Task was created,
+ or null if none was supplied.
+
+
+
+
+ Gets an indication of whether the asynchronous operation completed synchronously.
+
+ true if the asynchronous operation completed synchronously; otherwise, false.
+
+
+
+ Provides access to the TaskScheduler responsible for executing this Task.
+
+
+
+
+ Provides access to factory methods for creating and instances.
+
+
+ The factory returned from is a default instance
+ of , as would result from using
+ the default constructor on TaskFactory.
+
+
+
+
+ Provides an event that can be used to wait for completion.
+ Only called by Wait*(), which means that we really do need to instantiate a completion event.
+
+
+
+
+ Determines whether this is the root task of a self replicating group.
+
+
+
+
+ Determines whether the task is a replica itself.
+
+
+
+
+ The property formerly known as IsFaulted.
+
+
+
+
+ Gets whether the completed due to an unhandled exception.
+
+
+ If is true, the Task's will be equal to
+ TaskStatus.Faulted, and its
+ property will be non-null.
+
+
+
+
+ Checks whether the TASK_STATE_EXCEPTIONOBSERVEDBYPARENT status flag is set,
+ This will only be used by the implicit wait to prevent double throws
+
+
+
+
+
+ Checks whether the body was ever invoked. Used by task scheduler code to verify custom schedulers actually ran the task.
+
+
+
+
+ A structure to hold continuation information.
+
+
+
+
+ Constructs a new continuation structure.
+
+ The task to be activated.
+ The continuation options.
+ The scheduler to use for the continuation.
+
+
+
+ Invokes the continuation for the target completion task.
+
+ The completed task.
+ Whether the continuation can be inlined.
+
+
+
+ Initializes a new with the specified function.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+
+ The argument is null.
+
+
+
+
+ Initializes a new with the specified function.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+ The to be assigned to this task.
+
+ The argument is null.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Initializes a new with the specified function and creation options.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+
+ The TaskCreationOptions used to
+ customize the task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+
+
+
+ Initializes a new with the specified function and creation options.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+ The that will be assigned to the new task.
+
+ The TaskCreationOptions used to
+ customize the task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Initializes a new with the specified function and state.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+ An object representing data to be used by the action.
+
+ The argument is null.
+
+
+
+
+ Initializes a new with the specified action, state, and options.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+ An object representing data to be used by the function.
+ The to be assigned to the new task.
+
+ The argument is null.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Initializes a new with the specified action, state, and options.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+ An object representing data to be used by the function.
+
+ The TaskCreationOptions used to
+ customize the task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+
+
+
+ Initializes a new with the specified action, state, and options.
+
+
+ The delegate that represents the code to execute in the task. When the function has completed,
+ the task's property will be set to return the result value of the function.
+
+ An object representing data to be used by the function.
+ The to be assigned to the new task.
+
+ The TaskCreationOptions used to
+ customize the task's behavior.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for .
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a new future object.
+
+ The parent task for this future.
+ A function that yields the future value.
+ The task scheduler which will be used to execute the future.
+ The CancellationToken for the task.
+ Options to control the future's behavior.
+ Internal options to control the future's behavior.
+ The argument specifies
+ a SelfReplicating , which is illegal."/>.
+
+
+
+ Creates a new future object.
+
+ The parent task for this future.
+ An object containing data to be used by the action; may be null.
+ A function that yields the future value.
+ The CancellationToken for the task.
+ The task scheduler which will be used to execute the future.
+ Options to control the future's behavior.
+ Internal options to control the future's behavior.
+ The argument specifies
+ a SelfReplicating , which is illegal."/>.
+
+
+
+ Evaluates the value selector of the Task which is passed in as an object and stores the result.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ The that will be assigned to the new continuation task.
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ The to associate with the continuation task and to use for its execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed. If the continuation criteria specified through the parameter are not met, the continuation task will be canceled
+ instead of scheduled.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ An action to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ The that will be assigned to the new continuation task.
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+
+ The to associate with the continuation task and to use for its
+ execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed. If the criteria specified through the parameter
+ are not met, the continuation task will be canceled instead of scheduled.
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current
+ task has completed, whether it completes due to running to completion successfully, faulting due
+ to an unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+ The that will be assigned to the new task.
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current
+ task has completed, whether it completes due to running to completion successfully, faulting due
+ to an unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ The to associate with the continuation task and to use for its execution.
+
+ A new continuation .
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The argument is null.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be
+ passed the completed task as an argument.
+
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+ A new continuation .
+
+
+ The returned will not be scheduled for execution until the current
+ task has completed, whether it completes due to running to completion successfully, faulting due
+ to an unhandled exception, or exiting out early due to being canceled.
+
+
+ The , when executed, should return a . This task's completion state will be transferred to the task returned
+ from the ContinueWith call.
+
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The has been disposed.
+
+
+
+
+ Creates a continuation that executes when the target completes.
+
+
+ The type of the result produced by the continuation.
+
+
+ A function to run when the completes. When run, the delegate will be passed as
+ an argument this completed task.
+
+ The that will be assigned to the new task.
+
+ Options for when the continuation is scheduled and how it behaves. This includes criteria, such
+ as OnlyOnCanceled, as
+ well as execution options, such as ExecuteSynchronously.
+
+
+ The to associate with the continuation task and to use for its
+ execution.
+
+ A new continuation .
+
+
+ The returned will not be scheduled for execution until the current task has
+ completed, whether it completes due to running to completion successfully, faulting due to an
+ unhandled exception, or exiting out early due to being canceled.
+
+
+ The , when executed, should return a .
+ This task's completion state will be transferred to the task returned from the
+ ContinueWith call.
+
+
+
+ The argument is null.
+
+
+ The argument specifies an invalid value for TaskContinuationOptions.
+
+
+ The argument is null.
+
+
+ The has been disposed.
+
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Gets the result value of this .
+
+
+ The get accessor for this property ensures that the asynchronous operation is complete before
+ returning. Once the result of the computation is available, it is stored and will be returned
+ immediately on later calls to .
+
+
+
+
+ Provides access to factory methods for creating instances.
+
+
+ The factory returned from is a default instance
+ of , as would result from using
+ the default constructor on the factory type.
+
+
+
+
+ Provides support for creating and scheduling
+ Task{TResult} objects.
+
+ The type of the results that are available though
+ the Task{TResult} objects that are associated with
+ the methods in this class.
+
+
+ There are many common patterns for which tasks are relevant. The
+ class encodes some of these patterns into methods that pick up default settings, which are
+ configurable through its constructors.
+
+
+ A default instance of is available through the
+ Task{TResult}.Factory property.
+
+
+
+
+
+ Initializes a instance with the default configuration.
+
+
+ This constructor creates a instance with a default configuration. The
+ property is initialized to
+ TaskCreationOptions.None, the
+ property is initialized to TaskContinuationOptions.None,
+ and the TaskScheduler property is
+ initialized to the current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the default configuration.
+
+ The default that will be assigned
+ to tasks created by this unless another CancellationToken is explicitly specified
+ while calling the factory methods.
+
+ This constructor creates a instance with a default configuration. The
+ property is initialized to
+ TaskCreationOptions.None, the
+ property is initialized to TaskContinuationOptions.None,
+ and the TaskScheduler property is
+ initialized to the current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+
+ The
+ TaskScheduler to use to schedule any tasks created with this TaskFactory{TResult}. A null value
+ indicates that the current TaskScheduler should be used.
+
+
+ With this constructor, the
+ property is initialized to
+ TaskCreationOptions.None, the
+ property is initialized to TaskContinuationOptions.None,
+ and the TaskScheduler property is
+ initialized to , unless it's null, in which case the property is
+ initialized to the current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+
+ The default
+ TaskCreationOptions to use when creating tasks with this TaskFactory{TResult}.
+
+
+ The default
+ TaskContinuationOptions to use when creating continuation tasks with this TaskFactory{TResult}.
+
+
+ The exception that is thrown when the
+ argument or the
+ argument specifies an invalid value.
+
+
+ With this constructor, the
+ property is initialized to ,
+ the
+ property is initialized to , and the TaskScheduler property is initialized to the
+ current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+ The default that will be assigned
+ to tasks created by this unless another CancellationToken is explicitly specified
+ while calling the factory methods.
+
+ The default
+ TaskCreationOptions to use when creating tasks with this TaskFactory{TResult}.
+
+
+ The default
+ TaskContinuationOptions to use when creating continuation tasks with this TaskFactory{TResult}.
+
+
+ The default
+ TaskScheduler to use to schedule any Tasks created with this TaskFactory{TResult}. A null value
+ indicates that TaskScheduler.Current should be used.
+
+
+ The exception that is thrown when the
+ argument or the
+ argumentspecifies an invalid value.
+
+
+ With this constructor, the
+ property is initialized to ,
+ the
+ property is initialized to , and the TaskScheduler property is initialized to
+ , unless it's null, in which case the property is initialized to the
+ current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ The started .
+ The exception that is thrown when the
+ argument is null.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ The that will be assigned to the new task.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The that will be assigned to the new task.
+ The TaskScheduler
+ that is used to schedule the created
+ Task{TResult}.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ The that will be assigned to the new task.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ The that will be assigned to the new task.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The TaskScheduler
+ that is used to schedule the created
+ Task{TResult}.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates a Task that executes an end
+ method function when a specified IAsyncResult completes.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The function delegate that processes the completed .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ A Task that represents the
+ asynchronous operation.
+
+
+
+ Creates a Task that executes an end
+ method function when a specified IAsyncResult completes.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The function delegate that processes the completed .
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ A Task that represents the
+ asynchronous operation.
+
+
+
+ Creates a Task that executes an end
+ method function when a specified IAsyncResult completes.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The function delegate that processes the completed .
+ The TaskScheduler
+ that is used to schedule the task that executes the end method.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ A Task that represents the
+ asynchronous operation.
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the third argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The third argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the third argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The third argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in
+ the array have completed.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in
+ the array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the array have completed.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the array completes.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the array completes.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Gets the default CancellationToken of this
+ TaskFactory.
+
+
+ This property returns the default that will be assigned to all
+ tasks created by this factory unless another CancellationToken value is explicitly specified
+ during the call to the factory methods.
+
+
+
+
+ Gets the TaskScheduler of this
+ TaskFactory{TResult}.
+
+
+ This property returns the default scheduler for this factory. It will be used to schedule all
+ tasks unless another scheduler is explicitly specified during calls to this factory's methods.
+ If null, TaskScheduler.Current
+ will be used.
+
+
+
+
+ Gets the TaskCreationOptions
+ value of this TaskFactory{TResult}.
+
+
+ This property returns the default creation options for this factory. They will be used to create all
+ tasks unless other options are explicitly specified during calls to this factory's methods.
+
+
+
+
+ Gets the TaskContinuationOptions
+ value of this TaskFactory{TResult}.
+
+
+ This property returns the default continuation options for this factory. They will be used to create
+ all continuation tasks unless other options are explicitly specified during calls to this factory's methods.
+
+
+
+
+ Represents the current stage in the lifecycle of a .
+
+
+
+
+ The task has been initialized but has not yet been scheduled.
+
+
+
+
+ The task is waiting to be activated and scheduled internally by the .NET Framework infrastructure.
+
+
+
+
+ The task has been scheduled for execution but has not yet begun executing.
+
+
+
+
+ The task is running but has not yet completed.
+
+
+
+
+ The task has finished executing and is implicitly waiting for
+ attached child tasks to complete.
+
+
+
+
+ The task completed execution successfully.
+
+
+
+
+ The task acknowledged cancellation by throwing an OperationCanceledException with its own CancellationToken
+ while the token was in signaled state, or the task's CancellationToken was already signaled before the
+ task started executing.
+
+
+
+
+ The task completed due to an unhandled exception.
+
+
+
+
+ In some cases a replica will want to quit prematurely (ie. before finishing a chunk of work it may have grabbed)
+ yet they will need the next replica to pick things up from where they left. This API is used to save such state.
+
+ Calling it is also the only way to record a premature exit.
+
+
+
+
+
+ Specifies flags that control optional behavior for the creation and execution of tasks.
+
+
+
+
+ Specifies that the default behavior should be used.
+
+
+
+
+ A hint to a TaskScheduler to schedule a
+ task in as fair a manner as possible, meaning that tasks scheduled sooner will be more likely to
+ be run sooner, and tasks scheduled later will be more likely to be run later.
+
+
+
+
+ Specifies that a task will be a long-running, course-grained operation. It provides a hint to the
+ TaskScheduler that oversubscription may be
+ warranted.
+
+
+
+
+ Specifies that a task is attached to a parent in the task hierarchy.
+
+
+
+
+ Task creation flags which are only used internally.
+
+
+
+ Specifies "No internal task options"
+
+
+ Used to filter out internal vs. public task creation options.
+
+
+ Specifies that the task will be queued by the runtime before handing it over to the user.
+ This flag will be used to skip the cancellationtoken registration step, which is only meant for unstarted tasks.
+
+
+
+ Specifies flags that control optional behavior for the creation and execution of continuation tasks.
+
+
+
+
+ Default = "Continue on any, no task options, run asynchronously"
+ Specifies that the default behavior should be used. Continuations, by default, will
+ be scheduled when the antecedent task completes, regardless of the task's final TaskStatus.
+
+
+
+
+ A hint to a TaskScheduler to schedule a
+ task in as fair a manner as possible, meaning that tasks scheduled sooner will be more likely to
+ be run sooner, and tasks scheduled later will be more likely to be run later.
+
+
+
+
+ Specifies that a task will be a long-running, course-grained operation. It provides
+ a hint to the TaskScheduler that
+ oversubscription may be warranted.
+
+
+
+
+ Specifies that a task is attached to a parent in the task hierarchy.
+
+
+
+
+ Specifies that the continuation task should not be scheduled if its antecedent ran to completion.
+ This option is not valid for multi-task continuations.
+
+
+
+
+ Specifies that the continuation task should not be scheduled if its antecedent threw an unhandled
+ exception. This option is not valid for multi-task continuations.
+
+
+
+
+ Specifies that the continuation task should not be scheduled if its antecedent was canceled. This
+ option is not valid for multi-task continuations.
+
+
+
+
+ Specifies that the continuation task should be scheduled only if its antecedent ran to
+ completion. This option is not valid for multi-task continuations.
+
+
+
+
+ Specifies that the continuation task should be scheduled only if its antecedent threw an
+ unhandled exception. This option is not valid for multi-task continuations.
+
+
+
+
+ Specifies that the continuation task should be scheduled only if its antecedent was canceled.
+ This option is not valid for multi-task continuations.
+
+
+
+
+ Specifies that the continuation task should be executed synchronously. With this option
+ specified, the continuation will be run on the same thread that causes the antecedent task to
+ transition into its final state. If the antecedent is already complete when the continuation is
+ created, the continuation will run on the thread creating the continuation. Only very
+ short-running continuations should be executed synchronously.
+
+
+
+
+ Internal helper class to keep track of stack depth and decide whether we should inline or not.
+
+
+
+
+ This method needs to be called before attempting inline execution on the current thread.
+ If false is returned, it means we are too close to the end of the stack and should give up inlining.
+ Each call to TryBeginInliningScope() that returns true must be matched with a
+ call to EndInliningScope() regardless of whether inlining actually took place.
+
+
+
+
+ This needs to be called once for each previous successful TryBeginInliningScope() call after
+ inlining related logic runs.
+
+
+
+
+ Represents an exception used to communicate task cancellation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the
+ class with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the
+ class with a specified error message and a reference to the inner exception that is the cause of
+ this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception.
+
+
+
+ Initializes a new instance of the class
+ with a reference to the that has been canceled.
+
+ A task that has been canceled.
+
+
+
+ Initializes a new instance of the
+ class with serialized data.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+
+
+
+ Gets the task associated with this exception.
+
+
+ It is permissible for no Task to be associated with a
+ , in which case
+ this property will return null.
+
+
+
+
+ An exception holder manages a list of exceptions for one particular task.
+ It offers the ability to aggregate, but more importantly, also offers intrinsic
+ support for propagating unhandled exceptions that are never observed. It does
+ this by aggregating and throwing if the holder is ever GC'd without the holder's
+ contents ever having been requested (e.g. by a Task.Wait, Task.get_Exception, etc).
+
+
+
+
+ Creates a new holder; it will be registered for finalization.
+
+ The task this holder belongs to.
+
+
+
+ A finalizer that repropagates unhandled exceptions.
+
+
+
+
+ Add an exception to the internal list. This will ensure the holder is
+ in the proper state (handled/unhandled) depending on the list's contents.
+
+ An exception object (either an Exception or an
+ IEnumerable{Exception}) to add to the list.
+
+
+
+ A private helper method that ensures the holder is considered
+ unhandled, i.e. it is registered for finalization.
+
+
+
+
+ A private helper method that ensures the holder is considered
+ handled, i.e. it is not registered for finalization.
+
+ Whether this is called from the finalizer thread.
+
+
+
+ Allocates a new aggregate exception and adds the contents of the list to
+ it. By calling this method, the holder assumes exceptions to have been
+ "observed", such that the finalization check will be subsequently skipped.
+
+ Whether this is being called from a finalizer.
+ An extra exception to be included (optionally).
+ The aggregate exception to throw.
+
+
+
+ Provides support for creating and scheduling
+ Tasks.
+
+
+
+ There are many common patterns for which tasks are relevant. The
+ class encodes some of these patterns into methods that pick up default settings, which are
+ configurable through its constructors.
+
+
+ A default instance of is available through the
+ Task.Factory property.
+
+
+
+
+
+ Initializes a instance with the default configuration.
+
+
+ This constructor creates a instance with a default configuration. The
+ property is initialized to
+ TaskCreationOptions.None, the
+ property is initialized to TaskContinuationOptions.None,
+ and the TaskScheduler property is
+ initialized to the current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+ The default that will be assigned
+ to tasks created by this unless another CancellationToken is explicitly specified
+ while calling the factory methods.
+
+ This constructor creates a instance with a default configuration. The
+ property is initialized to
+ TaskCreationOptions.None, the
+ property is initialized to TaskContinuationOptions.None,
+ and the TaskScheduler property is
+ initialized to the current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+
+ The
+ TaskScheduler to use to schedule any tasks created with this TaskFactory. A null value
+ indicates that the current TaskScheduler should be used.
+
+
+ With this constructor, the
+ property is initialized to
+ TaskCreationOptions.None, the
+ property is initialized to TaskContinuationOptions.None,
+ and the TaskScheduler property is
+ initialized to , unless it's null, in which case the property is
+ initialized to the current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+
+ The default
+ TaskCreationOptions to use when creating tasks with this TaskFactory.
+
+
+ The default
+ TaskContinuationOptions to use when creating continuation tasks with this TaskFactory.
+
+
+ The exception that is thrown when the
+ argument or the
+ argument specifies an invalid value.
+
+
+ With this constructor, the
+ property is initialized to ,
+ the
+ property is initialized to , and the TaskScheduler property is initialized to the
+ current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Initializes a instance with the specified configuration.
+
+ The default that will be assigned
+ to tasks created by this unless another CancellationToken is explicitly specified
+ while calling the factory methods.
+
+ The default
+ TaskCreationOptions to use when creating tasks with this TaskFactory.
+
+
+ The default
+ TaskContinuationOptions to use when creating continuation tasks with this TaskFactory.
+
+
+ The default
+ TaskScheduler to use to schedule any Tasks created with this TaskFactory. A null value
+ indicates that TaskScheduler.Current should be used.
+
+
+ The exception that is thrown when the
+ argument or the
+ argumentspecifies an invalid value.
+
+
+ With this constructor, the
+ property is initialized to ,
+ the
+ property is initialized to , and the TaskScheduler property is initialized to
+ , unless it's null, in which case the property is initialized to the
+ current scheduler (see TaskScheduler.Current).
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors
+ and then calling
+ Start to schedule it for execution. However,
+ unless creation and scheduling must be separated, StartNew is the recommended
+ approach for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ The that will be assigned to the new task.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors
+ and then calling
+ Start to schedule it for execution. However,
+ unless creation and scheduling must be separated, StartNew is the recommended
+ approach for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ Task.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors and
+ then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ The that will be assigned to the new
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ Task.
+ The TaskScheduler
+ that is used to schedule the created Task.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors and
+ then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ An object containing data to be used by the
+ delegate.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors and
+ then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ An object containing data to be used by the
+ delegate.
+ The that will be assigned to the new
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors and
+ then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ An object containing data to be used by the
+ delegate.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ Task.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors and
+ then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a Task.
+
+ The action delegate to execute asynchronously.
+ An object containing data to be used by the
+ delegate.
+ The that will be assigned to the new task.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ Task.
+ The TaskScheduler
+ that is used to schedule the created Task.
+ The started Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a Task using one of its constructors and
+ then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ The started .
+ The exception that is thrown when the
+ argument is null.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ The that will be assigned to the new
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ The that will be assigned to the new task.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The TaskScheduler
+ that is used to schedule the created
+ Task{TResult}.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ The that will be assigned to the new
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates and starts a .
+
+ The type of the result available through the
+ Task.
+
+ A function delegate that returns the future result to be available through
+ the .
+ An object containing data to be used by the
+ delegate.
+ The that will be assigned to the new task.
+ A TaskCreationOptions value that controls the behavior of the
+ created
+ .
+ The TaskScheduler
+ that is used to schedule the created
+ Task{TResult}.
+ The started .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ Calling StartNew is functionally equivalent to creating a using one
+ of its constructors and then calling
+ Start to schedule it for execution.
+ However, unless creation and scheduling must be separated, StartNew is the recommended approach
+ for both simplicity and performance.
+
+
+
+
+ Creates a Task that executes an end method action
+ when a specified IAsyncResult completes.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The action delegate that processes the completed .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ A Task that represents the asynchronous
+ operation.
+
+
+
+ Creates a Task that executes an end method action
+ when a specified IAsyncResult completes.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The action delegate that processes the completed .
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ A Task that represents the asynchronous
+ operation.
+
+
+
+ Creates a Task that executes an end method action
+ when a specified IAsyncResult completes.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The action delegate that processes the completed .
+ The TaskScheduler
+ that is used to schedule the task that executes the end method.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ A Task that represents the asynchronous
+ operation.
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the
+ delegate.
+ The type of the second argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the
+ delegate.
+ The type of the second argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the
+ delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the third argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The third argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of begin
+ and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the
+ delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the third argument passed to
+ delegate.
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The third argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that represents the
+ asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that executes an end
+ method function when a specified IAsyncResult completes.
+
+ The type of the result available through the
+ Task.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The function delegate that processes the completed .
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ A Task that represents the
+ asynchronous operation.
+
+
+
+ Creates a Task that executes an end
+ method function when a specified IAsyncResult completes.
+
+ The type of the result available through the
+ Task.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The function delegate that processes the completed .
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ A Task that represents the
+ asynchronous operation.
+
+
+
+ Creates a Task that executes an end
+ method function when a specified IAsyncResult completes.
+
+ The type of the result available through the
+ Task.
+
+ The IAsyncResult whose completion should trigger the processing of the
+ .
+ The function delegate that processes the completed .
+ The TaskScheduler
+ that is used to schedule the task that executes the end method.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ A Task that represents the
+ asynchronous operation.
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the third argument passed to
+ delegate.
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The third argument passed to the
+ delegate.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Creates a Task that represents a pair of
+ begin and end methods that conform to the Asynchronous Programming Model pattern.
+
+ The type of the first argument passed to the delegate.
+ The type of the second argument passed to
+ delegate.
+ The type of the third argument passed to
+ delegate.
+ The type of the result available through the
+ Task.
+
+ The delegate that begins the asynchronous operation.
+ The delegate that ends the asynchronous operation.
+ The first argument passed to the
+ delegate.
+ The second argument passed to the
+ delegate.
+ The third argument passed to the
+ delegate.
+ The TaskCreationOptions value that controls the behavior of the
+ created Task.
+ An object containing data to be used by the
+ delegate.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument specifies an invalid TaskCreationOptions
+ value.
+ The created Task that
+ represents the asynchronous operation.
+
+ This method throws any exceptions thrown by the .
+
+
+
+
+ Check validity of options passed to FromAsync method
+
+ The options to be validated.
+ determines type of FromAsync method that called this method
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in
+ the array have completed.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in
+ the array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in the array have completed.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in the array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in
+ the array have completed.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in
+ the array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in the array have completed.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The action delegate to execute when all tasks in the array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of a set of provided Tasks.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue.
+ The function delegate to execute when all tasks in the
+ array have completed.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAll.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the array completes.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the array completes.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation Task.
+ The new continuation Task.
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result that is returned by the
+ delegate and associated with the created .
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The function delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the
+ array completes.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the
+ array completes.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Creates a continuation Task
+ that will be started upon the completion of any Task in the provided set.
+
+ The type of the result of the antecedent .
+ The array of tasks from which to continue when one task completes.
+ The action delegate to execute when one task in the
+ array completes.
+ The CancellationToken
+ that will be assigned to the new continuation task.
+ The
+ TaskContinuationOptions value that controls the behavior of
+ the created continuation Task.
+ The TaskScheduler
+ that is used to schedule the created continuation .
+ The new continuation .
+ The exception that is thrown when the
+ array is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ argument is null.
+ The exception that is thrown when the
+ array contains a null value.
+ The exception that is thrown when the
+ array is empty.
+ The exception that is thrown when the
+ argument specifies an invalid TaskContinuationOptions
+ value.
+ The exception that is thrown when one
+ of the elements in the array has been disposed.
+ The provided CancellationToken
+ has already been disposed.
+
+
+ The NotOn* and OnlyOn* TaskContinuationOptions,
+ which constrain for which TaskStatus states a continuation
+ will be executed, are illegal with ContinueWhenAny.
+
+
+
+
+ Gets the default CancellationToken of this
+ TaskFactory.
+
+
+ This property returns the default that will be assigned to all
+ tasks created by this factory unless another CancellationToken value is explicitly specified
+ during the call to the factory methods.
+
+
+
+
+ Gets the TaskScheduler of this
+ TaskFactory.
+
+
+ This property returns the default scheduler for this factory. It will be used to schedule all
+ tasks unless another scheduler is explicitly specified during calls to this factory's methods.
+ If null, TaskScheduler.Current
+ will be used.
+
+
+
+
+ Gets the TaskCreationOptions
+ value of this TaskFactory.
+
+
+ This property returns the default creation options for this factory. They will be used to create all
+ tasks unless other options are explicitly specified during calls to this factory's methods.
+
+
+
+
+ Gets the TaskContinuationOptions
+ value of this TaskFactory.
+
+
+ This property returns the default continuation options for this factory. They will be used to create
+ all continuation tasks unless other options are explicitly specified during calls to this factory's methods.
+
+
+
+
+ Represents the producer side of a unbound to a
+ delegate, providing access to the consumer side through the property.
+
+
+
+ It is often the case that a is desired to
+ represent another asynchronous operation.
+ TaskCompletionSource is provided for this purpose. It enables
+ the creation of a task that can be handed out to consumers, and those consumers can use the members
+ of the task as they would any other. However, unlike most tasks, the state of a task created by a
+ TaskCompletionSource is controlled explicitly by the methods on TaskCompletionSource. This enables the
+ completion of the external asynchronous operation to be propagated to the underlying Task. The
+ separation also ensures that consumers are not able to transition the state without access to the
+ corresponding TaskCompletionSource.
+
+
+ All members of are thread-safe
+ and may be used from multiple threads concurrently.
+
+
+ The type of the result value assocatied with this .
+
+
+
+ Creates a .
+
+
+
+
+ Creates a
+ with the specified options.
+
+
+ The created
+ by this instance and accessible through its property
+ will be instantiated using the specified .
+
+ The options to use when creating the underlying
+ .
+
+ The represent options invalid for use
+ with a .
+
+
+
+
+ Creates a
+ with the specified state.
+
+ The state to use as the underlying
+ 's AsyncState.
+
+
+
+ Creates a with
+ the specified state and options.
+
+ The options to use when creating the underlying
+ .
+ The state to use as the underlying
+ 's AsyncState.
+
+ The represent options invalid for use
+ with a .
+
+
+
+
+ Attempts to transition the underlying
+ into the
+ Faulted
+ state.
+
+ The exception to bind to this .
+ True if the operation was successful; otherwise, false.
+ This operation will return false if the
+ is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The argument is null.
+ The was disposed.
+
+
+
+ Attempts to transition the underlying
+ into the
+ Faulted
+ state.
+
+ The collection of exceptions to bind to this .
+ True if the operation was successful; otherwise, false.
+ This operation will return false if the
+ is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The argument is null.
+ There are one or more null elements in .
+ The collection is empty.
+ The was disposed.
+
+
+
+ Transitions the underlying
+ into the
+ Faulted
+ state.
+
+ The exception to bind to this .
+ The argument is null.
+
+ The underlying is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The was disposed.
+
+
+
+ Transitions the underlying
+ into the
+ Faulted
+ state.
+
+ The collection of exceptions to bind to this .
+ The argument is null.
+ There are one or more null elements in .
+
+ The underlying is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The was disposed.
+
+
+
+ Attempts to transition the underlying
+ into the
+ RanToCompletion
+ state.
+
+ The result value to bind to this .
+ True if the operation was successful; otherwise, false.
+ This operation will return false if the
+ is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The was disposed.
+
+
+
+ Transitions the underlying
+ into the
+ RanToCompletion
+ state.
+
+ The result value to bind to this .
+
+ The underlying is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The was disposed.
+
+
+
+ Transitions the underlying
+ into the
+ Canceled
+ state.
+
+
+ The underlying is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The was disposed.
+
+
+
+ Attempts to transition the underlying
+ into the
+ Canceled
+ state.
+
+ True if the operation was successful; otherwise, false.
+ This operation will return false if the
+ is already in one
+ of the three final states:
+ RanToCompletion,
+ Faulted, or
+ Canceled.
+
+ The was disposed.
+
+
+
+ Gets the created
+ by this .
+
+
+ This property enables a consumer access to the that is controlled by this instance.
+ The , ,
+ , and
+ methods (and their "Try" variants) on this instance all result in the relevant state
+ transitions on this underlying Task.
+
+
+
+
+ Represents an abstract scheduler for tasks.
+
+
+
+ TaskScheduler acts as the extension point for all
+ pluggable scheduling logic. This includes mechanisms such as how to schedule a task for execution, and
+ how scheduled tasks should be exposed to debuggers.
+
+
+ All members of the abstract type are thread-safe
+ and may be used from multiple threads concurrently.
+
+
+
+
+
+ Queues a Task to the scheduler.
+
+
+
+ A class derived from TaskScheduler
+ implements this method to accept tasks being scheduled on the scheduler.
+ A typical implementation would store the task in an internal data structure, which would
+ be serviced by threads that would execute those tasks at some time in the future.
+
+
+ This method is only meant to be called by the .NET Framework and
+ should not be called directly by the derived class. This is necessary
+ for maintaining the consistency of the system.
+
+
+ The Task to be queued.
+ The argument is null.
+
+
+
+ Determines whether the provided Task
+ can be executed synchronously in this call, and if it can, executes it.
+
+
+
+ A class derived from TaskScheduler implements this function to
+ support inline execution of a task on a thread that initiates a wait on that task object. Inline
+ execution is optional, and the request may be rejected by returning false. However, better
+ scalability typically results the more tasks that can be inlined, and in fact a scheduler that
+ inlines too little may be prone to deadlocks. A proper implementation should ensure that a
+ request executing under the policies guaranteed by the scheduler can successfully inline. For
+ example, if a scheduler uses a dedicated thread to execute tasks, any inlining requests from that
+ thread should succeed.
+
+
+ If a scheduler decides to perform the inline execution, it should do so by calling to the base
+ TaskScheduler's
+ TryExecuteTask method with the provided task object, propagating
+ the return value. It may also be appropriate for the scheduler to remove an inlined task from its
+ internal data structures if it decides to honor the inlining request. Note, however, that under
+ some circumstances a scheduler may be asked to inline a task that was not previously provided to
+ it with the method.
+
+
+ The derived scheduler is responsible for making sure that the calling thread is suitable for
+ executing the given task as far as its own scheduling and execution policies are concerned.
+
+
+ The Task to be
+ executed.
+ A Boolean denoting whether or not task has previously been
+ queued. If this parameter is True, then the task may have been previously queued (scheduled); if
+ False, then the task is known not to have been queued, and this call is being made in order to
+ execute the task inline without queueing it.
+ A Boolean value indicating whether the task was executed inline.
+ The argument is
+ null.
+ The was already
+ executed.
+
+
+
+ Generates an enumerable of Task instances
+ currently queued to the scheduler waiting to be executed.
+
+
+
+ A class derived from implements this method in order to support
+ integration with debuggers. This method will only be invoked by the .NET Framework when the
+ debugger requests access to the data. The enumerable returned will be traversed by debugging
+ utilities to access the tasks currently queued to this scheduler, enabling the debugger to
+ provide a representation of this information in the user interface.
+
+
+ It is important to note that, when this method is called, all other threads in the process will
+ be frozen. Therefore, it's important to avoid synchronization with other threads that may lead to
+ blocking. If synchronization is necessary, the method should prefer to throw a
+ than to block, which could cause a debugger to experience delays. Additionally, this method and
+ the enumerable returned must not modify any globally visible state.
+
+
+ The returned enumerable should never be null. If there are currently no queued tasks, an empty
+ enumerable should be returned instead.
+
+
+ For developers implementing a custom debugger, this method shouldn't be called directly, but
+ rather this functionality should be accessed through the internal wrapper method
+ GetScheduledTasksForDebugger:
+ internal Task[] GetScheduledTasksForDebugger(). This method returns an array of tasks,
+ rather than an enumerable. In order to retrieve a list of active schedulers, a debugger may use
+ another internal method: internal static TaskScheduler[] GetTaskSchedulersForDebugger().
+ This static method returns an array of all active TaskScheduler instances.
+ GetScheduledTasksForDebugger then may be used on each of these scheduler instances to retrieve
+ the list of scheduled tasks for each.
+
+
+ An enumerable that allows traversal of tasks currently queued to this scheduler.
+
+
+ This scheduler is unable to generate a list of queued tasks at this time.
+
+
+
+
+ Retrieves some thread static state that can be cached and passed to multiple
+ TryRunInline calls, avoiding superflous TLS fetches.
+
+ A bag of TLS state (or null if none exists).
+
+
+
+ Attempts to execute the target task synchronously.
+
+ The task to run.
+ True if the task may have been previously queued,
+ false if the task was absolutely not previously queued.
+ The state retrieved from GetThreadStatics
+ True if it ran, false otherwise.
+
+
+
+ Attempts to dequeue a Task that was previously queued to
+ this scheduler.
+
+ The Task to be dequeued.
+ A Boolean denoting whether the argument was successfully dequeued.
+ The argument is null.
+
+
+
+ Notifies the scheduler that a work item has made progress.
+
+
+
+
+ Initializes the .
+
+
+
+
+ Frees all resources associated with this scheduler.
+
+
+
+
+ Creates a
+ associated with the current .
+
+
+ All Task instances queued to
+ the returned scheduler will be executed through a call to the
+ Post method
+ on that context.
+
+
+ A associated with
+ the current SynchronizationContext, as
+ determined by SynchronizationContext.Current.
+
+
+ The current SynchronizationContext may not be used as a TaskScheduler.
+
+
+
+
+ Attempts to execute the provided Task
+ on this scheduler.
+
+
+
+ Scheduler implementations are provided with Task
+ instances to be executed through either the method or the
+ method. When the scheduler deems it appropriate to run the
+ provided task, should be used to do so. TryExecuteTask handles all
+ aspects of executing a task, including action invocation, exception handling, state management,
+ and lifecycle control.
+
+
+ must only be used for tasks provided to this scheduler by the .NET
+ Framework infrastructure. It should not be used to execute arbitrary tasks obtained through
+ custom mechanisms.
+
+
+
+ A Task object to be executed.
+
+ The is not associated with this scheduler.
+
+ A Boolean that is true if was successfully executed, false if it
+ was not. A common reason for execution failure is that the task had previously been executed or
+ is in the process of being executed by another thread.
+
+
+
+ Provides an array of all queued Task instances
+ for the debugger.
+
+
+ The returned array is populated through a call to .
+ Note that this function is only meant to be invoked by a debugger remotely.
+ It should not be called by any other codepaths.
+
+ An array of Task instances.
+
+ This scheduler is unable to generate a list of queued tasks at this time.
+
+
+
+
+ Provides an array of all active TaskScheduler
+ instances for the debugger.
+
+
+ This function is only meant to be invoked by a debugger remotely.
+ It should not be called by any other codepaths.
+
+ An array of TaskScheduler instances.
+
+
+
+ Registers a new TaskScheduler instance in the global collection of schedulers.
+
+
+
+
+ Removes a TaskScheduler instance from the global collection of schedulers.
+
+
+
+
+ Indicates the maximum concurrency level this
+ is able to support.
+
+
+
+
+ Indicates whether this is a custom scheduler, in which case the safe code paths will be taken upon task entry
+ using a CAS to transition from queued state to executing.
+
+
+
+
+ Gets the default TaskScheduler instance.
+
+
+
+
+ Gets the TaskScheduler
+ associated with the currently executing task.
+
+
+ When not called from within a task, will return the scheduler.
+
+
+
+
+ Gets the unique ID for this .
+
+
+
+
+ Occurs when a faulted 's unobserved exception is about to trigger exception escalation
+ policy, which, by default, would terminate the process.
+
+
+ This AppDomain-wide event provides a mechanism to prevent exception
+ escalation policy (which, by default, terminates the process) from triggering.
+ Each handler is passed a
+ instance, which may be used to examine the exception and to mark it as observed.
+
+
+
+
+ Nested class that provides debugger view for TaskScheduler
+
+
+
+
+ A TaskScheduler implementation that executes all tasks queued to it through a call to
+ on the
+ that its associated with. The default constructor for this class binds to the current
+
+
+
+
+ Constructs a SynchronizationContextTaskScheduler associated with
+
+ This constructor expects to be set.
+
+
+
+ Implemetation of for this scheduler class.
+
+ Simply posts the tasks to be executed on the associated .
+
+
+
+
+
+ Implementation of for this scheduler class.
+
+ The task will be executed inline only if the call happens within
+ the associated .
+
+
+
+
+
+
+ Implementes the property for
+ this scheduler class.
+
+ By default it returns 1, because a based
+ scheduler only supports execution on a single thread.
+
+
+
+
+ Provides data for the event that is raised when a faulted 's
+ exception goes unobserved.
+
+
+ The Exception property is used to examine the exception without marking it
+ as observed, whereas the method is used to mark the exception
+ as observed. Marking the exception as observed prevents it from triggering exception escalation policy
+ which, by default, terminates the process.
+
+
+
+
+ Initializes a new instance of the class
+ with the unobserved exception.
+
+ The Exception that has gone unobserved.
+
+
+
+ Marks the as "observed," thus preventing it
+ from triggering exception escalation policy which, by default, terminates the process.
+
+
+
+
+ Gets whether this exception has been marked as "observed."
+
+
+
+
+ The Exception that went unobserved.
+
+
+
+
+ An implementation of TaskScheduler that uses the ThreadPool scheduler
+
+
+
+
+ Constructs a new ThreadPool task scheduler object
+
+
+
+
+ Schedules a task to the ThreadPool.
+
+ The task to schedule.
+
+
+
+ This internal function will do this:
+ (1) If the task had previously been queued, attempt to pop it and return false if that fails.
+ (2) Propagate the return value from Task.ExecuteEntry() back to the caller.
+
+ IMPORTANT NOTE: TryExecuteTaskInline will NOT throw task exceptions itself. Any wait code path using this function needs
+ to account for exceptions that need to be propagated, and throw themselves accordingly.
+
+
+
+
+ Notifies the scheduler that work is progressing (no-op).
+
+
+
+
+ This is the only scheduler that returns false for this property, indicating that the task entry codepath is unsafe (CAS free)
+ since we know that the underlying scheduler already takes care of atomic transitions from queued to non-queued.
+
+
+
+
+ Represents an exception used to communicate an invalid operation by a
+ .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the
+ class with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the
+ class using the default error message and a reference to the inner exception that is the cause of
+ this exception.
+
+ The exception that is the cause of the current exception.
+
+
+
+ Initializes a new instance of the
+ class with a specified error message and a reference to the inner exception that is the cause of
+ this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception.
+
+
+
+ Initializes a new instance of the
+ class with serialized data.
+
+ The that holds
+ the serialized object data about the exception being thrown.
+ The that
+ contains contextual information about the source or destination.
+
+
+
+ The exception that is thrown when the post-phase action of a fails.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified inner exception.
+
+ The exception that is the cause of the current exception.
+
+
+
+ Initializes a new instance of the class with a specified error message.
+
+ A string that describes the exception.
+
+
+
+ Initializes a new instance of the class with a specified error message and inner exception.
+
+ A string that describes the exception.
+ The exception that is the cause of the current exception.
+
+
+
+ Initializes a new instance of the class with serialized data.
+
+ The object that holds the serialized object data.
+ An object that describes the source or destination of the serialized data.
+
+
+
+ Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.
+
+
+
+ A group of tasks cooperate by moving through a series of phases, where each in the group signals it
+ has arrived at the in a given phase and implicitly waits for all others to
+ arrive. The same can be used for multiple phases.
+
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads, with the exception of Dispose, which
+ must only be used when all other operations on the have
+ completed.
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The number of participating threads.
+ is less than 0
+ or greater than .
+
+
+
+ Initializes a new instance of the class.
+
+ The number of participating threads.
+ The to be executed after each
+ phase.
+ is less than 0
+ or greater than .
+
+ The delegate will be executed after
+ all participants have arrived at the barrier in one phase. The participants
+ will not be released to the next phase until the postPhaseAction delegate
+ has completed execution.
+
+
+
+
+ Extract the three variables current, total and sense from a given big variable
+
+ The integer variable that contains the other three variables
+ The current cparticipant count
+ The total participants count
+ The sense flag
+
+
+
+ Write the three variables current. total and the sense to the m_currentTotal
+
+ The old current total to compare
+ The current cparticipant count
+ The total participants count
+ The sense flag
+ True if the CAS succeeded, false otherwise
+
+
+
+ Notifies the that there will be an additional participant.
+
+ The phase number of the barrier in which the new participants will first
+ participate.
+
+ Adding a participant would cause the barrier's participant count to
+ exceed .
+
+
+ The method was invoked from within a post-phase action.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Notifies the that there will be additional participants.
+
+ The number of additional participants to add to the
+ barrier.
+ The phase number of the barrier in which the new participants will first
+ participate.
+ is less than
+ 0.
+ Adding participants would cause the
+ barrier's participant count to exceed .
+
+ The method was invoked from within a post-phase action.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Notifies the that there will be one less participant.
+
+ The barrier already has 0
+ participants.
+
+ The method was invoked from within a post-phase action.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Notifies the that there will be fewer participants.
+
+ The number of additional participants to remove from the barrier.
+ is less than
+ 0.
+ The barrier already has 0 participants.
+
+ The method was invoked from within a post-phase action.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Signals that a participant has reached the and waits for all other
+ participants to reach the barrier as well.
+
+
+ The method was invoked from within a post-phase action, the barrier currently has 0 participants,
+ or the barrier is being used by more threads than are registered as participants.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Signals that a participant has reached the and waits for all other
+ participants to reach the barrier, while observing a .
+
+ The to
+ observe.
+
+ The method was invoked from within a post-phase action, the barrier currently has 0 participants,
+ or the barrier is being used by more threads than are registered as participants.
+
+ has been
+ canceled.
+ The current instance has already been
+ disposed.
+
+
+
+ Signals that a participant has reached the and waits for all other
+ participants to reach the barrier as well, using a
+ to measure the time interval.
+
+ A that represents the number of
+ milliseconds to wait, or a that represents -1 milliseconds to
+ wait indefinitely.
+ true if all other participants reached the barrier; otherwise, false.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out, or it is greater than
+ .
+
+ The method was invoked from within a post-phase action, the barrier currently has 0 participants,
+ or the barrier is being used by more threads than are registered as participants.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Signals that a participant has reached the and waits for all other
+ participants to reach the barrier as well, using a
+ to measure the time interval, while observing a .
+
+ A that represents the number of
+ milliseconds to wait, or a that represents -1 milliseconds to
+ wait indefinitely.
+ The to
+ observe.
+ true if all other participants reached the barrier; otherwise, false.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out.
+
+ The method was invoked from within a post-phase action, the barrier currently has 0 participants,
+ or the barrier is being used by more threads than are registered as participants.
+
+ has been
+ canceled.
+ The current instance has already been
+ disposed.
+
+
+
+ Signals that a participant has reached the and waits for all other
+ participants to reach the barrier as well, using a
+ 32-bit signed integer to measure the time interval.
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ true if all other participants reached the barrier; otherwise, false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+
+ The method was invoked from within a post-phase action, the barrier currently has 0 participants,
+ or the barrier is being used by more threads than are registered as participants.
+
+ The current instance has already been
+ disposed.
+
+
+
+ Signals that a participant has reached the barrier and waits for all other participants to reach
+ the barrier as well, using a
+ 32-bit signed integer to measure the time interval, while observing a .
+
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ The to
+ observe.
+ true if all other participants reached the barrier; otherwise, false.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+
+ The method was invoked from within a post-phase action, the barrier currently has 0 participants,
+ or the barrier is being used by more threads than are registered as participants.
+
+ has been
+ canceled.
+ The current instance has already been
+ disposed.
+
+
+
+ Finish the phase by invoking the post phase action, and setting the event, this must be called by the
+ last arrival thread
+
+ The current phase sense
+
+
+
+ Sets the current phase event and reset the next phase event
+
+ The current phase sense
+
+
+
+ Releases all resources used by the current instance of .
+
+
+ The method was invoked from within a post-phase action.
+
+
+ Unlike most of the members of , Dispose is not thread-safe and may not be
+ used concurrently with other members of this instance.
+
+
+
+
+ When overridden in a derived class, releases the unmanaged resources used by the
+ , and optionally releases the managed resources.
+
+ true to release both managed and unmanaged resources; false to release
+ only unmanaged resources.
+
+ Unlike most of the members of , Dispose is not thread-safe and may not be
+ used concurrently with other members of this instance.
+
+
+
+
+ Throw ObjectDisposedException if the barrier is disposed
+
+
+
+
+ Gets the number of participants in the barrier that haven’t yet signaled
+ in the current phase.
+
+
+ This could be 0 during a post-phase action delegate execution or if the
+ ParticipantCount is 0.
+
+
+
+
+ Gets the total number of participants in the barrier.
+
+
+
+
+ Gets the number of the barrier's current phase.
+
+
+
+
+ Provides blocking and bounding capabilities for thread-safe collections that
+ implement .
+
+
+ represents a collection
+ that allows for thread-safe adding and removing of data.
+ is used as a wrapper
+ for an instance, allowing
+ removal attempts from the collection to block until data is available to be removed. Similarly,
+ a can be created to enforce
+ an upper-bound on the number of data elements allowed in the
+ ; addition attempts to the
+ collection may then block until space is available to store the added items. In this manner,
+ is similar to a traditional
+ blocking queue data structure, except that the underlying data storage mechanism is abstracted
+ away as an .
+
+ Specifies the type of elements in the collection.
+
+
+ Initializes a new instance of the
+
+ class without an upper-bound.
+
+
+ The default underlying collection is a ConcurrentQueue<T>.
+
+
+
+ Initializes a new instance of the
+ class with the specified upper-bound.
+
+ The bounded size of the collection.
+ The is
+ not a positive value.
+
+ The default underlying collection is a ConcurrentQueue<T>.
+
+
+
+ Initializes a new instance of the
+ class with the specified upper-bound and using the provided
+ as its underlying data store.
+ The collection to use as the underlying data store.
+ The bounded size of the collection.
+ The argument is
+ null.
+ The is not a positive value.
+ The supplied contains more values
+ than is permitted by .
+
+
+ Initializes a new instance of the
+ class without an upper-bound and using the provided
+ as its underlying data store.
+ The collection to use as the underlying data store.
+ The argument is
+ null.
+
+
+ Initializes the BlockingCollection instance.
+ The collection to use as the underlying data store.
+ The bounded size of the collection.
+ The number of items currently in the underlying collection.
+
+
+
+ Adds the item to the .
+
+ The item to be added to the collection. The value can be a null reference.
+ The has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ The underlying collection didn't accept the item.
+
+ If a bounded capacity was specified when this instance of
+ was initialized,
+ a call to Add may block until space is available to store the provided item.
+
+
+
+
+ Adds the item to the .
+ A is thrown if the is
+ canceled.
+
+ The item to be added to the collection. The value can be a null reference.
+ A cancellation token to observe.
+ If the is canceled.
+ The has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ The underlying collection didn't accept the item.
+
+ If a bounded capacity was specified when this instance of
+ was initialized,
+ a call to may block until space is available to store the provided item.
+
+
+
+
+ Attempts to add the specified item to the .
+
+ The item to be added to the collection.
+ true if the could be added; otherwise, false.
+ The has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ The underlying collection didn't accept the item.
+
+
+
+ Attempts to add the specified item to the .
+
+ The item to be added to the collection.
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ true if the could be added to the collection within
+ the alloted time; otherwise, false.
+ The has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than
+ .
+ The underlying collection didn't accept the item.
+
+
+
+ Attempts to add the specified item to the .
+
+ The item to be added to the collection.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ true if the could be added to the collection within
+ the alloted time; otherwise, false.
+ The has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ The underlying collection didn't accept the item.
+
+
+
+ Attempts to add the specified item to the .
+ A is thrown if the is
+ canceled.
+
+ The item to be added to the collection.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ A cancellation token to observe.
+ true if the could be added to the collection within
+ the alloted time; otherwise, false.
+ If the is canceled.
+ The has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ The underlying collection didn't accept the item.
+
+
+ Adds an item into the underlying data store using its IProducerConsumerCollection<T>.Add
+ method. If a bounded capacity was specified and the collection was full,
+ this method will wait for, at most, the timeout period trying to add the item.
+ If the timeout period was exhaused before successfully adding the item this method will
+ return false.
+ The item to be added to the collection.
+ The number of milliseconds to wait for the collection to accept the item,
+ or Timeout.Infinite to wait indefinitely.
+ A cancellation token to observe.
+ False if the collection remained full till the timeout period was exhausted.True otherwise.
+ If the is canceled.
+ the collection has already been marked
+ as complete with regards to additions.
+ If the collection has been disposed.
+ The underlying collection didn't accept the item.
+
+
+ Takes an item from the .
+ The item removed from the collection.
+ The is empty and has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ The underlying collection was modified
+ outside of this instance.
+ A call to may block until an item is available to be removed.
+
+
+ Takes an item from the .
+ The item removed from the collection.
+ If the is
+ canceled or the is empty and has been marked
+ as complete with regards to additions.
+ The has been disposed.
+ The underlying collection was modified
+ outside of this instance.
+ A call to may block until an item is available to be removed.
+
+
+
+ Attempts to remove an item from the .
+
+ The item removed from the collection.
+ true if an item could be removed; otherwise, false.
+ The has been disposed.
+ The underlying collection was modified
+ outside of this instance.
+
+
+
+ Attempts to remove an item from the .
+
+ The item removed from the collection.
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ true if an item could be removed from the collection within
+ the alloted time; otherwise, false.
+ The has been disposed.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than
+ .
+ The underlying collection was modified
+ outside of this instance.
+
+
+
+ Attempts to remove an item from the .
+
+ The item removed from the collection.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ true if an item could be removed from the collection within
+ the alloted time; otherwise, false.
+ The has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ The underlying collection was modified
+ outside of this instance.
+
+
+
+ Attempts to remove an item from the .
+ A is thrown if the is
+ canceled.
+
+ The item removed from the collection.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ A cancellation token to observe.
+ true if an item could be removed from the collection within
+ the alloted time; otherwise, false.
+ If the is canceled.
+ The has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ The underlying collection was modified
+ outside of this instance.
+
+
+ Takes an item from the underlying data store using its IProducerConsumerCollection<T>.Take
+ method. If the collection was empty, this method will wait for, at most, the timeout period (if AddingIsCompleted is false)
+ trying to remove an item. If the timeout period was exhaused before successfully removing an item
+ this method will return false.
+ A is thrown if the is
+ canceled.
+
+ The item removed from the collection.
+ The number of milliseconds to wait for the collection to have an item available
+ for removal, or Timeout.Infinite to wait indefinitely.
+ A cancellation token to observe.
+ A combined cancellation token if created, it is only created by GetConsumingEnumerable to avoid creating the linked token
+ multiple times.
+ False if the collection remained empty till the timeout period was exhausted. True otherwise.
+ If the is canceled.
+ If the collection has been disposed.
+
+
+
+ Adds the specified item to any one of the specified
+ instances.
+
+ The array of collections.
+ The item to be added to one of the collections.
+ The index of the collection in the array to which the item was added.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element, or at least one of collections has been
+ marked as complete for adding.
+ At least one of the instances has been disposed.
+ At least one underlying collection didn't accept the item.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+
+ If a bounded capacity was specified when all of the
+ instances were initialized,
+ a call to AddToAny may block until space is available in one of the collections
+ to store the provided item.
+
+
+
+
+ Adds the specified item to any one of the specified
+ instances.
+ A is thrown if the is
+ canceled.
+
+ The array of collections.
+ The item to be added to one of the collections.
+ A cancellation token to observe.
+ The index of the collection in the array to which the item was added.
+ If the is canceled.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element, or at least one of collections has been
+ marked as complete for adding.
+ At least one of the instances has been disposed.
+ At least one underlying collection didn't accept the item.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+
+ If a bounded capacity was specified when all of the
+ instances were initialized,
+ a call to AddToAny may block until space is available in one of the collections
+ to store the provided item.
+
+
+
+
+ Attempts to add the specified item to any one of the specified
+ instances.
+
+ The array of collections.
+ The item to be added to one of the collections.
+ The index of the collection in the
+ array to which the item was added, or -1 if the item could not be added.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element, or at least one of collections has been
+ marked as complete for adding.
+ At least one of the instances has been disposed.
+ At least one underlying collection didn't accept the item.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+
+
+
+ Attempts to add the specified item to any one of the specified
+ instances.
+
+ The array of collections.
+ The item to be added to one of the collections.
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ The index of the collection in the
+ array to which the item was added, or -1 if the item could not be added.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element, or at least one of collections has been
+ marked as complete for adding.
+ At least one of the instances has been disposed.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than
+ .
+ At least one underlying collection didn't accept the item.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+
+
+
+ Attempts to add the specified item to any one of the specified
+ instances.
+
+ The array of collections.
+ The item to be added to one of the collections.
+ The number of milliseconds to wait, or (-1) to wait indefinitely. /// The index of the collection in the
+ array to which the item was added, or -1 if the item could not be added.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element, or at least one of collections has been
+ marked as complete for adding.
+ At least one of the instances has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ At least one underlying collection didn't accept the item.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+
+
+
+ Attempts to add the specified item to any one of the specified
+ instances.
+ A is thrown if the is
+ canceled.
+
+ The array of collections.
+ The item to be added to one of the collections.
+ The number of milliseconds to wait, or (-1) to wait indefinitely. /// The index of the collection in the
+ array to which the item was added, or -1 if the item could not be added.
+ A cancellation token to observe.
+ If the is canceled.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element, or at least one of collections has been
+ marked as complete for adding.
+ At least one of the instances has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ At least one underlying collection didn't accept the item.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+
+
+ Adds/Takes an item to/from anyone of the specified collections.
+ A is thrown if the is
+ canceled.
+
+ The collections into which the item can be added.
+ The item to be added or the item removed and returned to the caller.
+ The number of milliseconds to wait for a collection to accept the
+ operation, or -1 to wait indefinitely.
+ Indicates whether this method is called to Add or Take.
+ A cancellation token to observe.
+ The index into collections for the collection which accepted the
+ adding/removal of the item; -1 if the item could not be added/removed.
+ If the is canceled.
+ If the collections argument is null.
+ If the collections argument is a 0-length array or contains a
+ null element. Also, if atleast one of the collections has been marked complete for adds.
+ If atleast one of the collections has been disposed.
+
+
+
+ Local static method, used by TryAddTakeAny to get the wait handles for the collection, with exclude option to exclude the Compeleted collections
+
+ The blocking collections
+ Add or Take operation
+ The original CancellationToken
+ True to exclude the compeleted collections
+ Complete list of cancellationTokens to observe
+ The collections wait handles
+
+
+
+ Helper to perform WaitHandle.WaitAny(.., CancellationToken)
+ this should eventually appear on the WaitHandle class.
+
+
+
+
+
+
+
+
+
+ Helper function to measure and update the wait time
+
+ The first time (in Ticks) observed when the wait started
+ The orginal wait timeoutout in milliseconds
+ The new wait time in milliseconds, -1 if the time expired
+
+
+
+ Takes an item from any one of the specified
+ instances.
+
+ The array of collections.
+ The item removed from one of the collections.
+ The index of the collection in the array from which
+ the item was removed, or -1 if an item could not be removed.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element.
+ At least one of the instances has been disposed.
+ At least one of the underlying collections was modified
+ outside of its instance.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+ A call to TakeFromAny may block until an item is available to be removed.
+
+
+
+ Takes an item from any one of the specified
+ instances.
+ A is thrown if the is
+ canceled.
+
+ The array of collections.
+ The item removed from one of the collections.
+ A cancellation token to observe.
+ The index of the collection in the array from which
+ the item was removed, or -1 if an item could not be removed.
+ The argument is
+ null.
+ If the is canceled.
+ The argument is
+ a 0-length array or contains a null element.
+ At least one of the instances has been disposed.
+ At least one of the underlying collections was modified
+ outside of its instance.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+ A call to TakeFromAny may block until an item is available to be removed.
+
+
+
+ Attempts to remove an item from any one of the specified
+ instances.
+
+ The array of collections.
+ The item removed from one of the collections.
+ The index of the collection in the array from which
+ the item was removed, or -1 if an item could not be removed.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element.
+ At least one of the instances has been disposed.
+ At least one of the underlying collections was modified
+ outside of its instance.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+ A call to TryTakeFromAny may block until an item is available to be removed.
+
+
+
+ Attempts to remove an item from any one of the specified
+ instances.
+
+ The array of collections.
+ The item removed from one of the collections.
+ A that represents the number of milliseconds
+ to wait, or a that represents -1 milliseconds to wait indefinitely.
+
+ The index of the collection in the array from which
+ the item was removed, or -1 if an item could not be removed.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element.
+ At least one of the instances has been disposed.
+ is a negative number
+ other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater than
+ .
+ At least one of the underlying collections was modified
+ outside of its instance.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+ A call to TryTakeFromAny may block until an item is available to be removed.
+
+
+
+ Attempts to remove an item from any one of the specified
+ instances.
+
+ The array of collections.
+ The item removed from one of the collections.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ The index of the collection in the array from which
+ the item was removed, or -1 if an item could not be removed.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element.
+ At least one of the instances has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ At least one of the underlying collections was modified
+ outside of its instance.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+ A call to TryTakeFromAny may block until an item is available to be removed.
+
+
+
+ Attempts to remove an item from any one of the specified
+ instances.
+ A is thrown if the is
+ canceled.
+
+ The array of collections.
+ The item removed from one of the collections.
+ The number of milliseconds to wait, or (-1) to wait indefinitely.
+ A cancellation token to observe.
+ The index of the collection in the array from which
+ the item was removed, or -1 if an item could not be removed.
+ If the is canceled.
+ The argument is
+ null.
+ The argument is
+ a 0-length array or contains a null element.
+ At least one of the instances has been disposed.
+ is a
+ negative number other than -1, which represents an infinite time-out.
+ At least one of the underlying collections was modified
+ outside of its instance.
+ The count of is greater than the maximum size of
+ 62 for STA and 63 for MTA.
+ A call to TryTakeFromAny may block until an item is available to be removed.
+
+
+
+ Marks the instances
+ as not accepting any more additions.
+
+
+ After a collection has been marked as complete for adding, adding to the collection is not permitted
+ and attempts to remove from the collection will not wait when the collection is empty.
+
+ The has been disposed.
+
+
+ Cancels the semaphores.
+
+
+
+ Releases resources used by the instance.
+
+
+
+
+ Releases resources used by the instance.
+
+ Whether being disposed explicitly (true) or due to a finalizer (false).
+
+
+ Copies the items from the instance into a new array.
+ An array containing copies of the elements of the collection.
+ The has been disposed.
+
+ The copied elements are not removed from the collection.
+
+
+
+ Copies all of the items in the instance
+ to a compatible one-dimensional array, starting at the specified index of the target array.
+
+ The one-dimensional array that is the destination of the elements copied from
+ the instance. The array must have zero-based indexing.
+ The zero-based index in at which copying begins.
+ The argument is
+ null.
+ The argument is less than zero.
+ The argument is equal to or greater
+ than the length of the .
+ The has been disposed.
+
+
+ Copies all of the items in the instance
+ to a compatible one-dimensional array, starting at the specified index of the target array.
+
+ The one-dimensional array that is the destination of the elements copied from
+ the instance. The array must have zero-based indexing.
+ The zero-based index in at which copying begins.
+ The argument is
+ null.
+ The argument is less than zero.
+ The argument is equal to or greater
+ than the length of the , the array is multidimensional, or the type parameter for the collection
+ cannot be cast automatically to the type of the destination array.
+ The has been disposed.
+
+
+ Provides a consuming for items in the collection.
+ An that removes and returns items from the collection.
+ The has been disposed.
+
+
+ Provides a consuming for items in the collection.
+ Calling MoveNext on the returned enumerable will block if there is no data available, or will
+ throw an if the is canceled.
+
+ A cancellation token to observe.
+ An that removes and returns items from the collection.
+ The has been disposed.
+ If the is canceled.
+
+
+ Provides an for items in the collection.
+ An for the items in the collection.
+ The has been disposed.
+
+
+ Provides an for items in the collection.
+ An for the items in the collection.
+ The has been disposed.
+
+
+ Centralizes the logic for validating the BlockingCollections array passed to TryAddToAny()
+ and TryTakeFromAny().
+ The collections to/from which an item should be added/removed.
+ Indicates whether this method is called to Add or Take.
+ A copy of the collections array that acts as a defense to prevent an “outsider” from changing
+ elements of the array after we have done the validation on them.
+ If the collections argument is null.
+ If the collections argument is a 0-length array or contains a
+ null element. Also, if atleast one of the collections has been marked complete for adds.
+ If atleast one of the collections has been disposed.
+
+
+ Centeralizes the logic of validating the timeout input argument.
+ The TimeSpan to wait for to successfully complete an operation on the collection.
+ If the number of millseconds represented by the timeout
+ TimeSpan is less than 0 or is larger than Int32.MaxValue and not Timeout.Infinite
+
+
+ Centralizes the logic of validating the millisecondsTimeout input argument.
+ The number of milliseconds to wait for to successfully complete an
+ operation on the collection.
+ If the number of millseconds is less than 0 and not
+ equal to Timeout.Infinite.
+
+
+ Throws a System.ObjectDisposedException if the collection was disposed
+ If the collection has been disposed.
+
+
+ Gets the bounded capacity of this instance.
+ The bounded capacity of this collection, or int.MaxValue if no bound was supplied.
+ The has been disposed.
+
+
+ Gets whether this has been marked as complete for adding.
+ Whether this collection has been marked as complete for adding.
+ The has been disposed.
+
+
+ Gets whether this has been marked as complete for adding and is empty.
+ Whether this collection has been marked as complete for adding and is empty.
+ The has been disposed.
+
+
+ Gets the number of items contained in the .
+ The number of items contained in the .
+ The has been disposed.
+
+
+ Gets a value indicating whether access to the is synchronized.
+ The has been disposed.
+
+
+
+ Gets an object that can be used to synchronize access to the . This property is not supported.
+
+ The SyncRoot property is not supported.
+
+
+ An enumerated data type used internal to the class to specify to a generic method
+ the current mode of operation.
+
+
+ A debugger view of the blocking collection that makes it simple to browse the
+ collection's contents at a point in time.
+ The type of element that the BlockingCollection will hold.
+
+
+ Constructs a new debugger view object for the provided blocking collection object.
+ A blocking collection to browse in the debugger.
+
+
+ Returns a snapshot of the underlying collection's elements.
+
+
+
+ Represents an thread-safe, unordered collection of objects.
+
+ Specifies the type of elements in the bag.
+
+
+ Bags are useful for storing objects when ordering doesn't matter, and unlike sets, bags support
+ duplicates. is a thread-safe bag implementation, optimized for
+ scenarios where the same thread will be both producing and consuming data stored in the bag.
+
+
+ accepts null reference (Nothing in Visual Basic) as a valid
+ value for reference types.
+
+
+ All public and protected members of are thread-safe and may be used
+ concurrently from multiple threads.
+
+
+
+
+
+ Initializes a new instance of the
+ class.
+
+
+
+
+ Initializes a new instance of the
+ class that contains elements copied from the specified collection.
+
+ The collection whose elements are copied to the new .
+ is a null reference
+ (Nothing in Visual Basic).
+
+
+
+ Local helper function to initalize a new bag object
+
+ An enumeration containing items with which to initialize this bag.
+
+
+
+ Adds an object to the .
+
+ The object to be added to the
+ . The value can be a null reference
+ (Nothing in Visual Basic) for reference types.
+
+
+
+
+
+
+
+
+
+ Attempts to add an object to the .
+
+ The object to be added to the
+ . The value can be a null reference
+ (Nothing in Visual Basic) for reference types.
+ Always returns true
+
+
+
+ Attempts to remove and return an object from the .
+
+ When this method returns, contains the object
+ removed from the or the default value
+ of if the operation failed.
+ true if an object was removed successfully; otherwise, false.
+
+
+
+ Attempts to return an object from the
+ without removing it.
+
+ When this method returns, contains an object from
+ the or the default value of
+ if the operation failed.
+ true if and object was returned successfully; otherwise, false.
+
+
+
+ Local helper function to Take or Peek an item from the bag
+
+ To receive the item retrieved from the bag
+ True means Take operation, false means Peek operation
+ True if succeeded, false otherwise
+
+
+
+ Local helper function to retrieve a thread local list by a thread object
+
+ Create a new list if the thread does ot exist
+ The local list object
+
+
+
+ Try to reuse an unowned list if exist
+ unowned lists are the lists that their owner threads are aborted or terminated
+ this is workaround to avoid memory leaks.
+
+ The list object, null if all lists are owned
+
+
+
+ Local helper method to steal an item from any other non empty thread
+ It enumerate all other threads in two passes first pass acquire the lock with TryEnter if succeeded
+ it steals the item, otherwise it enumerate them again in 2nd pass and acquire the lock using Enter
+
+ To receive the item retrieved from the bag
+ Whether to remove or peek.
+ True if succeeded, false otherwise.
+
+
+
+ local helper function tries to steal an item from given local list
+
+
+
+
+ Local helper function to check the list if it became empty after acquiring the lock
+ and wait if there is unsynchronized Add/Take operation in the list to be done
+
+ The list to steal
+ True if can steal, false otherwise
+
+
+
+ Copies the elements to an existing
+ one-dimensional Array, starting at the specified array
+ index.
+
+ The one-dimensional Array that is the
+ destination of the elements copied from the
+ . The Array must have zero-based indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+ is equal to or greater than the
+ length of the
+ -or- the number of elements in the source is greater than the available space from
+ to the end of the destination .
+
+
+
+ Copies the elements of the to an , starting at a particular
+ index.
+
+ The one-dimensional Array that is the
+ destination of the elements copied from the
+ . The Array must have zero-based indexing.
+ The zero-based index in at which copying
+ begins.
+ is a null reference (Nothing in
+ Visual Basic).
+ is less than
+ zero.
+
+ is multidimensional. -or-
+ does not have zero-based indexing. -or-
+ is equal to or greater than the length of the
+ -or- The number of elements in the source is
+ greater than the available space from to the end of the destination
+ . -or- The type of the source cannot be cast automatically to the type of the
+ destination .
+
+
+
+
+ Copies the elements to a new array.
+
+ A new array containing a snapshot of elements copied from the .
+
+
+
+ Returns an enumerator that iterates through the .
+
+ An enumerator for the contents of the .
+
+ The enumeration represents a moment-in-time snapshot of the contents
+ of the bag. It does not reflect any updates to the collection after
+ was called. The enumerator is safe to use
+ concurrently with reads from and writes to the bag.
+
+
+
+
+ Returns an enumerator that iterates through the .
+
+ An enumerator for the contents of the .
+
+ The items enumerated represent a moment-in-time snapshot of the contents
+ of the bag. It does not reflect any update to the collection after
+ was called.
+
+
+
+
+ Get the data array to be serialized
+
+
+
+
+ Construct the stack from a previously seiralized one
+
+
+
+
+ Local helper method to freeze all bag operations, it
+ 1- Acquire the global lock to prevent any other thread to freeze the bag, and also new new thread can be added
+ to the dictionary
+ 2- Then Acquire all local lists locks to prevent steal and synchronized operations
+ 3- Wait for all un-synchronized operations to be done
+
+ Retrieve the lock taken result for the global lock, to be passed to Unfreeze method
+
+
+
+ Local helper method to unfreeze the bag from a frozen state
+
+ The lock taken result from the Freeze method
+
+
+
+ local helper method to acquire all local lists locks
+
+
+
+
+ Local helper method to release all local lists locks
+
+
+
+
+ Local helper function to wait all unsynchronized operations
+
+
+
+
+ Local helper function to get the bag count, the caller should call it from Freeze/Unfreeze block
+
+ The current bag count
+
+
+
+ Local helper function to return the bag item in a list, this is mainly used by CopyTo and ToArray
+ This is not thread safe, should be called in Freeze/UnFreeze bag block
+
+ List the contains the bag items
+
+
+
+ Gets the number of elements contained in the .
+
+ The number of elements contained in the .
+
+ The count returned represents a moment-in-time snapshot of the contents
+ of the bag. It does not reflect any updates to the collection after
+ was called.
+
+
+
+
+ Gets a value that indicates whether the is empty.
+
+ true if the is empty; otherwise, false.
+
+
+
+ Gets a value indicating whether access to the is
+ synchronized with the SyncRoot.
+
+ true if access to the is synchronized
+ with the SyncRoot; otherwise, false. For , this property always
+ returns false.
+
+
+
+ Gets an object that can be used to synchronize access to the . This property is not supported.
+
+ The SyncRoot property is not supported.
+
+
+
+ A class that represents a node in the lock thread list
+
+
+
+
+ A class that represents the lock thread list
+
+
+
+
+ ThreadLocalList constructor
+
+ The owner thread for this list
+
+
+
+ Add new item to head of the list
+
+ The item to add.
+ Whether to update the count.
+
+
+
+ Remove an item from the head of the list
+
+ The removed item
+
+
+
+ Peek an item from the head of the list
+
+ the peeked item
+ True if succeeded, false otherwise
+
+
+
+ Steal an item from the tail of the list
+
+ the removed item
+ remove or peek flag
+
+
+
+ Gets the total list count, it's not thread safe, may provide incorrect count if it is called concurrently
+
+
+
+
+ List operations
+
+
+
+
+ A simple class for the debugger view window
+
+
+
+
+ Provides a set of methods for querying objects that implement
+ ParallelQuery{TSource}. This is the parallel equivalent of
+ .
+
+
+
+
+ Enables parallelization of a query.
+
+ The type of elements of .
+ An
+ to convert to a .
+ The source as a to bind to
+ ParallelEnumerable extension methods.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Enables parallelization of a query, as sourced by a partitioner
+ responsible for splitting the input sequence into partitions.
+
+ The type of elements of .
+ A partitioner over the input sequence.
+ The as a ParallelQuery to bind to ParallelEnumerable extension methods.
+
+ The source partitioner's GetOrderedPartitions method is used when ordering is enabled,
+ whereas the partitioner's GetPartitions is used if ordering is not enabled (the default).
+ The source partitioner's GetDynamicPartitions and GetDynamicOrderedPartitions are not used.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Enables treatment of a data source as if it was ordered, overriding the default of unordered.
+ AsOrdered may only be invoked on sequences returned by AsParallel, ParallelEnumerable.Range,
+ and ParallelEnumerable.Repeat.
+
+ The type of elements of .
+ The input sequence.
+
+ Thrown if is not one of AsParallel, ParallelEnumerable.Range, or ParallelEnumerable.Repeat.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ A natural tension exists between performance and preserving order in parallel processing. By default,
+ a parallelized query behaves as if the ordering of the results is arbitrary
+ unless AsOrdered is applied or there is an explicit OrderBy operator in the query.
+
+ The source sequence which will maintain ordering in the query.
+
+
+
+ Enables treatment of a data source as if it was ordered, overriding the default of unordered.
+ AsOrdered may only be invoked on sequences returned by AsParallel, ParallelEnumerable.Range,
+ and ParallelEnumerable.Repeat.
+
+ The input sequence.
+
+ Thrown if the is not one of AsParallel, ParallelEnumerable.Range, or ParallelEnumerable.Repeat.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ A natural tension exists between performance and preserving order in parallel processing. By default,
+ a parallelized query behaves as if the ordering of the results is arbitrary unless AsOrdered
+ is applied or there is an explicit OrderBy operator in the query.
+
+ The source sequence which will maintain ordering in the query.
+
+
+
+ Allows an intermediate query to be treated as if no ordering is implied among the elements.
+
+
+ AsUnordered may provide
+ performance benefits when ordering is not required in a portion of a query.
+
+ The type of elements of .
+ The input sequence.
+ The source sequence with arbitrary order.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Enables parallelization of a query.
+
+ An to convert
+ to a .
+
+ The source as a ParallelQuery to bind to
+ ParallelEnumerable extension methods.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Converts a into an
+ to force sequential
+ evaluation of the query.
+
+ The type of elements of .
+ A to convert to an .
+ The source as an
+ to bind to sequential extension methods.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Sets the task scheduler to execute the query.
+
+ The type of elements of .
+ A ParallelQuery on which to set the task scheduler option.
+ Task scheduler to execute the query.
+ ParallelQuery representing the same query as source, but with the task scheduler option set.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ WithTaskScheduler is used multiple times in the query.
+
+
+
+
+ Sets the degree of parallelism to use in a query. Degree of parallelism is the maximum number of concurrently
+ executing tasks that will be used to process the query.
+
+ The type of elements of .
+ A ParallelQuery on which to set the limit on the degrees of parallelism.
+ The degree of parallelism for the query.
+ ParallelQuery representing the same query as source, with the limit on the degrees of parallelism set.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ WithDegreeOfParallelism is used multiple times in the query.
+
+
+ is less than 1 or greater than 63.
+
+
+
+
+ Sets the to associate with the query.
+
+ The type of elements of .
+ A ParallelQuery on which to set the option.
+ A cancellation token.
+ ParallelQuery representing the same query as source, but with the
+ registered.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ WithCancellation is used multiple times in the query.
+
+
+ The associated with the has been disposed.
+
+
+
+
+ Sets the execution mode of the query.
+
+ The type of elements of .
+ A ParallelQuery on which to set the option.
+ The mode in which to execute the query.
+ ParallelQuery representing the same query as source, but with the
+ registered.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ is not a valid value.
+
+
+ WithExecutionMode is used multiple times in the query.
+
+
+
+
+ Sets the merge options for this query, which specify how the query will buffer output.
+
+ The type of elements of .
+ A ParallelQuery on which to set the option.
+ The merge optiosn to set for this query.
+ ParallelQuery representing the same query as source, but with the
+ registered.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ is not a valid value.
+
+
+ WithMergeOptions is used multiple times in the query.
+
+
+
+
+ Generates a parallel sequence of integral numbers within a specified range.
+
+ The value of the first integer in the sequence.
+ The number of sequential integers to generate.
+ An IEnumerable<Int32> in C# or IEnumerable(Of Int32) in
+ Visual Basic that contains a range of sequential integral numbers.
+
+ is less than 0
+ -or-
+ + - 1 is larger than .
+
+
+
+
+ Generates a parallel sequence that contains one repeated value.
+
+ The type of the value to be repeated in the result sequence.
+ The value to be repeated.
+ The number of times to repeat the value in the generated sequence.
+ A sequence that contains a repeated value.
+
+ is less than 0.
+
+
+
+
+ Returns an empty ParallelQuery{TResult} that has the specified type argument.
+
+ The type to assign to the type parameter of the returned
+ generic sequence.
+ An empty sequence whose type argument is .
+
+
+
+ Invokes in parallel the specified action for each element in the .
+
+
+ This is an efficient way to process the output from a parallelized query because it does
+ not require a merge step at the end. However, order of execution is non-deterministic.
+
+ The type of elements of .
+ The whose elements will be processed by
+ .
+ An Action to invoke on each element.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Filters in parallel a sequence of values based on a predicate.
+
+ The type of the elements of source.
+ A sequence to filter.
+ A function to test each element for a condition.
+ A sequence that contains elements from the input sequence that satisfy
+ the condition.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Filters in parallel a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.
+
+ The type of the elements of source.
+ A sequence to filter.
+ A function to test each element for a condition.
+ A sequence that contains elements from the input sequence that satisfy the condition.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Projects in parallel each element of a sequence into a new form.
+
+ The type of the elements of .
+ The type of elements resturned by selector.
+ A sequence of values to invoke a transform function on.
+ A transform function to apply to each element.
+ A sequence whose elements are the result of invoking the transform function on each
+ element of .
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Projects in parallel each element of a sequence into a new form by incorporating the element's index.
+
+ The type of the elements of .
+ The type of elements resturned by selector.
+ A sequence of values to invoke a transform function on.
+ A transform function to apply to each element.
+ A sequence whose elements are the result of invoking the transform function on each
+ element of .
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Merges in parallel two sequences by using the specified predicate function.
+
+ The type of the elements of the first sequence.
+ The type of the elements of the second sequence.
+ The type of the return elements.
+ The first sequence to zip.
+ The second sequence to zip.
+ A function to create a result element from two matching elements.
+
+ A sequence that has elements of type that are obtained by performing
+ resultSelector pairwise on two sequences. If the sequence lengths are unequal, this truncates
+ to the length of the shorter sequence.
+
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Zip overload should never be called.
+ This method is marked as obsolete and always throws
+ when invoked.
+
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Zip with a left data source of type
+ and a right data source of type .
+ Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation.
+
+
+
+
+ Correlates in parallel the elements of two sequences based on matching keys.
+ The default equality comparer is used to compare keys.
+
+ The type of the elements of the first sequence.
+ The type of the elements of the second sequence.
+ The type of the keys returned by the key selector functions.
+ The type of the result elements.
+ The first sequence to join.
+ The sequence to join to the first sequence.
+ A function to extract the join key from each element of
+ the first sequence.
+ A function to extract the join key from each element of
+ the second sequence.
+ A function to create a result element from two matching elements.
+ A sequence that has elements of type that are obtained by performing
+ an inner join on two sequences.
+
+ or or or
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Join overload should never be called.
+ This method is marked as obsolete and always throws when invoked.
+
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage Join with a left data source of type
+ and a right data source of type .
+ Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.
+
+
+
+
+ Correlates in parallel the elements of two sequences based on matching keys.
+ A specified IEqualityComparer{T} is used to compare keys.
+
+ The type of the elements of the first sequence.
+ The type of the elements of the second sequence.
+ The type of the keys returned by the key selector functions.
+ The type of the result elements.
+ The first sequence to join.
+ The sequence to join to the first sequence.
+ A function to extract the join key from each element
+ of the first sequence.
+ A function to extract the join key from each element
+ of the second sequence.
+ A function to create a result element from two matching elements.
+ An IEqualityComparer<(Of <(T>)>) to hash and compare keys.
+ A sequence that has elements of type that are obtained by performing
+ an inner join on two sequences.
+
+ or or or
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Join overload should never be called.
+ This method is marked as obsolete and always throws when invoked.
+
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Join with a left data source of type
+ and a right data source of type .
+ Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.
+
+
+
+
+ Correlates in parallel the elements of two sequences based on equality of keys and groups the results.
+ The default equality comparer is used to compare keys.
+
+ The type of the elements of the first sequence.
+ The type of the elements of the second sequence.
+ The type of the keys returned by the key selector functions.
+ The type of the result elements.
+ The first sequence to join.
+ The sequence to join to the first sequence.
+ A function to extract the join key from each element
+ of the first sequence.
+ A function to extract the join key from each element
+ of the second sequence.
+ A function to create a result element from an element from
+ the first sequence and a collection of matching elements from the second sequence.
+ A sequence that has elements of type that are obtained by performing
+ a grouped join on two sequences.
+
+ or or or
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This GroupJoin overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of GroupJoin with a left data source of type
+ and a right data source of type .
+ Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Correlates in parallel the elements of two sequences based on key equality and groups the results.
+ A specified IEqualityComparer{T} is used to compare keys.
+
+ The type of the elements of the first sequence.
+ The type of the elements of the second sequence.
+ The type of the keys returned by the key selector functions.
+ The type of the result elements.
+ The first sequence to join.
+ The sequence to join to the first sequence.
+ A function to extract the join key from each element
+ of the first sequence.
+ A function to extract the join key from each element
+ of the second sequence.
+ A function to create a result element from an element from
+ the first sequence and a collection of matching elements from the second sequence.
+ An IEqualityComparer<(Of <(T>)>) to hash and compare keys.
+ A sequence that has elements of type that are obtained by performing
+ a grouped join on two sequences.
+
+ or or or
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This GroupJoin overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of GroupJoin with a left data source of type
+ and a right data source of type .
+ Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Projects in parallel each element of a sequence to an IEnumerable{T}
+ and flattens the resulting sequences into one sequence.
+
+ The type of elements of .
+ The type of the elements of the sequence returned by selector.
+ A sequence of values to project.
+ A transform function to apply to each element.
+ A sequence whose elements are the result of invoking the one-to-many transform
+ function on each element of the input sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Projects in parallel each element of a sequence to an IEnumerable{T}, and flattens the resulting
+ sequences into one sequence. The index of each source element is used in the projected form of
+ that element.
+
+ The type of elements of .
+ The type of the elements of the sequence returned by selector.
+ A sequence of values to project.
+ A transform function to apply to each element.
+ A sequence whose elements are the result of invoking the one-to-many transform
+ function on each element of the input sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Projects each element of a sequence to an IEnumerable{T},
+ flattens the resulting sequences into one sequence, and invokes a result selector
+ function on each element therein.
+
+ The type of elements of .
+ The type of the intermediate elements collected by .
+
+ A sequence of values to project.
+ A transform function to apply to each source element;
+ the second parameter of the function represents the index of the source element.
+ A function to create a result element from an element from
+ the first sequence and a collection of matching elements from the second sequence.
+ A sequence 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.
+
+ or or
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Projects each element of a sequence to an IEnumerable{T}, flattens the resulting
+ sequences into one sequence, and invokes a result selector function on each element
+ therein. The index of each source element is used in the intermediate projected
+ form of that element.
+
+ The type of elements of .
+ The type of the intermediate elements collected by
+ .
+ The type of elements to return.
+ A sequence of values to project.
+ A transform function to apply to each source element;
+ the second parameter of the function represents the index of the source element.
+ A function to create a result element from an element from
+ the first sequence and a collection of matching elements from the second sequence.
+
+ A sequence 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.
+
+
+ or or
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Sorts in parallel the elements of a sequence in ascending order according to a key.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ To achieve a stable sort, change a query of the form:
+ var ordered = source.OrderBy((e) => e.k);
+ to instead be formed as:
+ var ordered = source.Select((e,i) => new { E=e, I=i }).OrderBy((v) => v.i).Select((v) => v.e);
+
+ The type of elements of .
+ The type of the key returned by .
+ A sequence of values to order.
+ A function to extract a key from an element.
+ An OrderedParallelQuery{TSource} whose elements are sorted
+ according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Sorts in parallel the elements of a sequence in ascending order by using a specified comparer.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ A sequence of values to order.
+ A function to extract a key from an element.
+ An IComparer{TKey} to compare keys.
+ An OrderedParallelQuery{TSource} whose elements are sorted according
+ to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Sorts in parallel the elements of a sequence in descending order according to a key.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ A sequence of values to order.
+ A function to extract a key from an element.
+ An OrderedParallelQuery{TSource} whose elements are sorted
+ descending according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Sorts the elements of a sequence in descending order by using a specified comparer.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ A sequence of values to order.
+ A function to extract a key from an element.
+ An IComparer{TKey} to compare keys.
+ An OrderedParallelQuery{TSource} whose elements are sorted descending
+ according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Performs in parallel a subsequent ordering of the elements in a sequence
+ in ascending order according to a key.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ An OrderedParallelQuery{TSource} than
+ contains elements to sort.
+ A function to extract a key from an element.
+ An OrderedParallelQuery{TSource} whose elements are
+ sorted according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Performs in parallel a subsequent ordering of the elements in a sequence in
+ ascending order by using a specified comparer.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ An OrderedParallelQuery{TSource} that contains
+ elements to sort.
+ A function to extract a key from an element.
+ An IComparer{TKey} to compare keys.
+ An OrderedParallelQuery{TSource} whose elements are sorted
+ according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Performs in parallel a subsequent ordering of the elements in a sequence in
+ descending order, according to a key.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ An OrderedParallelQuery{TSource} than contains
+ elements to sort.
+ A function to extract a key from an element.
+ An OrderedParallelQuery{TSource} whose elements are sorted
+ descending according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Performs in parallel a subsequent ordering of the elements in a sequence in descending
+ order by using a specified comparer.
+
+
+ In contrast to the sequential implementation, this is not a stable sort.
+ See the remarks for OrderBy(ParallelQuery{TSource}, Func{TSource,TKey}) for
+ an approach to implementing a stable sort.
+
+ The type of elements of .
+ The type of the key returned by .
+ An OrderedParallelQuery{TSource} than contains
+ elements to sort.
+ A function to extract a key from an element.
+ An IComparer{TKey} to compare keys.
+ An OrderedParallelQuery{TSource} whose elements are sorted
+ descending according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups in parallel the elements of a sequence according to a specified key selector function.
+
+ The type of elements of .
+ The type of the key returned by .
+ An OrderedParallelQuery{TSource}than contains
+ elements to sort.
+ A function to extract a key from an element.
+ An OrderedParallelQuery{TSource}whose elements are sorted
+ descending according to a key.
+
+
+
+ Groups in parallel the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.
+
+ The type of elements of .
+ The type of the key returned by >.
+ An OrderedParallelQuery{TSource} than contains
+ elements to sort.
+ A function to extract a key from an element.
+ An IComparer{TSource} to compare keys.
+ An OrderedParallelQuery{TSource} whose elements are sorted
+ descending according to a key.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups in parallel the elements of a sequence according to a specified key selector function and
+ projects the elements for each group by using a specified function.
+
+ The type of elements of .
+ The type of the key returned by .
+ The type of the elements in the IGrouping
+ An OrderedParallelQuery<(Of <(TElement>)>) than contains
+ elements to sort.
+ A function to extract a key from an element.
+ A function to map each source element to an element in an IGrouping.
+ A ParallelQuery<IGrouping<TKey, TElement>> in C# or
+ ParallelQuery(Of IGrouping(Of TKey, TElement)) in Visual Basic where each IGrouping
+ generic object contains a collection of objects of type and a key.
+
+ or or
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups in parallel the elements of a sequence according to a key selector function.
+ The keys are compared by using a comparer and each group's elements are projected by
+ using a specified function.
+
+ The type of elements of .
+ The type of the key returned by .
+ The type of the elements in the IGrouping
+ An OrderedParallelQuery{TSource}than contains elements to sort.
+ A function to extract a key from an element.
+ A function to map each source element to an element in an IGrouping.
+ An IComparer{TSource} to compare keys.
+
+ A ParallelQuery{IGrouping{TKey, TElement}} in C# or
+ ParallelQuery(Of IGrouping(Of TKey, TElement)) in Visual Basic where each IGrouping
+ generic object contains a collection of objects of type and a key.
+
+
+ or or
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups in parallel the elements of a sequence according to a specified
+ key selector function and creates a result value from each group and its key.
+
+ The type of the elements of .
+ The type of the key returned by .
+ The type of the result value returned by .
+ A sequence whose elements to group.
+ A function to extract the key for each element.
+ A function to create a result value from each group.
+ A collection of elements of type where each element represents a
+ projection over a group and its key.
+
+ or or
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups in parallel the elements of a sequence according to a specified key selector function
+ and creates a result value from each group and its key. The keys are compared
+ by using a specified comparer.
+
+ The type of the elements of .
+ The type of the key returned by .
+ The type of the result value returned by .
+ A sequence whose elements to group.
+ A function to extract the key for each element.
+ A function to create a result value from each group.
+ An IEqualityComparer{TKey} to compare keys.
+
+ An ParallelQuery<IGrouping<TKey, TResult>> in C# or
+ ParallelQuery(Of IGrouping(Of TKey, TResult)) in Visual Basic where each
+ IGrouping<(Of <(TKey, TResult>)>) object contains a collection of objects
+ of type and a key.
+
+
+ or or
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups in parallel the elements of a sequence according to a specified key
+ selector function and creates a result value from each group and its key.
+ The elements of each group are projected by using a specified function.
+
+ The type of the elements of .
+ The type of the key returned by .
+ The type of the elements in each
+ IGrouping{TKey, TElement}.
+ The type of the result value returned by .
+ A sequence whose elements to group.
+ A function to extract the key for each element.
+ A function to map each source element to an element in an
+ IGrouping<TKey, TElement>.
+ A function to create a result value from each group.
+ A collection of elements of type where each element represents a
+ projection over a group and its key.
+
+ or or
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Groups the elements of a sequence according to a specified key selector function and
+ creates a result value from each group and its key. Key values are compared by using a
+ specified comparer, and the elements of each group are projected by using a specified function.
+
+ The type of the elements of .
+ The type of the key returned by .
+ The type of the elements in each
+ IGrouping{TKey, TElement}.
+ The type of the result value returned by .
+ A sequence whose elements to group.
+ A function to extract the key for each element.
+ A function to map each source element to an element in an
+ IGrouping{Key, TElement}.
+ A function to create a result value from each group.
+ An IEqualityComparer{TKey} to compare keys.
+ A collection of elements of type where each element represents a
+ projection over a group and its key.
+
+ or or
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Run an aggregation sequentially. If the user-provided reduction function throws an exception, wrap
+ it with an AggregateException.
+
+
+
+
+ if true, use the seed provided in the method argument
+ if false, use the first element of the sequence as the seed instead
+
+
+
+
+
+ Applies in parallel an accumulator function over a sequence.
+
+ The type of the elements of .
+ A sequence to aggregate over.
+ An accumulator function to be invoked on each element.
+ The final accumulator value.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Applies in parallel an accumulator function over a sequence.
+ The specified seed value is used as the initial accumulator value.
+
+ The type of the elements of .
+ The type of the accumulator value.
+ A sequence to aggregate over.
+ The initial accumulator value.
+ An accumulator function to be invoked on each element.
+ The final accumulator value.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Applies in parallel an accumulator function over a sequence. The specified
+ seed value is used as the initial accumulator value, and the specified
+ function is used to select the result value.
+
+ The type of the elements of .
+ The type of the accumulator value.
+ The type of the resulting value.
+ A sequence to aggregate over.
+ The initial accumulator value.
+ An accumulator function to be invoked on each element.
+ A function to transform the final accumulator value
+ into the result value.
+ The transformed final accumulator value.
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Applies in parallel an accumulator function over a sequence. This overload is not
+ available in the sequential implementation.
+
+
+ This overload is specific to processing a parallelized query. A parallelized query may
+ partition the data source sequence into several sub-sequences (partitions).
+ The is invoked on each element within partitions.
+ Each partition then yields a single accumulated result. The
+ is then invoked on the results of each partition to yield a single element. This element is then
+ transformed by the function.
+
+ The type of the elements of .
+ The type of the accumulator value.
+ The type of the resulting value.
+ A sequence to aggregate over.
+ The initial accumulator value.
+
+ An accumulator function to be invoked on each element in a partition.
+
+
+ An accumulator function to be invoked on the yielded element from each partition.
+
+
+ A function to transform the final accumulator value into the result value.
+
+ The transformed final accumulator value.
+
+ or
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Applies in parallel an accumulator function over a sequence. This overload is not
+ available in the sequential implementation.
+
+
+ This overload is specific to parallelized queries. A parallelized query may partition the data source sequence
+ into several sub-sequences (partitions). The is invoked
+ on each element within partitions. Each partition then yields a single accumulated result.
+ The
+ is then invoked on the results of each partition to yield a single element. This element is then
+ transformed by the function.
+
+ The type of the elements of .
+ The type of the accumulator value.
+ The type of the resulting value.
+ A sequence to aggregate over.
+
+ A function that returns the initial accumulator value.
+
+
+ An accumulator function to be invoked on each element in a partition.
+
+
+ An accumulator function to be invoked on the yielded element from each partition.
+
+
+ A function to transform the final accumulator value into the result value.
+
+ The transformed final accumulator value.
+
+ or or
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the number of elements in a parallel sequence.
+
+ The type of the elements of .
+ A sequence that contains elements to be counted.
+ The number of elements in the input sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The number of elements in source is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns a number that represents how many elements in the specified
+ parallel sequence satisfy a condition.
+
+ The type of the elements of .
+ A sequence that contains elements to be counted.
+ A function to test each element for a condition.
+
+ A number that represents how many elements in the sequence satisfy the condition
+ in the predicate function.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The number of elements in source is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns an Int64 that represents the total number of elements in a parallel sequence.
+
+ The type of the elements of .
+ A sequence that contains elements to be counted.
+ The number of elements in the input sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The number of elements in source is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns an Int64 that represents how many elements in a parallel sequence satisfy a condition.
+
+ The type of the elements of .
+ A sequence that contains elements to be counted.
+ A function to test each element for a condition.
+
+ A number that represents how many elements in the sequence satisfy the condition
+ in the predicate function.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The number of elements in source is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of a sequence of values.
+
+ A sequence of values to calculate the sum of.
+ The sum of the values in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the sum of the sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values to calculate the sum of.
+ A transform function to apply to each element.
+ The sum of the values in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the minimum value in a parallel sequence of values.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ The minimum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements and is a non-nullable value type.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the minimum value.
+
+ The type of elements of .
+ The type of the value returned by .
+ A sequence of values to determine the minimum value of.
+ A transform function to apply to each element.
+ The minimum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements and is a non-nullable value type.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the maximum value in a parallel sequence of values.
+
+ A sequence of values to determine the maximum value of.
+ The maximum value in the sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements and is a non-nullable value type.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Invokes in parallel a transform function on each element of a
+ sequence and returns the maximum value.
+
+ The type of elements of .
+ The type of the value returned by .
+ A sequence of values to determine the maximum value of.
+ A transform function to apply to each element.
+ The maximum value in the sequence.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements and is a non-nullable value type.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values.
+
+ A sequence of values that are used to calculate an average.
+ The average of the sequence of values.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ The sum or count of the elements in the sequence is larger than .
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Computes in parallel the average of a sequence of values that are obtained
+ by invoking a transform function on each element of the input sequence.
+
+ The type of elements of .
+ A sequence of values that are used to calculate an average.
+ A transform function to apply to each element.
+ The average of the sequence of values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Determines in parallel whether any element of a sequence satisfies a condition.
+
+ The type of elements of .
+ An IEnumerable whose elements to apply the predicate to.
+ A function to test each element for a condition.
+
+ true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Determines whether a parallel sequence contains any elements.
+
+ The type of elements of .
+ The IEnumerable to check for emptiness.
+ true if the source sequence contains any elements; otherwise, false.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Determines in parallel whether all elements of a sequence satisfy a condition.
+
+ The type of elements of .
+ A sequence whose elements to apply the predicate to.
+ A function to test each element for a condition.
+
+ true if all elements in the source sequence pass the test in the specified predicate; otherwise, false.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Determines in parallel whether a sequence contains a specified element
+ by using the default equality comparer.
+
+ The type of elements of .
+ A sequence in which to locate a value.
+ The value to locate in the sequence.
+
+ true if the source sequence contains an element that has the specified value; otherwise, false.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Determines in parallel whether a sequence contains a specified element by using a
+ specified IEqualityComparer{T}.
+
+ The type of elements of .
+ A sequence in which to locate a value.
+ The value to locate in the sequence.
+ An equality comparer to compare values.
+
+ true if the source sequence contains an element that has the specified value; otherwise, false.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns a specified number of contiguous elements from the start of a parallel sequence.
+
+ The type of elements of .
+ The sequence to return elements from.
+ The number of elements to return.
+
+ A sequence that contains the specified number of elements from the start of the input sequence.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Returns elements from a parallel sequence as long as a specified condition is true.
+
+ The type of elements of .
+ The sequence to return elements from.
+ A function to test each element for a condition.
+
+ A sequence that contains the elements from the input sequence that occur before
+ the element at which the test no longer passes.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Returns elements from a parallel sequence as long as a specified condition is true.
+ The element's index is used in the logic of the predicate function.
+
+ The type of elements of .
+ The sequence to return elements from.
+
+ A function to test each source element for a condition; the second parameter of the
+ function represents the index of the source element.
+
+
+ A sequence that contains elements from the input sequence that occur before
+ the element at which the test no longer passes.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Bypasses a specified number of elements in a parallel sequence and then returns the remaining elements.
+
+ The type of elements of .
+ The sequence to return elements from.
+ The number of elements to skip before returning the remaining elements.
+
+ A sequence that contains the elements that occur after the specified index in the input sequence.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Bypasses elements in a parallel sequence as long as a specified
+ condition is true and then returns the remaining elements.
+
+ The type of elements of .
+ The sequence to return elements from.
+ A function to test each element for a condition.
+ A sequence that contains the elements from the input sequence starting at
+ the first element in the linear series that does not pass the test specified by
+ predicate.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Bypasses elements in a parallel sequence as long as a specified condition is true and
+ then returns the remaining elements. The element's index is used in the logic of
+ the predicate function.
+
+ The type of elements of .
+ The sequence to return elements from.
+
+ A function to test each source element for a condition; the
+ second parameter of the function represents the index of the source element.
+
+
+ A sequence that contains the elements from the input sequence starting at the
+ first element in the linear series that does not pass the test specified by
+ predicate.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Concatenates two parallel sequences.
+
+ The type of the elements of the input sequences.
+ The first sequence to concatenate.
+ The sequence to concatenate to the first sequence.
+ A sequence that contains the concatenated elements of the two input sequences.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Concat overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Concat with a left data source of type
+ and a right data source of type .
+ Otherwise, the Concat operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Determines whether two parallel sequences are equal by comparing the elements by using
+ the default equality comparer for their type.
+
+ The type of the elements of the input sequences.
+ A sequence to compare to second.
+ A sequence to compare to the first input sequence.
+
+ true if the two source sequences are of equal length and their corresponding elements
+ are equal according to the default equality comparer for their type; otherwise, false.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ This SequenceEqual overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ Thrown every time this method is called.
+
+ This overload exists to disallow usage of SequenceEqual with a left data source of type
+ and a right data source of type .
+ Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Determines whether two parallel sequences are equal by comparing their elements by
+ using a specified IEqualityComparer{T}.
+
+ The type of the elements of the input sequences.
+ A sequence to compare to .
+ A sequence to compare to the first input sequence.
+ An IEqualityComparer<(Of <(T>)>) to use to compare elements.
+
+ true if the two source sequences are of equal length and their corresponding
+ elements are equal according to the default equality comparer for their type; otherwise, false.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ A helper method for SequenceEqual to dispose an enumerator. If an exception is thrown by the disposal,
+ it gets wrapped into an AggregateException, unless it is an OCE with the query's CancellationToken.
+
+
+
+
+ This SequenceEqual overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ Thrown every time this method is called.
+
+ This overload exists to disallow usage of SequenceEqual with a left data source of type
+ and a right data source of type .
+ Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation,
+ but would in reality bind to sequential implementation.
+
+
+
+
+ Returns distinct elements from a parallel sequence by using the
+ default equality comparer to compare values.
+
+ The type of the elements of .
+ The sequence to remove duplicate elements from.
+ A sequence that contains distinct elements from the source sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Returns distinct elements from a parallel sequence by using a specified
+ IEqualityComparer{T} to compare values.
+
+ The type of the elements of .
+ The sequence to remove duplicate elements from.
+ An IEqualityComparer<(Of <(T>)>) to compare values.
+ A sequence that contains distinct elements from the source sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Produces the set union of two parallel sequences by using the default equality comparer.
+
+ The type of the elements of the input sequences.
+ A sequence whose distinct elements form the first set for the union.
+ A sequence whose distinct elements form the second set for the union.
+ A sequence that contains the elements from both input sequences, excluding duplicates.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Union overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Union with a left data source of type
+ and a right data source of type .
+ Otherwise, the Union operator would appear to be binding to the parallel implementation,
+ but would in reality bind to sequential implementation.
+
+
+
+
+ Produces the set union of two parallel sequences by using a specified IEqualityComparer{T}.
+
+ The type of the elements of the input sequences.
+ A sequence whose distinct elements form the first set for the union.
+ A sequence whose distinct elements form the second set for the union.
+ An IEqualityComparer<(Of <(T>)>) to compare values.
+ A sequence that contains the elements from both input sequences, excluding duplicates.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Union overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Union with a left data source of type
+ and a right data source of type .
+ Otherwise, the Union operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Produces the set intersection of two parallel sequences by using the
+ default equality comparer to compare values.
+
+ The type of the elements of the input sequences.
+ A sequence whose distinct elements that also appear in will be returned.
+
+
+ A sequence whose distinct elements that also appear in the first sequence will be returned.
+
+ A sequence that contains the elements that form the set intersection of two sequences.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Intersect overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Intersect with a left data source of type
+ and a right data source of type .
+ Otherwise, the Intersect operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Produces the set intersection of two parallel sequences by using
+ the specified IEqualityComparer{T} to compare values.
+
+ The type of the elements of the input sequences.
+
+ A sequence whose distinct elements that also appear in will be returned.
+
+
+ A sequence whose distinct elements that also appear in the first sequence will be returned.
+
+ An IEqualityComparer<(Of <(T>)>) to compare values.
+ A sequence that contains the elements that form the set intersection of two sequences.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Intersect overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Intersect with a left data source of type
+ and a right data source of type .
+ Otherwise, the Intersect operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Produces the set difference of two parallel sequences by using
+ the default equality comparer to compare values.
+
+ The type of the elements of the input sequences.
+
+ A sequence whose elements that are not also in will be returned.
+
+
+ A sequence whose elements that also occur in the first sequence will cause those
+ elements to be removed from the returned sequence.
+
+ A sequence that contains the set difference of the elements of two sequences.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Except overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Except with a left data source of type
+ and a right data source of type .
+ Otherwise, the Except operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Produces the set difference of two parallel sequences by using the
+ specified IEqualityComparer{T} to compare values.
+
+ The type of the elements of the input sequences.
+ A sequence whose elements that are not also in will be returned.
+
+ A sequence whose elements that also occur in the first sequence will cause those elements
+ to be removed from the returned sequence.
+
+ An IEqualityComparer<(Of <(T>)>) to compare values.
+ A sequence that contains the set difference of the elements of two sequences.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+
+
+ This Except overload should never be called.
+ This method is marked as obsolete and always throws when called.
+
+ This type parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This parameter is not used.
+ This overload always throws a .
+ The exception that occurs when this method is called.
+
+ This overload exists to disallow usage of Except with a left data source of type
+ and a right data source of type .
+ Otherwise, the Except operator would appear to be binding to the parallel implementation,
+ but would in reality bind to the sequential implementation.
+
+
+
+
+ Converts a into an
+ to force sequential
+ evaluation of the query.
+
+ The type of the elements of .
+ The sequence to type as .
+ The input sequence types as .
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Creates an array from a ParallelQuery{T}.
+
+ The type of the elements of .
+ A sequence to create an array from.
+ An array that contains the elements from the input sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates a List{T} from an ParallelQuery{T}.
+
+ The type of the elements of .
+ A sequence to create a List<(Of <(T>)>) from.
+ A List<(Of <(T>)>) that contains elements from the input sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates a Dictionary{TKey,TValue} from a ParallelQuery{T} according to
+ a specified key selector function.
+
+ The type of the elements of .
+ The type of the key returned by .
+ A sequence to create a Dictionary<(Of <(TKey, TValue>)>) from.
+ A function to extract a key from each element.
+ A Dictionary<(Of <(TKey, TValue>)>) that contains keys and values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ produces a key that is a null reference (Nothing in Visual Basic).
+ -or-
+ produces duplicate keys for two elements.
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates a Dictionary{TKey,TValue} from a ParallelQuery{T} according to a
+ specified key selector function and key comparer.
+
+ The type of the elements of .
+ The type of the key returned by .
+ A sequence to create a Dictionary<(Of <(TKey, TValue>)>) from.
+ A function to extract a key from each element.
+ An IEqualityComparer<(Of <(T>)>) to compare keys.
+ A Dictionary<(Of <(TKey, TValue>)>) that contains keys and values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ produces a key that is a null reference (Nothing in Visual Basic).
+ -or-
+ produces duplicate keys for two elements.
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates a Dictionary{TKey,TValue} from a ParallelQuery{T} according to specified
+ key selector and element selector functions.
+
+ The type of the elements of .
+ The type of the key returned by .
+ The type of the value returned by .
+ A sequence to create a Dictionary<(Of <(TKey, TValue>)>) from.
+ A function to extract a key from each element.
+
+ A transform function to produce a result element value from each element.
+
+
+ A Dictionary<(Of <(TKey, TValue>)>) that contains values of type
+ selected from the input sequence
+
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ produces a key that is a null reference (Nothing in Visual Basic).
+ -or-
+ produces duplicate keys for two elements.
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates a Dictionary{TKey,TValue from a ParallelQuery{T} according to a
+ specified key selector function, a comparer, and an element selector function.
+
+ The type of the elements of .
+ The type of the key returned by .
+ The type of the value returned by .
+ A sequence to create a Dictionary<(Of <(TKey, TValue>)>) from.
+ A function to extract a key from each element.
+ A transform function to produce a result element
+ value from each element.
+ An IEqualityComparer<(Of <(T>)>) to compare keys.
+
+ A Dictionary<(Of <(TKey, TValue>)>) that contains values of type
+ selected from the input sequence
+
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ produces a key that is a null reference (Nothing in Visual Basic).
+ -or-
+ produces duplicate keys for two elements.
+ -or-
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates an ILookup{TKey,T} from a ParallelQuery{T} according to a specified key selector function.
+
+ The type of elements of .
+ The type of the key returned by .
+ The sequence to create a Lookup<(Of <(TKey, TElement>)>) from.
+ A function to extract a key from each element.
+ A Lookup<(Of <(TKey, TElement>)>) that contains keys and values.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates an ILookup{TKey,T} from a ParallelQuery{T} according to a specified
+ key selector function and key comparer.
+
+ The type of elements of .
+ The type of the key returned by .
+ The sequence to create a Lookup<(Of <(TKey, TElement>)>) from.
+ A function to extract a key from each element.
+ An IEqualityComparer<(Of <(T>)>) to compare keys.
+ A Lookup<(Of <(TKey, TElement>)>) that contains keys and values.
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates an ILookup{TKey,TElement} from a ParallelQuery{T} according to specified
+ key selector and element selector functions.
+
+ The type of elements of .
+ The type of the key returned by .
+ The type of the value returned by .
+ The sequence to create a Lookup<(Of <(TKey, TElement>)>) from.
+ A function to extract a key from each element.
+
+ A transform function to produce a result element value from each element.
+
+
+ A Lookup<(Of <(TKey, TElement>)>) that contains values of type TElement
+ selected from the input sequence.
+
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Creates an ILookup{TKey,TElement} from a ParallelQuery{T} according to
+ a specified key selector function, a comparer and an element selector function.
+
+ The type of elements of .
+ The type of the key returned by .
+ The type of the value returned by .
+ The sequence to create a Lookup<(Of <(TKey, TElement>)>) from.
+ A function to extract a key from each element.
+
+ A transform function to produce a result element value from each element.
+
+ An IEqualityComparer<(Of <(T>)>) to compare keys.
+
+ A Lookup<(Of <(TKey, TElement>)>) that contains values of type TElement selected
+ from the input sequence.
+
+
+ or or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Inverts the order of the elements in a parallel sequence.
+
+ The type of the elements of .
+ A sequence of values to reverse.
+ A sequence whose elements correspond to those of the input sequence in reverse order.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Filters the elements of a ParallelQuery based on a specified type.
+
+ The type to filter the elements of the sequence on.
+ The sequence whose elements to filter.
+ A sequence that contains elements from the input sequence of type .
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Converts the elements of a ParallelQuery to the specified type.
+
+ The type to convert the elements of to.
+ The sequence that contains the elements to be converted.
+
+ A sequence that contains each element of the source sequence converted to the specified type.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Returns the first element of a parallel sequence.
+ The type of the elements of .
+ The sequence to return the first element of.
+ The first element in the specified sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the first element in a parallel sequence that satisfies a specified condition.
+
+ There's a temporary difference from LINQ to Objects, this does not throw
+ ArgumentNullException when the predicate is null.
+ The type of the elements of .
+ The sequence to return an element from.
+ A function to test each element for a condition.
+ The first element in the sequence that passes the test in the specified predicate function.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ No element in satisfies the condition in .
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the first element of a parallel sequence, or a default value if the
+ sequence contains no elements.
+
+ The type of the elements of .
+ The sequence to return the first element of.
+
+ default(TSource) if is empty; otherwise, the first element in .
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the first element of the parallel sequence that satisfies a condition or a
+ default value if no such element is found.
+
+ There's a temporary difference from LINQ to Objects, this does not throw
+ ArgumentNullException when the predicate is null.
+ The type of the elements of .
+ The sequence to return an element from.
+ A function to test each element for a condition.
+
+ default(TSource) if is empty or if no element passes the test
+ specified by predicate; otherwise, the first element in that
+ passes the test specified by predicate.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the last element of a parallel sequence.
+ The type of the elements of .
+ The sequence to return the last element from.
+ The value at the last position in the source sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ contains no elements.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the last element of a parallel sequence that satisfies a specified condition.
+
+ The type of the elements of .
+ The sequence to return an element from.
+ A function to test each element for a condition.
+
+ The last element in the sequence that passes the test in the specified predicate function.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ No element in satisfies the condition in .
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the last element of a parallel sequence, or a default value if the
+ sequence contains no elements.
+
+ The type of the elements of .
+ The sequence to return an element from.
+
+ default() if the source sequence is empty; otherwise, the last element in the sequence.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the last element of a parallel sequence that satisfies a condition, or
+ a default value if no such element is found.
+
+ The type of the elements of .
+ The sequence to return an element from.
+ A function to test each element for a condition.
+
+ default() if the sequence is empty or if no elements pass the test in the
+ predicate function; otherwise, the last element that passes the test in the predicate function.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the only element of a parallel sequence, and throws an exception if there is not
+ exactly one element in the sequence.
+
+ The type of the elements of .
+ The sequence to return the single element of.
+ The single element of the input sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ The input sequence contains more than one element. -or- The input sequence is empty.
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the only element of a parallel sequence that satisfies a specified condition,
+ and throws an exception if more than one such element exists.
+
+ The type of the elements of .
+ The sequence to return the single element of.
+ A function to test an element for a condition.
+ The single element of the input sequence that satisfies a condition.
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ No element satisfies the condition in . -or- More than one element satisfies the condition in .
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the only element of a parallel 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 the elements of .
+ The sequence to return the single element of.
+
+ The single element of the input sequence, or default() if the
+ sequence contains no elements.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the only element of a parallel 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 the elements of .
+ The sequence to return the single element of.
+ A function to test an element for a condition.
+
+ The single element of the input sequence that satisfies the condition, or
+ default() if no such element is found.
+
+
+ or is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the elements of the specified parallel sequence or the type parameter's
+ default value in a singleton collection if the sequence is empty.
+
+ The type of the elements of .
+ The sequence to return a default value for if it is empty.
+
+ A sequence that contains default(TSource) if is empty; otherwise, .
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Returns the elements of the specified parallel sequence or the specified value
+ in a singleton collection if the sequence is empty.
+
+ The type of the elements of .
+ The sequence to return the specified value for if it is empty.
+ The value to return if the sequence is empty.
+
+ A sequence that contains defaultValue if is empty; otherwise, .
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+
+
+ Returns the element at a specified index in a parallel sequence.
+
+ The type of the elements of .
+ A sequence to return an element from.
+ The zero-based index of the element to retrieve.
+ The element at the specified position in the source sequence.
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ is less than 0 or greater than or equal to the number of elements in .
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Returns the element at a specified index in a parallel sequence or a default value if the
+ index is out of range.
+
+ The type of the elements of .
+ A sequence to return an element from.
+ The zero-based index of the element to retrieve.
+
+ default(TSource) if the index is outside the bounds of the source sequence;
+ otherwise, the element at the specified position in the source sequence.
+
+
+ is a null reference (Nothing in Visual Basic).
+
+
+ One or more exceptions occurred during the evaluation of the query.
+
+
+ The query was canceled.
+
+
+
+
+ Specifies the preferred type of output merge to use in a query. This is a hint only, and may not be
+ respected by the system when parallelizing all queries.
+
+
+
+ Use NotBuffered for queries that will be consumed and output as streams, this has the lowest latency
+ between beginning query execution and elements being yielded. For some queries, such as those involving a
+ sort (OrderBy, OrderByDescending), buffering is essential and a hint of NotBuffered or AutoBuffered will
+ be ignored.
+
+
+ Use AutoBuffered for most cases; this is the default. It strikes a balance between latency and
+ overall performance.
+
+
+ Use FullyBuffered for queries when the entire output can be processed before the information is
+ needed. This option offers the best performance when all of the output can be accumulated before yielding
+ any information, though it is not suitable for stream processing or showing partial results mid-query.
+
+
+
+
+
+ Use the default merge type, which is AutoBuffered.
+
+
+
+
+ Use a merge without output buffers. As soon as result elements have been computed,
+ make that element available to the consumer of the query.
+
+
+
+
+ Use a merge with output buffers of a size chosen by the system. Results
+ will accumulate into an output buffer before they are available to the consumer of
+ the query.
+
+
+
+
+ Use a merge with full output buffers. The system will accumulate all of the
+ results before making any of them available to the consumer of the query.
+
+
+
+
+ This is a bounded channel meant for single-producer/single-consumer scenarios.
+
+ Specifies the type of data in the channel.
+
+
+
+ The simplest channel is one that has no synchronization. This is used for stop-
+ and-go productions where we are guaranteed the consumer is not running
+ concurrently. It just wraps a FIFO queue internally.
+
+ Assumptions:
+ Producers and consumers never try to enqueue/dequeue concurrently.
+
+
+
+
+
+ We occassionally need a no-op enumerator to stand-in when we don't have data left
+ within a partition's data stream. These are simple enumerable and enumerator
+ implementations that always and consistently yield no elements.
+
+
+
+
+
+ Represents a parallel sequence.
+
+
+
+
+ Represents a parallel sequence.
+
+
+
+
+ Returns an enumerator that iterates through the sequence.
+
+ An enumerator that iterates through the sequence.
+
+
+
+ Returns an enumerator that iterates through the sequence.
+
+ An enumerator that iterates through the sequence.
+
+
+
+ A common enumerator type that unifies all query operator enumerators.
+
+
+
+
+
+
+ A simple implementation of the IEnumerable{object} interface which wraps
+ a weakly typed IEnumerable object, allowing it to be accessed as a strongly typed
+ IEnumerable{object}.
+
+
+
+
+
+ An interface that allows developers to specify their own partitioning routines.
+
+
+
+
+
+
+ A simple implementation of the ParallelQuery{object} interface which wraps an
+ underlying IEnumerable, such that it can be used in parallel queries.
+
+
+
+
+ A simple implementation of the ParallelQuery{T} interface which wraps an
+ underlying IEnumerable{T}, such that it can be used in parallel queries.
+
+
+
+
+
+ An enum to specify whether an aggregate operator is associative, commutative,
+ neither, or both. This influences query analysis and execution: associative
+ aggregations can run in parallel, whereas non-associative cannot; non-commutative
+ aggregations must be run over data in input-order.
+
+
+
+
+ A simple enumerable type that implements the range algorithm. It also supports
+ partitioning of the indices by implementing an interface that PLINQ recognizes.
+
+
+
+
+ A simple enumerable type that implements the repeat algorithm. It also supports
+ partitioning of the count space by implementing an interface that PLINQ recognizes.
+
+
+
+
+
+ A special merge helper for indexible queries. Given an indexible query, we know how many elements
+ we'll have in the result set, so we can allocate the array ahead of time. Then, as each result element
+ is produced, we can directly insert it into the appropriate position in the output array, paying
+ no extra cost for ordering.
+
+
+
+
+
+ Used as a stand-in for replaceable merge algorithms. Alternative implementations
+ are chosen based on the style of merge required.
+
+
+
+
+
+ Instantiates the array merge helper.
+
+ The query settings
+ The query results
+
+
+
+ A method used as a delegate passed into the ForAll operator
+
+
+
+
+ Schedules execution of the merge itself.
+
+
+
+
+ Gets the enumerator over the results.
+
+ We never expect this method to be called. ArrayMergeHelper is intended to be used when we want
+ to consume the results using GetResultsAsArray().
+
+
+
+
+ Returns the merged results as an array.
+
+
+
+
+
+ An enumerator that merges multiple one-to-one channels into a single output
+ stream, including any necessary blocking and synchronization. This is an
+ asynchronous enumerator, i.e. the producers may be inserting items into the
+ channels concurrently with the consumer taking items out of them. Therefore,
+ enumerating this object can cause the current thread to block.
+
+ We use a biased choice algorithm to choose from our consumer channels. I.e. we
+ will prefer to process elements in a fair round-robin fashion, but will
+ occassionally bypass this if a channel is empty.
+
+
+
+
+
+
+ Convenience class used by enumerators that merge many partitions into one.
+
+
+
+
+
+ WaitAny simulates a Win32-style WaitAny on the set of thin-events.
+
+ An array of thin-events (null elements permitted)
+ The index of the specific event in events that caused us to wake up.
+
+
+
+ The default merge helper uses a set of straightforward algorithms for output
+ merging. Namely, for synchronous merges, the input data is yielded from the
+ input data streams in "depth first" left-to-right order. For asynchronous merges,
+ on the other hand, we use a biased choice algorithm to favor input channels in
+ a "fair" way. No order preservation is carried out by this helper.
+
+
+
+
+
+
+ Drives execution of an actual merge operation, including creating channel data
+ structures and scheduling parallel work as appropriate. The algorithms used
+ internally are parameterized based on the type of data in the partitions; e.g.
+ if an order preserved stream is found, the merge will automatically use an
+ order preserving merge, and so forth.
+
+
+
+
+
+ The order preserving merge helper guarantees the output stream is in a specific order. This is done
+ by comparing keys from a set of already-sorted input partitions, and coalescing output data using
+ incremental key comparisons.
+
+
+
+
+
+
+ A merge helper that yields results in a streaming fashion, while still ensuring correct output
+ ordering. This merge only works if each producer task generates outputs in the correct order,
+ i.e. with an Increasing (or Correct) order index.
+
+ The merge creates DOP producer tasks, each of which will be writing results into a separate
+ buffer.
+
+ The consumer always waits until each producer buffer contains at least one element. If we don't
+ have one element from each producer, we cannot yield the next element. (If the order index is
+ Correct, or in some special cases with the Increasing order, we could yield sooner. The
+ current algorithm does not take advantage of this.)
+
+ The consumer maintains a producer heap, and uses it to decide which producer should yield the next output
+ result. After yielding an element from a particular producer, the consumer will take another element
+ from the same producer. However, if the producer buffer exceeded a particular threshold, the consumer
+ will take the entire buffer, and give the producer an empty buffer to fill.
+
+ Finally, if the producer notices that its buffer has exceeded an even greater threshold, it will
+ go to sleep and wait until the consumer takes the entire buffer.
+
+
+
+
+ The initial capacity of the buffer queue. The value was chosen experimentally.
+
+
+
+
+ If the consumer notices that the queue reached this limit, it will take the entire buffer from
+ the producer, instead of just popping off one result. The value was chosen experimentally.
+
+
+
+
+ If the producer notices that the queue reached this limit, it will go to sleep until woken up
+ by the consumer. Chosen experimentally.
+
+
+
+
+ Whether the producer is allowed to buffer up elements before handing a chunk to the consumer.
+ If false, the producer will make each result available to the consumer immediately after it is
+ produced.
+
+
+
+
+ Buffers for the results. Each buffer has elements added by one producer, and removed
+ by the consumer.
+
+
+
+
+ Whether each producer is done producing. Set to true by individual producers, read by consumer.
+
+
+
+
+ Whether a particular producer is waiting on the consumer. Read by the consumer, set to true
+ by producers, set to false by the consumer.
+
+
+
+
+ Whether the consumer is waiting on a particular producer. Read by producers, set to true
+ by consumer, set to false by producer.
+
+
+
+
+ Each object is a lock protecting the corresponding elements in m_buffers, m_producerDone,
+ m_producerWaiting and m_consumerWaiting.
+
+
+
+
+ A singleton instance of the comparer used by the producer heap. Eager allocation is OK
+ because if the static constructor runs, we will be using this merge.
+
+
+
+
+ A structure to represent a producer in the producer heap.
+
+
+
+
+ A comparer used by FixedMaxHeap(Of Producer)
+
+ This comparer will be used by max-heap. We want the producer with the smallest MaxKey to
+ end up in the root of the heap.
+
+ x.MaxKey GREATER_THAN y.MaxKey => x LESS_THAN y => return -
+ x.MaxKey EQUALS y.MaxKey => x EQUALS y => return 0
+ x.MaxKey LESS_THAN y.MaxKey => x GREATER_THAN y => return +
+
+
+
+
+ Enumerator over the results of an order-preserving pipelining merge.
+
+
+
+
+ Merge helper associated with this enumerator
+
+
+
+
+ Heap used to efficiently locate the producer whose result should be consumed next.
+ For each producer, stores the order index for the next element to be yielded.
+
+ Read and written by the consumer only.
+
+
+
+
+ Stores the next element to be yielded from each producer. We use a separate array
+ rather than storing this information in the producer heap to keep the Producer struct
+ small.
+
+ Read and written by the consumer only.
+
+
+
+
+ A private buffer for the consumer. When the size of a producer buffer exceeds a threshold
+ (STEAL_BUFFER_SIZE), the consumer will take ownership of the entire buffer, and give the
+ producer a new empty buffer to place results into.
+
+ Read and written by the consumer only.
+
+
+
+
+ Tracks whether MoveNext() has already been called previously.
+
+
+
+
+ Constructor
+
+
+
+
+ Moves the enumerator to the next result, or returns false if there are no more results to yield.
+
+
+
+
+ If the cancellation of the query has been initiated (because one or more producers
+ encountered exceptions, or because external cancellation token has been set), the method
+ will tear down the query and rethrow the exception.
+
+
+
+
+ Wait until a producer's buffer is non-empty, or until that producer is done.
+
+ false if there is no element to yield because the producer is done, true otherwise
+
+
+
+ Looks for an element from a particular producer in the consumer's private buffer.
+
+
+
+
+ Returns the current result
+
+
+
+
+ This enumerator merges multiple input channels into a single output stream. The merging process just
+ goes from left-to-right, enumerating each channel in succession in its entirety.
+ Assumptions:
+ Before enumerating this object, all producers for all channels must have finished enqueueing new
+ elements.
+
+
+
+
+
+ This enumerator handles the actual coordination among partitions required to
+ accomplish the repartitioning operation, as explained above.
+
+ The kind of elements.
+ The key used to distribute elements.
+ The kind of keys found in the source (ignored).
+
+
+
+ A repartitioning stream must take input data that has already been partitioned and
+ redistribute its contents based on a new partitioning algorithm. This is accomplished
+ by making each partition p responsible for redistributing its input data to the
+ correct destination partition. Some input elements may remain in p, but many will now
+ belong to a different partition and will need to move. This requires a great deal of
+ synchronization, but allows threads to repartition data incrementally and in parallel.
+ Each partition will "pull" data on-demand instead of partitions "pushing" data, which
+ allows us to reduce some amount of synchronization overhead.
+
+ We currently only offer one form of reparitioning via hashing. This used to be an
+ abstract base class, but we have eliminated that to get rid of some virtual calls on
+ hot code paths. Uses a key selection algorithm with mod'ding to determine destination.
+
+ @TODO: @BUG#519: consider adding a bound to the buffers. Unfortunately this can quite easily
+ lead to deadlock when multiple repartitions are involved. Need a solution.
+ @TODO: @BUG#504: consider amortizing synchronization overhead by enqueueing/dequeueing in chunks
+ rather than single elements. Also need to be careful not to introduce deadlock.
+
+
+
+
+
+
+
+ A partitioned stream just partitions some data source using an extensible
+ partitioning algorithm and exposes a set of N enumerators that are consumed by
+ their ordinal index [0..N). It is used to build up a set of streaming computations.
+ At instantiation time, the actual data source to be partitioned is supplied; and
+ then the caller will layer on top additional enumerators to represent phases in the
+ computation. Eventually, a merge can then schedule enumeration of all of the
+ individual partitions in parallel by obtaining references to the individual
+ partition streams.
+
+ This type has a set of subclasses which implement different partitioning algorithms,
+ allowing us to easily plug in different partitioning techniques as needed. The type
+ supports wrapping IEnumerables and IEnumerators alike, with some preference for the
+ former as many partitioning algorithms are more intelligent for certain data types.
+
+
+
+
+
+
+ IPartitionedStreamRecipient is essentially a generic action on a partitioned stream,
+ whose generic type parameter is the type of the order keys in the partitioned stream.
+
+
+
+
+
+ This enumerator handles the actual coordination among partitions required to
+ accomplish the repartitioning operation, as explained above. In addition to that,
+ it tracks order keys so that order preservation can flow through the enumerator.
+
+ The kind of elements.
+ The key used to distribute elements.
+ The kind of keys found in the source.
+
+
+
+ Contiguous range chunk partitioning attempts to improve data locality by keeping
+ data close together in the incoming data stream together in the outgoing partitions.
+ There are really three types of partitions that are used internally:
+
+ 1. If the data source is indexable--like an array or List_T--we can actually
+ just compute the range indexes and avoid doing any copying whatsoever. Each
+ "partition" is just an enumerator that will walk some subset of the data.
+ 2. If the data source has an index (different than being indexable!), we can
+ turn this into a range scan of the index. We can roughly estimate distribution
+ and ensure an evenly balanced set of partitions.
+ @TODO: @BUG#516: we don't have indexes today. We are considering it for the future.
+ 3. If we can't use 1 or 2, we instead partition "on demand" by chunking the contents
+ of the source enumerator as they are requested. The unfortunate thing is that
+ this requires synchronization, since consumers may be running in parallel. We
+ amortize the cost of this by giving chunks of items when requested instead of
+ one element at a time. Note that this approach also works for infinite streams.
+
+ In all cases, the caller can request that enumerators walk elements in striped
+ contiguous chunks. If striping is requested, then each partition j will yield elements
+ in the data source for which ((i / s)%p) == j, where i is the element's index, s is
+ a chunk size calculated by the system with the intent of aligning on cache lines, and
+ p is the number of partitions. If striping is not requested, we use the same algorith,
+ only, instead of aligning on cache lines, we use a chunk size of l / p, where l
+ is the length of the input and p is the number of partitions.
+
+ Notes:
+ This is used as the default partitioning strategy by much of the PLINQ infrastructure.
+
+
+
+
+
+ The aggregation operator is a little unique, in that the enumerators it returns
+ yield intermediate results instead of the final results. That's because there is
+ one last Aggregate operation that must occur in order to perform the final reduction
+ over the intermediate streams. In other words, the intermediate enumerators produced
+ by this operator are never seen by other query operators or consumers directly.
+
+ An aggregation performs parallel prefixing internally. Given a binary operator O,
+ it will generate intermediate results by folding O across partitions; then it
+ performs a final reduction by folding O accross the intermediate results. The
+ analysis engine knows about associativity and commutativity, and will ensure the
+ style of partitioning inserted into the tree is compatable with the operator.
+
+ For instance, say O is + (meaning it is AC), our input is {1,2,...,8}, and we
+ use 4 partitions to calculate the aggregation. Sequentially this would look
+ like this O(O(O(1,2),...),8), in other words ((1+2)+...)+8. The parallel prefix
+ of this (w/ 4 partitions) instead calculates the intermediate aggregations, i.e.:
+ t1 = O(1,2), t2 = O(3,4), ... t4 = O(7,8), aka t1 = 1+2, t2 = 3+4, t4 = 7+8.
+ The final step is to aggregate O over these intermediaries, i.e.
+ O(O(O(t1,t2),t3),t4), or ((t1+t2)+t3)+t4. This generalizes to any binary operator.
+
+ Beause some aggregations use a different input, intermediate, and output types,
+ we support an even more generalized aggregation type. In this model, we have
+ three operators, an intermediate (used for the incremental aggregations), a
+ final (used for the final summary of intermediate results), and a result selector
+ (used to perform whatever transformation is needed on the final summary).
+
+
+
+
+
+
+
+ The base class from which all binary query operators derive, that is, those that
+ have two child operators. This introduces some convenience methods for those
+ classes, as well as any state common to all subclasses.
+
+
+
+
+
+
+ This is the abstract base class for all query operators in the system. It
+ implements the ParallelQuery{T} type so that it can be bound as the source
+ of parallel queries and so that it can be returned as the result of parallel query
+ operations. Not much is in here, although it does serve as the "entry point" for
+ opening all query operators: it will lazily analyze and cache a plan the first
+ time the tree is opened, and will open the tree upon calls to GetEnumerator.
+
+ Notes:
+ This class implements ParallelQuery so that any parallel query operator
+ can bind to the parallel query provider overloads. This allows us to string
+ together operators w/out the user always specifying AsParallel, e.g.
+ Select(Where(..., ...), ...), and so forth.
+
+
+
+
+
+ The QueryResults{T} is a class representing the results of the query. There may
+ be different ways the query results can be manipulated. Currently, two ways are
+ supported:
+
+ 1. Open the query results as a partitioned stream by calling GivePartitionedStream
+ and pass a generic action as an argument.
+
+ 2. Access individual elements of the results list by calling GetElement(index) and
+ ElementsCount. This method of accessing the query results is available only if
+ IsIndexible return true.
+
+
+
+
+
+ A QueryOperator that represents the output of the query partitioner.AsParallel().
+
+
+
+
+ Determines the OrdinalIndexState for a partitioner
+
+
+
+
+ QueryResults for a PartitionerQueryOperator
+
+
+
+
+ Enumerator that converts an enumerator over key-value pairs exposed by a partitioner
+ to a QueryOperatorEnumerator used by PLINQ internally.
+
+
+
+
+ Enumerator that converts an enumerator over key-value pairs exposed by a partitioner
+ to a QueryOperatorEnumerator used by PLINQ internally.
+
+
+
+
+ A scan is just a simple operator that is positioned directly on top of some
+ real data source. It's really just a place holder used during execution and
+ analysis -- it should never actually get opened.
+
+
+
+
+
+ Operator that yields the elements from the first data source that aren't in the second.
+ This is known as the set relative complement, i.e. left - right.
+
+
+
+
+
+ The base class from which all binary query operators derive, that is, those that
+ have two child operators. This introduces some convenience methods for those
+ classes, as well as any state common to all subclasses.
+
+
+
+
+
+
+
+ A group join operator takes a left query tree and a right query tree, and then yields
+ the matching elements between the two. This can be used for outer joins, i.e. those
+ where an outer element has no matching inner elements -- the result is just an empty
+ list. As with the join algorithm above, we currently use a hash join algorithm.
+
+
+
+
+
+
+
+
+ This enumerator implements the hash-join algorithm as noted earlier.
+
+ Assumptions:
+ This enumerator type won't work properly at all if the analysis engine didn't
+ ensure a proper hash-partition. We expect inner and outer elements with equal
+ keys are ALWAYS in the same partition. If they aren't (e.g. if the analysis is
+ busted) we'll silently drop items on the floor. :(
+
+
+ This is the enumerator class for two operators:
+ - Join
+ - GroupJoin
+
+
+
+
+
+
+
+
+
+ Operator that yields the intersection of two data sources.
+
+
+
+
+
+ A join operator takes a left query tree and a right query tree, and then yields the
+ matching pairs between the two. LINQ supports equi-key-based joins. Hence, a key-
+ selection function for the left and right data types will yield keys of the same
+ type for both. We then merely have to match elements from the left with elements from
+ the right that have the same exact key. Note that this is an inner join. In other
+ words, outer elements with no matching inner elements do not appear in the output.
+
+ @TODO: @BUG#528: Currently we implement only a hash-join algorithm. Furthermore, we always
+ choose the inner data source for the hash-table creation. There is room for
+ optimization and different algorithm choices eventually.
+
+ Hash-joins work in two phases:
+
+ (1) Building - we build a hash-table from one of the data sources. In the case
+ of this specific operator, the table is built from the hash-codes of
+ keys selected via the key selector function. Because elements may share
+ the same key, the table must support one-key-to-many-values.
+ (2) Probing - for each element in the data source not used for building, we
+ use its key to look into the hash-table. If we find elements under this
+ key, we just enumerate all of them, yielding them as join matches.
+
+ Because hash-tables exhibit on average O(1) lookup, we turn what would have been
+ an O(n*m) algorithm -- in the case of nested loops joins -- into an O(n) algorithm.
+ We of course require some additional storage to do so, but in general this pays.
+
+
+
+
+
+
+
+
+ Operator that yields the union of two data sources.
+
+
+
+
+
+ A Zip operator combines two input data sources into a single output stream,
+ using a pairwise element matching algorithm. For example, the result of zipping
+ two vectors a = {0, 1, 2, 3} and b = {9, 8, 7, 6} is the vector of pairs,
+ c = {(0,9), (1,8), (2,7), (3,6)}. Because the expectation is that each element
+ is matched with the element in the other data source at the same ordinal
+ position, the zip operator requires order preservation.
+
+
+
+
+
+
+
+ Partitioned stream recipient that will merge the results.
+
+
+
+
+ A wrapper enumerator that just opens the query operator when MoveNext() is called for the
+ first time. We use QueryOpeningEnumerator to call QueryOperator.GetOpenedEnumerator()
+ lazily because once GetOpenedEnumerator() is called, PLINQ starts precomputing the
+ results of the query.
+
+
+
+
+ Opens the query and initializes m_openedQueryEnumerator and m_querySettings.
+ Called from the first MoveNext call.
+
+
+
+
+ An inlined count aggregation and its enumerator.
+
+
+
+
+
+ This class is common to all of the "inlined" versions of various aggregations. The
+ inlined operators ensure that real MSIL instructions are used to perform elementary
+ operations versus general purpose delegate-based binary operators. For obvious reasons
+ this is a quite bit more efficient, although it does lead to a fair bit of unfortunate
+ code duplication.
+
+
+
+
+
+
+
+ A class with some shared implementation between all aggregation enumerators.
+
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for decimals.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for decimals.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for decimals.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for doubles.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for doubles.
+
+ Notes:
+ Note that normally double.NaN < anything is false, as is anything < NaN. This would
+ lead to some strangeness in Min and Max, e.g. Min({ NaN, 5.0 } == NaN, yet
+ Min({ 5.0, NaN }) == 5.0! We impose a total ordering so that NaN is smaller than
+ everything, including -infinity, which is consistent with Comparer_T.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for doubles.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for floats.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for floats.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for floats.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for ints.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for ints.
+
+
+
+
+ Inlined aggregations for summing up primitives (int, long, float, double, decimal), as
+ well as the nullable versions of each (int?, long?, float?, double?, decimal?).
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for longs.
+
+
+
+
+ An inlined count aggregation and its enumerator.
+
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for longs.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for longs.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for Nullable decimals.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for Nullable decimals.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for nullable decimals.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for Nullable doubles.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for Nullable{Double}s.
+
+ Notes:
+ Note that normally double.NaN < anything is false, as is anything < NaN. This would
+ lead to some strangeness in Min and Max, e.g. Min({ NaN, 5.0 } == NaN, yet
+ Min({ 5.0, NaN }) == 5.0! We impose a total ordering so that NaN is smaller than
+ everything, including -infinity, which is consistent with Comparer_T.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for nullable doubles.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for Nullable floats.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for Nullable floats.
+
+ Notes:
+ Note that normally float.NaN < anything is false, as is anything < NaN. This would
+ lead to some strangeness in Min and Max, e.g. Min({ NaN, 5.0 } == NaN, yet
+ Min({ 5.0, NaN }) == 5.0! We impose a total ordering so that NaN is smaller than
+ everything, including -infinity, which is consistent with Comparer_T.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for Nullable floats.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for Nullable ints.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for Nullable ints.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for Nullable ints.
+
+
+
+
+ An inlined average aggregation operator and its enumerator, for Nullable longs.
+
+
+
+
+ An inlined min/max aggregation and its enumerator, for Nullable{Int64}s.
+
+
+
+
+ An inlined sum aggregation and its enumerator, for Nullable longs.
+
+
+
+
+ Class to represent an IList{T} as QueryResults{T}
+
+
+
+
+
+ Describes the state of order preservation index associated with an enumerator.
+
+
+
+
+ This type contains query execution options specified by the user.
+ QuerySettings are used as follows:
+ - in the query construction phase, some settings may be uninitialized.
+ - at the start of the query opening phase, the WithDefaults method
+ is used to initialize all uninitialized settings.
+ - in the rest of the query opening phase, we assume that all settings
+ have been initialized.
+
+
+
+
+ Represents operators AsOrdered and AsUnordered. In the current implementation, it
+ simply turns on preservation globally in the query.
+
+
+
+
+
+ Represents operators that set various query execution options.
+
+
+
+
+
+ The any/all operators work the same way. They search for the occurrence of a predicate
+ value in the data source, and upon the first occurrence of such a value, yield a
+ particular value. Specifically:
+
+ - Any returns true if the predicate for any element evaluates to true.
+ - All returns false if the predicate for any element evaluates to false.
+
+ This uniformity is used to apply a general purpose algorithm. Both sentences above
+ take the form of "returns XXX if the predicate for any element evaluates to XXX."
+ Therefore, we just parameterize on XXX, called the qualifciation below, and if we
+ ever find an occurrence of XXX in the input data source, we also return XXX. Otherwise,
+ we return !XXX. Obviously, XXX in this case is a bool.
+
+ This is a search algorithm. So once any single partition finds an element, it will
+ return so that execution can stop. This is done with a "cancelation" flag that is
+ polled by all parallel workers. The first worker to find an answer sets it, and all
+ other workers notice it and quit as quickly as possible.
+
+
+
+
+
+ Concatenates one data source with another. Order preservation is used to ensure
+ the output is actually a concatenation -- i.e. one after the other. The only
+ special synchronization required is to find the largest index N in the first data
+ source so that the indices of elements in the second data source can be offset
+ by adding N+1. This makes it appear to the order preservation infrastructure as
+ though all elements in the second came after all elements in the first, which is
+ precisely what we want.
+
+
+
+
+
+ Contains is quite similar to the any/all operator above. Each partition searches a
+ subset of elements for a match, and the first one to find a match signals to the rest
+ of the partititons to stop searching.
+
+
+
+
+
+ This operator just exposes elements directly from the underlying data source, if
+ it's not empty, or yields a single default element if the data source is empty.
+ There is a minimal amount of synchronization at the beginning, until all partitions
+ have registered whether their stream is empty or not. Once the 0th partition knows
+ that at least one other partition is non-empty, it may proceed. Otherwise, it is
+ the 0th partition which yields the default value.
+
+
+
+
+
+ This operator yields all of the distinct elements in a single data set. It works quite
+ like the above set operations, with the obvious difference being that it only accepts
+ a single data source as input.
+
+
+
+
+
+ ElementAt just retrieves an element at a specific index. There is some cross-partition
+ coordination to force partitions to stop looking once a partition has found the
+ sought-after element.
+
+
+
+
+
+ Executes the query, either sequentially or in parallel, depending on the query execution mode and
+ whether a premature merge was inserted by this ElementAt operator.
+
+ result
+ withDefaultValue
+ whether an element with this index exists
+
+
+
+ First tries to discover the first element in the source, optionally matching a
+ predicate. All partitions search in parallel, publish the lowest index for a
+ candidate match, and reach a barrier. Only the partition that "wins" the race,
+ i.e. who found the candidate with the smallest index, will yield an element.
+
+
+
+
+
+ A forall operator just enables an action to be placed at the "top" of a query tree
+ instead of yielding an enumerator that some consumer can walk. We execute the
+ query for effect instead of yielding a data result.
+
+
+
+
+
+ The operator type for GroupBy statements. This operator groups the input based on
+ a key-selection routine, yielding one-to-many values of key-to-elements. The
+ implementation is very much like the hash join operator, in which we first build
+ a big hashtable of the input; then we just iterate over each unique key in the
+ hashtable, yielding it plus all of the elements with the same key.
+
+
+
+
+
+
+
+ An ordered version of the grouping data structure. Represents an ordered group of elements that
+ have the same grouping key.
+
+
+
+
+ Constructs a new grouping
+
+
+
+
+ Add an element
+
+
+
+
+ No more elements will be added, so we can sort the group now.
+
+
+
+
+ The key this grouping represents.
+
+
+
+
+ A variant of the Select operator that supplies element index while performing the
+ projection operation. This requires cooperation with partitioning and merging to
+ guarantee ordering is preserved.
+
+ @TODO: @PERF: @BUG#527: as an optimization, we strictly don't need order to be preserved
+ all the way until the merge. If ordering is only kept for THIS operator, we
+ can subsequently get rid of order preservation after executing.
+
+
+
+
+
+
+ A variant of the Where operator that supplies element index while performing the
+ filtering operation. This requires cooperation with partitioning and merging to
+ guarantee ordering is preserved.
+
+ @TODO: @PERF: @BUG#527: as an optimization, we strictly don't need order to be preserved
+ all the way until the merge. If ordering is only kept for THIS operator, we
+ can subsequently get rid of order preservation after executing.
+
+
+
+
+
+ Last tries to discover the last element in the source, optionally matching a
+ predicate. All partitions search in parallel, publish the greatest index for a
+ candidate match, and reach a barrier. Only the partition that "wins" the race,
+ i.e. who found the candidate with the largest index, will yield an element.
+
+ @TODO: @PERF: @BUG#414: this traverses the data source in forward-order. In the future, we
+ will want to traverse in reverse order, since this allows partitions to stop
+ the search sooner (by watching if the current index passes below the current best).
+
+
+
+
+
+
+ Reverse imposes ordinal order preservation. There are normally two phases to this
+ operator's execution. Each partition first builds a buffer containing all of its
+ elements, and then proceeds to yielding the elements in reverse. There is a
+ 'barrier' (but not a blocking barrier) in between these two steps, at which point the largest index becomes
+ known. This is necessary so that when elements from the buffer are yielded, the
+ CurrentIndex can be reported as the largest index minus the original index (thereby
+ reversing the indices as well as the elements themselves). If the largest index is
+ known a priori, because we have an array for example, we can avoid the barrier in
+ between the steps.
+
+
+
+
+
+ SelectMany is effectively a nested loops join. It is given two data sources, an
+ outer and an inner -- actually, the inner is sometimes calculated by invoking a
+ function for each outer element -- and we walk the outer, walking the entire
+ inner enumerator for each outer element. There is an optional result selector
+ function which can transform the output before yielding it as a result element.
+
+ Notes:
+ Although select many takes two enumerable objects as input, it appears to the
+ query analysis infrastructure as a unary operator. That's because it works a
+ little differently than the other binary operators: it has to re-open the right
+ child every time an outer element is walked. The right child is NOT partitioned.
+
+
+
+
+
+
+
+ A helper method for WrapPartitionedStream. We use the helper to reuse a block of code twice, but with
+ a different order key type. (If premature merge occured, the order key type will be "int". Otherwise,
+ it will be the same type as "TLeftKey" in WrapPartitionedStream.)
+
+
+
+
+ Similar helper method to WrapPartitionedStreamNotIndexed, except that this one is for the indexed variant
+ of SelectMany (i.e., the SelectMany that passes indices into the user sequence-generating delegate)
+
+
+
+
+ The operator type for Select statements. This operator transforms elements as it
+ enumerates them through the use of a selector delegate.
+
+
+
+
+
+
+ Single searches the input to find the sole element that satisfies the (optional)
+ predicate. If multiple such elements are found, the caller is responsible for
+ producing an error. There is some degree of cross-partition synchronization to
+ proactively hault the search if we ever determine there are multiple elements
+ satisfying the search in the input.
+
+
+
+
+
+ The query operator for OrderBy and ThenBy.
+
+
+
+
+
+
+ Take and Skip either take or skip a specified number of elements, captured in the
+ count argument. These will work a little bit like TakeWhile and SkipWhile: there
+ are two phases, (1) Search and (2) Yield. In the search phase, our goal is to
+ find the 'count'th index from the input. We do this in parallel by sharing a count-
+ sized array. Each thread races to populate the array with indices in ascending
+ order. This requires synchronization for inserts. We use a simple heap, for decent
+ worst case performance. After a thread has scanned ‘count’ elements, or its current
+ index is greater than or equal to the maximum index in the array (and the array is
+ fully populated), the thread can stop searching. All threads issue a barrier before
+ moving to the Yield phase. When the Yield phase is entered, the count-1th element
+ of the array contains: in the case of Take, the maximum index (exclusive) to be
+ returned; or in the case of Skip, the minimum index (inclusive) to be returned. The
+ Yield phase simply consists of yielding these elements as output.
+
+
+
+
+
+ Determines the order index state for the output operator
+
+
+
+
+ Take- and SkipWhile work similarly. Execution is broken into two phases: Search
+ and Yield.
+
+ During the Search phase, many partitions at once search for the first occurrence
+ of a false element. As they search, any time a partition finds a false element
+ whose index is lesser than the current lowest-known false element, the new index
+ will be published, so other partitions can stop the search. The search stops
+ as soon as (1) a partition exhausts its input, (2) the predicate yields false for
+ one of the partition's elements, or (3) its input index passes the current lowest-
+ known index (sufficient since a given partition's indices are always strictly
+ incrementing -- asserted below). Elements are buffered during this process.
+
+ Partitions use a barrier after Search and before moving on to Yield. Once all
+ have passed the barrier, Yielding begins. At this point, the lowest-known false
+ index will be accurate for the entire set, since all partitions have finished
+ scanning. This is where TakeWhile and SkipWhile differ. TakeWhile will start at
+ the beginning of its buffer and yield all elements whose indices are less than
+ the lowest-known false index. SkipWhile, on the other hand, will skipp any such
+ elements in the buffer, yielding those whose index is greater than or equal to
+ the lowest-known false index, and then finish yielding any remaining elements in
+ its data source (since it may have stopped prematurely due to (3) above).
+
+
+
+
+
+ Determines the order index state for the output operator
+
+
+
+
+ The operator type for Where statements. This operator filters out elements that
+ don't match a filter function (supplied at instantiation time).
+
+
+
+
+
+ Poll frequency (number of loops per cancellation check) for situations where per-1-loop testing is too high an overhead.
+
+
+
+
+ Throws an OCE if the merged token has been canceled.
+
+ A token to check for cancelation.
+
+
+
+ A spooling task handles marshaling data from a producer to a consumer. It simply
+ takes data from a producer and hands it off to a consumer. This class is the base
+ class from which other concrete spooling tasks derive, encapsulating some common
+ logic (such as capturing exceptions).
+
+
+
+
+ Simple abstract task representation, allowing either synchronous and asynchronous
+ execution. Subclasses override the Work API to implement the logic.
+
+
+
+
+ The number of elements to accumulate on the producer before copying the elements to the
+ producer-consumer buffer. This constant is only used in the AutoBuffered mode.
+
+ Experimentally, 16 appears to be sufficient buffer size to compensate for the synchronization
+ cost.
+
+
+
+
+ Whether the producer is allowed to buffer up elements before handing a chunk to the consumer.
+ If false, the producer will make each result available to the consumer immediately after it is
+ produced.
+
+
+
+
+ Constructor
+
+
+
+
+ This method is responsible for enumerating results and enqueueing them to
+ the output buffer as appropriate. Each base class implements its own.
+
+
+
+
+ Creates and begins execution of a new set of spooling tasks.
+
+
+
+
+ Dispose the underlying enumerator and wake up the consumer if necessary.
+
+
+
+
+ A spooling task handles marshaling data from a producer to a consumer. It's given
+ a single enumerator object that contains all of the production algorithms, a single
+ destination channel from which consumers draw results, and (optionally) a
+ synchronization primitive using which to notify asynchronous consumers. This
+ particular task variant preserves sort order in the final data.
+
+
+
+
+
+
+ A collection of tasks used by a single query instance. This type also offers some
+ convenient methods for tracing significant ETW events, waiting on tasks, propagating
+ exceptions, and performing cancellation activities.
+
+
+
+
+ A factory class to execute spooling logic.
+
+
+
+
+ A spooling task handles marshaling data from a producer to a consumer. It's given
+ a single enumerator object that contains all of the production algorithms, a single
+ destination channel from which consumers draw results, and (optionally) a
+ synchronization primitive using which to notify asynchronous consumers.
+
+
+
+
+
+
+ A spooling task handles marshaling data from a producer to a consumer. It's given
+ a single enumerator object that contains all of the production algorithms, a single
+ destination channel from which consumers draw results, and (optionally) a
+ synchronization primitive using which to notify asynchronous consumers.
+
+
+
+
+
+
+ A spooling task handles marshaling data from a producer to a consumer. It's given
+ a single enumerator object that contains all of the production algorithms, a single
+ destination channel from which consumers draw results, and (optionally) a
+ synchronization primitive using which to notify asynchronous consumers.
+
+
+
+
+
+
+ Wraps an enumerable with a cancellation checker. The enumerator handed out by the source enumerable
+ will be wrapped by an object that periodically checks whether a particular cancellation token has
+ been cancelled. If so, the next call to MoveNext() will throw an OperationCancelledException.
+
+
+
+
+ WrapEnumerable.ExceptionAggregator wraps the enumerable with another enumerator that will
+ catch exceptions, and wrap each with an AggregateException.
+
+ If PLINQ decides to execute a query sequentially, we will reuse LINQ-to-objects
+ implementations for the different operators. However, we still need to throw
+ AggregateException in the cases when parallel execution would have thrown an
+ AggregateException. Thus, we introduce a wrapper enumerator that catches exceptions
+ and wraps them with an AggregateException.
+
+
+
+
+ A variant of WrapEnumerable that accepts a QueryOperatorEnumerator{,} instead of an IEnumerable{}.
+ The code duplication is necessary to avoid extra virtual method calls that would otherwise be needed to
+ convert the QueryOperatorEnumerator{,} to an IEnumerator{}.
+
+
+
+
+ Accepts an exception, wraps it as if it was crossing the parallel->sequential boundary, and throws the
+ wrapped exception. In sequential fallback cases, we use this method to throw exceptions that are consistent
+ with exceptions thrown by PLINQ when the query is executed by worker tasks.
+
+ The exception will be wrapped into an AggregateException, except for the case when the query is being
+ legitimately cancelled, in which case we will propagate the CancellationException with the appropriate
+ token.
+
+
+
+
+ Wraps a function with a try/catch that morphs all exceptions into AggregateException.
+
+ The input argument type.
+ The return value type.
+ A function to use internally.
+ The cancellation state to use.
+ A new function containing exception wrapping logic.
+
+
+
+ ExchangeUtilities is a static class that contains helper functions to partition and merge
+ streams.
+
+
+
+
+ Used during hash partitioning, when the keys being memoized are not used for anything.
+
+
+
+
+ Very simple heap data structure, of fixed size.
+
+
+
+
+
+ A growing array. Unlike List{T}, it makes the internal array available to its user.
+
+
+
+
+
+ A simple hash map data structure, derived from the LINQ set we also use.
+
+ The kind of keys contained within.
+ The kind of values contained within.
+
+
+
+ A linked list of array chunks. Allows direct access to its arrays.
+
+ The elements held within.
+
+
+
+ Allocates a new root chunk of a particular size.
+
+
+
+
+ Adds an element to this chunk. Only ever called on the root.
+
+ The new element.
+
+
+
+ Fetches an enumerator to walk the elements in all chunks rooted from this one.
+
+
+
+
+ The next chunk in the linked chain.
+
+
+
+
+ The number of elements contained within this particular chunk.
+
+
+
+
+ Lookup class implements the ILookup interface. Lookup is very similar to a dictionary
+ except multiple values are allowed to map to the same key, and null keys are supported.
+
+ Support for null keys adds an issue because the Dictionary class Lookup uses for
+ storage does not support null keys. So, we need to treat null keys separately.
+ Unfortunately, since TKey may be a value type, we cannot test whether the key is null
+ using the user-specified equality comparer.
+
+ C# does allow us to compare the key against null using the == operator, but there is a
+ possibility that the user's equality comparer considers null to be equal to other values.
+ Now, MSDN documentation specifies that if IEqualityComparer.Equals(x,y) returns true, it
+ must be the case that x and y have the same hash code, and null has no hash code. Despite
+ that, we might as well support the use case, even if it is bad practice.
+
+ The solution the Lookup class uses is to treat the key default(TKey) as a special case,
+ and hold its associated grouping - if any - in a special field instead of inserting it
+ into a dictionary.
+
+
+
+
+
+
+ A pair just wraps two bits of data into a single addressable unit. This is a
+ value type to ensure it remains very lightweight, since it is frequently used
+ with other primitive data types as well.
+
+
+
+
+
+
+ PairComparer compares pairs by the first element, and breaks ties by the second
+ element.
+
+
+
+
+
+
+ Comparer that wraps another comparer, and flips the result of each comparison to the
+ opposite answer.
+
+
+
+
+
+ A set for various operations. Shamelessly stolen from LINQ's source code.
+ @TODO: can the Linq one be used directly now that we are in System.Core
+
+ The kind of elements contained within.
+
+
+
+ A very simple primitive that allows us to share a value across multiple threads.
+
+
+
+
+
+ Common miscellaneous utility methods used throughout the code-base.
+
+
+
+
+ A struct to wrap any arbitrary object reference or struct. Used for situations
+ where we can't tolerate null values (like keys for hashtables).
+
+
+
+
+
+ Compares two wrapped structs of the same underlying type for equality. Simply
+ wraps the actual comparer for the type being wrapped.
+
+
+
+
+
+ Represents a sorted, parallel sequence.
+
+
+
+
+ Returns an enumerator that iterates through the sequence.
+
+ An enumerator that iterates through the sequence.
+
+
+
+ The query execution mode is a hint that specifies how the system should handle
+ performance trade-offs when parallelizing queries.
+
+
+
+
+ By default, the system will use algorithms for queries
+ that are ripe for parallelism and will avoid algorithms with high
+ overheads that will likely result in slow downs for parallel execution.
+
+
+
+
+ Parallelize the entire query, even if that means using high-overhead algorithms.
+
+
+
+
+ Provides a set of static (Shared in Visual Basic) methods for working with specific kinds of
+ instances.
+
+
+
+
+ Creates a proxy Task that represents the
+ asynchronous operation of a Task{Task}.
+
+
+ It is often useful to be able to return a Task from a
+ Task{TResult}, where the inner Task represents work done as part of the outer Task{TResult}. However,
+ doing so results in a Task{Task}, which, if not dealt with carefully, could produce unexpected behavior. Unwrap
+ solves this problem by creating a proxy Task that represents the entire asynchronous operation of such a Task{Task}.
+
+ The Task{Task} to unwrap.
+ The exception that is thrown if the
+ argument is null.
+ A Task that represents the asynchronous operation of the provided Task{Task}.
+
+
+
+ Creates a proxy Task{TResult} that represents the
+ asynchronous operation of a Task{Task{TResult}}.
+
+
+ It is often useful to be able to return a Task{TResult} from a Task{TResult}, where the inner Task{TResult}
+ represents work done as part of the outer Task{TResult}. However, doing so results in a Task{Task{TResult}},
+ which, if not dealt with carefully, could produce unexpected behavior. Unwrap solves this problem by
+ creating a proxy Task{TResult} that represents the entire asynchronous operation of such a Task{Task{TResult}}.
+
+ The Task{Task{TResult}} to unwrap.
+ The exception that is thrown if the
+ argument is null.
+ A Task{TResult} that represents the asynchronous operation of the provided Task{Task{TResult}}. /// Unwraps a Task that returns another Task.
+
+
+
diff --git a/recovered/2012/TibisMathematicsSuite/Factorizator/MainWindow.xaml b/recovered/2012/TibisMathematicsSuite/Factorizator/MainWindow.xaml
new file mode 100755
index 0000000..2d13cc4
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/Factorizator/MainWindow.xaml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ready
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/recovered/2012/TibisMathematicsSuite/Factorizator/MainWindow.xaml.cs b/recovered/2012/TibisMathematicsSuite/Factorizator/MainWindow.xaml.cs
new file mode 100755
index 0000000..abe01a8
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/Factorizator/MainWindow.xaml.cs
@@ -0,0 +1,172 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Threading;
+
+namespace Factorizator
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ #region Error variable
+ private bool error = false;
+ private bool Error
+ {
+ get { return error; }
+ set
+ {
+ error = value;
+ inputNumber.Background = (value) ? (Brushes.Pink) : (Brushes.White);
+ }
+ }
+ #endregion
+
+ #region Vars
+ Thread worker = null;
+ #endregion
+
+ #region Constructor
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ #endregion
+
+ #region Keyboard handler
+ private void Window_KeyDown(object sender, KeyEventArgs e)
+ {
+ e.Handled = true;
+ var text = Keyboard.FocusedElement as TextBox;
+
+ if (e.KeyboardDevice.Modifiers == ModifierKeys.None)
+ {
+ switch (e.Key)
+ {
+ case Key.Enter: buttonCalculate_Click(this, new RoutedEventArgs()); break;
+ case Key.Escape: statusCancel_Click(this, new RoutedEventArgs()); break;
+ case Key.F1: DynamicLink.Launcher.StartModule("Help", "factorizator"); break;
+ default: e.Handled = false; break;
+ }
+ }
+
+ else if (text == null && e.KeyboardDevice.Modifiers == ModifierKeys.Control && e.Key == Key.C)
+ contextCopyRem_Click(this, new RoutedEventArgs());
+
+ else if (text == null && e.KeyboardDevice.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift) && e.Key == Key.C)
+ contextCopyDiv_Click(this, new RoutedEventArgs());
+
+ else e.Handled = false;
+ }
+ #endregion
+
+ #region UI handlers
+ private void inputNumber_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ if (Error)
+ {
+ Error = false;
+ statusMessage.Text = "Ready";
+ }
+ }
+
+ private void buttonCalculate_Click(object sender, RoutedEventArgs e)
+ {
+ if (inputNumber.Text == "") return;
+
+ decimal d;
+
+ if (!decimal.TryParse(inputNumber.Text, out d))
+ {
+ Error = true;
+ statusMessage.Text = "Bad number.";
+ }
+
+ else BeginWork(d);
+ }
+
+ private void contextCopyRem_Click(object sender, RoutedEventArgs e)
+ {
+ DecimalPair pair = factorizationDisplay.SelectedItem as DecimalPair;
+ if (pair == null) return;
+
+ Clipboard.SetText(pair.First.ToString());
+ }
+
+ private void contextCopyDiv_Click(object sender, RoutedEventArgs e)
+ {
+ DecimalPair pair = factorizationDisplay.SelectedItem as DecimalPair;
+ if (pair == null) return;
+
+ Clipboard.SetText(pair.Second.ToString());
+ }
+
+ private void contextClear_Click(object sender, RoutedEventArgs e)
+ {
+ factorizationDisplay.Items.Clear();
+ }
+
+ private void statusCancel_Click(object sender, RoutedEventArgs e)
+ {
+ FactorizatorAlgorithm.Abort = true;
+ }
+
+ #endregion
+
+ #region Worker
+ void BeginWork(decimal num)
+ {
+ num = Math.Truncate(num);
+
+ // Visual stuff
+ statusMessage.Text = "Calculating...";
+ statusProgress.Visibility = System.Windows.Visibility.Visible;
+ statusCancel.Visibility = System.Windows.Visibility.Visible;
+
+ // Start thread
+ worker = new Thread(new ParameterizedThreadStart(DoWork));
+ worker.Start(num);
+ }
+
+ delegate void FinishWorkDelegate(decimal[] resultFact, decimal[] resultNum);
+ void DoWork(object param)
+ {
+ decimal number = (decimal)param;
+ decimal[] resultFact, resultNum;
+
+ FactorizatorAlgorithm.Factorize(number, out resultFact, out resultNum);
+ Dispatcher.Invoke(new FinishWorkDelegate(FinishWork), resultFact, resultNum);
+ }
+
+ void FinishWork(decimal[] resultFact, decimal[] resultNum)
+ {
+ factorizationDisplay.Items.Clear();
+
+ // Show results
+ for (int i = 0; i < resultNum.Length; i++)
+ {
+ if (i < resultFact.Length)
+ factorizationDisplay.Items.Add(new DecimalPair(resultNum[i], resultFact[i]));
+ else factorizationDisplay.Items.Add(new DecimalPair(resultNum[i], 0));
+ }
+
+ // Update visual stuff
+ statusMessage.Text = "Ready";
+ statusProgress.Visibility = System.Windows.Visibility.Hidden;
+ statusCancel.Visibility = System.Windows.Visibility.Hidden;
+ }
+
+ #endregion
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/Help/Help.csproj b/recovered/2012/TibisMathematicsSuite/Help/Help.csproj
new file mode 100755
index 0000000..4f5fea5
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/Help/Help.csproj
@@ -0,0 +1,164 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {5BF4AB9C-9AE0-44ED-B49E-09ACE92C8D89}
+ WinExe
+ Properties
+ Help
+ Help
+ v3.5
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ x86
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ help-logo.ico
+
+
+ true
+
+
+ ..\..\TibisMathematicsSuite - Release\
+ TRACE
+ true
+ pdbonly
+ x86
+ prompt
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+
+
+
+
+ MainWindow.xaml
+ Code
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+ {A04B247B-6A95-462B-9E07-3337A1C158F1}
+ Launcher
+
+
+
+
+ {3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}
+ 4
+ 0
+ 0
+ primary
+ False
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/CsvParser.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/CsvParser.cs
new file mode 100755
index 0000000..4ef77ba
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/CsvParser.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data;
+
+namespace MatrixCalculator
+{
+ public static class CsvParser
+ {
+ ///
+ /// Converts a CSV string into a DataTable
+ ///
+ /// CSV
+ /// Separator characters
+ /// Should separators be combined?
+ public static DataTable GetTable(string csv, char[] separators, bool combine = false)
+ {
+ DataTable table = new DataTable("table");
+ table.Columns.Add();
+
+ csv = csv.TrimEnd('\n', '\r');
+ string[] lines = csv.Split('\n');
+
+ for (int i = 0; i < lines.Length; i++)
+ {
+ string[] vals = lines[i].Split(separators, (combine ? StringSplitOptions.RemoveEmptyEntries : StringSplitOptions.None));
+ table.Rows.Add("");
+
+ for (int j = 0; j < vals.Length; j++)
+ {
+ if (j >= table.Columns.Count) table.Columns.Add();
+ table.Rows[i][j] = vals[j];
+ }
+ }
+
+ return table;
+ }
+
+ ///
+ /// Converts matrix to CSV string
+ ///
+ /// The matrix
+ /// CSV separator character
+ public static string ToCSV (MathNet.Numerics.LinearAlgebra.Matrix m, char sep = ',')
+ {
+ StringBuilder str = new StringBuilder();
+
+ for (int i = 0; i < m.RowCount; i++)
+ {
+ for (int j = 0; j < m.ColumnCount; j++) {
+ str.Append(m[i, j]);
+ if (j < m.ColumnCount - 1) str.Append(sep);
+ }
+
+ str.Append('\n');
+ }
+
+ return str.ToString();
+ }
+
+
+ ///
+ /// Converts the data in a DataGridView to CSV format
+ ///
+ /// The DataGridView
+ /// CSV separator
+ public static string ToCSV(System.Windows.Forms.DataGridView m, char sep = ',')
+ {
+ return ToCSV(m, 0, 0, m.Rows.Count, m.Columns.Count, false, sep);
+ }
+
+ ///
+ /// Converts the data in a DataGridView to CSV format
+ ///
+ /// The DataGridView
+ /// First row in range.
+ /// First column in range.
+ /// Last row in range.
+ /// Last column in range.
+ /// Only selected cells will be taken.
+ /// CSV separator
+ public static string ToCSV(System.Windows.Forms.DataGridView m, int startRow, int startCol, int endRow, int endCol, bool just_selected = false, char sep = ',')
+ {
+ StringBuilder str = new StringBuilder();
+
+ for (int i = startRow; i < endRow; i++)
+ {
+ for (int j = startCol; j < endCol; j++)
+ {
+ if (!just_selected || (just_selected && m[j, i].Selected))
+ str.Append(m[j, i].Value);
+
+ if (j < m.ColumnCount - 1) str.Append(sep);
+ }
+
+ str.Append('\n');
+ }
+
+ return str.ToString();
+ }
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Forms/Editor.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Forms/Editor.cs
new file mode 100755
index 0000000..6ac5693
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Forms/Editor.cs
@@ -0,0 +1,181 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using MathNet.Numerics.LinearAlgebra;
+
+namespace MatrixCalculator
+{
+ public partial class Editor : Form
+ {
+ bool allowExit = true;
+
+ #region Setters and getters
+ public string MatrixName {
+ get { return inputName.Text; }
+ set { inputName.Text = value; }
+ }
+
+ public string MatrixDescription
+ {
+ get { return inputDescription.Text; }
+ set { inputDescription.Text = value; }
+ }
+
+ public Matrix Matrix
+ {
+ get { return GridViewHelper.GetMatrix(dataEditor); }
+ set {
+ GridViewHelper.PutMatrix(value, dataEditor);
+ inputColumns.Value = value.ColumnCount;
+ inputRows.Value = value.RowCount;
+ }
+ }
+ #endregion
+
+ #region Constructor
+ public Editor()
+ {
+ InitializeComponent();
+
+ inputName.Text = "New matrix ";
+ }
+ #endregion
+
+ #region Resize buttons
+ private void buttonResizeReset_Click(object sender, EventArgs e)
+ {
+ inputRows.Value = dataEditor.Rows.Count;
+ inputColumns.Value = dataEditor.Columns.Count;
+ }
+
+ private void buttonResizeApply_Click(object sender, EventArgs e)
+ {
+ int rows = Convert.ToInt32(inputRows.Value);
+ int cols = Convert.ToInt32(inputColumns.Value);
+
+ GridViewHelper.Resize(dataEditor, cols, rows);
+ }
+ #endregion
+
+ #region Form buttons
+ private void buttonAccept_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = System.Windows.Forms.DialogResult.OK;
+
+ // Make sure name is not empty
+ if (MatrixName == "")
+ {
+ allowExit = false;
+ MessageBox.Show("You must enter a name!", "Error!");
+ }
+
+ // Make sure size is not empty! Empty matrices behave very weird
+ else if (dataEditor.Columns.Count == 0 || dataEditor.Rows.Count == 0)
+ {
+ allowExit = false;
+ MessageBox.Show("The matrix must have at least one row and one column!", "Error!");
+ }
+ }
+
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.Close();
+ }
+ #endregion
+
+ #region Right click menu
+ private void contextMenuCut_Click(object sender, EventArgs e)
+ {
+ GridViewHelper.CopySelected(dataEditor);
+
+ foreach (DataGridViewCell i in dataEditor.SelectedCells) i.Value = "0";
+ }
+
+ private void contextMenuCopy_Click(object sender, EventArgs e)
+ {
+ GridViewHelper.CopySelected(dataEditor);
+ }
+
+ private void contextMenuPaste_Click(object sender, EventArgs e)
+ {
+ GridViewHelper.Paste(dataEditor);
+ }
+
+ private void contextMenuClear_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewCell i in dataEditor.SelectedCells) i.Value = "0";
+ }
+
+ private void contextMenuClearAll_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewRow i in dataEditor.Rows)
+ foreach (DataGridViewCell j in i.Cells)
+ j.Value = "0";
+ }
+
+ private void contextMenuInsertRow_Click(object sender, EventArgs e)
+ {
+ if (dataEditor.CurrentCell != null) dataEditor.Rows.Insert(dataEditor.CurrentCell.RowIndex, new DataGridViewRow());
+ else dataEditor.Rows.Add();
+ }
+
+ private void contextMenuInsertCol_Click(object sender, EventArgs e)
+ {
+ var col = new DataGridViewTextBoxColumn()
+ {
+ SortMode = DataGridViewColumnSortMode.NotSortable,
+ AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCellsExceptHeader
+ };
+
+ if (dataEditor.CurrentCell != null) dataEditor.Columns.Insert(dataEditor.CurrentCell.ColumnIndex, col);
+ else dataEditor.Columns.Add(col);
+ }
+
+ private void contextMenuDelRow_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewCell i in dataEditor.SelectedCells)
+ dataEditor.Rows.RemoveAt(i.RowIndex);
+ }
+
+ private void contextMenuDelColumn_Click(object sender, EventArgs e)
+ {
+ foreach (DataGridViewCell i in dataEditor.SelectedCells)
+ dataEditor.Columns.RemoveAt(i.ColumnIndex);
+ }
+ #endregion
+
+ #region Drawing
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
+ }
+ #endregion
+
+ private void dataEditor_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
+ {
+ if (e.ColumnIndex < 0 || e.ColumnIndex >= dataEditor.Columns.Count) return;
+ if (e.RowIndex < 0 || e.RowIndex >= dataEditor.Rows.Count) return;
+
+ if (e.Button == System.Windows.Forms.MouseButtons.Right)
+ {
+ dataEditor.CurrentCell = dataEditor.Rows[e.RowIndex].Cells[e.ColumnIndex];
+ if (dataEditor.ContextMenu != null) dataEditor.ContextMenu.Show(dataEditor, e.Location);
+ }
+ }
+
+ private void Editor_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (!allowExit)
+ {
+ allowExit = true;
+ e.Cancel = true;
+ }
+ }
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Forms/ImportCsvWindow.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Forms/ImportCsvWindow.cs
new file mode 100755
index 0000000..b2c30f0
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Forms/ImportCsvWindow.cs
@@ -0,0 +1,225 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace MatrixCalculator
+{
+ public partial class ImportCsvWindow : Form
+ {
+ private string csv;
+ private bool allowExit = true;
+
+ #region Public properties
+ public int StartRow { get; set; }
+ public int StartCol { get; set; }
+ public int EndRow { get; set; }
+ public int EndCol { get; set; }
+
+ public string Csv{
+ get { return csv; }
+ set { csv = value; UpdateGrid(); }
+ }
+
+ public string MatrixName {
+ get {
+ return inputName.Text;
+ }
+
+ set {
+ inputName.Text = value;
+ }
+ }
+
+ public MathNet.Numerics.LinearAlgebra.Matrix Matrix
+ {
+ get { return GridViewHelper.GetMatrix(dataGrid); }
+ set { GridViewHelper.PutMatrix(value, dataGrid); }
+ }
+ #endregion
+
+ private Dictionary separators = new Dictionary();
+
+ public ImportCsvWindow()
+ {
+ InitializeComponent();
+
+ separators.Add(',', true);
+ separators.Add('\t', false);
+ separators.Add(' ', false);
+ separators.Add(';', false);
+ }
+
+ public void LoadFile(string filename)
+ {
+ if (System.IO.File.Exists(filename))
+ Csv = System.IO.File.ReadAllText(filename);
+ }
+
+ private void UpdateGrid()
+ {
+ List sep = new List();
+ foreach (var i in separators)
+ if (i.Value) sep.Add(i.Key);
+
+ // Update data
+ dataGrid.DataSource = CsvParser.GetTable(Csv, sep.ToArray(), checkCombine.Checked);
+
+ foreach (DataGridViewColumn i in dataGrid.Columns)
+ {
+ i.HeaderText = "";
+ i.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
+ }
+
+ // Update sizes
+ inputStartRow.Value = 0;
+ inputStartColumn.Value = 0;
+ inputEndColumn.Value = inputEndColumn.Maximum = dataGrid.Columns.Count - 1;
+ inputEndRow.Value = inputEndRow.Maximum = dataGrid.Rows.Count - 1;
+ }
+
+ #region Separators
+ private void checkCombine_CheckedChanged(object sender, EventArgs e)
+ {
+ UpdateGrid();
+ }
+
+ private void checkSepComma_CheckedChanged(object sender, EventArgs e)
+ {
+ separators[','] = checkSepComma.Checked;
+ UpdateGrid();
+ }
+
+ private void checkSepSemicolon_CheckedChanged(object sender, EventArgs e)
+ {
+ separators[';'] = checkSepComma.Checked;
+ UpdateGrid();
+ }
+
+ private void checkSepSpace_CheckedChanged(object sender, EventArgs e)
+ {
+ separators[' '] = checkSepComma.Checked;
+ UpdateGrid();
+ }
+
+ private void checkSepOthers_CheckedChanged(object sender, EventArgs e)
+ {
+ List temp = new List();
+ foreach (var i in separators)
+ if (i.Key != ' ' && i.Key != '\t' && i.Key != ';' && i.Key != ',')
+ temp.Add(i.Key);
+
+ foreach (var i in temp) separators[i] = false;
+
+ if (checkSepOthers.Checked)
+ foreach (var i in inputSepOthers.Text)
+ separators[i] = true;
+
+ UpdateGrid();
+ }
+
+ private void checkSepTab_CheckedChanged(object sender, EventArgs e)
+ {
+ separators['\t'] = checkSepComma.Checked;
+ UpdateGrid();
+ }
+
+ private void inputSepOthers_TextChanged(object sender, EventArgs e)
+ {
+ List temp = new List();
+ foreach (var i in separators)
+ if (i.Key != ' ' && i.Key != '\t' && i.Key != ';' && i.Key != ',')
+ temp.Add(i.Key);
+
+ foreach (var i in temp) separators[i] = false;
+
+ if (checkSepOthers.Checked)
+ foreach (var i in inputSepOthers.Text)
+ separators[i] = true;
+
+ UpdateGrid();
+ }
+ #endregion
+
+ #region Form buttons
+ private void buttonEntire_Click(object sender, EventArgs e)
+ {
+ StartCol = StartRow = 0;
+ inputEndColumn.Value = dataGrid.Columns.Count - 1;
+ inputEndRow.Value = dataGrid.Rows.Count - 1;
+
+ this.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.Close();
+ }
+
+ private void buttonAccept_Click(object sender, EventArgs e)
+ {
+ // Get numbers
+ StartCol = Convert.ToInt32(inputStartColumn.Value);
+ StartRow = Convert.ToInt32(inputStartRow.Value);
+ EndCol = Convert.ToInt32(inputEndColumn.Value);
+ EndRow = Convert.ToInt32(inputEndRow.Value);
+
+ // Validate input
+ if (inputName.Text == "")
+ {
+ allowExit = false;
+ MessageBox.Show("Name cannot be empty!", "Error!");
+ return;
+ }
+
+ if (EndCol - StartCol <= 0 || EndRow - StartRow <= 0)
+ {
+ allowExit = false;
+ MessageBox.Show("Invalid range, the matrix must have at least one row and one column.", "Error!");
+ return;
+ }
+
+ // Trim unneeded rows and columns
+ while (StartCol > 0) {
+ dataGrid.Columns.RemoveAt(0);
+ StartCol--;
+ EndCol--;
+ }
+
+ while (StartRow > 0) {
+ dataGrid.Rows.RemoveAt(0);
+ StartRow--;
+ EndRow--;
+ }
+
+ GridViewHelper.Resize(dataGrid, EndCol + 1, EndRow + 1);
+
+ // Done, finish
+ this.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.Close();
+ }
+
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.Close();
+ }
+ #endregion
+
+ private void ImportCsvWindow_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (!allowExit)
+ {
+ allowExit = true;
+ e.Cancel = true;
+ }
+ }
+
+ #region Painting
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
+ }
+ #endregion
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/GridViewHelper.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/GridViewHelper.cs
new file mode 100755
index 0000000..bda9462
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/GridViewHelper.cs
@@ -0,0 +1,144 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using MathNet.Numerics.LinearAlgebra;
+
+namespace MatrixCalculator
+{
+ static class GridViewHelper
+ {
+ ///
+ /// Loads a matrix in a DataGridView
+ ///
+ public static void PutMatrix(Matrix m, DataGridView grid)
+ {
+ // Reset grid
+ grid.Rows.Clear();
+ grid.Columns.Clear();
+
+ // Add columns
+ for (int i = 0; i < m.ColumnCount; i++)
+ {
+ var col = new DataGridViewTextBoxColumn()
+ {
+ SortMode = DataGridViewColumnSortMode.NotSortable,
+ AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
+ };
+
+ grid.Columns.Add(col);
+ }
+
+ // Add rows and data
+ for (int i = 0; i < m.RowCount; i++)
+ {
+ grid.Rows.Add();
+
+ for (int j = 0; j < m.ColumnCount; j++)
+ grid[j, i].Value = MyDouble.String(m[i, j]);
+ }
+ }
+
+ ///
+ /// Gets the matrix from a DataGridView
+ ///
+ public static Matrix GetMatrix(DataGridView grid)
+ {
+ Matrix m = new Matrix(grid.Rows.Count, grid.Columns.Count);
+
+ for (int i = 0; i < m.RowCount; i++)
+ for (int j = 0; j < m.ColumnCount; j++)
+ {
+ double temp = 0;
+
+ if (grid[j, i].Value != null)
+ double.TryParse(grid[j, i].Value.ToString(), out temp);
+
+ m[i, j] = temp;
+ }
+
+ return m;
+ }
+
+ ///
+ /// Resizes a DataGridView
+ ///
+ /// The DataGridView
+ /// The new number of columns
+ /// The new number of rows
+ public static void Resize(DataGridView grid, int ncols, int nrows)
+ {
+ // Add columns
+ while (grid.Columns.Count < ncols)
+ {
+ DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn()
+ {
+ AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells,
+ SortMode = DataGridViewColumnSortMode.NotSortable
+ };
+
+ grid.Columns.Add(col);
+ }
+
+ // Remove columns
+ while (grid.Columns.Count > ncols)
+ grid.Columns.Remove(grid.Columns.GetLastColumn(DataGridViewElementStates.Displayed, DataGridViewElementStates.None));
+
+ // Add rows
+ while (grid.Rows.Count < nrows)
+ grid.Rows.Add();
+
+ // Remove rows
+ while (grid.Rows.Count > nrows)
+ grid.Rows.RemoveAt(grid.Rows.GetLastRow(DataGridViewElementStates.Displayed));
+ }
+
+ ///
+ /// Copies the selected area to clipboard
+ ///
+ public static void CopySelected(DataGridView grid)
+ {
+ int minRow, minCol, maxRow, maxCol;
+ minRow = minCol = int.MaxValue;
+ maxRow = maxCol = int.MinValue;
+
+ foreach (DataGridViewCell i in grid.SelectedCells)
+ {
+ minRow = Math.Min(minRow, i.RowIndex);
+ minCol = Math.Min(minCol, i.ColumnIndex);
+ maxRow = Math.Max(maxRow, i.RowIndex);
+ maxCol = Math.Max(maxCol, i.ColumnIndex);
+ }
+
+ string csv = CsvParser.ToCSV(grid, minRow, minCol, maxRow, maxCol, true);
+ Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
+ }
+
+ ///
+ /// Pastes clipboard content into selected cell and beyond
+ ///
+ public static void Paste(DataGridView grid)
+ {
+ // Where to paste
+ int row = 0, col = 0;
+ if (grid.CurrentCell != null) {
+ row = grid.CurrentCell.RowIndex;
+ col = grid.CurrentCell.ColumnIndex;
+ }
+
+ // Get data
+ string data = "";
+ if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue)) data = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
+ else if (Clipboard.ContainsText()) data = Clipboard.GetText();
+
+ var table = CsvParser.GetTable(data, MatrixCalculator.Properties.Settings.Default.InternalCsvSeparators.ToArray());
+
+ // Put data in table
+ for (int i = 0; i < table.Rows.Count; i++)
+ for (int j = 0; j < table.Columns.Count; j++)
+ if (table.Rows[i][j].ToString() != "" && row + i < grid.Rows.Count && col + j < grid.Columns.Count)
+ grid[j + col, i + row].Value = table.Rows[i][j];
+ }
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/MatrixConverter.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/MatrixConverter.cs
new file mode 100755
index 0000000..c45c88b
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/MatrixConverter.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data;
+using MathNet.Numerics.LinearAlgebra;
+
+namespace MatrixCalculator
+{
+ static class MatrixConverter
+ {
+ ///
+ /// Puts a matrix in a DataTable
+ ///
+ public static DataTable GetTable(Matrix matrix)
+ {
+ DataTable table = new DataTable("matrix");
+
+ for (int i = 0; i < matrix.ColumnCount; i++)
+ table.Columns.Add();
+
+ for (int i = 0; i < matrix.RowCount; i++)
+ {
+ table.Rows.Add("");
+
+ for (int j = 0; j < matrix.ColumnCount; j++)
+ table.Rows[i][j] = matrix[i, j].ToString();
+ }
+
+ return table;
+ }
+
+ ///
+ /// Converts a DataTable into a matrix
+ ///
+ public static Matrix FromTable(DataTable table)
+ {
+ Matrix matrix = new Matrix(table.Rows.Count, table.Columns.Count);
+
+ for (int i = 0; i < matrix.RowCount; i++)
+ for (int j = 0; j < matrix.ColumnCount; j++)
+ {
+ double temp = 0;
+ double.TryParse(table.Rows[i][j].ToString(), out temp);
+ matrix[i, j] = temp;
+ }
+
+ return matrix;
+ }
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/MatrixHelper.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/MatrixHelper.cs
new file mode 100755
index 0000000..213a391
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/Helpers/MatrixHelper.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using MathNet.Numerics.LinearAlgebra;
+
+namespace MatrixCalculator
+{
+ static class MatrixHelper
+ {
+ public static bool Equal(Matrix a, Matrix b)
+ {
+ if (a.RowCount != b.RowCount || a.ColumnCount != b.ColumnCount) return false;
+
+ for (int i = 0; i < a.RowCount; i++)
+ for (int j = 0; j < a.ColumnCount; j++)
+ if (a[i, j] != b[i, j]) return false;
+
+ return true;
+ }
+
+ public static Matrix Power(Matrix mat, int power)
+ {
+ // Solution
+ Matrix sol = Matrix.Identity(mat.RowCount, mat.ColumnCount);
+
+ if (power < 0) {
+ mat = mat.Inverse();
+ power *= -1;
+ }
+
+ // Now raise to power binary
+ for (int i = 0; (1 << i) <= power; i++)
+ {
+ if ((power & (1 << i)) != 0) sol = (sol * mat);
+ mat = (mat * mat);
+ }
+
+ // Done
+ return sol;
+ }
+
+ public static double Max(Matrix mat)
+ {
+ double max = double.MinValue;
+
+ for (int i = 0; i < mat.RowCount; i++)
+ for (int j = 0; j < mat.ColumnCount; j++)
+ max = Math.Max(mat[i, j], max);
+
+ return max;
+ }
+
+ public static double Min(Matrix mat)
+ {
+ double min = double.MaxValue;
+
+ for (int i = 0; i < mat.RowCount; i++)
+ for (int j = 0; j < mat.ColumnCount; j++)
+ min = Math.Min(mat[i, j], min);
+
+ return min;
+ }
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/MainWindow.cs b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/MainWindow.cs
new file mode 100755
index 0000000..0af44d2
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/MainWindow.cs
@@ -0,0 +1,812 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using MathNet.Numerics.LinearAlgebra;
+
+namespace MatrixCalculator
+{
+ public partial class MainWindow : Form
+ {
+ private WorksheetFile worksheet = new WorksheetFile();
+ private List matrices = new List();
+ private Matrix matrixA, matrixB, matrixResult;
+
+ #region Matrix properties
+ private Matrix MatrixA {
+ get { return matrixA; }
+ set {
+ matrixA = value;
+ GridViewHelper.PutMatrix(matrixA, dataMatrixA);
+ }
+ }
+
+ private Matrix MatrixB
+ {
+ get { return matrixB; }
+ set
+ {
+ matrixB = value;
+ GridViewHelper.PutMatrix(matrixB, dataMatrixB);
+ }
+ }
+
+ private Matrix MatrixResult
+ {
+ get { return matrixResult; }
+ set
+ {
+ matrixResult = value;
+ GridViewHelper.PutMatrix(matrixResult, dataResult);
+ }
+ }
+
+ private Matrix MatrixPreview
+ {
+ get {
+ if (listMatrices.SelectedItems.Count == 1)
+ return matrices[listMatrices.SelectedIndices[0]];
+ else return null;
+ }
+ set {
+ GridViewHelper.PutMatrix(value, dataPreview);
+ }
+ }
+ #endregion
+
+ #region Constructor
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ ResetAll();
+ }
+
+ #endregion
+
+ #region User interface
+
+ #region Menus
+ private void menuFileNew_Click(object sender, EventArgs e)
+ {
+ if (!ShowSaveWarningDialog()) return;
+
+ ResetAll();
+ worksheet = new WorksheetFile();
+ }
+
+ private void menuFileOpen_Click(object sender, EventArgs e)
+ {
+ if (!ShowSaveWarningDialog()) return;
+
+ // Open file dialog
+ string file;
+ if (!OpenDialog("Open worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
+
+ // Open the file
+ DataTable data = new DataTable();
+ try {
+ worksheet = new WorksheetFile(file);
+ data = worksheet.Read();
+ }
+
+ catch (Exception ex) {
+ MessageBox.Show("Error:" + ex.Message, "Error!");
+ return;
+ }
+
+ // Load data
+ ResetAll();
+ AddMatrices(data);
+ }
+
+ private void menuFileSave_Click(object sender, EventArgs e)
+ {
+ if (worksheet.FileName == "")
+ {
+ string file;
+ if (!SaveDialog("Save worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
+
+ worksheet.FileName = file;
+ }
+
+ try { worksheet.Save(); }
+ catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error!"); }
+ }
+
+ private void menuFileSaveAs_Click(object sender, EventArgs e)
+ {
+ string file;
+ if (!SaveDialog("Save worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
+
+ try { worksheet.SaveAs(file); }
+ catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error!"); }
+ }
+
+ private void menuFileImportCsv_Click(object sender, EventArgs e)
+ {
+ string file;
+ if (!OpenDialog("Open CSV file...", MatrixCalculator.Properties.Resources.CsvFormatFilter, out file))
+ return;
+
+ ImportCsvWindow wind = new ImportCsvWindow();
+ try { wind.LoadFile(file); }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Error: " + ex.Message, "Error!");
+ }
+
+ if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK)
+ return;
+
+ AddMatrix(wind.Matrix, wind.MatrixName, "", true);
+ }
+
+ private void menuFileImportWorksheet_Click(object sender, EventArgs e)
+ {
+ string file;
+ if (!OpenDialog("Open worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file))
+ return;
+
+ ImportWorksheetWindow wind = new ImportWorksheetWindow();
+ try { wind.LoadFile(file); }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Error: " + ex.Message, "Error!");
+ }
+
+ if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+ AddMatrices(wind.Data);
+ }
+
+ private void menuFilePreferences_Click(object sender, EventArgs e)
+ {
+ new SettingsWindow().ShowDialog();
+ }
+
+ private void menuFileExit_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+
+ private void menuMatrixNew_Click(object sender, EventArgs e)
+ {
+ Editor edit = new Editor();
+ edit.Text = "New matrix...";
+
+ if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK)
+ return;
+
+ AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
+ }
+
+ private void menuMatrixEdit_Click(object sender, EventArgs e)
+ {
+ if (listMatrices.SelectedItems.Count != 1) return;
+
+ string old_name, new_name, desc;
+ Matrix matrix;
+ // Set up variables
+
+ Editor edit = new Editor();
+ edit.Text = "Edit matrix...";
+ old_name = edit.MatrixName = listMatrices.SelectedItems[0].Text;
+ edit.MatrixDescription = listMatrices.SelectedItems[0].SubItems[1].Text;
+ edit.Matrix = matrices[listMatrices.SelectedIndices[0]];
+
+ // Dialog
+ if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+
+ // Update new stuff
+ new_name = listMatrices.SelectedItems[0].Text = edit.MatrixName;
+ desc = listMatrices.SelectedItems[0].SubItems[1].Text = edit.MatrixDescription;
+ matrix = matrices[listMatrices.SelectedIndices[0]] = edit.Matrix;
+
+ // Update in file
+ worksheet.ModifyMatrix(old_name, new_name, CsvParser.ToCSV(matrix), desc);
+
+ // Update preview
+ listMatrices_SelectedIndexChanged(this, new EventArgs());
+ }
+
+ private void menuMatrixDelete_Click(object sender, EventArgs e)
+ {
+ foreach (int i in listMatrices.SelectedIndices)
+ {
+ worksheet.DeleteMatrix(listMatrices.Items[i].Text);
+ listMatrices.Items.RemoveAt(i);
+ matrices.RemoveAt(i);
+ }
+ }
+
+ private void menuMatrixDuplicate_Click(object sender, EventArgs e)
+ {
+ if (listMatrices.SelectedItems.Count != 1) return;
+
+ // Set up variables
+ Editor edit = new Editor();
+ edit.Text = "New matrix...";
+ edit.MatrixName = listMatrices.SelectedItems[0].Text;
+ edit.MatrixDescription = listMatrices.SelectedItems[0].SubItems[1].Text;
+ edit.Matrix = matrices[listMatrices.SelectedIndices[0]];
+
+ // Dialog
+ if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+
+ // Update new stuff
+ AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
+ }
+
+ private void menuMatrixInsertA_Click(object sender, EventArgs e)
+ {
+ if (listMatrices.SelectedIndices.Count == 1)
+ MatrixA = matrices[listMatrices.SelectedIndices[0]];
+ }
+
+ private void menuMatrixInsertB_Click(object sender, EventArgs e)
+ {
+ if (listMatrices.SelectedIndices.Count == 1)
+ MatrixB = matrices[listMatrices.SelectedIndices[0]];
+ }
+
+ private void menuMatrixCopy_Click(object sender, EventArgs e)
+ {
+ if (listMatrices.SelectedIndices.Count != 1) return;
+
+ string csv = CsvParser.ToCSV(matrices[listMatrices.SelectedIndices[0]]);
+ Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
+ }
+
+ private void menuMatrixPaste_Click(object sender, EventArgs e)
+ {
+ // Get data
+ string csv = "";
+ if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue))
+ csv = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
+ else return;
+
+ // Put it in a matrix
+ Editor edit = new Editor();
+ edit.Text = "Paste matrix...";
+ edit.Matrix = MatrixConverter.FromTable(CsvParser.GetTable(csv, ",;\t".ToArray()));
+ edit.MatrixName = "Pasted matrix";
+
+ if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+
+ // Get data
+ AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
+ }
+
+ private void menuMatrixPasteSpecial_Click(object sender, EventArgs e)
+ {
+ // Get data
+ string csv = "";
+ if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue))
+ csv = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
+ else if (Clipboard.ContainsText())
+ csv = Clipboard.GetText();
+ else return;
+
+ // Use CSV importer
+ ImportCsvWindow wind = new ImportCsvWindow();
+ wind.Csv = csv;
+
+ if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+
+ AddMatrix(wind.Matrix, wind.MatrixName, "", true);
+ }
+
+ private void menuHelpAbout_Click(object sender, EventArgs e)
+ {
+ DynamicLink.Launcher.About();
+ }
+
+ private void menuHelpHelp_Click(object sender, EventArgs e)
+ {
+ DynamicLink.Launcher.StartModule("Help", "matrixcalc");
+ }
+
+ private void contextMenuDataAdd_Click(object sender, EventArgs e)
+ {
+ var item = sender as ToolStripMenuItem;
+ var menu = item.Owner as ContextMenuStrip;
+ var grid = menu.SourceControl as DataGridView;
+ if (grid == null) return;
+
+ // Create editor window
+ Editor editwindow = new Editor();
+ editwindow.Text = "New matrix...";
+ editwindow.Matrix = GridViewHelper.GetMatrix(grid);
+
+ if (editwindow.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+ AddMatrix(editwindow.Matrix, editwindow.MatrixName, editwindow.MatrixDescription, true);
+ }
+
+ private void contextMenuDataClear_Click(object sender, EventArgs e)
+ {
+ var item = sender as ToolStripMenuItem;
+ var menu = item.Owner as ContextMenuStrip;
+ var grid = menu.SourceControl as DataGridView;
+ if (grid == null) return;
+
+ if (grid == dataMatrixA) matrixA = null;
+ else if (grid == dataMatrixB) matrixB = null;
+
+ grid.Rows.Clear();
+ grid.Columns.Clear();
+ }
+
+ private void contextMenuDataCopy_Click(object sender, EventArgs e)
+ {
+ var item = sender as ToolStripMenuItem;
+ var menu = item.Owner as ContextMenuStrip;
+ var grid = menu.SourceControl as DataGridView;
+ if (grid == null) return;
+
+ string csv = CsvParser.ToCSV(grid);
+ Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
+ }
+
+ #endregion
+
+ #region Calculator buttons
+ private void buttonAdd_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 1, 1, 1, 0, 0)) return;
+
+ try { MatrixResult = matrixA + matrixB; }
+ catch (Exception ex)
+ {
+ textOutput.Text = "Error: " + ex.Message;
+ }
+ }
+
+ private void buttonSub_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 1, 1, 1, 0, 0)) return;
+
+ try { MatrixResult = matrixA - matrixB; }
+ catch (Exception ex)
+ {
+ textOutput.Text = "Error: " + ex.Message;
+ }
+ }
+
+ private void buttonMul_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 1, 1, 0, 1, 0)) return;
+
+ try { MatrixResult = matrixA * matrixB; }
+ catch (Exception ex)
+ {
+ textOutput.Text = "Error: " + ex.Message;
+ }
+ }
+
+ private void buttonAddNum_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ // Get a number
+ NumericInput input = new NumericInput(NumericInput.NumberType.Real);
+ if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+ double number = input.NumberReal;
+
+ // Now add it
+ Matrix m = new Matrix(matrixA.RowCount, matrixA.ColumnCount, number);
+ MatrixResult = matrixA + m;
+ }
+
+ private void buttonSubNum_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ // Get a number
+ NumericInput input = new NumericInput(NumericInput.NumberType.Real);
+ if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+ double number = input.NumberReal;
+
+ // Now add it
+ Matrix m = new Matrix(matrixA.RowCount, matrixA.ColumnCount, number);
+ MatrixResult = matrixA - m;
+ }
+
+ private void buttonMulNum_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ // Get a number
+ NumericInput input = new NumericInput(NumericInput.NumberType.Real);
+ if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+ double number = input.NumberReal;
+
+ // Now add it
+ MatrixResult = matrixA * number;
+ }
+
+ private void buttonInv_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ try { MatrixResult = matrixA.Inverse(); }
+ catch (Exception ex)
+ {
+ textOutput.Text = "Error: " + ex.Message;
+ }
+ }
+
+ private void buttonPow_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ // Get a number
+ NumericInput input = new NumericInput(NumericInput.NumberType.Integer);
+ if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
+ int number = input.NumberInt;
+
+ // Calculate
+ try { MatrixResult = MatrixHelper.Power (matrixA, number); }
+ catch (Exception ex)
+ {
+ textOutput.Text = "Error: " + ex.Message;
+ }
+ }
+
+ private void buttonTransp_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ try { MatrixResult = Matrix.Transpose(matrixA); }
+ catch (Exception ex)
+ {
+ textOutput.Text = "Error: " + ex.Message;
+ }
+ }
+
+ private void buttonTrace_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
+ MatrixResult = new Matrix(1, matrixA.Trace());
+
+ else textOutput.Text = MyDouble.String(matrixA.Trace());
+ }
+
+ private void buttonRank_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
+ MatrixResult = new Matrix(1, Convert.ToDouble(matrixA.Rank()));
+
+ else textOutput.Text = matrixA.Rank().ToString();
+ }
+
+ private void buttonDet_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 1)) return;
+
+ if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
+ MatrixResult = new Matrix(1, matrixA.Determinant());
+
+ else textOutput.Text = MyDouble.String(matrixA.Determinant());
+ }
+
+ private void buttonMin_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
+ MatrixResult = new Matrix(1, MatrixHelper.Min(matrixA));
+
+ else textOutput.Text = MyDouble.String(MatrixHelper.Min(matrixA));
+
+ }
+
+ private void buttonMax_Click(object sender, EventArgs e)
+ {
+ if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
+
+ if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
+ MatrixResult = new Matrix(1, MatrixHelper.Max(matrixA));
+
+ else textOutput.Text = MyDouble.String(MatrixHelper.Max(matrixA));
+ }
+
+ #endregion
+
+ #region Drag & drop
+ private void dataMatrix_DragEnter(object sender, DragEventArgs e)
+ {
+ if (e.Data.GetDataPresent(typeof(ListViewItem))) e.Effect = DragDropEffects.Move;
+ else e.Effect = DragDropEffects.None;
+ }
+
+ private void dataMatrix_DragDrop(object sender, DragEventArgs e)
+ {
+ ListViewItem data = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
+ var send = sender as DataGridView;
+ if (data == null || send == null) return;
+
+ if (send == dataMatrixA) MatrixA = matrices[data.Index];
+ else if (send == dataMatrixB) MatrixB = matrices[data.Index];
+ }
+
+ private void listMatrices_DragOver(object sender, DragEventArgs e)
+ {
+ e.Effect = DragDropEffects.Move;
+ }
+
+ private void listMatrices_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (listMatrices.SelectedItems.Count == 1 && e.Button == System.Windows.Forms.MouseButtons.Left)
+ listMatrices.DoDragDrop(listMatrices.SelectedItems[0], DragDropEffects.Move);
+ }
+ #endregion
+
+ #region List Matrices Selected Index Changed
+ private void EnableMenus(int insA, int insB, int copy, int edit, int del, int dupl)
+ {
+ menuMatrixInsertA.Enabled = contextMenuListInsertA.Enabled = (insA != 0);
+ menuMatrixInsertB.Enabled = contextMenuListInsertB.Enabled = (insB != 0);
+ menuMatrixCopy.Enabled = contextMenuListCopy.Enabled = (copy != 0);
+ menuMatrixEdit.Enabled = contextMenuListEdit.Enabled = (edit != 0);
+ menuMatrixDelete.Enabled = contextMenuListDelete.Enabled = (del != 0);
+ menuMatrixDuplicate.Enabled = contextMenuListDuplicate.Enabled = (dupl != 0);
+ }
+
+ private void listMatrices_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ switch (listMatrices.SelectedIndices.Count)
+ {
+ case 0: EnableMenus(0, 0, 0, 0, 0, 0); break;
+ case 1:
+ this.labelPreviewName.Text = "Name: " + listMatrices.SelectedItems[0].Text;
+ this.labelPreviewDesc.Text = "Description: " + listMatrices.SelectedItems[0].SubItems[1].Text;
+ MatrixPreview = matrices[listMatrices.SelectedIndices[0]];
+
+ EnableMenus(1, 1, 1, 1, 1, 1);
+ break;
+ default: EnableMenus(0, 0, 0, 0, 1, 0); break;
+ }
+ }
+ #endregion
+
+ #region Painting
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
+ }
+ #endregion
+
+ #region Others
+ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ if (!ShowSaveWarningDialog()) e.Cancel = true;
+
+ if (!e.Cancel) MatrixCalculator.Properties.Settings.Default.Save();
+ }
+
+ private void textOutput_TextChanged(object sender, EventArgs e)
+ {
+ toolTip.SetToolTip(textOutput, textOutput.Text);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region Additional routines
+ private string MakeUnique(string name)
+ {
+ List probl = new List();
+
+ // Test name uniqueness
+ bool unique = true;
+ foreach (ListViewItem i in this.listMatrices.Items)
+ {
+ if (i.Text == name) unique = false;
+ if (i.Text.StartsWith(name)) probl.Add(i.Text);
+ }
+
+ // If not unique, generate a unique name
+ if (!unique)
+ {
+ int n = 0;
+ while (probl.Contains(name + n.ToString()) && n < 10000) n++;
+ name += n.ToString();
+ }
+
+ return name;
+ }
+
+ private void AddMatrix(Matrix m, string name, string desc, bool inFile = false)
+ {
+ matrices.Add(m);
+ name = MakeUnique(name);
+
+ // Add it
+ ListViewItem item = listMatrices.Items.Add(name);
+ item.SubItems.Add(desc);
+
+ // To file?
+ if (inFile) worksheet.AddMatrix(name, CsvParser.ToCSV(m), desc);
+
+ }
+
+ private void AddMatrices(DataTable data, bool infile = false)
+ {
+ AddMatrices(data, infile, false, MatrixCalculator.Properties.Settings.Default.InternalCsvSeparators.ToArray());
+ }
+
+ private void AddMatrices(DataTable data, bool infile, bool combine, params char[] separs)
+ {
+ foreach (DataRow i in data.Rows)
+ {
+ try {
+ string name = i["name"].ToString();
+ string desc = i["description"].ToString();
+ string csv = i["csv"].ToString();
+ DataTable dt = CsvParser.GetTable(csv, separs, combine);
+
+ AddMatrix(MatrixConverter.FromTable(dt), name, desc, infile);
+ }
+
+ catch (Exception e)
+ {
+ MessageBox.Show("Error: " + e.Message, "Error!");
+ return;
+ }
+ }
+ }
+
+ private void ResetAll()
+ {
+ matrices.Clear();
+ listMatrices.Items.Clear();
+
+ AddMatrix(Matrix.Zeros(7), "Zero", "Zero matrix");
+ AddMatrix(Matrix.Identity(7, 7), "One", "Identity matrix");
+ }
+
+ private bool ShowSaveWarningDialog()
+ {
+ // Nothing to do
+ if (worksheet.IsQueueEmpty) return true;
+
+ // Show dialog
+ switch (MessageBox.Show("All the unsaved changes will be lost. Do you want to save the current worksheet?",
+ "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
+ {
+
+ case System.Windows.Forms.DialogResult.Cancel: return false;
+ case System.Windows.Forms.DialogResult.Yes:
+ menuFileSave_Click(this, new EventArgs());
+ break;
+
+ case System.Windows.Forms.DialogResult.No:
+ break;
+ }
+
+ return true;
+ }
+
+ private bool OpenDialog(string title, string filter, out string filename)
+ {
+ bool result;
+
+ // Initialize dialog
+ OpenFileDialog open = new OpenFileDialog();
+ open.Title = title;
+ open.Filter = filter;
+
+ // Show
+ if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK) result = true;
+ else result = false;
+
+ // Output
+ filename = open.FileName;
+ return result;
+ }
+
+ private bool SaveDialog(string title, string filter, out string filename)
+ {
+ bool result;
+
+ // Initialize dialog
+ SaveFileDialog save = new SaveFileDialog();
+ save.Title = title;
+ save.Filter = filter;
+
+ // Show
+ if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK) result = true;
+ else result = false;
+
+ // Output
+ filename = save.FileName;
+ return result;
+ }
+
+ #endregion
+
+ #region Additional calculator routines
+ bool VerifyConditions(int includeA, int includeB, int changeSpecial, int checkSum, int checkMul, int checkSq)
+ {
+ // Verify matrix A
+ if (includeA != 0 && matrixA == null)
+ {
+ textOutput.Text = "Error: Missing matrix A!";
+ return false;
+ }
+
+ // Verify matrix B
+ if (includeB != 0 && matrixB == null)
+ {
+ textOutput.Text = "Error: Missing matrix B!";
+ return false;
+ }
+
+ // Replace special matrix types (0 and identity)
+ if (changeSpecial != 0)
+ {
+ // Matrix A
+ if (MatrixHelper.Equal(matrixA, Matrix.Zeros(7)))
+ {
+ if (checkSum != 0) matrixA = new Matrix(matrixB.RowCount, matrixB.ColumnCount, 0.0);
+ if (checkMul != 0) matrixA = new Matrix(matrixB.ColumnCount, matrixB.ColumnCount, 0.0);
+ }
+
+ if (MatrixHelper.Equal(matrixA, Matrix.Identity(7, 7)))
+ {
+ if (checkSum != 0) matrixA = Matrix.Identity(matrixB.RowCount, matrixB.ColumnCount);
+ if (checkMul != 0) matrixA = Matrix.Identity(matrixB.ColumnCount, matrixB.ColumnCount);
+ }
+
+ // Matrix B
+ if (MatrixHelper.Equal(matrixB, Matrix.Zeros(7)))
+ {
+ if (checkSum != 0) matrixB = new Matrix(matrixA.RowCount, matrixA.ColumnCount, 0.0);
+ if (checkMul != 0) matrixB = new Matrix(matrixA.ColumnCount, matrixA.ColumnCount, 0.0);
+ }
+
+ if (MatrixHelper.Equal(matrixB, Matrix.Identity(7, 7)))
+ {
+ if (checkSum != 0) matrixB = Matrix.Identity(matrixA.RowCount, matrixA.ColumnCount);
+ if (checkMul != 0) matrixB = Matrix.Identity(matrixA.ColumnCount, matrixA.ColumnCount);
+ }
+ }
+
+ // If sum, make sure sizes match
+ if (checkSum != 0 && (matrixA.RowCount != matrixB.RowCount || matrixA.ColumnCount != matrixB.ColumnCount))
+ {
+ textOutput.Text = "Error: Incompatible matrices.";
+ return false;
+ }
+
+ // If multiplication, check A's width = B's height
+ if (checkMul != 0 && (matrixA.ColumnCount != matrixB.RowCount))
+ {
+ textOutput.Text = "Error: Incompatible matrices.";
+ return false;
+ }
+
+ // If matrix A must be square
+ if (checkSq != 0 && (matrixA.ColumnCount != matrixA.RowCount))
+ {
+ textOutput.Text = "Error: Invalid matrix.";
+ return false;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+
+ }
+}
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/MatrixCalculator.csproj b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/MatrixCalculator.csproj
new file mode 100755
index 0000000..bcc9ced
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/MatrixCalculator.csproj
@@ -0,0 +1,205 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {9C7FBEFC-5219-41CE-9EB3-24AC382C0A7A}
+ WinExe
+ Properties
+ MatrixCalculator
+ MatrixCalculator
+ v3.5
+ 512
+
+
+ x86
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ Resources\matrixcalc-logo.ico
+
+
+ true
+
+
+ ..\..\TibisMathematicsSuite - Release\
+ TRACE
+ true
+ pdbonly
+ x86
+ prompt
+ false
+ false
+ false
+
+
+
+ C:\Users\Tibi\Downloads\MathNet.Iridium-2008.8.16.470\MathNet.Iridium-2008.8.16.470\Binaries\Release\MathNet.Iridium.dll
+
+
+
+
+ ..\..\..\Libraries\sqlite-netFx35\System.Data.SQLite.dll
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Editor.cs
+
+
+
+ Form
+
+
+ ImportCsvWindow.cs
+
+
+ Form
+
+
+ ImportWorksheetWindow.cs
+
+
+
+ Form
+
+
+ MainWindow.cs
+
+
+
+ Form
+
+
+ NumericInput.cs
+
+
+
+
+
+ Form
+
+
+ SettingsWindow.cs
+
+
+
+ Editor.cs
+
+
+ ImportCsvWindow.cs
+
+
+ ImportWorksheetWindow.cs
+
+
+ SettingsWindow.cs
+
+
+ MainWindow.cs
+
+
+ NumericInput.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ {A04B247B-6A95-462B-9E07-3337A1C158F1}
+ Launcher
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/TibisMathematicsSuite/MatrixCalculator/app.config b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/app.config
new file mode 100755
index 0000000..4716e74
--- /dev/null
+++ b/recovered/2012/TibisMathematicsSuite/MatrixCalculator/app.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+ True
+
+
+ ,;
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/factorizator-1.0/Factorizator/documentation/index.xml b/recovered/2012/factorizator-1.0/Factorizator/documentation/index.xml
new file mode 100644
index 0000000..e394484
--- /dev/null
+++ b/recovered/2012/factorizator-1.0/Factorizator/documentation/index.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/Factorizator.vshost.exe.manifest b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/Factorizator.vshost.exe.manifest
new file mode 100644
index 0000000..f96b1d6
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/Factorizator.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/MatrixCalculator.exe.config b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/MatrixCalculator.exe.config
new file mode 100644
index 0000000..4716e74
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/MatrixCalculator.exe.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+ True
+
+
+ ,;
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/MatrixCalculator.vshost.exe.config b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/MatrixCalculator.vshost.exe.config
new file mode 100644
index 0000000..4716e74
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/MatrixCalculator.vshost.exe.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+ True
+
+
+ ,;
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/System.Data.SQLite.xml b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/System.Data.SQLite.xml
new file mode 100644
index 0000000..bc30f2b
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/System.Data.SQLite.xml
@@ -0,0 +1,4254 @@
+
+
+
+ System.Data.SQLite
+
+
+
+
+ This class implements SQLiteBase completely, and is the guts of the code that interop's SQLite with .NET
+
+
+
+
+ This internal class provides the foundation of SQLite support. It defines all the abstract members needed to implement
+ a SQLite data provider, and inherits from SQLiteConvert which allows for simple translations of string to and from SQLite.
+
+
+
+
+ This base class provides datatype conversion services for the SQLite provider.
+
+
+
+
+ The format string for DateTime values when using the InvariantCulture or CurrentCulture formats.
+
+
+
+
+ The value for the Unix epoch (e.g. January 1, 1970 at midnight, in UTC).
+
+
+
+
+ The value of the OLE Automation epoch represented as a Julian day.
+
+
+
+
+ An array of ISO8601 datetime formats we support conversion from
+
+
+
+
+ An UTF-8 Encoding instance, so we can convert strings to and from UTF-8
+
+
+
+
+ The default DateTime format for this instance
+
+
+
+
+ The default DateTimeKind for this instance.
+
+
+
+
+ Initializes the conversion class
+
+ The default date/time format to use for this instance
+ The DateTimeKind to use.
+
+
+
+ Converts a string to a UTF-8 encoded byte array sized to include a null-terminating character.
+
+ The string to convert to UTF-8
+ A byte array containing the converted string plus an extra 0 terminating byte at the end of the array.
+
+
+
+ Convert a DateTime to a UTF-8 encoded, zero-terminated byte array.
+
+
+ This function is a convenience function, which first calls ToString() on the DateTime, and then calls ToUTF8() with the
+ string result.
+
+ The DateTime to convert.
+ The UTF-8 encoded string, including a 0 terminating byte at the end of the array.
+
+
+
+ Converts a UTF-8 encoded IntPtr of the specified length into a .NET string
+
+ The pointer to the memory where the UTF-8 string is encoded
+ The number of bytes to decode
+ A string containing the translated character(s)
+
+
+
+ Converts a UTF-8 encoded IntPtr of the specified length into a .NET string
+
+ The pointer to the memory where the UTF-8 string is encoded
+ The number of bytes to decode
+ A string containing the translated character(s)
+
+
+
+ Converts a string into a DateTime, using the current DateTimeFormat specified for the connection when it was opened.
+
+
+ Acceptable ISO8601 DateTime formats are:
+
+ THHmmssK
+ THHmmK
+ HH:mm:ss.FFFFFFFK
+ HH:mm:ssK
+ HH:mmK
+ yyyy-MM-dd HH:mm:ss.FFFFFFFK
+ yyyy-MM-dd HH:mm:ssK
+ yyyy-MM-dd HH:mmK
+ yyyy-MM-ddTHH:mm:ss.FFFFFFFK
+ yyyy-MM-ddTHH:mmK
+ yyyy-MM-ddTHH:mm:ssK
+ yyyyMMddHHmmssK
+ yyyyMMddHHmmK
+ yyyyMMddTHHmmssFFFFFFFK
+ THHmmss
+ THHmm
+ HH:mm:ss.FFFFFFF
+ HH:mm:ss
+ HH:mm
+ yyyy-MM-dd HH:mm:ss.FFFFFFF
+ yyyy-MM-dd HH:mm:ss
+ yyyy-MM-dd HH:mm
+ yyyy-MM-ddTHH:mm:ss.FFFFFFF
+ yyyy-MM-ddTHH:mm
+ yyyy-MM-ddTHH:mm:ss
+ yyyyMMddHHmmss
+ yyyyMMddHHmm
+ yyyyMMddTHHmmssFFFFFFF
+ yyyy-MM-dd
+ yyyyMMdd
+ yy-MM-dd
+
+ If the string cannot be matched to one of the above formats, an exception will be thrown.
+
+ The string containing either a long integer number of 100-nanosecond units since
+ System.DateTime.MinValue, a Julian day double, an integer number of seconds since the Unix epoch, a
+ culture-independent formatted date and time string, a formatted date and time string in the current
+ culture, or an ISO8601-format string.
+ A DateTime value
+
+
+
+ Converts a string into a DateTime, using the specified DateTimeFormat and DateTimeKind.
+
+
+ Acceptable ISO8601 DateTime formats are:
+
+ THHmmssK
+ THHmmK
+ HH:mm:ss.FFFFFFFK
+ HH:mm:ssK
+ HH:mmK
+ yyyy-MM-dd HH:mm:ss.FFFFFFFK
+ yyyy-MM-dd HH:mm:ssK
+ yyyy-MM-dd HH:mmK
+ yyyy-MM-ddTHH:mm:ss.FFFFFFFK
+ yyyy-MM-ddTHH:mmK
+ yyyy-MM-ddTHH:mm:ssK
+ yyyyMMddHHmmssK
+ yyyyMMddHHmmK
+ yyyyMMddTHHmmssFFFFFFFK
+ THHmmss
+ THHmm
+ HH:mm:ss.FFFFFFF
+ HH:mm:ss
+ HH:mm
+ yyyy-MM-dd HH:mm:ss.FFFFFFF
+ yyyy-MM-dd HH:mm:ss
+ yyyy-MM-dd HH:mm
+ yyyy-MM-ddTHH:mm:ss.FFFFFFF
+ yyyy-MM-ddTHH:mm
+ yyyy-MM-ddTHH:mm:ss
+ yyyyMMddHHmmss
+ yyyyMMddHHmm
+ yyyyMMddTHHmmssFFFFFFF
+ yyyy-MM-dd
+ yyyyMMdd
+ yy-MM-dd
+
+ If the string cannot be matched to one of the above formats, an exception will be thrown.
+
+ The string containing either a long integer number of 100-nanosecond units since
+ System.DateTime.MinValue, a Julian day double, an integer number of seconds since the Unix epoch, a
+ culture-independent formatted date and time string, a formatted date and time string in the current
+ culture, or an ISO8601-format string.
+ The SQLiteDateFormats to use.
+ The DateTimeKind to use.
+ A DateTime value
+
+
+
+ Converts a julianday value into a DateTime
+
+ The value to convert
+ A .NET DateTime
+
+
+
+ Converts a julianday value into a DateTime
+
+ The value to convert
+ The DateTimeKind to use.
+ A .NET DateTime
+
+
+
+ Converts a DateTime struct to a JulianDay double
+
+ The DateTime to convert
+ The JulianDay value the Datetime represents
+
+
+
+ Converts a DateTime to a string value, using the current DateTimeFormat specified for the connection when it was opened.
+
+ The DateTime value to convert
+ Either a string containing the long integer number of 100-nanosecond units since System.DateTime.MinValue, a
+ Julian day double, an integer number of seconds since the Unix epoch, a culture-independent formatted date and time
+ string, a formatted date and time string in the current culture, or an ISO8601-format date/time string.
+
+
+
+ Internal function to convert a UTF-8 encoded IntPtr of the specified length to a DateTime.
+
+
+ This is a convenience function, which first calls ToString() on the IntPtr to convert it to a string, then calls
+ ToDateTime() on the string to return a DateTime.
+
+ A pointer to the UTF-8 encoded string
+ The length in bytes of the string
+ The parsed DateTime value
+
+
+
+ Smart method of splitting a string. Skips quoted elements, removes the quotes.
+
+
+ This split function works somewhat like the String.Split() function in that it breaks apart a string into
+ pieces and returns the pieces as an array. The primary differences are:
+
+ Only one character can be provided as a separator character
+ Quoted text inside the string is skipped over when searching for the separator, and the quotes are removed.
+
+ Thus, if splitting the following string looking for a comma:
+ One,Two, "Three, Four", Five
+
+ The resulting array would contain
+ [0] One
+ [1] Two
+ [2] Three, Four
+ [3] Five
+
+ Note that the leading and trailing spaces were removed from each item during the split.
+
+ Source string to split apart
+ Separator character
+ A string array of the split up elements
+
+
+
+ Convert a value to true or false.
+
+ A string or number representing true or false
+
+
+
+
+ Convert a string to true or false.
+
+ A string representing true or false
+
+
+ "yes", "no", "y", "n", "0", "1", "on", "off" as well as Boolean.FalseString and Boolean.TrueString will all be
+ converted to a proper boolean value.
+
+
+
+
+ Determines the data type of a column in a statement
+
+ The statement to retrieve information for
+ The column to retrieve type information on
+ The SQLiteType to receive the affinity for the given column
+
+
+
+ Converts a SQLiteType to a .NET Type object
+
+ The SQLiteType to convert
+ Returns a .NET Type object
+
+
+
+ For a given intrinsic type, return a DbType
+
+ The native type to convert
+ The corresponding (closest match) DbType
+
+
+
+ Returns the ColumnSize for the given DbType
+
+ The DbType to get the size of
+
+
+
+
+ Convert a DbType to a Type
+
+ The DbType to convert from
+ The closest-match .NET type
+
+
+
+ For a given type, return the closest-match SQLite TypeAffinity, which only understands a very limited subset of types.
+
+ The type to evaluate
+ The SQLite type affinity for that type.
+
+
+
+ For a given type name, return a closest-match .NET type
+
+ The name of the type to match
+ The .NET DBType the text evaluates to.
+
+
+
+ Shutdown the SQLite engine so that it can be restarted with different config options.
+ We depend on auto initialization to recover.
+
+
+
+
+ Returns non-zero if a database connection is open.
+
+
+
+
+
+ Opens a database.
+
+
+ Implementers should call SQLiteFunction.BindFunctions() and save the array after opening a connection
+ to bind all attributed user-defined functions and collating sequences to the new connection.
+
+ The filename of the database to open. SQLite automatically creates it if it doesn't exist.
+ The open flags to use when creating the connection
+ The maximum size of the pool for the given filename
+ If true, the connection can be pulled from the connection pool
+
+
+
+ Closes the currently-open database.
+
+
+ After the database has been closed implemeters should call SQLiteFunction.UnbindFunctions() to deallocate all interop allocated
+ memory associated with the user-defined functions and collating sequences tied to the closed connection.
+
+
+
+
+ Sets the busy timeout on the connection. SQLiteCommand will call this before executing any command.
+
+ The number of milliseconds to wait before returning SQLITE_BUSY
+
+
+
+ Returns the text of the last error issued by SQLite
+
+
+
+
+
+ When pooling is enabled, force this connection to be disposed rather than returned to the pool
+
+
+
+
+ Prepares a SQL statement for execution.
+
+ The source connection preparing the command. Can be null for any caller except LINQ
+ The SQL command text to prepare
+ The previous statement in a multi-statement command, or null if no previous statement exists
+ The timeout to wait before aborting the prepare
+ The remainder of the statement that was not processed. Each call to prepare parses the
+ SQL up to to either the end of the text or to the first semi-colon delimiter. The remaining text is returned
+ here for a subsequent call to Prepare() until all the text has been processed.
+ Returns an initialized SQLiteStatement.
+
+
+
+ Steps through a prepared statement.
+
+ The SQLiteStatement to step through
+ True if a row was returned, False if not.
+
+
+
+ Resets a prepared statement so it can be executed again. If the error returned is SQLITE_SCHEMA,
+ transparently attempt to rebuild the SQL statement and throw an error if that was not possible.
+
+ The statement to reset
+ Returns -1 if the schema changed while resetting, 0 if the reset was sucessful or 6 (SQLITE_LOCKED) if the reset failed due to a lock
+
+
+
+ Enables or disabled extened result codes returned by SQLite
+
+ true to enable extended result codes, false to disable.
+
+
+
+
+ Returns the numeric result code for the most recent failed SQLite API call
+ associated with the database connection.
+
+ Result code
+
+
+
+ Returns the extended numeric result code for the most recent failed SQLite API call
+ associated with the database connection.
+
+ Extended result code
+
+
+
+ Add a log message via the SQLite sqlite3_log interface.
+
+ Error code to be logged with the message.
+ String to be logged. Unlike the SQLite sqlite3_log()
+ interface, this should be pre-formatted. Consider using the
+ String.Format() function.
+
+
+
+
+ Returns a string representing the active version of SQLite
+
+
+
+
+ Returns the rowid of the most recent successful INSERT into the database from this connection.
+
+
+
+
+ Returns the number of changes the last executing insert/update caused.
+
+
+
+
+ Returns the amount of memory (in bytes) currently in use by the SQLite core library.
+
+
+
+
+ Returns the maximum amount of memory (in bytes) used by the SQLite core library since the high-water mark was last reset.
+
+
+
+
+ The opaque pointer returned to us by the sqlite provider
+
+
+
+
+ The user-defined functions registered on this connection
+
+
+
+
+ Shutdown the SQLite engine so that it can be restarted with different config options.
+ We depend on auto initialization to recover.
+
+ Returns a result code
+
+
+ Enables or disabled extended result codes returned by SQLite
+
+
+ Gets the last SQLite error code
+
+
+ Gets the last SQLite extended error code
+
+
+ Add a log message via the SQLite sqlite3_log interface.
+
+
+
+ Allows the setting of a logging callback invoked by SQLite when a
+ log event occurs. Only one callback may be set. If NULL is passed,
+ the logging callback is unregistered.
+
+ The callback function to invoke.
+ Returns a result code
+
+
+
+ Determines if the SQLite core library has been initialized for the
+ current process.
+
+
+ A boolean indicating whether or not the SQLite core library has been
+ initialized for the current process.
+
+
+
+
+ Determines if the SQLite core library has been initialized for the
+ current process.
+
+
+ A boolean indicating whether or not the SQLite core library has been
+ initialized for the current process.
+
+
+
+
+ Helper function to retrieve a column of data from an active statement.
+
+ The statement being step()'d through
+ The column index to retrieve
+ The type of data contained in the column. If Uninitialized, this function will retrieve the datatype information.
+ Returns the data in the column
+
+
+
+ Alternate SQLite3 object, overriding many text behaviors to support UTF-16 (Unicode)
+
+
+
+
+ Overrides SQLiteConvert.ToString() to marshal UTF-16 strings instead of UTF-8
+
+ A pointer to a UTF-16 string
+ The length (IN BYTES) of the string
+ A .NET string
+
+
+
+ The extra behavioral flags that can be applied to a connection.
+
+
+
+
+ No extra flags.
+
+
+
+
+ Enable logging of all SQL statements to be prepared.
+
+
+
+
+ The default extra flags for new connections.
+
+
+
+
+ SQLite implementation of DbCommand.
+
+
+
+
+ The command text this command is based on
+
+
+
+
+ The connection the command is associated with
+
+
+
+
+ The version of the connection the command is associated with
+
+
+
+
+ Indicates whether or not a DataReader is active on the command.
+
+
+
+
+ The timeout for the command, kludged because SQLite doesn't support per-command timeout values
+
+
+
+
+ Designer support
+
+
+
+
+ Used by DbDataAdapter to determine updating behavior
+
+
+
+
+ The collection of parameters for the command
+
+
+
+
+ The SQL command text, broken into individual SQL statements as they are executed
+
+
+
+
+ Unprocessed SQL text that has not been executed
+
+
+
+
+ Transaction associated with this command
+
+
+
+
+ Constructs a new SQLiteCommand
+
+
+ Default constructor
+
+
+
+
+ Initializes the command with the given command text
+
+ The SQL command text
+
+
+
+ Initializes the command with the given SQL command text and attach the command to the specified
+ connection.
+
+ The SQL command text
+ The connection to associate with the command
+
+
+
+ Initializes the command and associates it with the specified connection.
+
+ The connection to associate with the command
+
+
+
+ Initializes a command with the given SQL, connection and transaction
+
+ The SQL command text
+ The connection to associate with the command
+ The transaction the command should be associated with
+
+
+
+ Disposes of the command and clears all member variables
+
+ Whether or not the class is being explicitly or implicitly disposed
+
+
+
+ Clears and destroys all statements currently prepared
+
+
+
+
+ Builds an array of prepared statements for each complete SQL statement in the command text
+
+
+
+
+ Not implemented
+
+
+
+
+ Forwards to the local CreateParameter() function
+
+
+
+
+
+ Create a new parameter
+
+
+
+
+
+ This function ensures there are no active readers, that we have a valid connection,
+ that the connection is open, that all statements are prepared and all parameters are assigned
+ in preparation for allocating a data reader.
+
+
+
+
+ Creates a new SQLiteDataReader to execute/iterate the array of SQLite prepared statements
+
+ The behavior the data reader should adopt
+ Returns a SQLiteDataReader object
+
+
+
+ Overrides the default behavior to return a SQLiteDataReader specialization class
+
+ The flags to be associated with the reader
+ A SQLiteDataReader
+
+
+
+ Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class
+
+ A SQLiteDataReader
+
+
+
+ Called by the SQLiteDataReader when the data reader is closed.
+
+
+
+
+ Execute the command and return the number of rows inserted/updated affected by it.
+
+
+
+
+
+ Execute the command and return the first column of the first row of the resultset
+ (if present), or null if no resultset was returned.
+
+ The first column of the first row of the first resultset from the query
+
+
+
+ Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.
+
+
+
+
+ Clones a command, including all its parameters
+
+ A new SQLiteCommand with the same commandtext, connection and parameters
+
+
+
+ The SQL command text associated with the command
+
+
+
+
+ The amount of time to wait for the connection to become available before erroring out
+
+
+
+
+ The type of the command. SQLite only supports CommandType.Text
+
+
+
+
+ The connection associated with this command
+
+
+
+
+ Forwards to the local Connection property
+
+
+
+
+ Returns the SQLiteParameterCollection for the given command
+
+
+
+
+ Forwards to the local Parameters property
+
+
+
+
+ The transaction associated with this command. SQLite only supports one transaction per connection, so this property forwards to the
+ command's underlying connection.
+
+
+
+
+ Forwards to the local Transaction property
+
+
+
+
+ Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable.
+
+
+
+
+ Determines if the command is visible at design time. Defaults to True.
+
+
+
+
+ SQLite implementation of DbCommandBuilder.
+
+
+
+
+ Default constructor
+
+
+
+
+ Initializes the command builder and associates it with the specified data adapter.
+
+
+
+
+
+ Minimal amount of parameter processing. Primarily sets the DbType for the parameter equal to the provider type in the schema
+
+ The parameter to use in applying custom behaviors to a row
+ The row to apply the parameter to
+ The type of statement
+ Whether the application of the parameter is part of a WHERE clause
+
+
+
+ Returns a valid named parameter
+
+ The name of the parameter
+ Error
+
+
+
+ Returns a named parameter for the given ordinal
+
+ The i of the parameter
+ Error
+
+
+
+ Returns a placeholder character for the specified parameter i.
+
+ The index of the parameter to provide a placeholder for
+ Returns a named parameter
+
+
+
+ Sets the handler for receiving row updating events. Used by the DbCommandBuilder to autogenerate SQL
+ statements that may not have previously been generated.
+
+ A data adapter to receive events on.
+
+
+
+ Returns the automatically-generated SQLite command to delete rows from the database
+
+
+
+
+
+ Returns the automatically-generated SQLite command to delete rows from the database
+
+
+
+
+
+
+ Returns the automatically-generated SQLite command to update rows in the database
+
+
+
+
+
+ Returns the automatically-generated SQLite command to update rows in the database
+
+
+
+
+
+
+ Returns the automatically-generated SQLite command to insert rows into the database
+
+
+
+
+
+ Returns the automatically-generated SQLite command to insert rows into the database
+
+
+
+
+
+
+ Places brackets around an identifier
+
+ The identifier to quote
+ The bracketed identifier
+
+
+
+ Removes brackets around an identifier
+
+ The quoted (bracketed) identifier
+ The undecorated identifier
+
+
+
+ Override helper, which can help the base command builder choose the right keys for the given query
+
+
+
+
+
+
+ Gets/sets the DataAdapter for this CommandBuilder
+
+
+
+
+ Overridden to hide its property from the designer
+
+
+
+
+ Overridden to hide its property from the designer
+
+
+
+
+ Overridden to hide its property from the designer
+
+
+
+
+ Overridden to hide its property from the designer
+
+
+
+
+ Overridden to hide its property from the designer
+
+
+
+
+ SQLite implentation of DbConnection.
+
+
+ The ConnectionString property of the SQLiteConnection class can contain the following parameter(s), delimited with a semi-colon:
+
+
+ Parameter
+ Values
+ Required
+ Default
+
+
+ Data Source
+ {filename}
+ Y
+
+
+
+ Version
+ 3
+ N
+ 3
+
+
+ UseUTF16Encoding
+ True False
+ N
+ False
+
+
+ DateTimeFormat
+ Ticks - Use DateTime.Ticks ISO8601 - Use ISO8601 DateTime format
+ N
+ ISO8601
+
+
+ DateTimeKind
+ Unspecified - Not specified as either UTC or local time. Utc - The time represented is UTC. Local - The time represented is local time.
+ N
+ Unspecified
+
+
+ BaseSchemaName
+ Some base data classes in the framework (e.g. those that build SQL queries dynamically)
+ assume that an ADO.NET provider cannot support an alternate catalog (i.e. database) without supporting
+ alternate schemas as well; however, SQLite does not fit into this model. Therefore, this value is used
+ as a placeholder and removed prior to preparing any SQL statements that may contain it.
+ N
+ sqlite_default_schema
+
+
+ BinaryGUID
+ True - Store GUID columns in binary form False - Store GUID columns as text
+ N
+ True
+
+
+ Cache Size
+ {size in bytes}
+ N
+ 2000
+
+
+ Synchronous
+ Normal - Normal file flushing behavior Full - Full flushing after all writes Off - Underlying OS flushes I/O's
+ N
+ Normal
+
+
+ Page Size
+ {size in bytes}
+ N
+ 1024
+
+
+ Password
+ {password}
+ N
+
+
+
+ Enlist
+ Y - Automatically enlist in distributed transactions N - No automatic enlistment
+ N
+ Y
+
+
+ Pooling
+ True - Use connection pooling False - Do not use connection pooling
+ N
+ False
+
+
+ FailIfMissing
+ True - Don't create the database if it does not exist, throw an error instead False - Automatically create the database if it does not exist
+ N
+ False
+
+
+ Max Page Count
+ {size in pages} - Limits the maximum number of pages (limits the size) of the database
+ N
+ 0
+
+
+ Legacy Format
+ True - Use the more compatible legacy 3.x database format False - Use the newer 3.3x database format which compresses numbers more effectively
+ N
+ False
+
+
+ Default Timeout
+ {time in seconds} The default command timeout
+ N
+ 30
+
+
+ Journal Mode
+ Delete - Delete the journal file after a commit Persist - Zero out and leave the journal file on disk after a commit Off - Disable the rollback journal entirely
+ N
+ Delete
+
+
+ Read Only
+ True - Open the database for read only access False - Open the database for normal read/write access
+ N
+ False
+
+
+ Max Pool Size
+ The maximum number of connections for the given connection string that can be in the connection pool
+ N
+ 100
+
+
+ Default IsolationLevel
+ The default transaciton isolation level
+ N
+ Serializable
+
+
+ Foreign Keys
+ Enable foreign key constraints
+ N
+ False
+
+
+ Flags
+ Extra behavioral flags for the connection. See the SQLiteConnectionFlags enumeration for possible values.
+ N
+ Default
+
+
+
+
+
+
+ The default "stub" (i.e. placeholder) base schema name to use when
+ returning column schema information. Used as the initial value of
+ the BaseSchemaName property. This should start with "sqlite_*"
+ because those names are reserved for use by SQLite (i.e. they cannot
+ be confused with the names of user objects).
+
+
+
+
+ State of the current connection
+
+
+
+
+ The connection string
+
+
+
+
+ Nesting level of the transactions open on the connection
+
+
+
+
+ The default isolation level for new transactions
+
+
+
+
+ Whether or not the connection is enlisted in a distrubuted transaction
+
+
+
+
+ The base SQLite object to interop with
+
+
+
+
+ The database filename minus path and extension
+
+
+
+
+ Temporary password storage, emptied after the database has been opened
+
+
+
+
+ The "stub" (i.e. placeholder) base schema name to use when returning
+ column schema information.
+
+
+
+
+ The extra behavioral flags for this connection, if any. See the
+ SQLiteConnectionFlags enumeration for a list of possible values.
+
+
+
+
+ Default command timeout
+
+
+
+
+ Constructs a new SQLiteConnection object
+
+
+ Default constructor
+
+
+
+
+ Initializes the connection with the specified connection string
+
+ The connection string to use on the connection
+
+
+
+ Clones the settings and connection string from an existing connection. If the existing connection is already open, this
+ function will open its own connection, enumerate any attached databases of the original connection, and automatically
+ attach to them.
+
+
+
+
+
+ Creates a clone of the connection. All attached databases and user-defined functions are cloned. If the existing connection is open, the cloned connection
+ will also be opened.
+
+
+
+
+
+ Creates a database file. This just creates a zero-byte file which SQLite
+ will turn into a database when the file is opened properly.
+
+ The file to create
+
+
+
+ Raises the state change event when the state of the connection changes
+
+ The new state. If it is different from the previous state, an event is raised.
+
+
+
+ OBSOLETE. Creates a new SQLiteTransaction if one isn't already active on the connection.
+
+ This parameter is ignored.
+ When TRUE, SQLite defers obtaining a write lock until a write operation is requested.
+ When FALSE, a writelock is obtained immediately. The default is TRUE, but in a multi-threaded multi-writer
+ environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.
+ Returns a SQLiteTransaction object.
+
+
+
+ OBSOLETE. Creates a new SQLiteTransaction if one isn't already active on the connection.
+
+ When TRUE, SQLite defers obtaining a write lock until a write operation is requested.
+ When FALSE, a writelock is obtained immediately. The default is false, but in a multi-threaded multi-writer
+ environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.
+ Returns a SQLiteTransaction object.
+
+
+
+ Creates a new SQLiteTransaction if one isn't already active on the connection.
+
+ Supported isolation levels are Serializable, ReadCommitted and Unspecified.
+
+ Unspecified will use the default isolation level specified in the connection string. If no isolation level is specified in the
+ connection string, Serializable is used.
+ Serializable transactions are the default. In this mode, the engine gets an immediate lock on the database, and no other threads
+ may begin a transaction. Other threads may read from the database, but not write.
+ With a ReadCommitted isolation level, locks are deferred and elevated as needed. It is possible for multiple threads to start
+ a transaction in ReadCommitted mode, but if a thread attempts to commit a transaction while another thread
+ has a ReadCommitted lock, it may timeout or cause a deadlock on both threads until both threads' CommandTimeout's are reached.
+
+ Returns a SQLiteTransaction object.
+
+
+
+ Creates a new SQLiteTransaction if one isn't already active on the connection.
+
+ Returns a SQLiteTransaction object.
+
+
+
+ Forwards to the local BeginTransaction() function
+
+ Supported isolation levels are Unspecified, Serializable, and ReadCommitted
+
+
+
+
+ Not implemented
+
+
+
+
+
+ When the database connection is closed, all commands linked to this connection are automatically reset.
+
+
+
+
+ Clears the connection pool associated with the connection. Any other active connections using the same database file
+ will be discarded instead of returned to the pool when they are closed.
+
+
+
+
+
+ Clears all connection pools. Any active connections will be discarded instead of sent to the pool when they are closed.
+
+
+
+
+ Create a new SQLiteCommand and associate it with this connection.
+
+ Returns an instantiated SQLiteCommand object already assigned to this connection.
+
+
+
+ Forwards to the local CreateCommand() function
+
+
+
+
+
+ Parses the connection string into component parts
+
+ The connection string to parse
+ An array of key-value pairs representing each parameter of the connection string
+
+
+
+ Manual distributed transaction enlistment support
+
+ The distributed transaction to enlist in
+
+
+
+ Looks for a key in the array of key/values of the parameter string. If not found, return the specified default value
+
+ The list to look in
+ The key to find
+ The default value to return if the key is not found
+ The value corresponding to the specified key, or the default value if not found.
+
+
+
+ Opens the connection using the parameters found in the ConnectionString
+
+
+
+ Passes a shutdown request off to SQLite.
+
+
+ Enables or disabled extended result codes returned by SQLite
+
+
+ Enables or disabled extended result codes returned by SQLite
+
+
+ Enables or disabled extended result codes returned by SQLite
+
+
+ Add a log message via the SQLite sqlite3_log interface.
+
+
+
+ Change the password (or assign a password) to an open database.
+
+
+ No readers or writers may be active for this process. The database must already be open
+ and if it already was password protected, the existing password must already have been supplied.
+
+ The new password to assign to the database
+
+
+
+ Change the password (or assign a password) to an open database.
+
+
+ No readers or writers may be active for this process. The database must already be open
+ and if it already was password protected, the existing password must already have been supplied.
+
+ The new password to assign to the database
+
+
+
+ Sets the password for a password-protected database. A password-protected database is
+ unusable for any operation until the password has been set.
+
+ The password for the database
+
+
+
+ Sets the password for a password-protected database. A password-protected database is
+ unusable for any operation until the password has been set.
+
+ The password for the database
+
+
+
+ Queries or modifies the number of retries or the retry interval (in milliseconds) for
+ certain I/O operations that may fail due to anti-virus software.
+
+ The number of times to retry the I/O operation. A negative value
+ will cause the current count to be queried and replace that negative value.
+ The number of milliseconds to wait before retrying the I/O
+ operation. This number is multiplied by the number of retry attempts so far to come
+ up with the final number of milliseconds to wait. A negative value will cause the
+ current interval to be queried and replace that negative value.
+ Zero for success, non-zero for error.
+
+
+
+ Expand the filename of the data source, resolving the |DataDirectory| macro as appropriate.
+
+ The database filename to expand
+ The expanded path and filename of the filename
+
+
+
+ The following commands are used to extract schema information out of the database. Valid schema types are:
+
+
+ MetaDataCollections
+
+
+ DataSourceInformation
+
+
+ Catalogs
+
+
+ Columns
+
+
+ ForeignKeys
+
+
+ Indexes
+
+
+ IndexColumns
+
+
+ Tables
+
+
+ Views
+
+
+ ViewColumns
+
+
+
+
+ Returns the MetaDataCollections schema
+
+ A DataTable of the MetaDataCollections schema
+
+
+
+ Returns schema information of the specified collection
+
+ The schema collection to retrieve
+ A DataTable of the specified collection
+
+
+
+ Retrieves schema information using the specified constraint(s) for the specified collection
+
+ The collection to retrieve
+ The restrictions to impose
+ A DataTable of the specified collection
+
+
+
+ Builds a MetaDataCollections schema datatable
+
+ DataTable
+
+
+
+ Builds a DataSourceInformation datatable
+
+ DataTable
+
+
+
+ Build a Columns schema
+
+ The catalog (attached database) to query, can be null
+ The table to retrieve schema information for, must not be null
+ The column to retrieve schema information for, can be null
+ DataTable
+
+
+
+ Returns index information for the given database and catalog
+
+ The catalog (attached database) to query, can be null
+ The name of the index to retrieve information for, can be null
+ The table to retrieve index information for, can be null
+ DataTable
+
+
+
+ Retrieves table schema information for the database and catalog
+
+ The catalog (attached database) to retrieve tables on
+ The table to retrieve, can be null
+ The table type, can be null
+ DataTable
+
+
+
+ Retrieves view schema information for the database
+
+ The catalog (attached database) to retrieve views on
+ The view name, can be null
+ DataTable
+
+
+
+ Retrieves catalog (attached databases) schema information for the database
+
+ The catalog to retrieve, can be null
+ DataTable
+
+
+
+ Returns the base column information for indexes in a database
+
+ The catalog to retrieve indexes for (can be null)
+ The table to restrict index information by (can be null)
+ The index to restrict index information by (can be null)
+ The source column to restrict index information by (can be null)
+ A DataTable containing the results
+
+
+
+ Returns detailed column information for a specified view
+
+ The catalog to retrieve columns for (can be null)
+ The view to restrict column information by (can be null)
+ The source column to restrict column information by (can be null)
+ A DataTable containing the results
+
+
+
+ Retrieves foreign key information from the specified set of filters
+
+ An optional catalog to restrict results on
+ An optional table to restrict results on
+ An optional foreign key name to restrict results on
+ A DataTable with the results of the query
+
+
+
+ This event is raised whenever the database is opened or closed.
+
+
+
+
+ The connection string containing the parameters for the connection
+
+
+
+
+ Parameter
+ Values
+ Required
+ Default
+
+
+ Data Source
+ {filename}
+ Y
+
+
+
+ Version
+ 3
+ N
+ 3
+
+
+ UseUTF16Encoding
+ True False
+ N
+ False
+
+
+ DateTimeFormat
+ Ticks - Use DateTime.Ticks ISO8601 - Use ISO8601 DateTime format JulianDay - Use JulianDay format
+ N
+ ISO8601
+
+
+ BinaryGUID
+ Yes/On/1 - Store GUID columns in binary form No/Off/0 - Store GUID columns as text
+ N
+ On
+
+
+ Cache Size
+ {size in bytes}
+ N
+ 2000
+
+
+ Synchronous
+ Normal - Normal file flushing behavior Full - Full flushing after all writes Off - Underlying OS flushes I/O's
+ N
+ Normal
+
+
+ Page Size
+ {size in bytes}
+ N
+ 1024
+
+
+ Password
+ {password}
+ N
+
+
+
+ Enlist
+ Y - Automatically enlist in distributed transactions N - No automatic enlistment
+ N
+ Y
+
+
+ Pooling
+ True - Use connection pooling False - Do not use connection pooling
+ N
+ False
+
+
+ FailIfMissing
+ True - Don't create the database if it does not exist, throw an error instead False - Automatically create the database if it does not exist
+ N
+ False
+
+
+ Max Page Count
+ {size in pages} - Limits the maximum number of pages (limits the size) of the database
+ N
+ 0
+
+
+ Legacy Format
+ True - Use the more compatible legacy 3.x database format False - Use the newer 3.3x database format which compresses numbers more effectively
+ N
+ False
+
+
+ Default Timeout
+ {time in seconds} The default command timeout
+ N
+ 30
+
+
+ Journal Mode
+ Delete - Delete the journal file after a commit Persist - Zero out and leave the journal file on disk after a commit Off - Disable the rollback journal entirely
+ N
+ Delete
+
+
+ Read Only
+ True - Open the database for read only access False - Open the database for normal read/write access
+ N
+ False
+
+
+ Max Pool Size
+ The maximum number of connections for the given connection string that can be in the connection pool
+ N
+ 100
+
+
+ Default IsolationLevel
+ The default transaciton isolation level
+ N
+ Serializable
+
+
+
+
+
+
+ Returns the filename without extension or path
+
+
+
+
+ Returns the string "main".
+
+
+
+
+ Gets/sets the default command timeout for newly-created commands. This is especially useful for
+ commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible.
+ This can also be set in the ConnectionString with "Default Timeout"
+
+
+
+
+ Gets/sets the extra behavioral flags for this connection. See the
+ SQLiteConnectionFlags enumeration for a list of possible values.
+
+
+
+
+ Returns the version of the underlying SQLite database engine
+
+
+
+
+ Returns the rowid of the most recent successful INSERT into the database from this connection.
+
+
+
+
+ Returns the number of rows changed by the last INSERT, UPDATE, or DELETE statement executed on
+ this connection.
+
+
+
+
+ Returns the amount of memory (in bytes) currently in use by the SQLite core library.
+
+
+
+
+ Returns the maximum amount of memory (in bytes) used by the SQLite core library since the high-water mark was last reset.
+
+
+
+
+ Returns the version of the underlying SQLite database engine
+
+
+
+
+ This method returns the string whose value is the same as the
+ SQLITE_SOURCE_ID C preprocessor macro used when compiling the
+ SQLite core library.
+
+
+
+
+ Returns the state of the connection.
+
+
+
+
+ This event is raised whenever SQLite makes an update/delete/insert into the database on
+ this connection. It only applies to the given connection.
+
+
+
+
+ This event is raised whenever SQLite is committing a transaction.
+ Return non-zero to trigger a rollback
+
+
+
+
+ This event is raised whenever SQLite statement first begins executing on
+ this connection. It only applies to the given connection.
+
+
+
+
+ This event is raised whenever SQLite is committing a transaction.
+ Return non-zero to trigger a rollback
+
+
+
+
+ Returns a SQLiteProviderFactory object.
+
+
+
+
+ The I/O file cache flushing behavior for the connection
+
+
+
+
+ Normal file flushing at critical sections of the code
+
+
+
+
+ Full file flushing after every write operation
+
+
+
+
+ Use the default operating system's file flushing, SQLite does not explicitly flush the file buffers after writing
+
+
+
+
+ Raised when a transaction is about to be committed. To roll back a transaction, set the
+ rollbackTrans boolean value to true.
+
+ The connection committing the transaction
+ Event arguments on the transaction
+
+
+
+ Raised when data is inserted, updated and deleted on a given connection
+
+ The connection committing the transaction
+ The event parameters which triggered the event
+
+
+
+ Raised when a statement first begins executing on a given connection
+
+ The connection executing the statement
+ Event arguments of the trace
+
+
+
+ Whenever an update event is triggered on a connection, this enum will indicate
+ exactly what type of operation is being performed.
+
+
+
+
+ A row is being deleted from the given database and table
+
+
+
+
+ A row is being inserted into the table.
+
+
+
+
+ A row is being updated in the table.
+
+
+
+
+ Passed during an Update callback, these event arguments detail the type of update operation being performed
+ on the given connection.
+
+
+
+
+ The name of the database being updated (usually "main" but can be any attached or temporary database)
+
+
+
+
+ The name of the table being updated
+
+
+
+
+ The type of update being performed (insert/update/delete)
+
+
+
+
+ The RowId affected by this update.
+
+
+
+
+ Event arguments raised when a transaction is being committed
+
+
+
+
+ Set to true to abort the transaction and trigger a rollback
+
+
+
+
+ Passed during an Trace callback, these event arguments contain the UTF-8 rendering of the SQL statement text
+
+
+
+
+ SQL statement text as the statement first begins executing
+
+
+
+
+ The connection pool object
+
+
+
+
+ The default version number new pools will get
+
+
+
+
+ Attempt to pull a pooled connection out of the queue for active duty
+
+ The filename for a desired connection
+ The maximum size the connection pool for the filename can be
+ The pool version the returned connection will belong to
+ Returns NULL if no connections were available. Even if none are, the poolversion will still be a valid pool version
+
+
+
+ Clears out all pooled connections and rev's up the default pool version to force all old active objects
+ not in the pool to get discarded rather than returned to their pools.
+
+
+
+
+ Clear a given pool for a given filename. Discards anything in the pool for the given file, and revs the pool
+ version so current active objects on the old version of the pool will get discarded rather than be returned to the pool.
+
+ The filename of the pool to clear
+
+
+
+ Return a connection to the pool for someone else to use.
+
+ The filename of the pool to use
+ The connection handle to pool
+ The pool version the handle was created under
+
+ If the version numbers don't match between the connection and the pool, then the handle is discarded.
+
+
+
+
+ We don't have to thread-lock anything in this function, because it's only called by other functions above
+ which already have a thread-safe lock.
+
+ The queue to resize
+ If a function intends to add to the pool, this is true, which forces the resize
+ to take one more than it needs from the pool
+
+
+
+ Keeps track of connections made on a specified file. The PoolVersion dictates whether old objects get
+ returned to the pool or discarded when no longer in use.
+
+
+
+
+ SQLite implementation of DbConnectionStringBuilder.
+
+
+
+
+ Properties of this class
+
+
+
+
+ Constructs a new instance of the class
+
+
+ Default constructor
+
+
+
+
+ Constructs a new instance of the class using the specified connection string.
+
+ The connection string to parse
+
+
+
+ Private initializer, which assigns the connection string and resets the builder
+
+ The connection string to assign
+
+
+
+ Helper function for retrieving values from the connectionstring
+
+ The keyword to retrieve settings for
+ The resulting parameter value
+ Returns true if the value was found and returned
+
+
+
+ Fallback method for MONO, which doesn't implement DbConnectionStringBuilder.GetProperties()
+
+ The hashtable to fill with property descriptors
+
+
+
+ Gets/Sets the default version of the SQLite engine to instantiate. Currently the only valid value is 3, indicating version 3 of the sqlite library.
+
+
+
+
+ Gets/Sets the synchronization mode (file flushing) of the connection string. Default is "Normal".
+
+
+
+
+ Gets/Sets the encoding for the connection string. The default is "False" which indicates UTF-8 encoding.
+
+
+
+
+ Gets/Sets whether or not to use connection pooling. The default is "False"
+
+
+
+
+ Gets/Sets whethor not to store GUID's in binary format. The default is True
+ which saves space in the database.
+
+
+
+
+ Gets/Sets the filename to open on the connection string.
+
+
+
+
+ An alternate to the data source property
+
+
+
+
+ Gets/sets the default command timeout for newly-created commands. This is especially useful for
+ commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible.
+
+
+
+
+ Determines whether or not the connection will automatically participate
+ in the current distributed transaction (if one exists)
+
+
+
+
+ If set to true, will throw an exception if the database specified in the connection
+ string does not exist. If false, the database will be created automatically.
+
+
+
+
+ If enabled, uses the legacy 3.xx format for maximum compatibility, but results in larger
+ database sizes.
+
+
+
+
+ When enabled, the database will be opened for read-only access and writing will be disabled.
+
+
+
+
+ Gets/sets the database encryption password
+
+
+
+
+ Gets/Sets the page size for the connection.
+
+
+
+
+ Gets/Sets the maximum number of pages the database may hold
+
+
+
+
+ Gets/Sets the cache size for the connection.
+
+
+
+
+ Gets/Sets the DateTime format for the connection.
+
+
+
+
+ Gets/Sets the DateTime kind for the connection.
+
+
+
+
+ Gets/Sets the placeholder base schema name used for
+ .NET Framework compatibility purposes.
+
+
+
+
+ Determines how SQLite handles the transaction journal file.
+
+
+
+
+ Sets the default isolation level for transactions on the connection.
+
+
+
+
+ If enabled, use foreign key constraints
+
+
+
+
+ Gets/Sets the extra behavioral flags.
+
+
+
+
+ SQLite has very limited types, and is inherently text-based. The first 5 types below represent the sum of all types SQLite
+ understands. The DateTime extension to the spec is for internal use only.
+
+
+
+
+ Not used
+
+
+
+
+ All integers in SQLite default to Int64
+
+
+
+
+ All floating point numbers in SQLite default to double
+
+
+
+
+ The default data type of SQLite is text
+
+
+
+
+ Typically blob types are only seen when returned from a function
+
+
+
+
+ Null types can be returned from functions
+
+
+
+
+ Used internally by this provider
+
+
+
+
+ Used internally
+
+
+
+
+ This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of three formats. Ticks, ISO8601
+ and JulianDay.
+
+
+ ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second.
+ JulianDay is the numeric format the SQLite uses internally and is arguably the most compatible with 3rd party tools. It is
+ not readable as text without post-processing.
+ Ticks less compatible with 3rd party tools that query the database, and renders the DateTime field unreadable as text without post-processing.
+
+ The preferred order of choosing a datetime format is JulianDay, ISO8601, and then Ticks. Ticks is mainly present for legacy
+ code support.
+
+
+
+
+ Using ticks is not recommended and is not well supported with LINQ.
+
+
+
+
+ The ISO8601 format
+
+
+
+
+ JulianDay format, which is what SQLite uses internally
+
+
+
+
+ The whole number of seconds since the Unix epoch (January 1, 1970).
+
+
+
+
+ Any culture-independent string value that the .NET Framework can interpret as a valid DateTime.
+
+
+
+
+ Any string value that the .NET Framework can interpret as a valid DateTime using the current culture.
+
+
+
+
+ The default format for this provider.
+
+
+
+
+ This enum determines how SQLite treats its journal file.
+
+
+ By default SQLite will create and delete the journal file when needed during a transaction.
+ However, for some computers running certain filesystem monitoring tools, the rapid
+ creation and deletion of the journal file can cause those programs to fail, or to interfere with SQLite.
+
+ If a program or virus scanner is interfering with SQLite's journal file, you may receive errors like "unable to open database file"
+ when starting a transaction. If this is happening, you may want to change the default journal mode to Persist.
+
+
+
+
+ The default mode, this causes SQLite to use the existing journaling mode for the database.
+
+
+
+
+ SQLite will create and destroy the journal file as-needed.
+
+
+
+
+ When this is set, SQLite will keep the journal file even after a transaction has completed. It's contents will be erased,
+ and the journal re-used as often as needed. If it is deleted, it will be recreated the next time it is needed.
+
+
+
+
+ This option disables the rollback journal entirely. Interrupted transactions or a program crash can cause database
+ corruption in this mode!
+
+
+
+
+ SQLite will truncate the journal file to zero-length instead of deleting it.
+
+
+
+
+ SQLite will store the journal in volatile RAM. This saves disk I/O but at the expense of database safety and integrity.
+ If the application using SQLite crashes in the middle of a transaction when the MEMORY journaling mode is set, then the
+ database file will very likely go corrupt.
+
+
+
+
+ SQLite uses a write-ahead log instead of a rollback journal to implement transactions. The WAL journaling mode is persistent;
+ after being set it stays in effect across multiple database connections and after closing and reopening the database. A database
+ in WAL journaling mode can only be accessed by SQLite version 3.7.0 or later.
+
+
+
+
+ Struct used internally to determine the datatype of a column in a resultset
+
+
+
+
+ The DbType of the column, or DbType.Object if it cannot be determined
+
+
+
+
+ The affinity of a column, used for expressions or when Type is DbType.Object
+
+
+
+
+ SQLite implementation of DbDataAdapter.
+
+
+
+
+ This class is just a shell around the DbDataAdapter. Nothing from DbDataAdapter is overridden here, just a few constructors are defined.
+
+
+ Default constructor.
+
+
+
+
+ Constructs a data adapter using the specified select command.
+
+ The select command to associate with the adapter.
+
+
+
+ Constructs a data adapter with the supplied select command text and associated with the specified connection.
+
+ The select command text to associate with the data adapter.
+ The connection to associate with the select command.
+
+
+
+ Constructs a data adapter with the specified select command text, and using the specified database connection string.
+
+ The select command text to use to construct a select command.
+ A connection string suitable for passing to a new SQLiteConnection, which is associated with the select command.
+
+
+
+ Raised by the underlying DbDataAdapter when a row is being updated
+
+ The event's specifics
+
+
+
+ Raised by DbDataAdapter after a row is updated
+
+ The event's specifics
+
+
+
+ Row updating event handler
+
+
+
+
+ Row updated event handler
+
+
+
+
+ Gets/sets the select command for this DataAdapter
+
+
+
+
+ Gets/sets the insert command for this DataAdapter
+
+
+
+
+ Gets/sets the update command for this DataAdapter
+
+
+
+
+ Gets/sets the delete command for this DataAdapter
+
+
+
+
+ SQLite implementation of DbDataReader.
+
+
+
+
+ Underlying command this reader is attached to
+
+
+
+
+ Index of the current statement in the command being processed
+
+
+
+
+ Current statement being Read()
+
+
+
+
+ State of the current statement being processed.
+ -1 = First Step() executed, so the first Read() will be ignored
+ 0 = Actively reading
+ 1 = Finished reading
+ 2 = Non-row-returning statement, no records
+
+
+
+
+ Number of records affected by the insert/update statements executed on the command
+
+
+
+
+ Count of fields (columns) in the row-returning statement currently being processed
+
+
+
+
+ Datatypes of active fields (columns) in the current statement, used for type-restricting data
+
+
+
+
+ The behavior of the datareader
+
+
+
+
+ If set, then dispose of the command object when the reader is finished
+
+
+
+
+ If set, then raise an exception when the object is accessed after being disposed.
+
+
+
+
+ An array of rowid's for the active statement if CommandBehavior.KeyInfo is specified
+
+
+
+
+ Matches the version of the connection.
+
+
+
+
+ The "stub" (i.e. placeholder) base schema name to use when returning
+ column schema information. Matches the base schema name used by the
+ associated connection.
+
+
+
+
+ Internal constructor, initializes the datareader and sets up to begin executing statements
+
+ The SQLiteCommand this data reader is for
+ The expected behavior of the data reader
+
+
+
+ Dispose of all resources used by this datareader.
+
+
+
+
+
+ Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified.
+
+
+
+
+ Throw an error if the datareader is closed
+
+
+
+
+ Throw an error if a row is not loaded
+
+
+
+
+ Enumerator support
+
+ Returns a DbEnumerator object.
+
+
+
+ SQLite is inherently un-typed. All datatypes in SQLite are natively strings. The definition of the columns of a table
+ and the affinity of returned types are all we have to go on to type-restrict data in the reader.
+
+ This function attempts to verify that the type of data being requested of a column matches the datatype of the column. In
+ the case of columns that are not backed into a table definition, we attempt to match up the affinity of a column (int, double, string or blob)
+ to a set of known types that closely match that affinity. It's not an exact science, but its the best we can do.
+
+
+ This function throws an InvalidTypeCast() exception if the requested type doesn't match the column's definition or affinity.
+
+ The index of the column to type-check
+ The type we want to get out of the column
+
+
+
+ Retrieves the column as a boolean value
+
+ The index of the column to retrieve
+ bool
+
+
+
+ Retrieves the column as a single byte value
+
+ The index of the column to retrieve
+ byte
+
+
+
+ Retrieves a column as an array of bytes (blob)
+
+ The index of the column to retrieve
+ The zero-based index of where to begin reading the data
+ The buffer to write the bytes into
+ The zero-based index of where to begin writing into the array
+ The number of bytes to retrieve
+ The actual number of bytes written into the array
+
+ To determine the number of bytes in the column, pass a null value for the buffer. The total length will be returned.
+
+
+
+
+ Returns the column as a single character
+
+ The index of the column to retrieve
+ char
+
+
+
+ Retrieves a column as an array of chars (blob)
+
+ The index of the column to retrieve
+ The zero-based index of where to begin reading the data
+ The buffer to write the characters into
+ The zero-based index of where to begin writing into the array
+ The number of bytes to retrieve
+ The actual number of characters written into the array
+
+ To determine the number of characters in the column, pass a null value for the buffer. The total length will be returned.
+
+
+
+
+ Retrieves the name of the back-end datatype of the column
+
+ The index of the column to retrieve
+ string
+
+
+
+ Retrieve the column as a date/time value
+
+ The index of the column to retrieve
+ DateTime
+
+
+
+ Retrieve the column as a decimal value
+
+ The index of the column to retrieve
+ decimal
+
+
+
+ Returns the column as a double
+
+ The index of the column to retrieve
+ double
+
+
+
+ Returns the .NET type of a given column
+
+ The index of the column to retrieve
+ Type
+
+
+
+ Returns a column as a float value
+
+ The index of the column to retrieve
+ float
+
+
+
+ Returns the column as a Guid
+
+ The index of the column to retrieve
+ Guid
+
+
+
+ Returns the column as a short
+
+ The index of the column to retrieve
+ Int16
+
+
+
+ Retrieves the column as an int
+
+ The index of the column to retrieve
+ Int32
+
+
+
+ Retrieves the column as a long
+
+ The index of the column to retrieve
+ Int64
+
+
+
+ Retrieves the name of the column
+
+ The index of the column to retrieve
+ string
+
+
+
+ Retrieves the i of a column, given its name
+
+ The name of the column to retrieve
+ The int i of the column
+
+
+
+ Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done
+ to gather the necessary information so it can be represented in an ADO.NET manner.
+
+ Returns a DataTable containing the schema information for the active SELECT statement being processed.
+
+
+
+ Retrieves the column as a string
+
+ The index of the column to retrieve
+ string
+
+
+
+ Retrieves the column as an object corresponding to the underlying datatype of the column
+
+ The index of the column to retrieve
+ object
+
+
+
+ Retreives the values of multiple columns, up to the size of the supplied array
+
+ The array to fill with values from the columns in the current resultset
+ The number of columns retrieved
+
+
+
+ Returns True if the specified column is null
+
+ The index of the column to retrieve
+ True or False
+
+
+
+ Moves to the next resultset in multiple row-returning SQL command.
+
+ True if the command was successful and a new resultset is available, False otherwise.
+
+
+
+ Retrieves the SQLiteType for a given column, and caches it to avoid repetetive interop calls.
+
+ The index of the column to retrieve
+ A SQLiteType structure
+
+
+
+ Reads the next row from the resultset
+
+ True if a new row was successfully loaded and is ready for processing
+
+
+
+ Not implemented. Returns 0
+
+
+
+
+ Returns the number of columns in the current resultset
+
+
+
+
+ Returns the number of visible fielsd in the current resultset
+
+
+
+
+ Returns True if the resultset has rows that can be fetched
+
+
+
+
+ Returns True if the data reader is closed
+
+
+
+
+ Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed!
+
+
+
+
+ Indexer to retrieve data from a column given its name
+
+ The name of the column to retrieve data for
+ The value contained in the column
+
+
+
+ Indexer to retrieve data from a column given its i
+
+ The index of the column to retrieve
+ The value contained in the column
+
+
+
+ SQLite exception class.
+
+
+
+
+ Public constructor for generating a SQLite error given the base error code
+
+ The SQLite error code to report
+ Extra text to go along with the error message text
+
+
+
+ Various public constructors that just pass along to the base Exception
+
+ Passed verbatim to Exception
+
+
+
+ Various public constructors that just pass along to the base Exception
+
+
+
+
+ Various public constructors that just pass along to the base Exception
+ Passed to Exception
+ Passed to Exception
+
+
+
+
+ Initializes the exception class with the SQLite error code.
+
+ The SQLite error code
+ A detailed error message
+ An error message string
+
+
+
+ Retrieves the underlying SQLite error code for this exception
+
+
+
+
+ SQLite error codes
+
+
+
+
+ Success
+
+
+
+
+ SQL error or missing database
+
+
+
+
+ Internal logic error in SQLite
+
+
+
+
+ Access permission denied
+
+
+
+
+ Callback routine requested an abort
+
+
+
+
+ The database file is locked
+
+
+
+
+ A table in the database is locked
+
+
+
+
+ malloc() failed
+
+
+
+
+ Attempt to write a read-only database
+
+
+
+
+ Operation terminated by sqlite3_interrupt()
+
+
+
+
+ Some kind of disk I/O error occurred
+
+
+
+
+ The database disk image is malformed
+
+
+
+
+ Table or record not found
+
+
+
+
+ Insertion failed because database is full
+
+
+
+
+ Unable to open the database file
+
+
+
+
+ Database lock protocol error
+
+
+
+
+ Database is empty
+
+
+
+
+ The database schema changed
+
+
+
+
+ Too much data for one row of a table
+
+
+
+
+ Abort due to constraint violation
+
+
+
+
+ Data type mismatch
+
+
+
+
+ Library used incorrectly
+
+
+
+
+ Uses OS features not supported on host
+
+
+
+
+ Authorization denied
+
+
+
+
+ Auxiliary database format error
+
+
+
+
+ 2nd parameter to sqlite3_bind out of range
+
+
+
+
+ File opened that is not a database file
+
+
+
+
+ sqlite3_step() has another row ready
+
+
+
+
+ sqlite3_step() has finished executing
+
+
+
+
+ SQLite implementation of DbProviderFactory.
+
+
+ SQLite implementation of DbProviderFactory.
+
+
+
+
+ Constructs a new SQLiteFactory object
+
+
+ Default constructor
+
+
+
+
+ Static instance member which returns an instanced SQLiteFactory class.
+
+
+
+
+ Returns a new SQLiteCommand object.
+
+ A SQLiteCommand object.
+
+
+
+ Returns a new SQLiteCommandBuilder object.
+
+ A SQLiteCommandBuilder object.
+
+
+
+ Creates a new SQLiteConnection.
+
+ A SQLiteConnection object.
+
+
+
+ Creates a new SQLiteConnectionStringBuilder.
+
+ A SQLiteConnectionStringBuilder object.
+
+
+
+ Creates a new SQLiteDataAdapter.
+
+ A SQLiteDataAdapter object.
+
+
+
+ Creates a new SQLiteParameter.
+
+ A SQLiteParameter object.
+
+
+
+ Will provide a DbProviderServices object in .NET 3.5
+
+ The class or interface type to query for
+
+
+
+
+ This event is raised whenever SQLite raises a logging event.
+ Note that this should be set as one of the first things in the
+ application. This event is provided for backward compatibility only.
+ New code should use the SQLiteLog class instead.
+
+
+
+
+ This abstract class is designed to handle user-defined functions easily. An instance of the derived class is made for each
+ connection to the database.
+
+
+ Although there is one instance of a class derived from SQLiteFunction per database connection, the derived class has no access
+ to the underlying connection. This is necessary to deter implementers from thinking it would be a good idea to make database
+ calls during processing.
+
+ It is important to distinguish between a per-connection instance, and a per-SQL statement context. One instance of this class
+ services all SQL statements being stepped through on that connection, and there can be many. One should never store per-statement
+ information in member variables of user-defined function classes.
+
+ For aggregate functions, always create and store your per-statement data in the contextData object on the 1st step. This data will
+ be automatically freed for you (and Dispose() called if the item supports IDisposable) when the statement completes.
+
+
+
+
+ The base connection this function is attached to
+
+
+
+
+ Internal array used to keep track of aggregate function context data
+
+
+
+
+ Holds a reference to the callback function for user functions
+
+
+
+
+ Holds a reference to the callbakc function for stepping in an aggregate function
+
+
+
+
+ Holds a reference to the callback function for finalizing an aggregate function
+
+
+
+
+ Holds a reference to the callback function for collation sequences
+
+
+
+
+ Current context of the current callback. Only valid during a callback
+
+
+
+
+ This static list contains all the user-defined functions declared using the proper attributes.
+
+
+
+
+ Internal constructor, initializes the function's internal variables.
+
+
+
+
+ Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if
+ someone closes the connection while a DataReader is open.
+
+
+
+
+ Placeholder for a user-defined disposal routine
+
+ True if the object is being disposed explicitly
+
+
+
+ Scalar functions override this method to do their magic.
+
+
+ Parameters passed to functions have only an affinity for a certain data type, there is no underlying schema available
+ to force them into a certain type. Therefore the only types you will ever see as parameters are
+ DBNull.Value, Int64, Double, String or byte[] array.
+
+ The arguments for the command to process
+ You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or
+ you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error,
+ just return it!
+
+
+
+ Aggregate functions override this method to do their magic.
+
+
+ Typically you'll be updating whatever you've placed in the contextData field and returning as quickly as possible.
+
+ The arguments for the command to process
+ The 1-based step number. This is incrememted each time the step method is called.
+ A placeholder for implementers to store contextual data pertaining to the current context.
+
+
+
+ Aggregate functions override this method to finish their aggregate processing.
+
+
+ If you implemented your aggregate function properly,
+ you've been recording and keeping track of your data in the contextData object provided, and now at this stage you should have
+ all the information you need in there to figure out what to return.
+ NOTE: It is possible to arrive here without receiving a previous call to Step(), in which case the contextData will
+ be null. This can happen when no rows were returned. You can either return null, or 0 or some other custom return value
+ if that is the case.
+
+ Your own assigned contextData, provided for you so you can return your final results.
+ You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or
+ you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error,
+ just return it!
+
+
+
+
+ User-defined collation sequences override this method to provide a custom string sorting algorithm.
+
+ The first string to compare
+ The second strnig to compare
+ 1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2
+
+
+
+ Converts an IntPtr array of context arguments to an object array containing the resolved parameters the pointers point to.
+
+
+ Parameters passed to functions have only an affinity for a certain data type, there is no underlying schema available
+ to force them into a certain type. Therefore the only types you will ever see as parameters are
+ DBNull.Value, Int64, Double, String or byte[] array.
+
+ The number of arguments
+ A pointer to the array of arguments
+ An object array of the arguments once they've been converted to .NET values
+
+
+
+ Takes the return value from Invoke() and Final() and figures out how to return it to SQLite's context.
+
+ The context the return value applies to
+ The parameter to return to SQLite
+
+
+
+ Internal scalar callback function, which wraps the raw context pointer and calls the virtual Invoke() method.
+
+ A raw context pointer
+ Number of arguments passed in
+ A pointer to the array of arguments
+
+
+
+ Internal collation sequence function, which wraps up the raw string pointers and executes the Compare() virtual function.
+
+ Not used
+ Length of the string pv1
+ Pointer to the first string to compare
+ Length of the string pv2
+ Pointer to the second string to compare
+ Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater
+ than the second.
+
+
+
+ The internal aggregate Step function callback, which wraps the raw context pointer and calls the virtual Step() method.
+
+
+ This function takes care of doing the lookups and getting the important information put together to call the Step() function.
+ That includes pulling out the user's contextData and updating it after the call is made. We use a sorted list for this so
+ binary searches can be done to find the data.
+
+ A raw context pointer
+ Number of arguments passed in
+ A pointer to the array of arguments
+
+
+
+ An internal aggregate Final function callback, which wraps the context pointer and calls the virtual Final() method.
+
+ A raw context pointer
+
+
+
+ Using reflection, enumerate all assemblies in the current appdomain looking for classes that
+ have a SQLiteFunctionAttribute attribute, and registering them accordingly.
+
+
+
+
+ Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work
+ properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.
+
+ The type of the function to register
+
+
+
+ Called by SQLiteBase derived classes, this function binds all user-defined functions to a connection.
+ It is done this way so that all user-defined functions will access the database using the same encoding scheme
+ as the connection (UTF-8 or UTF-16).
+
+
+ The wrapper functions that interop with SQLite will create a unique cookie value, which internally is a pointer to
+ all the wrapped callback functions. The interop function uses it to map CDecl callbacks to StdCall callbacks.
+
+ The base object on which the functions are to bind
+ Returns an array of functions which the connection object should retain until the connection is closed.
+
+
+
+ Returns a reference to the underlying connection's SQLiteConvert class, which can be used to convert
+ strings and DateTime's into the current connection's encoding schema.
+
+
+
+
+ Extends SQLiteFunction and allows an inherited class to obtain the collating sequence associated with a function call.
+
+
+ User-defined functions can call the GetCollationSequence() method in this class and use it to compare strings and char arrays.
+
+
+
+
+ Obtains the collating sequence in effect for the given function.
+
+
+
+
+
+ The type of user-defined function to declare
+
+
+
+
+ Scalar functions are designed to be called and return a result immediately. Examples include ABS(), Upper(), Lower(), etc.
+
+
+
+
+ Aggregate functions are designed to accumulate data until the end of a call and then return a result gleaned from the accumulated data.
+ Examples include SUM(), COUNT(), AVG(), etc.
+
+
+
+
+ Collation sequences are used to sort textual data in a custom manner, and appear in an ORDER BY clause. Typically text in an ORDER BY is
+ sorted using a straight case-insensitive comparison function. Custom collating sequences can be used to alter the behavior of text sorting
+ in a user-defined manner.
+
+
+
+
+ An internal callback delegate declaration.
+
+ Raw context pointer for the user function
+ Count of arguments to the function
+ A pointer to the array of argument pointers
+
+
+
+ An internal final callback delegate declaration.
+
+ Raw context pointer for the user function
+
+
+
+ Internal callback delegate for implementing collation sequences
+
+ Not used
+ Length of the string pv1
+ Pointer to the first string to compare
+ Length of the string pv2
+ Pointer to the second string to compare
+ Returns -1 if the first string is less than the second. 0 if they are equal, or 1 if the first string is greater
+ than the second.
+
+
+
+ The type of collating sequence
+
+
+
+
+ The built-in BINARY collating sequence
+
+
+
+
+ The built-in NOCASE collating sequence
+
+
+
+
+ The built-in REVERSE collating sequence
+
+
+
+
+ A custom user-defined collating sequence
+
+
+
+
+ The encoding type the collation sequence uses
+
+
+
+
+ The collation sequence is UTF8
+
+
+
+
+ The collation sequence is UTF16 little-endian
+
+
+
+
+ The collation sequence is UTF16 big-endian
+
+
+
+
+ A struct describing the collating sequence a function is executing in
+
+
+
+
+ The name of the collating sequence
+
+
+
+
+ The type of collating sequence
+
+
+
+
+ The text encoding of the collation sequence
+
+
+
+
+ Context of the function that requested the collating sequence
+
+
+
+
+ Calls the base collating sequence to compare two strings
+
+ The first string to compare
+ The second string to compare
+ -1 if s1 is less than s2, 0 if s1 is equal to s2, and 1 if s1 is greater than s2
+
+
+
+ Calls the base collating sequence to compare two character arrays
+
+ The first array to compare
+ The second array to compare
+ -1 if c1 is less than c2, 0 if c1 is equal to c2, and 1 if c1 is greater than c2
+
+
+
+ A simple custom attribute to enable us to easily find user-defined functions in
+ the loaded assemblies and initialize them in SQLite as connections are made.
+
+
+
+
+ Default constructor, initializes the internal variables for the function.
+
+
+
+
+ The function's name as it will be used in SQLite command text.
+
+
+
+
+ The number of arguments this function expects. -1 if the number of arguments is variable.
+
+
+
+
+ The type of function this implementation will be.
+
+
+
+
+ This class provides key info for a given SQLite statement.
+
+ Providing key information for a given statement is non-trivial :(
+
+
+
+
+
+ This function does all the nasty work at determining what keys need to be returned for
+ a given statement.
+
+
+
+
+
+
+
+ Make sure all the subqueries are open and ready and sync'd with the current rowid
+ of the table they're supporting
+
+
+
+
+ Release any readers on any subqueries
+
+
+
+
+ Append all the columns we've added to the original query to the schema
+
+
+
+
+
+ How many additional columns of keyinfo we're holding
+
+
+
+
+ Used to support CommandBehavior.KeyInfo
+
+
+
+
+ A single sub-query for a given table/database.
+
+
+
+
+ Passed during an Log callback
+
+
+
+
+ The error code.
+
+
+
+
+ SQL statement text as the statement first begins executing
+
+
+
+
+ Extra data associated with this event, if any.
+
+
+
+
+ Constructs the LogEventArgs object.
+
+ Should be null.
+ The SQLite error code.
+ The error message, if any.
+ The extra data, if any.
+
+
+
+ Raised when a log event occurs.
+
+ The current connection
+ Event arguments of the trace
+
+
+
+ Manages the SQLite custom logging functionality and the associated
+ callback for the whole process.
+
+
+
+
+ Object used to synchronize access to the static instance data
+ for this class.
+
+
+
+
+ Member variable to store the AppDomain.DomainUnload event handler.
+
+
+
+
+ The default log event handler.
+
+
+
+
+ The log callback passed to native SQLite engine. This must live
+ as long as the SQLite library has a pointer to it.
+
+
+
+
+ The base SQLite object to interop with.
+
+
+
+
+ This will be non-zero if logging is currently enabled.
+
+
+
+
+ Initializes the SQLite logging facilities.
+
+
+
+
+ Handles the AppDomain being unloaded.
+
+
+
+
+
+
+ Log a message to all the registered log event handlers without going
+ through the SQLite library.
+
+ The error code or zero for success.
+ The message to be logged.
+
+
+
+ Creates and initializes the default log event handler.
+
+
+
+
+ Adds the default log event handler to the list of handlers.
+
+
+
+
+ Removes the default log event handler from the list of handlers.
+
+
+
+
+ Internal proxy function that calls any registered application log
+ event handlers.
+
+
+
+
+ Default logger. Currently, uses the Trace class (i.e. sends events
+ to the current trace listeners, if any).
+
+ Should be null.
+ The data associated with this event.
+
+
+
+ Member variable to store the application log handler to call.
+
+
+
+
+ This event is raised whenever SQLite raises a logging event.
+ Note that this should be set as one of the first things in the
+ application.
+
+
+
+
+ If this property is true, logging is enabled; otherwise, logging is
+ disabled. When logging is disabled, no logging events will fire.
+
+
+
+
+ MetaDataCollections specific to SQLite
+
+
+
+
+ Returns a list of databases attached to the connection
+
+
+
+
+ Returns column information for the specified table
+
+
+
+
+ Returns index information for the optionally-specified table
+
+
+
+
+ Returns base columns for the given index
+
+
+
+
+ Returns the tables in the given catalog
+
+
+
+
+ Returns user-defined views in the given catalog
+
+
+
+
+ Returns underlying column information on the given view
+
+
+
+
+ Returns foreign key information for the given catalog
+
+
+
+
+ Returns the triggers on the database
+
+
+
+
+ SQLite implementation of DbParameter.
+
+
+
+
+ The data type of the parameter
+
+
+
+
+ The version information for mapping the parameter
+
+
+
+
+ The value of the data in the parameter
+
+
+
+
+ The source column for the parameter
+
+
+
+
+ The column name
+
+
+
+
+ The data size, unused by SQLite
+
+
+
+
+ Default constructor
+
+
+
+
+ Constructs a named parameter given the specified parameter name
+
+ The parameter name
+
+
+
+ Constructs a named parameter given the specified parameter name and initial value
+
+ The parameter name
+ The initial value of the parameter
+
+
+
+ Constructs a named parameter of the specified type
+
+ The parameter name
+ The datatype of the parameter
+
+
+
+ Constructs a named parameter of the specified type and source column reference
+
+ The parameter name
+ The data type
+ The source column
+
+
+
+ Constructs a named parameter of the specified type, source column and row version
+
+ The parameter name
+ The data type
+ The source column
+ The row version information
+
+
+
+ Constructs an unnamed parameter of the specified data type
+
+ The datatype of the parameter
+
+
+
+ Constructs an unnamed parameter of the specified data type and sets the initial value
+
+ The datatype of the parameter
+ The initial value of the parameter
+
+
+
+ Constructs an unnamed parameter of the specified data type and source column
+
+ The datatype of the parameter
+ The source column
+
+
+
+ Constructs an unnamed parameter of the specified data type, source column and row version
+
+ The data type
+ The source column
+ The row version information
+
+
+
+ Constructs a named parameter of the specified type and size
+
+ The parameter name
+ The data type
+ The size of the parameter
+
+
+
+ Constructs a named parameter of the specified type, size and source column
+
+ The name of the parameter
+ The data type
+ The size of the parameter
+ The source column
+
+
+
+ Constructs a named parameter of the specified type, size, source column and row version
+
+ The name of the parameter
+ The data type
+ The size of the parameter
+ The source column
+ The row version information
+
+
+
+ Constructs a named parameter of the specified type, size, source column and row version
+
+ The name of the parameter
+ The data type
+ The size of the parameter
+ Only input parameters are supported in SQLite
+ Ignored
+ Ignored
+ Ignored
+ The source column
+ The row version information
+ The initial value to assign the parameter
+
+
+
+ Constructs a named parameter, yet another flavor
+
+ The name of the parameter
+ The data type
+ The size of the parameter
+ Only input parameters are supported in SQLite
+ Ignored
+ Ignored
+ The source column
+ The row version information
+ Whether or not this parameter is for comparing NULL's
+ The intial value to assign the parameter
+
+
+
+ Constructs an unnamed parameter of the specified type and size
+
+ The data type
+ The size of the parameter
+
+
+
+ Constructs an unnamed parameter of the specified type, size, and source column
+
+ The data type
+ The size of the parameter
+ The source column
+
+
+
+ Constructs an unnamed parameter of the specified type, size, source column and row version
+
+ The data type
+ The size of the parameter
+ The source column
+ The row version information
+
+
+
+ Resets the DbType of the parameter so it can be inferred from the value
+
+
+
+
+ Clones a parameter
+
+ A new, unassociated SQLiteParameter
+
+
+
+ Whether or not the parameter can contain a null value
+
+
+
+
+ Returns the datatype of the parameter
+
+
+
+
+ Supports only input parameters
+
+
+
+
+ Returns the parameter name
+
+
+
+
+ Returns the size of the parameter
+
+
+
+
+ Gets/sets the source column
+
+
+
+
+ Used by DbCommandBuilder to determine the mapping for nullable fields
+
+
+
+
+ Gets and sets the row version
+
+
+
+
+ Gets and sets the parameter value. If no datatype was specified, the datatype will assume the type from the value given.
+
+
+
+
+ SQLite implementation of DbParameterCollection.
+
+
+
+
+ The underlying command to which this collection belongs
+
+
+
+
+ The internal array of parameters in this collection
+
+
+
+
+ Determines whether or not all parameters have been bound to their statement(s)
+
+
+
+
+ Initializes the collection
+
+ The command to which the collection belongs
+
+
+
+ Retrieves an enumerator for the collection
+
+ An enumerator for the underlying array
+
+
+
+ Adds a parameter to the collection
+
+ The parameter name
+ The data type
+ The size of the value
+ The source column
+ A SQLiteParameter object
+
+
+
+ Adds a parameter to the collection
+
+ The parameter name
+ The data type
+ The size of the value
+ A SQLiteParameter object
+
+
+
+ Adds a parameter to the collection
+
+ The parameter name
+ The data type
+ A SQLiteParameter object
+
+
+
+ Adds a parameter to the collection
+
+ The parameter to add
+ A zero-based index of where the parameter is located in the array
+
+
+
+ Adds a parameter to the collection
+
+ The parameter to add
+ A zero-based index of where the parameter is located in the array
+
+
+
+ Adds a named/unnamed parameter and its value to the parameter collection.
+
+ Name of the parameter, or null to indicate an unnamed parameter
+ The initial value of the parameter
+ Returns the SQLiteParameter object created during the call.
+
+
+
+ Adds an array of parameters to the collection
+
+ The array of parameters to add
+
+
+
+ Adds an array of parameters to the collection
+
+ The array of parameters to add
+
+
+
+ Clears the array and resets the collection
+
+
+
+
+ Determines if the named parameter exists in the collection
+
+ The name of the parameter to check
+ True if the parameter is in the collection
+
+
+
+ Determines if the parameter exists in the collection
+
+ The SQLiteParameter to check
+ True if the parameter is in the collection
+
+
+
+ Not implemented
+
+
+
+
+
+
+ Retrieve a parameter by name from the collection
+
+ The name of the parameter to fetch
+ A DbParameter object
+
+
+
+ Retrieves a parameter by its index in the collection
+
+ The index of the parameter to retrieve
+ A DbParameter object
+
+
+
+ Returns the index of a parameter given its name
+
+ The name of the parameter to find
+ -1 if not found, otherwise a zero-based index of the parameter
+
+
+
+ Returns the index of a parameter
+
+ The parameter to find
+ -1 if not found, otherwise a zero-based index of the parameter
+
+
+
+ Inserts a parameter into the array at the specified location
+
+ The zero-based index to insert the parameter at
+ The parameter to insert
+
+
+
+ Removes a parameter from the collection
+
+ The parameter to remove
+
+
+
+ Removes a parameter from the collection given its name
+
+ The name of the parameter to remove
+
+
+
+ Removes a parameter from the collection given its index
+
+ The zero-based parameter index to remove
+
+
+
+ Re-assign the named parameter to a new parameter object
+
+ The name of the parameter to replace
+ The new parameter
+
+
+
+ Re-assign a parameter at the specified index
+
+ The zero-based index of the parameter to replace
+ The new parameter
+
+
+
+ Un-binds all parameters from their statements
+
+
+
+
+ This function attempts to map all parameters in the collection to all statements in a Command.
+ Since named parameters may span multiple statements, this function makes sure all statements are bound
+ to the same named parameter. Unnamed parameters are bound in sequence.
+
+
+
+
+ Returns true
+
+
+
+
+ Returns false
+
+
+
+
+ Returns false
+
+
+
+
+ Returns null
+
+
+
+
+ Returns a count of parameters in the collection
+
+
+
+
+ Overloaded to specialize the return value of the default indexer
+
+ Name of the parameter to get/set
+ The specified named SQLite parameter
+
+
+
+ Overloaded to specialize the return value of the default indexer
+
+ The index of the parameter to get/set
+ The specified SQLite parameter
+
+
+
+ Represents a single SQL statement in SQLite.
+
+
+
+
+ The underlying SQLite object this statement is bound to
+
+
+
+
+ The command text of this SQL statement
+
+
+
+
+ The actual statement pointer
+
+
+
+
+ An index from which unnamed parameters begin
+
+
+
+
+ Names of the parameters as SQLite understands them to be
+
+
+
+
+ Parameters for this statement
+
+
+
+
+ Command this statement belongs to (if any)
+
+
+
+
+ Initializes the statement and attempts to get all information about parameters in the statement
+
+ The base SQLite object
+ The statement
+ The command text for this statement
+ The previous command in a multi-statement command
+
+
+
+ Disposes and finalizes the statement
+
+
+
+
+ Called by SQLiteParameterCollection, this function determines if the specified parameter name belongs to
+ this statement, and if so, keeps a reference to the parameter so it can be bound later.
+
+ The parameter name to map
+ The parameter to assign it
+
+
+
+ Bind all parameters, making sure the caller didn't miss any
+
+
+
+
+ Attempts to convert an arbitrary object to the Boolean data type.
+ Null object values are converted to false. Throws a SQLiteException
+ upon failure.
+
+ The object value to convert.
+ The format provider to use.
+ The converted boolean value.
+
+
+
+ Perform the bind operation for an individual parameter
+
+ The index of the parameter to bind
+ The parameter we're binding
+
+
+
+ SQLite implementation of DbTransaction.
+
+
+
+
+ The connection to which this transaction is bound
+
+
+
+
+ Constructs the transaction object, binding it to the supplied connection
+
+ The connection to open a transaction on
+ TRUE to defer the writelock, or FALSE to lock immediately
+
+
+
+ Disposes the transaction. If it is currently active, any changes are rolled back.
+
+
+
+
+ Commits the current transaction.
+
+
+
+
+ Rolls back the active transaction.
+
+
+
+
+ Returns the underlying connection to which this transaction applies.
+
+
+
+
+ Forwards to the local Connection property
+
+
+
+
+ Gets the isolation level of the transaction. SQLite only supports Serializable transactions.
+
+
+
+
+ A strongly-typed resource class, for looking up localized strings, etc.
+
+
+
+
+ Returns the cached ResourceManager instance used by this class.
+
+
+
+
+ Overrides the current thread's CurrentUICulture property for all
+ resource lookups using this strongly typed resource class.
+
+
+
+
+ Looks up a localized string similar to <?xml version="1.0" standalone="yes"?>
+ <DocumentElement>
+ <DataTypes>
+ <TypeName>smallint</TypeName>
+ <ProviderDbType>10</ProviderDbType>
+ <ColumnSize>5</ColumnSize>
+ <DataType>System.Int16</DataType>
+ <CreateFormat>smallint</CreateFormat>
+ <IsAutoIncrementable>false</IsAutoIncrementable>
+ <IsCaseSensitive>false</IsCaseSensitive>
+ <IsFixedLength>true</IsFixedLength>
+ <IsFixedPrecisionScale>true</IsFixedPrecisionScale>
+ <IsLong>false</IsLong>
+ <IsNullable>true</ [rest of string was truncated]";.
+
+
+
+
+ Looks up a localized string similar to ALL,ALTER,AND,AS,AUTOINCREMENT,BETWEEN,BY,CASE,CHECK,COLLATE,COMMIT,CONSTRAINT,CREATE,CROSS,DEFAULT,DEFERRABLE,DELETE,DISTINCT,DROP,ELSE,ESCAPE,EXCEPT,FOREIGN,FROM,FULL,GROUP,HAVING,IN,INDEX,INNER,INSERT,INTERSECT,INTO,IS,ISNULL,JOIN,LEFT,LIMIT,NATURAL,NOT,NOTNULL,NULL,ON,OR,ORDER,OUTER,PRIMARY,REFERENCES,RIGHT,ROLLBACK,SELECT,SET,TABLE,THEN,TO,TRANSACTION,UNION,UNIQUE,UPDATE,USING,VALUES,WHEN,WHERE.
+
+
+
+
+ Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?>
+ <DocumentElement>
+ <MetaDataCollections>
+ <CollectionName>MetaDataCollections</CollectionName>
+ <NumberOfRestrictions>0</NumberOfRestrictions>
+ <NumberOfIdentifierParts>0</NumberOfIdentifierParts>
+ </MetaDataCollections>
+ <MetaDataCollections>
+ <CollectionName>DataSourceInformation</CollectionName>
+ <NumberOfRestrictions>0</NumberOfRestrictions>
+ <NumberOfIdentifierParts>0</NumberOfIdentifierParts>
+ </MetaDataCollections>
+ <MetaDataC [rest of string was truncated]";.
+
+
+
+
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/TibisMathematicsSuite.vshost.exe.manifest b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/TibisMathematicsSuite.vshost.exe.manifest
new file mode 100644
index 0000000..f96b1d6
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/TibisMathematicsSuite.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-2ndf.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-2ndf.htm
new file mode 100644
index 0000000..07a7445
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-2ndf.htm
@@ -0,0 +1,40 @@
+
+
+
+
+ Scientific Calculator: 2nd function button
+
+
+
+
+
+
Scientific Calculator: 2nd function button
+
+
+
+
+ When activated, an indicator shows up on the display.
+
+
+
Description
+
+
The 2nd function button is used to change the function of a button when clicked.
+
Usually, the 2nd function is the inverse of the function the button is assigned to. The exact function is displayed in gray above each button. You can find more information about the function and 2nd function of a button when hovering over the button with the mouse.
+
You can also use the 2nd function of a button using the right mouse button.
+
+
+
+
Example
+
+
+
To calculate the square root of a number, you have to press 2ndf and then the x2 button.
+
Note: You can also right click the x2 button.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-abs.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-abs.htm
new file mode 100644
index 0000000..0c07abb
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-abs.htm
@@ -0,0 +1,31 @@
+
+
+
+
+ Scientific Calculator: Absolute
+
+
+
+
+
+
Scientific Calculator: Absolute
+
+
+
Description
+
+
In mathematics, the absolute (modulus) of a number, denoted by |n|, is equal to the number without regard to its sign.
+
+
+
+
+
Examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-buttons.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-buttons.htm
new file mode 100644
index 0000000..b2c88bb
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-buttons.htm
@@ -0,0 +1,377 @@
+
+
+
+
+ Scientific Calculator: Buttons
+
+
+
+
+
+
+
Scientific Calculator: Buttons
+
+
+
Buttons
+
+
+
+
Button
Description
Article
+
+
+
+
+
+
Adds a number to another.
+
+
+
+
-
+
Subtracts a number from another.
+
+
+
+
*
+
Multiplies 2 numbers.
+
+
+
+
/
+
Divide a number by another.
+
+
+
+
±
+
Toggle sign.
+
+
+
+
MOD
+
Calculates the remainder of division between 2 numbers.
+
+
+
+
AC
+
Resets any calculation.
+
+
+
+
Clear
+
Deletes the current number.
+
+
+
+
⌫
+
Removes the last inserted number.
+
+
+
+
+
+
Help
+
Opens help for the application.
+
+
+
+
M+
+
Adds the number on the display to memory.
+
+
+
+
M-
+
Subtracts the number on the display from memory.
+
+
+
+
MC
+
Memory Clear: Clears the memory content.
+
+
+
+
MS
+
Memory Set: Sets the memory content to the number on the display.
+
+
+
+
MR
+
Memory Recall: Displays the memory content on the display.
+
+
+
+
+
+
2ndf
+
Activates alternative function for the next button pressed.
+
+
+
+
+
en
+
Exponential function.
+
+
+
+
+
ln
+
Calculates natural logarithm.
+
+
+
+
+
+
10n
+
Calculates 10 at nth power.
+
+
+
+
+
log
+
Calculates decimal logarithm.
+
+
+
+
+
logn x
+
Calculates logarithm of x in base n.
+
+
+
+
+
+
+
{x}
+
Calculates fractional part of a number.
+
+
+
+
+
[x]
+
Calculates integer part of a number.
+
+
+
+
+
+
-Abs
+
Calculates negative absolute of a number.
+
+
+
+
+
Abs
+
Calculates absolute of a number.
+
+
+
+
+
+
1/x
+
Calculates the multiplicative inverse of a number.
+
+
+
+
+
+
n√x
+
Calculates nth root of a number.
+
+
+
+
+
xn
+
Calculates x at nth power.
+
+
+
+
+
+
+
arcsin
+
Calculates arcsine of a number (result is in radians).
+
+
+
+
+
sin
+
Calculates sine of a number (in radians).
+
+
+
+
+
+
arccos
+
Calculates arccosine of a number (result is in radians).
+
+
+
+
+
cos
+
Calculates cosine of a number (in radians).
+
+
+
+
+
+
arctan
+
Calculates arctangent of a number (result is in radians).
+
+
+
+
+
tan
+
Calculates tangent of a number (in radians).
+
+
+
+
+
+
√x
+
Calculates square root of a number.
+
+
+
+
+
x2
+
Calculates x squared.
+
+
+
+
+
+
+
arcsinh
+
Calculates hyperbolic arcsine of a number.
+
+
+
+
+
sinh
+
Calculates hyperbolic sine of a number.
+
+
+
+
+
+
arccosh
+
Calculates hyperbolic arccosine of a number.
+
+
+
+
+
cosh
+
Calculates hyperbolic cosine of a number.
+
+
+
+
+
+
arctanh
+
Calculates hyperbolic arctangent of a number.
+
+
+
+
+
tanh
+
Calculates hyperbolic tangent of a number.
+
+
+
+
+
+
3√x
+
Calculates cube root of a number.
+
+
+
+
+
x3
+
Calculates cube of x.
+
+
+
+
+
+
+
2π
+
Displays double value of pi.
+
+
+
+
+
2π
+
Displays pi constant.
+
+
+
+
+
+
e
+
Displays e constant.
+
+
+
+
+
+
xPy
+
Calculates arrangements of y items from x.
+
+
+
+
+
xCy
+
Calculates combinations of y items from x.
+
+
+
+
+
+
x!
+
Calculates factorial of x.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-combinatorics.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-combinatorics.htm
new file mode 100644
index 0000000..4c13bff
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-combinatorics.htm
@@ -0,0 +1,73 @@
+
+
+
+
+ Scientific Calculator: Combinatorics
+
+
+
+
+
+
Scientific Calculator: Combinatorics
+
+
Factorial
+
+
In mathematics, the factorial of a natural number, denoted by n!, is the product of all natural numbers smaller or equal to n.
+
+
+
+
This can also be written as:
+
+
+
By convention, 0! = 1.
+
Example:
+
+
+
+
+
+
Permutations
+
+
In mathematics, a permutation of a set of objects is defined as a particular order of the items.
+
For example, the permutations of the set {1, 2, 3} are: (1, 2, 3); (1, 3, 2); (2, 1, 3); (2, 3, 1); (3, 1, 2); (3, 2, 1);
+
+
The number of permutations for a set is given by n!.
+
+
+
+
+
Permutations of k objects
+
+
Example: the permutations of 2 items from the set {1, 2, 3} are:
+ (1, 2); (2, 1); (1, 3); (3, 1); (2, 3); (3, 2);
+
+
The number of permutations of k objects is given by the formula:
+
+
After making the simplifications, we get:
+
+
+
+
+
+
Combinations
+
+
In mathematics, a combination is a method of selecting a number of objects from a larger set, where order doesn't matter.
+
+
For example, the combinations of 2 items from the set {1, 2, 3} are:
+ {1, 2}; {1, 3}; {2, 3};
+
+
The number of combinations is given by the formula:
+
+
After making the simplifications, we get:
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-constants.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-constants.htm
new file mode 100644
index 0000000..dd62e06
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-constants.htm
@@ -0,0 +1,42 @@
+
+
+
+
+ Scientific Calculator: Constants
+
+
+
+
+
+
Scientific Calculator: Constants
+
+
π
+
+
π (sometimes written pi) is a mathematical constant that is the ratio of any Euclidian circle's circumference to its diameter.
+
The approximate value of pi is:
+
+
+
Pi has many uses in mathematics, science and engineering, making it one of the most important constants. For some additional information about pi in mathematics (geometry), you can check the trigonometry section.
+
+
+
+
e
+
+
e is an important mathematical constant that is the base of natural logarithms.
+
+
The constant is the result of the following limit:
+
+
+
The approximate value of e is:
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-int.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-int.htm
new file mode 100644
index 0000000..393d75d
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator-int.htm
@@ -0,0 +1,52 @@
+
+
+
+
+ Scientific Calculator: Integer and fractional part
+
+
+
+
+
+
Scientific Calculator: Integer and fractional part
+
+
Integer part
+
+
In mathematics, the floor (also known as the integer part) of a number n is the biggest integer number that is smaller than n.
+
+
The ceiling of a number n is the smallest integer number that is greater than n.
+
+
+
Notation:
+
The floor (integer part) of a number n: [n] = ⌊n⌋
+
+
The ceiling: ⌈n⌉
+
+
+
Examples:
+
+
+
+
+
+
+
Fractional part
+
+
In mathematics, any real number can be written as n + r, where n is an integer, and r (the fractional part) is a nonnegative real number smaller than 1.
+
+
The fractional part of a number n can be written as the difference between n and its integer part (floor):
+
+
+
+
Examples:
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator.htm
new file mode 100644
index 0000000..db72c91
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/calculator.htm
@@ -0,0 +1,70 @@
+
+
+
+
+ Scientific Calculator
+
+
+
+
+
+
The calculator is limited to 64bit floating point numbers (approximate range: ±5.0 × 10-324 to ±1.7 × 10308, or 15-16 digits).
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-basic.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-basic.htm
new file mode 100644
index 0000000..b5f65d1
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-basic.htm
@@ -0,0 +1,50 @@
+
+
+
+
+ Matrix Calculator: Basic guide
+
+
+
+
+
+
Matrix Calculator: Basic guide
+
+
+
Adding matrices
+
+
In Matrix Calculator, matrices are listed in the left panel. Two default matrices already exist (zero and identity matrices). These don't behave like normal matrices, the size is not fixed, so they are compatible for any type of operation with any other matrix.
+
+
Adding a matrix can be done by either creating a matrix, or importing a matrix.
+
+
+
Creating a matrix
+
Step 1: First open the Matrix menu, and click New matrix... Alternatively, you can also right click in the matrix list.
+
+
+
Step 2: Select a width and height for the matrix, and click Apply to update the matrix size. Now you can add the values in the table.
+
+
+
Step 3: Give the new matrix a name, and optionally a description, and press Accept.
+
+
+
Importing a matrix
+
This feature is not yet available.
+
+
+
+
Performing a calculation
+
In the main window there are two boxes (called slots), labeled Matrix A and Matrix B. These are the two terms that are used in calculation.
+
+
+
To insert a matrix into a slot, you can either drag and drop the matrix from the list, or select the Insert in slot _ option in the Matrix menu (or right click).
+
+
After inserting the matrix/matrices, click the button corresponding to the operation. If there was an error, it will be displayed in the Output box. The result will appear in the Result box.
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-calc.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-calc.htm
new file mode 100644
index 0000000..6372d6b
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-calc.htm
@@ -0,0 +1,255 @@
+
+
+
+
+ Matrix Calculator: Calculator window
+
+
+
+
+
+
Matrix Calculator: Calculator window
+
+
+
Calculator window
+
+
+
+
+
Name
Description
+
+
+
+
1
+
Matrix list
+
This is where all the created matrices are.
+
+
+
+
2
+
Preview pane
+
The matrix selected in the list is displayed here.
+
+
+
+
3
+
Slot A
+
The first term of operations.
+
+
+
+
4
+
Slot B
+
The second term of operations.
+
+
+
+
5
+
Result
+
This is where the result of the calculation appears.
+
+
+
+
6
+
Functions
+
All the functions are defined here. For a more detailed explanation, check the What all the buttons do article.
+
+
+
+
7
+
Output
+
If there are any errors (like incompatible matrices), they are displayed here.
+
+
+
+
+
+
+
+
The file menu
+
+
+
+
+
Name
Description
+
+
+
+
1
+
New worksheet
+
Creates a new worksheet*.
+
+
+
+
2
+
Open...
+
Opens an existing worksheet.
+
+
+
+
3
+
Save
+
Saves current worksheet.
+
+
+
+
4
+
Save as...
+
Saves as a new worksheet.
+
+
+
+
5
+
Import from csv file...
+
Imports matrices from a Comma Separated Value file. This feature is not (yet) available.
+
+
+
+
6
+
Import from worksheet...
+
Imports matrices from an existing worksheet. This feature is not (yet) available.
+
+
+
+
7
+
Exit
+
Closes the application.
+
+
+
+
+
* A worksheet is defined as a collection of matrices.
+
+
+
+
The matrix menu
+
This menu can also be opened by right clicking inside the matrix list.
+
+
+
+
+
Name
Description
+
+
+
+
1
+
New matrix...
+
Creates a new matrix.
+
+
+
+
2
+
Edit selected...
+
Edits the selected matrix.
+
+
+
+
3
+
Delete selected
+
Deletes the selected matrices.
+
+
+
+
4
+
Duplicate selected...
+
Creates a new matrix based on the selected one.
+
+
+
+
5
+
Insert in slot A.
+
Inserts the matrix in slot A (the first term).
+
+
+
+
6
+
Insert in slot B.
+
Inserts the matrix in slot B (second term).
+
+
+
+
7
+
Copy
+
Copies the selected matrices into memory. This feature is not (yet) available.
+
+
+
+
8
+
Paste
+
Pastes matrices from memory. This feature is not (yet) available.
+
+
+
+
9
+
Copy
+
Paste matrix from another application. This feature is not (yet) available.
+
+
+
+
+
+
+
The help menu
+
+
+
+
+
Name
Description
+
+
+
+
1
+
About
+
Opens a window with information about Tibi's Calculator Suite.
+
+
+
+
2
+
Help
+
Displays help using the application.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-editor.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-editor.htm
new file mode 100644
index 0000000..6455025
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix-editor.htm
@@ -0,0 +1,175 @@
+
+
+
+
+ Matrix Calculator: Editor window
+
+
+
+
+
+
Matrix Calculator: Editor window
+
+
+
Editor window
+
+
+
+
+
Name
Description
+
+
+
+
1
+
Name
+
The name of the matrix. This field is required.
+
+
+
+
2
+
Description
+
A description of the matrix. This field is optional.
+
+
+
+
3
+
Matrix size
+
Change the number of rows and columns of the matrix.
+
+
+
+
4
+
Apply button
+
Updates the matrix with the new size inserted.
+
+
+
+
5
+
Reset button
+
Resets the row and column count if change was not applied.
+
+
+
+
6
+
Accept button
+
Saves the modified matrix, and closes the window. If there are empty cells, they are filled with 0.
+
+
+
+
7
+
Cancel button
+
Discards the modified matrix, and closes the window.
+
+
+
+
8
+
Grid
+
This is where you can edit the matrix elements.
+
+
+
+
Grid context menu
+
+
9
+
Cut
+
Cuts the selected cells.
+
+
+
+
A
+
Copy
+
Copies the selected cells into memory.
+
+
+
+
B
+
Paste
+
Inserts cells from memory.
+
+
+
+
C
+
Paste special...
+
Paste from other applications. This feature is not (yet) available.
+
+
+
+
D
+
Clear selected
+
Sets the values in the selected cells to 0.
+
+
+
+
E
+
Clear all
+
Sets all the values in the matrix to 0.
+
+
+
+
F
+
Insert row
+
Inserts a row before the selected cell.
+
+
+
+
G
+
Insert column
+
Inserts a column before the selected cell.
+
+
+
+
H
+
Delete row
+
Deletes the row that contains the selected cell(s).
+
+
+
+
I
+
Delete column
+
Deletes the column that contains the selected cell(s).
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix.htm
new file mode 100644
index 0000000..fdb2972
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/matrix.htm
@@ -0,0 +1,49 @@
+
+
+
+
+ Matrix Calculator
+
+
+
+
+
+
The Matrix Calculator is calculator for mathematical matrices. In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries.
+
+
+
Limitations
+
The calculator is limited to 64bit floating point numbers (approximate range: ±5.0 × 10-324 to ±1.7 × 10308, or 15-16 digits).
+
The size of a matrix is only limited by the system memory, but it is not a very good idea to use large matrices (e.g. bigger than 100x100), since they make the application slow, and unresponsive.
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/factorizator-logo.ico b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/factorizator-logo.ico
new file mode 100644
index 0000000..52d2cf2
Binary files /dev/null and b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/factorizator-logo.ico differ
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/factorizator-logo.png b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/factorizator-logo.png
new file mode 100644
index 0000000..25217e6
Binary files /dev/null and b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/factorizator-logo.png differ
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/help-logo.png b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/help-logo.png
new file mode 100644
index 0000000..f827fa4
Binary files /dev/null and b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/resources/help-logo.png differ
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/suite-hotkeys.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/suite-hotkeys.htm
new file mode 100644
index 0000000..f533189
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/suite-hotkeys.htm
@@ -0,0 +1,29 @@
+
+
+
+
+ Tibi's Calculator Suite: Hotkeys
+
+
+
+
+
+
Tibi's Calculator Suite: Hotkeys
+
+
+
Hotkeys
+
+
You can set up a key combination that, when pressed, opens the scientific calculator or the matrix calculator.
+
+
To do that, open the settings window, and check the boxes of the application you want to assign a keyboard shortcut. Then, click inside the text box and press the keys you want.
The application developer is working hard, and from time to time releases a new version of the application. This new version may have additional utilities, it may fix some bugs, it may add new features, and it may be more efficient.
+
+
To get these updates automatically, make sure the Enable automatic updates* box is checked inside the settings window.
+
+
You also have the option to check manually for updates, just click the Check now button inside the settings window.
+
+
+
+
* This feature is not (yet) available.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/suite.htm b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/suite.htm
new file mode 100644
index 0000000..d1f1d90
--- /dev/null
+++ b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/suite.htm
@@ -0,0 +1,33 @@
+
+
+
+
+ Tibi's Calculator Suite
+
+
+
+
+
+
Tibi's Calculator Suite
+
+
+
Introduction
+
+
Tibi's Calculator Suite is a package of useful mathematical calculators. At the moment, it contains a scientific calculator, and a matrix calculator.
+
The suite application is an utility that makes it much easier to access the calculators, or help, using a system tray icon and global hotkeys. The utility can also update the application to the latest version available.
+
+
+
Getting started
+
At startup, the application appears as an icon in the system tray. When right clicking the icon, you have the option to open a calculator, change settings, view help or exit.
+
+
+
The settings window is where you can enable global hotkeys for the applications, this means pressing a keyboard combination to open a calculator. Also, in the settings window you can check for updates.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/temp/factorizator-logo.png b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/temp/factorizator-logo.png
new file mode 100644
index 0000000..25217e6
Binary files /dev/null and b/recovered/2012/tibimathematics-2.0/TibisMathematicsSuite - Release/documentation/temp/factorizator-logo.png differ
diff --git a/recovered/README.md b/recovered/README.md
new file mode 100644
index 0000000..67d02e3
--- /dev/null
+++ b/recovered/README.md
@@ -0,0 +1,16 @@
+# Recovered files
+
+## 2012
+
+Files from old backups that are not present in the git history of this repository
+(recovered from a laptop backup in 2026):
+
+- `TibisMathematicsSuite/`: older revisions of the MatrixCalculator, Factorizator
+ and Help sources and project files (March to May 2012).
+- `TibisMathematicsSuite - Release/`: config files that shipped with the release build.
+- `tibimathematics-2.0/`: files from the Math Suite 2.0 release package (May 2012),
+ mainly the HTML documentation pages, the logos and icons.
+- `factorizator-1.0/`: the documentation index of the standalone Factorizator 1.0 release.
+- `#Testing Area/saved.xml`: a saved matrix used for testing.
+
+Generated files (obj/*.BA~, System.Data.SQLite.xml, *.vshost.exe.manifest) were left out.