-
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 pull request #5 from ashenBlade/feature/refactoring
Refactoring
- Loading branch information
Showing
19 changed files
with
370 additions
and
113 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
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
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,14 @@ | ||
using EnumClass.Core.SymbolName; | ||
|
||
namespace EnumClass.Core; | ||
|
||
/// <summary> | ||
/// Helpful information for constructing enum member class types | ||
/// </summary> | ||
/// <param name="EnumClassName"> | ||
/// Name for generating enum class | ||
/// </param> | ||
/// <param name="Namespace"> | ||
/// Namespace where enum class will be generated | ||
/// </param> | ||
internal readonly record struct EnumMemberInfoCreationContext(ISymbolName EnumClassName, ISymbolName Namespace, ISymbolName EnumName); |
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
2 changes: 1 addition & 1 deletion
2
src/EnumClass.Core/Constants.cs → ...numClass.Core/Infrastructure/Constants.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace EnumClass.Core; | ||
namespace EnumClass.Core.Infrastructure; | ||
|
||
public static class Constants | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
src/EnumClass.Core/Diagnostics.cs → ...mClass.Core/Infrastructure/Diagnostics.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
16 changes: 16 additions & 0 deletions
16
src/EnumClass.Core/Infrastructure/ImmutableArrayExtensions.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,16 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.CodeAnalysis.CSharp.Syntax; | ||
|
||
namespace EnumClass.Core.Infrastructure; | ||
|
||
internal static class ImmutableArrayExtensions | ||
{ | ||
// ReSharper disable once LoopCanBeConvertedToQuery | ||
public static IEnumerable<(T1 Left, T2 Right)> Combine<T1, T2>(this IEnumerable<T1> array, T2 value) | ||
{ | ||
foreach (var element in array) | ||
{ | ||
yield return ( element, value ); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.