chore: OTEL service name

This commit is contained in:
Timothy Schenk 2024-09-16 21:19:09 +02:00
parent b0cb649dff
commit 50caf0464b
Signed by: rainote
SSH key fingerprint: SHA256:pnkNSDwpAnaip00xaZlVFHKKsS7T8UtOomMzvs0yITE
5 changed files with 11 additions and 13 deletions

View file

@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
namespace Wonderking.Game.Data.Item; namespace Wonderking.Game.Data.Item;
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ContainedItem public struct ContainedItem
{ {
public short ID { get; internal set; } public short ID { get; internal set; }

View file

@ -1,9 +1,14 @@
// Licensed to Timothy Schenk under the GNU AGPL Version 3 License. // Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
using System.Runtime.InteropServices;
namespace Wonderking.Game.Data.Item; namespace Wonderking.Game.Data.Item;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ItemOptions public struct ItemOptions
{ {
public uint[] OptionIDs { get; internal set; } [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
public bool OptionAvailable { get; internal set; } public uint[] OptionIDs;
public bool OptionAvailable;
} }

View file

@ -45,7 +45,7 @@ public abstract class DataReader<T>
throw new NotSupportedException("XorKey is null"); throw new NotSupportedException("XorKey is null");
} }
private Span<byte> GetDatFileContent(string path) private ReadOnlySpan<byte> GetDatFileContent(string path)
{ {
var fileData = File.ReadAllBytes(path + _datFileName); var fileData = File.ReadAllBytes(path + _datFileName);
var data = new byte[fileData.Length]; var data = new byte[fileData.Length];

View file

@ -1,13 +1,5 @@
// Licensed to Timothy Schenk under the GNU AGPL Version 3 License. // Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
/* Nicht gemergte Änderung aus Projekt "Wonderking(net7.0)"
Vor:
using System.Runtime.InteropServices;
using System.Text;
Nach:
using System.Text;
*/
using System.Text; using System.Text;
namespace Wonderking.Game.Reader; namespace Wonderking.Game.Reader;
@ -16,7 +8,7 @@ public static class GenericReaderExtensions
{ {
public static string ReadString(this BinaryReader reader, int length) public static string ReadString(this BinaryReader reader, int length)
{ {
var ret = Encoding.ASCII.GetString(reader.ReadBytes(length)).Replace("\0", ""); var ret = Encoding.ASCII.GetString(reader.ReadBytes(length)).Replace("\0", "", StringComparison.Ordinal);
return ret; return ret;
} }

View file

@ -16,6 +16,7 @@ services:
- Tracing:Enabled=true - Tracing:Enabled=true
- OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire:18889 - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire:18889
- Logging:LogLevel:Default=Debug - Logging:LogLevel:Default=Debug
- OTEL_SERVICE_NAME=continuity-auth
networks: networks:
- continuity - continuity
ports: ports: