-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
3,635 additions
and
63 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
32 changes: 32 additions & 0 deletions
32
src/EasilyNET.ExpressMapper/Abstractions/Clause/IClause.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,32 @@ | ||
namespace EasilyNET.ExpressMapper.Abstractions.Clause; | ||
|
||
/// <summary> | ||
/// Interface for a mapping clause. | ||
/// 映射子句的接口。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
public interface IClause<TSource, TDest> | ||
{ | ||
/// <summary> | ||
/// Gets a value indicating whether this clause is valid. | ||
/// 获取一个值,该值指示此子句是否有效。 | ||
/// </summary> | ||
bool IsValidClause { get; } | ||
} | ||
|
||
/// <summary> | ||
/// Interface for a reversible mapping clause. | ||
/// 可逆映射子句的接口。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
public interface IReverseAbleClause<TSource, TDest> : IClause<TSource, TDest> | ||
{ | ||
/// <summary> | ||
/// Gets the reverse clause. | ||
/// 获取反向子句。 | ||
/// </summary> | ||
/// <returns>The reverse clause. 反向子句。</returns> | ||
public IClause<TDest, TSource> GetReverseClause(); | ||
} |
25 changes: 25 additions & 0 deletions
25
src/EasilyNET.ExpressMapper/Abstractions/Clause/IConstructClause.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,25 @@ | ||
using System.Reflection; | ||
using EasilyNET.ExpressMapper.Expressions; | ||
|
||
namespace EasilyNET.ExpressMapper.Abstractions.Clause; | ||
|
||
/// <summary> | ||
/// Interface for constructor clause. | ||
/// 构造函数子句的接口。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
public interface IConstructClause<TSource, TDest> : IClause<TSource, TDest> | ||
{ | ||
/// <summary> | ||
/// Gets the constructor information. | ||
/// 获取构造函数信息。 | ||
/// </summary> | ||
public ConstructorInfo? ConstructorInfo { get; } | ||
|
||
/// <summary> | ||
/// Gets the constructor parameters. | ||
/// 获取构造函数参数。 | ||
/// </summary> | ||
public IEnumerable<MappingMember> ConstructorParams { get; } | ||
} |
24 changes: 24 additions & 0 deletions
24
src/EasilyNET.ExpressMapper/Abstractions/Clause/IIgnoreClause.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,24 @@ | ||
using EasilyNET.ExpressMapper.Expressions; | ||
|
||
namespace EasilyNET.ExpressMapper.Abstractions.Clause; | ||
|
||
/// <summary> | ||
/// Interface for ignore clause. | ||
/// 忽略子句的接口。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
public interface IIgnoreClause<TSource, TDest> : IClause<TSource, TDest> | ||
{ | ||
/// <summary> | ||
/// Gets the source ignore member. | ||
/// 获取源忽略成员。 | ||
/// </summary> | ||
public MappingMember? SourceIgnoreMember { get; } | ||
|
||
/// <summary> | ||
/// Gets the destination ignore member. | ||
/// 获取目标忽略成员。 | ||
/// </summary> | ||
public MappingMember? DestinationIgnoreMember { get; } | ||
} |
25 changes: 25 additions & 0 deletions
25
src/EasilyNET.ExpressMapper/Abstractions/Clause/IMapClause.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,25 @@ | ||
using System.Linq.Expressions; | ||
using EasilyNET.ExpressMapper.Expressions; | ||
|
||
namespace EasilyNET.ExpressMapper.Abstractions.Clause; | ||
|
||
/// <summary> | ||
/// Interface for map clause. | ||
/// 映射子句的接口。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
public interface IMapClause<TSource, TDest> : IClause<TSource, TDest> | ||
{ | ||
/// <summary> | ||
/// Gets the destination member. | ||
/// 获取目标成员。 | ||
/// </summary> | ||
public MappingMember? DestinationMember { get; } | ||
|
||
/// <summary> | ||
/// Gets the lambda expression. | ||
/// 获取 lambda 表达式。 | ||
/// </summary> | ||
public LambdaExpression? Expression { get; } | ||
} |
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,24 @@ | ||
using EasilyNET.ExpressMapper.Abstractions.Clause; | ||
|
||
namespace EasilyNET.ExpressMapper.Abstractions; | ||
|
||
/// <summary> | ||
/// Interface for configuration that includes key keeping functionality. | ||
/// 包含密钥保持功能的配置接口。 | ||
/// </summary> | ||
public interface IConfig : IKeyKeeper; | ||
|
||
/// <summary> | ||
/// Interface for configuration with source and destination types. | ||
/// 具有源类型和目标类型的配置接口。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
public interface IConfig<TSource, TDest> : IConfig | ||
{ | ||
/// <summary> | ||
/// Gets the collection of clauses. | ||
/// 获取子句集合。 | ||
/// </summary> | ||
IEnumerable<IClause<TSource, TDest>> Clauses { get; } | ||
} |
17 changes: 17 additions & 0 deletions
17
src/EasilyNET.ExpressMapper/Abstractions/IConfigManager.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,17 @@ | ||
namespace EasilyNET.ExpressMapper.Abstractions; | ||
|
||
/// <summary> | ||
/// Interface for configuration manager. | ||
/// 配置管理器接口。 | ||
/// </summary> | ||
public interface IConfigManager | ||
{ | ||
/// <summary> | ||
/// Gets the configuration for the specified source and destination types. | ||
/// 获取指定源类型和目标类型的配置。 | ||
/// </summary> | ||
/// <typeparam name="TSource">The source type. 源类型。</typeparam> | ||
/// <typeparam name="TDest">The destination type. 目标类型。</typeparam> | ||
/// <returns>The configuration if found; otherwise, null. 如果找到配置,则返回配置;否则返回 null。</returns> | ||
IConfig<TSource, TDest>? GetConfig<TSource, TDest>(); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/EasilyNET.ExpressMapper/Abstractions/IConfigProvider.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,15 @@ | ||
namespace EasilyNET.ExpressMapper.Abstractions; | ||
|
||
/// <summary> | ||
/// Interface for configuration provider. | ||
/// 配置提供程序接口。 | ||
/// </summary> | ||
public interface IConfigProvider | ||
{ | ||
/// <summary> | ||
/// Gets the configuration units. | ||
/// 获取配置单元。 | ||
/// </summary> | ||
/// <returns>Enumeration of configuration units. 配置单元的枚举。</returns> | ||
public IEnumerable<IConfig> GetConfigUnits(); | ||
} |
Oops, something went wrong.