-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: net60/ZString related housekeeping (#385)
* Directory.Build.props: Remove duplicate entries from Demo and Performance projects * Enable NRT for Demo and Performance projects * Remove folder SmartFormat.ZString from former projects SmartFormat.ZString * Remove obsolete entries from SmartFormat.sln * Remove reference to former SmartFormat.ZString.dll from SmartFormat.csproj
- Loading branch information
Showing
303 changed files
with
2,839 additions
and
69,170 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace SmartFormat.Demo | ||
namespace SmartFormat.Demo; | ||
|
||
internal static class Program | ||
{ | ||
static class Program | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
public static void Main() | ||
{ | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
Application.Run(new SmartFormatDemo()); | ||
} | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
Application.Run(new SmartFormatDemo()); | ||
} | ||
} |
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; | ||
#nullable enable | ||
using System; | ||
using System.Collections; | ||
#nullable enable | ||
namespace SmartFormat.Demo.Sample_Extensions | ||
|
||
namespace Demo.Sample_Extensions; | ||
|
||
public class ArgumentValidator | ||
{ | ||
public class ArgumentValidator | ||
public static void CheckForNullReference(object? argument, string argumentName) | ||
{ | ||
public static void CheckForNullReference(object? argument, string argumentName) | ||
{ | ||
if (argument != null) return; | ||
throw new ArgumentNullException(argumentName); | ||
} | ||
if (argument != null) return; | ||
throw new ArgumentNullException(argumentName); | ||
} | ||
|
||
public static void CheckForZeroValue(int argument, string argumentName) | ||
{ | ||
if (argument != 0) return; | ||
throw new ArgumentOutOfRangeException(argumentName, argument, argumentName + " cannot be zero"); | ||
} | ||
public static void CheckForZeroValue(int argument, string argumentName) | ||
{ | ||
if (argument != 0) return; | ||
throw new ArgumentOutOfRangeException(argumentName, argument, argumentName + " cannot be zero"); | ||
} | ||
|
||
public static void CheckForEmpty(IEnumerable argument, string argumentName) | ||
{ | ||
var enumerator = argument.GetEnumerator(); | ||
if (enumerator.MoveNext()) return; | ||
throw new ArgumentException(argumentName + " cannot be empty", argumentName); | ||
} | ||
public static void CheckForEmpty(IEnumerable argument, string argumentName) | ||
{ | ||
var enumerator = argument.GetEnumerator(); | ||
if (enumerator.MoveNext()) return; | ||
throw new ArgumentException(argumentName + " cannot be empty", argumentName); | ||
} | ||
} |
Oops, something went wrong.