private async Task Toggle(ReferenceType type, bool status) { if (status) { BitMask |= type; } else { BitMask &= ~type; } StateHasChanged(); await OnToggle.InvokeAsync(type); }