CollectionExtensionMethods
Provides extension methods for enumerable collections.
Methods
Either return the value that all elements in the collection have or null.
public static bool CommonValue<T>()
collection,
Collection to traverse.
comparison,
Comparer.
out T
commonValue
Common value, if found.
Returns: Value shared amongst all entries or null.
Either return the value that all elements in the collection have or null. This method uses ReferenceEquals to test for equality, you will probably want to use the overload which takes a specific comparison delegate.
Returns: True if there was a common value.
Extract a specific struct value all elements in a collection share, or return null. All values are compared using default comparison.
public static TValue? CommonValue<TValue, TType>()
collection,
Collection to iterate over.
accessor
Method for getting at values in collection items.
Returns: The value all elements have in common, or null.
Search for a layer first by full path and then by name.
Returns: Index of layer or -1.
Search for a layer first by full path and then by name.
Returns: Index of layer or -1.
Remove an element from a hashset if it exists, or add it if it doesn't.
Collect the instance IDs of all objects and subobjects in a collection into a hash set.