Class CollectionExtensions
Collection-related extension methods for
Inheritance
System.Object
CollectionExtensions
Namespace: X10D.Collections
Assembly: X10D.dll
Syntax
public static class CollectionExtensions : object
Methods
| Improve this Doc View SourceClearAndDisposeAll<T>(ICollection<T>)
Calls
Declaration
public static void ClearAndDisposeAll<T>(this ICollection<T> source)
where T : IDisposable
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | source | The collection to clear, and whose elements should be disposed. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements in |
See Also
| Improve this Doc View SourceClearAndDisposeAllAsync<T>(ICollection<T>)
Asynchronously calls
Declaration
public static Task ClearAndDisposeAllAsync<T>(this ICollection<T> source)
where T : IAsyncDisposable
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | source | The collection to clear, and whose elements should be disposed. |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
T | The type of the elements in |