Files
2025-05-01 07:20:41 +09:00

49 lines
1.3 KiB
C#

using ServerCore; using ServerBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerCommon
{
public class BlockUser : EntityBase
{
public BlockUser(EntityBase parent)
: base(EntityType.BlockUser, parent)
{
onInit().GetAwaiter().GetResult();
}
public override async Task<Result> onInit()
{
addEntityAttributes();
return await base.onInit();
}
private void addEntityAttributes()
{
addEntityAttribute(new BlockUserAttribute(this));
}
public override string toBasicString()
{
var root_parent = getRootParent();
NullReferenceCheckHelper.throwIfNull(root_parent, () => $"getRootParent() is null !!! - {toBasicString()}");
return $"{this.getTypeName()} - {root_parent.toBasicString()}";
}
public override string toSummaryString()
{
var root_parent = getRootParent();
NullReferenceCheckHelper.throwIfNull(root_parent, () => $"getRootParent() is null !!! - {toBasicString()}");
return $"{this.getTypeName()} - {root_parent.toSummaryString()}";
}
}
}