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 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()}"; } } }