-
Notifications
You must be signed in to change notification settings - Fork 114
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 #127 from donnytian/develop
v6.2
- Loading branch information
Showing
19 changed files
with
2,976 additions
and
2,769 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
477 changes: 276 additions & 201 deletions
477
Npoi.Mapper/src/Npoi.Mapper/Attributes/ColumnAttribute.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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,12 +1,11 @@ | ||
using System; | ||
|
||
namespace Npoi.Mapper.Attributes | ||
namespace Npoi.Mapper.Attributes; | ||
|
||
/// <summary> | ||
/// Specifies to ignore a property for mapping. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public sealed class IgnoreAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Specifies to ignore a property for mapping. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public sealed class IgnoreAttribute : Attribute | ||
{ | ||
} | ||
} |
17 changes: 8 additions & 9 deletions
17
Npoi.Mapper/src/Npoi.Mapper/Attributes/UseLastNonBlankValueAttribute.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,13 +1,12 @@ | ||
using System; | ||
|
||
namespace Npoi.Mapper.Attributes | ||
namespace Npoi.Mapper.Attributes; | ||
|
||
/// <summary> | ||
/// Specifies to use the last non-blank value when reading from cells for this property. | ||
/// Typically handle the blank error in merged cells. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public sealed class UseLastNonBlankValueAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Specifies to use the last non-blank value when reading from cells for this property. | ||
/// Typically handle the blank error in merged cells. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property)] | ||
public sealed class UseLastNonBlankValueAttribute : Attribute | ||
{ | ||
} | ||
} |
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: 16 additions & 16 deletions
32
Npoi.Mapper/src/Npoi.Mapper/Extensions/EnumerableExtensions.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,27 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Npoi.Mapper | ||
// ReSharper disable once CheckNamespace | ||
namespace Npoi.Mapper; | ||
|
||
/// <summary> | ||
/// Provides extensions for <see cref="IEnumerable{T}"/> class. | ||
/// </summary> | ||
public static class EnumerableExtensions | ||
{ | ||
/// <summary> | ||
/// Provides extensions for <see cref="IEnumerable{T}"/> class. | ||
/// Extension for <see cref="IEnumerable{T}"/> object to handle each item. | ||
/// </summary> | ||
public static class EnumerableExtensions | ||
/// <typeparam name="T">The item type.</typeparam> | ||
/// <param name="sequence">The enumerable sequence.</param> | ||
/// <param name="action">Action to apply to each item.</param> | ||
public static void ForEach<T>(this IEnumerable<T> sequence, Action<T> action) | ||
{ | ||
/// <summary> | ||
/// Extension for <see cref="IEnumerable{T}"/> object to handle each item. | ||
/// </summary> | ||
/// <typeparam name="T">The item type.</typeparam> | ||
/// <param name="sequence">The enumerable sequence.</param> | ||
/// <param name="action">Action to apply to each item.</param> | ||
public static void ForEach<T>(this IEnumerable<T> sequence, Action<T> action) | ||
{ | ||
if (sequence == null) return; | ||
if (sequence == null) return; | ||
|
||
foreach (var item in sequence) | ||
{ | ||
action(item); | ||
} | ||
foreach (var item in sequence) | ||
{ | ||
action(item); | ||
} | ||
} | ||
} |
Oops, something went wrong.