Skip to content

Commit ccac1e2

Browse files
committed
Updated docs from commit 20832a2 on refs/heads/master
1 parent 5611c3e commit ccac1e2

5 files changed

Lines changed: 50 additions & 14 deletions

File tree

README.zh-CN.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,30 @@ <h2 id="特点">特点</h2>
382382
public Genders Gender { get; set; }
383383
</code></pre>
384384
<ul>
385+
<li><strong>也可以继承“ValueMappingsBaseAttribute”特性基类实现值映射关系,目前仅可用于枚举和Bool类型,支持导入导出。</strong></li>
386+
</ul>
387+
<pre><code class="lang-csharp"> [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
388+
public class GenderLocalAttribute : ValueMappingsBaseAttribute
389+
{
390+
public override Dictionary&lt;string, object&gt; GetMappings(PropertyInfo propertyInfo)
391+
{
392+
var res= new Dictionary&lt;string, object&gt;();
393+
res.Add(&quot;男&quot;,0);
394+
res.Add(&quot;女&quot;,1);
395+
return res;
396+
}
397+
}
398+
399+
400+
/// &lt;summary&gt;
401+
/// 性别
402+
/// &lt;/summary&gt;
403+
[ImporterHeader(Name = &quot;性别&quot;)]
404+
[Required(ErrorMessage = &quot;性别不能为空&quot;)]
405+
[GenderLocal]
406+
public Genders Gender { get; set; }
407+
</code></pre>
408+
<ul>
385409
<li><p><strong>支持枚举和Bool类型的导入数据验证项的生成,以及相关数据转换</strong></p>
386410
<ul>
387411
<li><p><strong>枚举默认情况下会自动获取枚举的描述、显示名、名称和值生成数据项</strong></p>

RELEASE.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@
6262
<article class="content wrap" id="_content" data-uid="">
6363
<h1 id="release-log">Release Log</h1>
6464

65+
<h2 id="2750">2.7.5.0</h2>
66+
<p><strong>2024.01.03</strong></p>
67+
<ul>
68+
<li>发布Magicodes.IE.Stash,具体见<a href="https://github.com/dotnetcore/Magicodes.IE/pull/498">https://github.com/dotnetcore/Magicodes.IE/pull/498</a><a href="https://github.com/dotnetcore/Magicodes.IE/tree/master/src/Stash/Magicodes.IE.Stash">https://github.com/dotnetcore/Magicodes.IE/tree/master/src/Stash/Magicodes.IE.Stash</a></li>
69+
<li>增加导入Stream时的回调委托参数<a href="https://github.com/dotnetcore/Magicodes.IE/commit/e9a2a1b3b493fea90379b0ee519b7bbb42011122">https://github.com/dotnetcore/Magicodes.IE/commit/e9a2a1b3b493fea90379b0ee519b7bbb42011122</a></li>
70+
<li>增加ValueMappingsBase值映射特性基类,方便从外部(如:Abp框架)继承实现枚举、bool类型的多语言显示<a href="https://github.com/dotnetcore/Magicodes.IE/pull/544">https://github.com/dotnetcore/Magicodes.IE/pull/544</a></li>
71+
</ul>
6572
<h2 id="2744">2.7.4.4</h2>
6673
<p><strong>2023.04.22</strong></p>
6774
<ul>

api/Magicodes.ExporterAndImporter.Csv.CsvImporter.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,13 @@ <h5 class="typeParameters">Type Parameters</h5>
281281

282282

283283
<a id="Magicodes_ExporterAndImporter_Csv_CsvImporter_Import_" data-uid="Magicodes.ExporterAndImporter.Csv.CsvImporter.Import*"></a>
284-
<h4 id="Magicodes_ExporterAndImporter_Csv_CsvImporter_Import__1_Stream_Stream_" data-uid="Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(Stream,Stream)">Import&lt;T&gt;(Stream, Stream)</h4>
284+
<h4 id="Magicodes_ExporterAndImporter_Csv_CsvImporter_Import__1_Stream_Stream_Func_ImportResult___0__ImportResult___0___" data-uid="Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(Stream,Stream,Func{ImportResult{``0},ImportResult{``0}})">Import&lt;T&gt;(Stream, Stream, Func&lt;ImportResult&lt;T&gt;, ImportResult&lt;T&gt;&gt;)</h4>
285285
<div class="markdown level1 summary"><p>貌似无用</p>
286286
</div>
287287
<div class="markdown level1 conceptual"></div>
288288
<h5 class="decalaration">Declaration</h5>
289289
<div class="codewrapper">
290-
<pre><code class="lang-csharp hljs">public Task&lt;ImportResult&lt;T&gt;&gt; Import&lt;T&gt;(Stream stream, Stream labelingFileStream)
290+
<pre><code class="lang-csharp hljs">public Task&lt;ImportResult&lt;T&gt;&gt; Import&lt;T&gt;(Stream stream, Stream labelingFileStream, Func&lt;ImportResult&lt;T&gt;, ImportResult&lt;T&gt;&gt; importResultCallback = null)
291291
where T : class, new()</code></pre>
292292
</div>
293293
<h5 class="parameters">Parameters</h5>
@@ -310,6 +310,11 @@ <h5 class="parameters">Parameters</h5>
310310
<td><span class="parametername">labelingFileStream</span></td>
311311
<td></td>
312312
</tr>
313+
<tr>
314+
<td><span class="xref">Func</span>&lt;<span class="xref">ImportResult</span>&lt;T&gt;, <span class="xref">ImportResult</span>&lt;T&gt;&gt;</td>
315+
<td><span class="parametername">importResultCallback</span></td>
316+
<td></td>
317+
</tr>
313318
</tbody>
314319
</table>
315320
<h5 class="returns">Returns</h5>

manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"output": {
1313
".html": {
1414
"relative_path": "README.zh-CN.html",
15-
"hash": "GvRWRwy4bQEHiK6yCC9JJa/c8d3lyx/CE3Hje+LEu0A="
15+
"hash": "my9NUCwjg8bKFPwA2Byxkv96hD3qUks9hMa4/nVsJmw="
1616
}
1717
},
1818
"is_incremental": false,
@@ -24,7 +24,7 @@
2424
"output": {
2525
".html": {
2626
"relative_path": "RELEASE.html",
27-
"hash": "XTKwj5fNMpA25Ddp6xVTCo17HwNxro2n0LswUVKRYxM="
27+
"hash": "zu/U9na8R8o6nB/pR68AwIBO35Poi6SmnHFOLCfuVns="
2828
}
2929
},
3030
"is_incremental": false,
@@ -72,7 +72,7 @@
7272
"output": {
7373
".html": {
7474
"relative_path": "api/Magicodes.ExporterAndImporter.Csv.CsvImporter.html",
75-
"hash": "cPDl3wAefoJ038AAcZth9z3TjBPJ8yz8R9kOZQokPdk="
75+
"hash": "R0qCfxtb+Ki9tc6PN8DjRrnFdHalnU25Vc9D1kRjY1c="
7676
}
7777
},
7878
"is_incremental": false,

xrefmap.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ references:
256256
fullName.vb: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import(Of T)(Stream)
257257
nameWithType: CsvImporter.Import<T>(Stream)
258258
nameWithType.vb: CsvImporter.Import(Of T)(Stream)
259-
- uid: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(Stream,Stream)
260-
name: Import<T>(Stream, Stream)
261-
href: api/Magicodes.ExporterAndImporter.Csv.CsvImporter.html#Magicodes_ExporterAndImporter_Csv_CsvImporter_Import__1_Stream_Stream_
262-
commentId: M:Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(Stream,Stream)
263-
name.vb: Import(Of T)(Stream, Stream)
264-
fullName: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import<T>(Stream, Stream)
265-
fullName.vb: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import(Of T)(Stream, Stream)
266-
nameWithType: CsvImporter.Import<T>(Stream, Stream)
267-
nameWithType.vb: CsvImporter.Import(Of T)(Stream, Stream)
259+
- uid: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(Stream,Stream,Func{ImportResult{``0},ImportResult{``0}})
260+
name: Import<T>(Stream, Stream, Func<ImportResult<T>, ImportResult<T>>)
261+
href: api/Magicodes.ExporterAndImporter.Csv.CsvImporter.html#Magicodes_ExporterAndImporter_Csv_CsvImporter_Import__1_Stream_Stream_Func_ImportResult___0__ImportResult___0___
262+
commentId: M:Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(Stream,Stream,Func{ImportResult{``0},ImportResult{``0}})
263+
name.vb: Import(Of T)(Stream, Stream, Func(Of ImportResult(Of T), ImportResult(Of T)))
264+
fullName: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import<T>(Stream, Stream, Func<ImportResult<T>, ImportResult<T>>)
265+
fullName.vb: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import(Of T)(Stream, Stream, Func(Of ImportResult(Of T), ImportResult(Of T)))
266+
nameWithType: CsvImporter.Import<T>(Stream, Stream, Func<ImportResult<T>, ImportResult<T>>)
267+
nameWithType.vb: CsvImporter.Import(Of T)(Stream, Stream, Func(Of ImportResult(Of T), ImportResult(Of T)))
268268
- uid: Magicodes.ExporterAndImporter.Csv.CsvImporter.Import``1(System.String,Func{ImportResult{``0},ImportResult{``0}})
269269
name: Import<T>(String, Func<ImportResult<T>, ImportResult<T>>)
270270
href: api/Magicodes.ExporterAndImporter.Csv.CsvImporter.html#Magicodes_ExporterAndImporter_Csv_CsvImporter_Import__1_System_String_Func_ImportResult___0__ImportResult___0___

0 commit comments

Comments
 (0)