Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

wish to add the ability to ignore a copy of a property when it has a specific value. For example, null, empty string, empty collection

オープン
#747 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
backend

調査の方向性

まず、null プロパティをコピーしない Mapster の既存の動作と、issue に示されている IgnoreMember API を確認します。null、空の文字列、空のコレクションなどの設定値がコピーにどのような影響を与えるべきかを定義し、要求された値を網羅するマッピングケースで動作を検証します。

索引モデルが issue の本文から書いたものです。

説明

Ignore features improvement waiting for info

mapster has provided the function of not copying the property when the value of the property is null. Can we extend this function to stop copying the property when the value of the property is a series of specific values? It is better to provide a general method (I am not sure which property and which type, but I am sure that the value cannot be these)? Determine whether a property field can be copied before it is copied

  // Can you provide such a method     
  //      Another framework, automapper, already provides similar functionality
  // I don't care about the attribute name, but I care about the attribute value, and providing the attribute name is best when determining the attribute value
  IgnoreMember((srcMember, destMember, srcValue, destValue) =>
  {
      if (srcValue is string srcValueTxt)
      {
          return string.IsNullOrWhiteSpace(srcValueTxt);
      }

      if (srcValue == destValue)
      {
          return true;
      }

      return false;
  })
主要言語
C#
スター
5.2k
フォーク
411
平均マージ
1日 8時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MapsterMapper/Mapster のほかの issue

MapsterMapper/Mapster の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。