[Improvement] - Add by default using optimum constructor selector to unify the choice of constructor for types
まだ誰も着手していません。
評価
調査の方向性
まず、Mapster のソースでコンストラクター選択と MappingScore のロジックを見つけます。payload では特定のファイルやテストは指定されていません。示されている score、パラメーター数、最初の一致を優先するタイブレークのルールを対象とした集中的なカバレッジを追加し、提供されたコンストラクターの例がドキュメントに記載されたコンストラクターを選択したら完了とみなします。
索引モデルが issue の本文から書いたものです。
説明
Since the restriction of having a default constructor new() for classes is no longer mandatory,
and the constructor can using default values for the parameter type.
Optimality criterion(MappingScore) = maximum count of not mapped params. (MappingParam - CountParam)
If any constructors have the same MappingScore, select the one with more parameters.
Edge case: If any constructors have the same equal MappingScore and equal count of params select first.
Example:
Source
{
A
}
Destination
{
new () // MappingScore = 0; ParamCount = 0;
new (A) // MappingScore = 0; ParamCount = 1; <- select this max Param
}
Destination
{
new () // MappingScore = 0; ParamCount = 0; <- select this max MappingScore
new (A,В) // MappingScore = -1; ParamCount = 1;
}
Destination
{
new (A) // MappingScore = 0; ParamCount = 0; <- select this max MappingScore
new (A,В) // MappingScore = -1; ParamCount = 2;
}
Edge case:
Destination
{
new (A,B) // MappingScore = -1; ParamCount = 1; <- select this max MappingScore
new (A,C) // MappingScore = -1; ParamCount = 1;
}
- 主要言語
- C#
- スター
- 5.2k
- フォーク
- 411
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MapsterMapper/Mapster のほかの issue
-
.NET Matrixオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MapsterMapper/Mapster#1003 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
MapsterMapper/Mapster#1024 · コメント 1 件 ·
-
[Mapster Tool] Add support for global:: to disambiguate type names in generated mappers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンimprovement
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
MapsterMapper/Mapster#1020 · コメント 5 件 ·
-
Mapster.Tool - PropertySettingBuilder.Map(member, mapFunc, targetPropertyName) method is not working as expected!対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
MapsterMapper/Mapster#1017 · コメント 6 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
MapsterMapper/Mapster#1007 · コメント 5 件 ·
MapsterMapper/Mapster の issue をすべて見る
似ている issue
-
area-multitenancy area-security p1-recommended priority-high technical-debt
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
help wanted needs-unity ready for a contributor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eyalgolan/statecraft-israel#1542 ·
メンテナーはふだん 1 日以内に返信
-
kind/enhancement Provider Upgrade pulumi/pulumi-azure R1 Task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pulumi/pulumi-azure#3669 ·
-
[BUG] FromCString causes 1 byte OOB read in native code対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンtype/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信