forked from NDbUnit/NDbUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#23 Update project targeted frameworks, tools and libraries
- Loading branch information
1 parent
d24d8df
commit f0b68b6
Showing
20 changed files
with
446 additions
and
74 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,42 @@ | ||
using System; | ||
using System.Data; | ||
|
||
namespace NDbUnit.Core.Extensions | ||
{ | ||
/// <summary> | ||
/// Required methods for making CompareNetObjects library compatible with netstandard2.0 | ||
/// </summary> | ||
public static class CompareNetObjects | ||
{ | ||
#if NETSTANDARD | ||
|
||
/// <summary> | ||
/// Returns true if the type is a dataset. | ||
/// </summary> | ||
/// <param name="type">The type.</param> | ||
/// <returns><c>true</c> if the specified type is dataset; otherwise, <c>false</c>.</returns> | ||
/// <remarks>Copied from https://github.com/GregFinzer/Compare-Net-Objects/blob/master/Compare-NET-Objects/TypeHelper.cs since CompareNetObjects is currently only targeting netstandard1.3 that has no System.Data</remarks> | ||
public static bool IsDataset(this Type type) | ||
{ | ||
if (type == null) | ||
return false; | ||
|
||
return type == typeof(DataSet); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if the type is a data table. | ||
/// </summary> | ||
/// <param name="type">The type.</param> | ||
/// <returns><c>true</c> if [is data table] [the specified type]; otherwise, <c>false</c>.</returns> | ||
/// <remarks>Copied from https://github.com/GregFinzer/Compare-Net-Objects/blob/master/Compare-NET-Objects/TypeHelper.cs since CompareNetObjects is currently only targeting netstandard1.3 that has no System.Data</remarks> | ||
public static bool IsDataTable(this Type type) | ||
{ | ||
if (type == null) | ||
return false; | ||
|
||
return type == typeof(DataTable); | ||
} | ||
#endif | ||
} | ||
} |
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
Oops, something went wrong.