protected override bool GetScopeItem(
            SessionStateScope scope,
            ScopedItemLookupPath name,
            out PSDriveInfo drive)
        {
            bool flag = true;

            drive = scope.GetDrive(name.LookupPath.NamespaceID);
            if (drive == (PSDriveInfo)null)
            {
                flag = false;
            }
            return(flag);
        }
        /// <summary>
        /// Derived classes override this method to return their
        /// particular type of scoped item.
        /// </summary>
        /// <param name="scope">
        /// The scope to look the item up in.
        /// </param>
        /// <param name="name">
        /// The name of the item to retrieve.
        /// </param>
        /// <param name="drive">
        /// The scope item that the derived class should return.
        /// </param>
        /// <returns>
        /// True if the scope item was found or false otherwise.
        /// </returns>
        protected override bool GetScopeItem(
            SessionStateScope scope,
            VariablePath name,
            out PSDriveInfo drive)
        {
            Diagnostics.Assert(name is not FunctionLookupPath,
                               "name was scanned incorrect if we get here and it is a FunctionLookupPath");

            bool result = true;

            drive = scope.GetDrive(name.DriveName);

            if (drive == null)
            {
                result = false;
            }

            return(result);
        }