diff --git a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs index 74e69ba..a6662f4 100644 --- a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs +++ b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs @@ -801,6 +801,18 @@ namespace ICD.Common.Utils.Extensions return output; } + /// + /// Wraps this object instance into an IEnumerable + /// consisting of a single item. + /// + /// Type of the object. + /// The instance that will be wrapped. + /// An IEnumerable<T> consisting of a single item. + public static IEnumerable Yield(this T item) + { + yield return item; + } + /// /// Given a sequence [A, B, C] returns a sequence [[A, B], [B, C]] ///