Skip to content

Commit

Permalink
Bumped to 1dddce8
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenDev committed Oct 10, 2024
1 parent 556327e commit d0ad416
Show file tree
Hide file tree
Showing 282 changed files with 2,470 additions and 2,148 deletions.
8 changes: 7 additions & 1 deletion Chaos-Network.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
# 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Chaos.Common", "Chaos.Common\Chaos.Common.csproj", "{4F77F927-5349-4C44-AD70-EFBA8ADDB6E4}"
Expand Down Expand Up @@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Chaos.Time", "Chaos.Time\Ch
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Chaos.Time.Abstractions", "Chaos.Time.Abstractions\Chaos.Time.Abstractions.csproj", "{7F0521EE-762F-491F-90E3-318CE8CFAB81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Chaos.DarkAges", "Chaos.DarkAges\Chaos.DarkAges.csproj", "{244A8BC5-5D3D-4FE7-A784-9108DCC1B15A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -99,6 +101,10 @@ Global
{7F0521EE-762F-491F-90E3-318CE8CFAB81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F0521EE-762F-491F-90E3-318CE8CFAB81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F0521EE-762F-491F-90E3-318CE8CFAB81}.Release|Any CPU.Build.0 = Release|Any CPU
{244A8BC5-5D3D-4FE7-A784-9108DCC1B15A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{244A8BC5-5D3D-4FE7-A784-9108DCC1B15A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{244A8BC5-5D3D-4FE7-A784-9108DCC1B15A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{244A8BC5-5D3D-4FE7-A784-9108DCC1B15A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 3 additions & 3 deletions Chaos.Common/Collections/ArgumentCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed class ArgumentCollection : IEnumerable<string>
/// </param>
public ArgumentCollection(IEnumerable<string>? arguments, string? delimiter = null)
{
arguments ??= Enumerable.Empty<string>();
arguments ??= [];

if (!string.IsNullOrEmpty(delimiter))
arguments = arguments.SelectMany(str => str.Split(delimiter))
Expand All @@ -51,7 +51,7 @@ public ArgumentCollection(IEnumerable<string>? arguments, string? delimiter = nu
/// </param>
public ArgumentCollection(string argumentStr)
{
Arguments = new List<string>();
Arguments = [];

foreach (var match in RegexCache.COMMAND_SPLIT_REGEX
.Matches(argumentStr)
Expand Down Expand Up @@ -82,7 +82,7 @@ public ArgumentCollection(string argumentStr, string delimiter)
/// <summary>
/// Creates an empty <see cref="ArgumentCollection" />
/// </summary>
public ArgumentCollection() => Arguments = new List<string>();
public ArgumentCollection() => Arguments = [];

/// <inheritdoc />
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
Expand Down
2 changes: 1 addition & 1 deletion Chaos.Common/Collections/CounterCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed class CounterCollection : IEnumerable<KeyValuePair<string, int>>
/// </summary>
public CounterCollection(IEnumerable<KeyValuePair<string, int>>? enumerable = null)
=> Counters = new ConcurrentDictionary<string, int>(
enumerable ?? Array.Empty<KeyValuePair<string, int>>(),
enumerable ?? [],
StringComparer.OrdinalIgnoreCase);

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public int Count
public SynchronizedHashSet(IEnumerable<T>? items = null, IEqualityComparer<T>? comparer = null)
{
Sync = new AutoReleasingMonitor();
items ??= Enumerable.Empty<T>();
items ??= [];
comparer ??= EqualityComparer<T>.Default;

Set = new HashSet<T>(items, comparer);
Expand Down
4 changes: 2 additions & 2 deletions Chaos.Common/Collections/Synchronized/SynchronizedList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public virtual int Count
public SynchronizedList(IEnumerable<T>? items = null)
{
Sync = new AutoReleasingMonitor();
items ??= Enumerable.Empty<T>();
List = new List<T>(items);
items ??= [];
List = [..items];
}

/// <inheritdoc cref="ICollection{T}.Add" />
Expand Down
5 changes: 1 addition & 4 deletions Chaos.Common/Comparers/MostDerivedTypeComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ public int Compare(Type? x, Type? y)
if (x.IsAssignableTo(y))
return -1;

if (y.IsAssignableTo(x))
return 1;

return 0;
return y.IsAssignableTo(x) ? 1 : 0;
}
}
2 changes: 1 addition & 1 deletion Chaos.Common/Converters/EnumCollectionConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override EnumCollection Read(ref Utf8JsonReader reader, Type typeToConver
return a.GetTypes();
} catch
{
return Enumerable.Empty<Type>();
return [];
}
})
.Where(asmType => asmType.IsEnum && asmType is { IsInterface: false, IsAbstract: false })
Expand Down
2 changes: 1 addition & 1 deletion Chaos.Common/Converters/FlagCollectionConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override FlagCollection Read(ref Utf8JsonReader reader, Type typeToConver
return a.GetTypes();
} catch
{
return Enumerable.Empty<Type>();
return [];
}
})
.Where(asmType => asmType.IsEnum && asmType is { IsInterface: false, IsAbstract: false })
Expand Down
Loading

0 comments on commit d0ad416

Please sign in to comment.