From 87df3ec1f0f87167853b197f66cefb48855df9ac Mon Sep 17 00:00:00 2001 From: vnugent Date: Sun, 27 Aug 2023 14:14:51 -0400 Subject: spelling, and tiny tweaks --- lib/Plugins.Essentials/src/Accounts/AccountUtils.cs | 6 +++--- lib/Plugins.Essentials/src/Sessions/SessionBase.cs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/Plugins.Essentials') diff --git a/lib/Plugins.Essentials/src/Accounts/AccountUtils.cs b/lib/Plugins.Essentials/src/Accounts/AccountUtils.cs index 137fa4a..1b30934 100644 --- a/lib/Plugins.Essentials/src/Accounts/AccountUtils.cs +++ b/lib/Plugins.Essentials/src/Accounts/AccountUtils.cs @@ -468,12 +468,12 @@ namespace VNLib.Plugins.Essentials.Accounts #endregion - #region Privilage Extensions + #region Privilege Extensions /// - /// Compares the users privilage level against the specified level + /// Compares the users privilege level against the specified level /// /// - /// 64bit privilage level to compare + /// 64bit privilege level to compare /// true if the current user has at least the specified level or higher [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool HasLevel(this in SessionInfo session, byte level) => (session.Privilages & LEVEL_MSK) >= (((ulong)level << LEVEL_MSK_OFFSET) & LEVEL_MSK); diff --git a/lib/Plugins.Essentials/src/Sessions/SessionBase.cs b/lib/Plugins.Essentials/src/Sessions/SessionBase.cs index 100818b..33a0dbd 100644 --- a/lib/Plugins.Essentials/src/Sessions/SessionBase.cs +++ b/lib/Plugins.Essentials/src/Sessions/SessionBase.cs @@ -95,8 +95,11 @@ namespace VNLib.Plugins.Essentials.Sessions /// public virtual SessionType SessionType { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get => Enum.Parse(this[SESSION_TYPE_ENTRY]); - protected set => this[SESSION_TYPE_ENTRY] = ((byte)value).ToString(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected set => this[SESSION_TYPE_ENTRY] = value.ToString(); } /// -- cgit