mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Use C#9 features
This commit is contained in:
@@ -47,9 +47,9 @@ namespace CliFx.Demo.Commands
|
||||
|
||||
public partial class BookAddCommand
|
||||
{
|
||||
private static readonly Random Random = new Random();
|
||||
private static readonly Random Random = new();
|
||||
|
||||
private static DateTimeOffset CreateRandomDate() => new DateTimeOffset(
|
||||
private static DateTimeOffset CreateRandomDate() => new(
|
||||
Random.Next(1800, 2020),
|
||||
Random.Next(1, 12),
|
||||
Random.Next(1, 28),
|
||||
@@ -58,7 +58,7 @@ namespace CliFx.Demo.Commands
|
||||
Random.Next(1, 59),
|
||||
TimeSpan.Zero);
|
||||
|
||||
private static Isbn CreateRandomIsbn() => new Isbn(
|
||||
private static Isbn CreateRandomIsbn() => new(
|
||||
Random.Next(0, 999),
|
||||
Random.Next(0, 99),
|
||||
Random.Next(0, 99999),
|
||||
|
||||
@@ -15,6 +15,6 @@ namespace CliFx.Demo.Models
|
||||
|
||||
public partial class Library
|
||||
{
|
||||
public static Library Empty { get; } = new Library(Array.Empty<Book>());
|
||||
public static Library Empty { get; } = new(Array.Empty<Book>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user