Files
2026-03-05 11:39:06 +08:00

74 lines
2.1 KiB
C#

using ProtoBuf;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
[ProtoContract]
public partial class G2A_TestMessage : AMessage, IRouteMessage, IProto
{
public static G2A_TestMessage Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2A_TestMessage>();
}
public override void Dispose()
{
Tag = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2A_TestMessage>(this);
#endif
}
public uint OpCode() { return InnerOpcode.G2A_TestMessage; }
[ProtoMember(1)]
public string Tag { get; set; }
}
[ProtoContract]
public partial class G2A_TestRequest : AMessage, IRouteRequest, IProto
{
public static G2A_TestRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2A_TestRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2A_TestRequest>(this);
#endif
}
[ProtoIgnore]
public G2A_TestResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2A_TestRequest; }
}
[ProtoContract]
public partial class G2A_TestResponse : AMessage, IRouteResponse, IProto
{
public static G2A_TestResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2A_TestResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2A_TestResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.G2A_TestResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
}