From 4450f37e8a050bfaa2793c63b8e21d534e87f54a Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Mon, 8 Jan 2024 15:39:31 -0500 Subject: [PATCH] Add Linq.AsEnumerable --- CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua | 5 +++++ CSharp.lua/System.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua b/CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua index 6e170a4c..7f115bbb 100644 --- a/CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua +++ b/CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua @@ -895,6 +895,11 @@ function Enumerable.Cast(source, T) end) end +function Enumerable.AsEnumerable(source) + if source == nil then throw(ArgumentNullException("source")) end + return source +end + local function first(source, ...) if source == nil then throw(ArgumentNullException("source")) end local len = select("#", ...) diff --git a/CSharp.lua/System.xml b/CSharp.lua/System.xml index ecf0e12b..46d82436 100644 --- a/CSharp.lua/System.xml +++ b/CSharp.lua/System.xml @@ -731,6 +731,7 @@ limitations under the License. +