Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 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);
        }