/// <summary> /// Duplicates a context with all associated plug-ins. /// </summary> /// <param name="userData"> /// A pointer to user-defined data that will be forwarded to plug-ins and the /// context-specific logger, or <see cref="IntPtr.Zero"/> to use the user-defined /// data from this <see cref="Context"/> instance. /// </param> /// <returns>A new <see cref="Context"/> instance.</returns> /// <exception cref="LcmsNETException"> /// Failed to create instance. /// </exception> /// <exception cref="ObjectDisposedException"> /// The Context has already been disposed. /// </exception> /// <remarks> /// Requires Little CMS version 2.6 or later. /// </remarks> public Context Duplicate(IntPtr userData) { EnsureNotClosed(); return(new Context(Interop.DuplicateContext(handle, userData))); }