-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor a parameter for SetCellUsing and SetPropertyUsing
- Loading branch information
Showing
5 changed files
with
153 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using NPOI.SS.UserModel; | ||
|
||
namespace Ganss.Excel | ||
{ | ||
/// <summary> | ||
/// set excell cell parameter | ||
/// </summary> | ||
/// <typeparam name="TEntity"></typeparam> | ||
public class SetCellArgs<TEntity> : EventArgs where TEntity : class | ||
{ | ||
/// <summary> | ||
/// excel cell | ||
/// </summary> | ||
public ICell Cell { get; } | ||
|
||
/// <summary> | ||
/// collection row data | ||
/// </summary> | ||
public TEntity Data { get; } | ||
|
||
/// <summary> | ||
/// property value | ||
/// </summary> | ||
public object Value { get; } | ||
|
||
/// <summary> | ||
/// set excell cell parameter | ||
/// </summary> | ||
/// <param name="cell">excel cell</param> | ||
/// <param name="data">collection row data</param> | ||
/// <param name="value">excel cell value</param> | ||
public SetCellArgs(ICell cell, TEntity data, object value) | ||
{ | ||
Cell = cell; | ||
Data = data; | ||
Value = value; | ||
} | ||
} | ||
} |
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,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using NPOI.SS.UserModel; | ||
|
||
namespace Ganss.Excel | ||
{ | ||
|
||
/// <summary> | ||
/// set entity property value parameter | ||
/// </summary> | ||
/// <typeparam name="TEntity"></typeparam> | ||
public class SetPropertyArgs<TEntity> : EventArgs where TEntity : class | ||
{ | ||
/// <summary> | ||
/// excel cell | ||
/// </summary> | ||
public ICell Cell { get; } | ||
|
||
/// <summary> | ||
/// collection row data | ||
/// </summary> | ||
public TEntity Data { get; } | ||
|
||
/// <summary> | ||
/// excel cell value | ||
/// </summary> | ||
public object Value { get; } | ||
|
||
/// <summary> | ||
/// set entity property value parameter | ||
/// </summary> | ||
/// <param name="cell">excel cell</param> | ||
/// <param name="data">collection row data</param> | ||
/// <param name="value">excel cell value</param> | ||
public SetPropertyArgs(ICell cell, TEntity data, object value) | ||
{ | ||
Cell = cell; | ||
Data = data; | ||
Value = value; | ||
} | ||
} | ||
} |