/// <summary> /// Creates a new instance of the <see cref="ProfileSequenceDescriptor"/> class. /// </summary> /// <param name="context">A <see cref="Context"/>, or null for the global context.</param> /// <param name="nItems">The number of profiles in the sequence.</param> /// <returns>A new <see cref="ProfileSequenceDescriptor"/>.</returns> /// <exception cref="LcmsNETException"> /// Failed to create instance. /// </exception> /// <remarks> /// Creates the instance in the global context if <paramref name="context"/> is null. /// </remarks> public static ProfileSequenceDescriptor Create(Context context, uint nItems) { return(new ProfileSequenceDescriptor( Interop.AllocProfileSequenceDescription(context?.Handle ?? IntPtr.Zero, nItems), context)); }