/// <summary>
        /// Gets the number of displays of a specified type that are
        /// currently active.
        /// </summary>
        ///
        /// <param name="displayType">
        /// The display type.
        /// </param>
        ///
        /// <returns>
        /// The number of displays of a specified type that are currently
        /// active.
        /// </returns>
        public int GetNumDisplays(ZDisplayType displayType)
        {
            int numDisplays = 0;

            ZPlugin.LogOnError(ZPlugin.GetNumDisplaysByType(
                                   this._context.NativePtr, displayType, out numDisplays),
                               "GetNumDisplaysByType");

            return(numDisplays);
        }
        /// <summary>
        /// Gets a display of a specified type at a specified index.
        /// </summary>
        ///
        /// <param name="displayType">
        /// The type of display.
        /// </param>
        /// <param name="index">
        /// The index of the display.
        /// </param>
        ///
        /// <returns>
        /// The display of a specified type at a specified index.
        /// </returns>
        public ZDisplay GetDisplay(ZDisplayType displayType, int index = 0)
        {
            IntPtr displayNativePtr = IntPtr.Zero;

            ZPlugin.LogOnError(ZPlugin.GetDisplayByType(
                                   this._context.NativePtr, displayType, index,
                                   out displayNativePtr),
                               "GetDisplayByType");

            return(this.GetOrCreateCachedResource(displayNativePtr));
        }