Skip to content

Commit

Permalink
update for .net8
Browse files Browse the repository at this point in the history
  • Loading branch information
PrincessRTFM committed Mar 20, 2024
1 parent 871d8aa commit 339bfce
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions TinyCmds/Attributes/ArgumentsAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace PrincessRTFM.TinyCmds.Attributes;

[AttributeUsage(AttributeTargets.Class)]
internal class ArgumentsAttribute: Attribute {
public string ArgumentDescription => string.Join(" ", this.Arguments.Select(a => a.EndsWith("?") ? $"[{a.TrimEnd('?')}]" : $"<{a}>"));
public string ArgumentDescription => string.Join(" ", this.Arguments.Select(a => a.EndsWith('?') ? $"[{a.TrimEnd('?')}]" : $"<{a}>"));
public string[] Arguments { get; }
public int RequiredArguments => this.Arguments.Where(a => !a.EndsWith("?")).Count();
public int RequiredArguments => this.Arguments.Where(a => !a.EndsWith('?')).Count();
public int MaxArguments => this.Arguments.Length;

public ArgumentsAttribute(params string[] args) => this.Arguments = args;
Expand Down
1 change: 0 additions & 1 deletion TinyCmds/CommandAssertionFailureException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ public class CommandAssertionFailureException: Exception {
public CommandAssertionFailureException() { }
public CommandAssertionFailureException(string message) : base(message) { }
public CommandAssertionFailureException(string message, Exception inner) : base(message, inner) { }
protected CommandAssertionFailureException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
3 changes: 2 additions & 1 deletion TinyCmds/PluginCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;

using Dalamud.Game.Command;
Expand Down Expand Up @@ -31,7 +32,7 @@ public PluginCommandManager(Plugin core) {
.Select(t => {
try {
ConstructorInfo ctor = t.GetConstructor(Array.Empty<Type>())!;
object instance = FormatterServices.GetUninitializedObject(t);
object instance = RuntimeHelpers.GetUninitializedObject(t);
PropertyInfo prop = b
.GetProperties(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)
.Where(prop => prop.PropertyType == p)
Expand Down
2 changes: 1 addition & 1 deletion TinyCmds/TinyCmds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Product>TinyCmds</Product>
<Version>8.7.0</Version>
<Version>8.8.0</Version>
<Description>This plugin adds tiny and simple but useful chat commands, and nothing more. It finally has a UI specifically for command help.</Description>
<PackageProjectUrl>https://github.com/PrincessRTFM/TinyCommands</PackageProjectUrl>
<Copyright>Copyleft VariableVixen 2021</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion TinyCmds/dalamud.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<TargetFramework>net7-windows</TargetFramework>
<TargetFramework>net8-windows</TargetFramework>
<OutputType>Library</OutputType>
<Deterministic>false</Deterministic>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down
36 changes: 18 additions & 18 deletions TinyCmds/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"version": 1,
"dependencies": {
"net7.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[2.1.12, )",
"resolved": "2.1.12",
"contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg=="
},
"XivCommon": {
"type": "Direct",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "avaBp3FmSCi/PiQhntCeBDYOHejdyTWmFtz4pRBVQQ8vHkmRx+YTk1la9dkYBMlXxRXKckEdH1iI1Fu61JlE7w=="
}
}
}
}
"version": 1,
"dependencies": {
"net8.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[2.1.12, )",
"resolved": "2.1.12",
"contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg=="
},
"XivCommon": {
"type": "Direct",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "avaBp3FmSCi/PiQhntCeBDYOHejdyTWmFtz4pRBVQQ8vHkmRx+YTk1la9dkYBMlXxRXKckEdH1iI1Fu61JlE7w=="
}
}
}
}

0 comments on commit 339bfce

Please sign in to comment.