Skip to content

Commit 26657ad

Browse files
committed
some C# syntax updates and lib bumps
1 parent 6bf00d2 commit 26657ad

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

SharpDenizenTools/MetaHandlers/TagTracer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public void TraceTagParts(HashSet<MetaObjectType> possibleRoots, int index)
205205
if (wantedType == null)
206206
{
207207
Error($"Tag part 'as[{type}]' is invalid: type name given doesn't appear to be a real object type.");
208-
return new HashSet<MetaObjectType>();
208+
return [];
209209
}
210210
return ParsePossibleTypes(type, wantedType);
211211
}

SharpDenizenTools/MetaObjects/MetaDataValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class MetaDataValue : MetaObject
2323
/// <summary><see cref="MetaObject.AddTo(MetaDocs)"/></summary>
2424
public override void AddTo(MetaDocs docs)
2525
{
26-
docs.DataValueSets.GetOrCreate(DataKeyName, () => new HashSet<string>()).UnionWith(Values);
26+
docs.DataValueSets.GetOrCreate(DataKeyName, () => []).UnionWith(Values);
2727
}
2828

2929
/// <summary><see cref="MetaObject.ApplyValue(MetaDocs, string, string)"/></summary>

SharpDenizenTools/MetaObjects/MetaEvent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public override void AddTo(MetaDocs docs)
3232
bool anyLegacy = false;
3333
foreach (ScriptEventCouldMatcher matcher in CouldMatchers.DistinctBy(m => m.Parts[0]))
3434
{
35-
docs.EventLookupOpti.GetOrCreate(matcher.Parts[0], () => new List<MetaEvent>()).Add(this);
35+
docs.EventLookupOpti.GetOrCreate(matcher.Parts[0], () => []).Add(this);
3636
if (matcher.Parts[0].StartsWithFast('<'))
3737
{
3838
anyLegacy = true;

SharpDenizenTools/MetaObjects/MetaObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public abstract class MetaObject
2020
public bool HasMultipleNames = false;
2121

2222
/// <summary>If the object has multiple names, returns the full set of names.</summary>
23-
public virtual IEnumerable<string> MultiNames => new string[] { CleanName };
23+
public virtual IEnumerable<string> MultiNames => [CleanName];
2424

2525
/// <summary>Get the clean lowercase name of the object.</summary>
2626
public virtual string CleanName => Name.ToLowerFast();

SharpDenizenTools/SharpDenizenTools.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<DebugSymbols>true</DebugSymbols>
3030
</PropertyGroup>
3131
<ItemGroup>
32-
<PackageReference Include="FreneticLLC.FreneticUtilities" Version="1.0.24" />
33-
<PackageReference Include="YamlDotNet" Version="13.7.1" />
32+
<PackageReference Include="FreneticLLC.FreneticUtilities" Version="1.0.27" />
33+
<PackageReference Include="YamlDotNet" Version="15.1.2" />
3434
</ItemGroup>
3535
</Project>

0 commit comments

Comments
 (0)