-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/enumerator' into develop
- Loading branch information
Showing
19 changed files
with
1,568 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparer.Default.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.Equals.Action.1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.Equals.Action.2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.Equals.Action.3.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.Equals.Func.1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.Equals.Func.2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.Equals.Func.3.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.GetHashCode.Action.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.GetHashCode.Func.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/ExpressionTreeToolkit.Core/ExpressionEqualityComparerExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/ExpressionTreeToolkit.Core/ExpressionExtensions.AsEnumerable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) 2018 Alessio Gogna | ||
// Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq.Expressions; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Linq; | ||
|
||
#if JETBRAINS_ANNOTATIONS | ||
using AllowNullAttribute = JetBrains.Annotations.CanBeNullAttribute; | ||
using DisallowNullAttribute = JetBrains.Annotations.NotNullAttribute; | ||
using AllowItemNullAttribute = JetBrains.Annotations.ItemCanBeNullAttribute; | ||
#endif | ||
|
||
namespace ExpressionTreeToolkit | ||
{ | ||
public static partial class ExpressionExtensions | ||
{ | ||
public static IEnumerable<Expression> AsEnumerable([DisallowNull] this Expression source) | ||
{ | ||
if (source == null) | ||
{ | ||
throw new ArgumentNullException(nameof(source)); | ||
} | ||
|
||
if (source is IEnumerable<Expression> enumerable) | ||
{ | ||
return enumerable; | ||
} | ||
|
||
return ExpressionIterator.Default.Iterator(source); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (c) 2018 Alessio Gogna | ||
// Licensed under the MIT License. See LICENSE file in the project root for full license information. | ||
|
||
namespace ExpressionTreeToolkit | ||
{ | ||
public static partial class ExpressionExtensions | ||
{ | ||
} | ||
|
||
} |
Oops, something went wrong.