Example #1
0
 /// <summary>
 /// Formats a module to show the locked or not locked symbol when it is locked.
 /// </summary>
 private string FormatModuleLocked(IDbLockableContext lockContext, ModuleDetails module)
 {
     return(module.IsModuleLocked(lockContext) ? Locked : NotLocked);
 }
        /// <summary>
        /// Gets if the specified module is locked.
        /// </summary>
        /// <param name="locking">The locking service to work with.</param>
        /// <param name="context">The command context to look for.</param>
        /// <param name="module">The module to check.</param>
        /// <returns>True if the module is locked.</returns>
        public static async Task <bool> IsModuleLockedAsync(this IContextingService locking, ICommandContext context, ModuleDetails module)
        {
            IDbLockableContext lockContext = await locking.FindDbLockableContextAsync(context).ConfigureAwait(false);

            return(module.IsModuleLocked(lockContext));
        }