SCHALE.GameServer/SCHALE.Common/FlatData/SystemMailExcel.cs

117 lines
5.4 KiB
C#
Raw Permalink Normal View History

2024-04-21 00:21:57 +00:00
// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
namespace SCHALE.Common.FlatData
{
using global::System;
using global::System.Collections.Generic;
2024-04-29 15:52:45 +00:00
using global::SCHALE.Common.Crypto;
2024-04-21 00:21:57 +00:00
using global::Google.FlatBuffers;
public struct SystemMailExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static SystemMailExcel GetRootAsSystemMailExcel(ByteBuffer _bb) { return GetRootAsSystemMailExcel(_bb, new SystemMailExcel()); }
public static SystemMailExcel GetRootAsSystemMailExcel(ByteBuffer _bb, SystemMailExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public SystemMailExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public SCHALE.Common.FlatData.MailType MailType { get { int o = __p.__offset(4); return o != 0 ? (SCHALE.Common.FlatData.MailType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.MailType.System; } }
2024-04-21 00:21:57 +00:00
public long ExpiredDay { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string Sender { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSenderBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetSenderBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetSenderArray() { return __p.__vector_as_array<byte>(8); }
public string Comment { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetCommentBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetCommentBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetCommentArray() { return __p.__vector_as_array<byte>(10); }
public static Offset<SCHALE.Common.FlatData.SystemMailExcel> CreateSystemMailExcel(FlatBufferBuilder builder,
SCHALE.Common.FlatData.MailType MailType = SCHALE.Common.FlatData.MailType.System,
2024-04-21 00:21:57 +00:00
long ExpiredDay = 0,
StringOffset SenderOffset = default(StringOffset),
StringOffset CommentOffset = default(StringOffset)) {
builder.StartTable(4);
SystemMailExcel.AddExpiredDay(builder, ExpiredDay);
SystemMailExcel.AddComment(builder, CommentOffset);
SystemMailExcel.AddSender(builder, SenderOffset);
SystemMailExcel.AddMailType(builder, MailType);
2024-04-21 00:21:57 +00:00
return SystemMailExcel.EndSystemMailExcel(builder);
}
public static void StartSystemMailExcel(FlatBufferBuilder builder) { builder.StartTable(4); }
public static void AddMailType(FlatBufferBuilder builder, SCHALE.Common.FlatData.MailType mailType) { builder.AddInt(0, (int)mailType, 0); }
2024-04-21 00:21:57 +00:00
public static void AddExpiredDay(FlatBufferBuilder builder, long expiredDay) { builder.AddLong(1, expiredDay, 0); }
public static void AddSender(FlatBufferBuilder builder, StringOffset senderOffset) { builder.AddOffset(2, senderOffset.Value, 0); }
public static void AddComment(FlatBufferBuilder builder, StringOffset commentOffset) { builder.AddOffset(3, commentOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.SystemMailExcel> EndSystemMailExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.SystemMailExcel>(o);
}
2024-04-29 15:52:45 +00:00
public SystemMailExcelT UnPack() {
var _o = new SystemMailExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(SystemMailExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("SystemMail");
_o.MailType = TableEncryptionService.Convert(this.MailType, key);
2024-04-29 15:52:45 +00:00
_o.ExpiredDay = TableEncryptionService.Convert(this.ExpiredDay, key);
_o.Sender = TableEncryptionService.Convert(this.Sender, key);
_o.Comment = TableEncryptionService.Convert(this.Comment, key);
}
public static Offset<SCHALE.Common.FlatData.SystemMailExcel> Pack(FlatBufferBuilder builder, SystemMailExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.SystemMailExcel>);
var _Sender = _o.Sender == null ? default(StringOffset) : builder.CreateString(_o.Sender);
var _Comment = _o.Comment == null ? default(StringOffset) : builder.CreateString(_o.Comment);
return CreateSystemMailExcel(
builder,
_o.MailType,
2024-04-29 15:52:45 +00:00
_o.ExpiredDay,
_Sender,
_Comment);
}
}
public class SystemMailExcelT
{
public SCHALE.Common.FlatData.MailType MailType { get; set; }
2024-04-29 15:52:45 +00:00
public long ExpiredDay { get; set; }
public string Sender { get; set; }
public string Comment { get; set; }
public SystemMailExcelT() {
this.MailType = SCHALE.Common.FlatData.MailType.System;
2024-04-29 15:52:45 +00:00
this.ExpiredDay = 0;
this.Sender = null;
this.Comment = null;
}
2024-04-21 00:21:57 +00:00
}
static public class SystemMailExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*MailType*/, 4 /*SCHALE.Common.FlatData.MailType*/, 4, false)
2024-04-21 00:21:57 +00:00
&& verifier.VerifyField(tablePos, 6 /*ExpiredDay*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 8 /*Sender*/, false)
&& verifier.VerifyString(tablePos, 10 /*Comment*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}