BITKit/Src/Core/Net/Commands/NetCommandExamples.cs

31 lines
516 B
C#
Raw Normal View History

2023-08-23 01:59:26 +08:00
using System;
2024-06-08 10:07:40 +08:00
using System.Data;
2025-01-24 10:36:58 +08:00
using System.Runtime.InteropServices;
using MemoryPack;
2024-06-08 10:07:40 +08:00
2023-08-23 01:59:26 +08:00
namespace BITKit.Net.Examples
{
2025-01-24 10:36:58 +08:00
[MemoryPackable]
[StructLayout(LayoutKind.Auto)]
public partial struct LogTime
2023-08-23 01:59:26 +08:00
{
public Guid Id;
public DateTime CreateTime;
2024-06-08 10:07:40 +08:00
#if NET5_0_OR_GREATER
2023-08-23 01:59:26 +08:00
public LogTime()
{
CreateTime=DateTime.Now;
Id=Guid.NewGuid();
}
#endif
}
2025-01-24 10:36:58 +08:00
[MemoryPackable]
[StructLayout(LayoutKind.Auto)]
public partial struct SimplePing
2024-06-08 10:07:40 +08:00
{
public DateTime StartTime;
public DateTime EndTime;
}
2023-08-23 01:59:26 +08:00
}