Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghuan committed Jan 9, 2024
2 parents f1b01d6 + 1bbdde8 commit 8b9c0dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CSharp.lua/CoreSystem.Lua/CoreSystem/Collections/Linq.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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("#", ...)
Expand Down
1 change: 1 addition & 0 deletions CSharp.lua/System.xml
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ limitations under the License.
<method name="ThenByDescending" ArgCount="3" Template="Linq.ThenByDescending({0}, {1}, {2}, {`1})" />
<method name="Average" Template="Linq.Average({0}, {1})" />
<method name="DefaultIfEmpty" Template="Linq.DefaultIfEmpty({0})" />
<method name="AsEnumerable" Template="Linq.AsEnumerable({0})" />
</class>
</namespace>
<namespace name="System.Diagnostics" Name="System">
Expand Down

0 comments on commit 8b9c0dc

Please sign in to comment.