EnumerableExtensions Class

Summary

Extension methods that augment System.Collections.Generic.IEnumerable`1 and related collection types.
Assembly
GitVersion.Core.dll
Namespace
GitVersion.Extensions
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["EnumerableExtensions"] class Type type-node

Syntax

public static class EnumerableExtensions

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Methods

Name Value Summary
AddRange<T>(ICollection<T>, IEnumerable<T>) void
Appends all elements of items to source.
static
OnlyOrDefault<T>(IEnumerable<T>) T
Returns the single element of the sequence, or default if the sequence is empty or contains more than one element.
static
SingleOfType<T>(IEnumerable) T
Returns the single element of type T from a non-generic sequence, throwing if not exactly one exists.
static