/// <summary>
        /// Initializes a new instance of the <see cref="ClipboardFormatDrop"/> class.
        /// </summary>
        /// <param name="dataObject">The data object.</param>
        public ClipboardFormatDrop(IDataObject dataObject)
        {
            Contract.Requires(dataObject != null);

            FORMATETC format = FormatEtcExtensions.CreateFORMATETC(ClipFormat.CF_HDROP);

            dataObject.GetData(ref format, out medium);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClipboardFormatDrop"/> class.
        /// </summary>
        /// <param name="dataObject">The data object.</param>
        public ClipboardFormatDrop(IDataObject dataObject)
        {
            if (dataObject == null)
            {
                throw new ArgumentNullException(nameof(dataObject));
            }

            var format = FormatEtcExtensions.CreateFORMATETC(ClipFormat.CF_HDROP);

            dataObject.GetData(ref format, out medium);
        }