diff options
author | vnugent <public@vaughnnugent.com> | 2023-08-27 14:14:51 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-08-27 14:14:51 -0400 |
commit | 87df3ec1f0f87167853b197f66cefb48855df9ac (patch) | |
tree | 01f386c74e314470a97722e69b6748cf4cb4154a /lib/Plugins.Essentials | |
parent | f541b853c738a076d2a85ef6b269c1b140353b85 (diff) |
spelling, and tiny tweaks
Diffstat (limited to 'lib/Plugins.Essentials')
-rw-r--r-- | lib/Plugins.Essentials/src/Accounts/AccountUtils.cs | 6 | ||||
-rw-r--r-- | lib/Plugins.Essentials/src/Sessions/SessionBase.cs | 5 |
2 files changed, 7 insertions, 4 deletions
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 /// <summary> - /// Compares the users privilage level against the specified level + /// Compares the users privilege level against the specified level /// </summary> /// <param name="session"></param> - /// <param name="level">64bit privilage level to compare</param> + /// <param name="level">64bit privilege level to compare</param> /// <returns>true if the current user has at least the specified level or higher</returns> [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 ///<inheritdoc/> public virtual SessionType SessionType { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get => Enum.Parse<SessionType>(this[SESSION_TYPE_ENTRY]); - protected set => this[SESSION_TYPE_ENTRY] = ((byte)value).ToString(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected set => this[SESSION_TYPE_ENTRY] = value.ToString(); } ///<inheritdoc/> |