Implemented interface member:
method
GetDataPresent
System.Windows.Forms.IDataObject.GetDataPresent(System.String, System.Boolean)
89 references to GetDataPresent
System.Windows.Forms (5)
System\Windows\Forms\OLE\DataObject.cs (5)
247public virtual bool GetDataPresent(string format) => GetDataPresent(format, autoConvert: true); 307public virtual bool ContainsAudio() => GetDataPresent(DataFormats.WaveAudioConstant, autoConvert: false); 309public virtual bool ContainsFileDropList() => GetDataPresent(DataFormats.FileDropConstant, autoConvert: true); 311public virtual bool ContainsImage() => GetDataPresent(DataFormats.BitmapConstant, autoConvert: true); 319return GetDataPresent(ConvertToDataFormats(format), autoConvert: false);
System.Windows.Forms.Tests (84)
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (5)
76dataObject.GetDataPresent(format, autoConvert).Should().BeFalse(); 113dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 114dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 177dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 178dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue();
System\Windows\Forms\DataObjectTests.cs (79)
80.Setup(o => o.GetDataPresent(DataFormats.WaveAudio, false)) 84mockDataObject.Verify(o => o.GetDataPresent(DataFormats.WaveAudio, false), Times.Once()); 103.Setup(o => o.GetDataPresent(DataFormats.FileDrop, true)) 107mockDataObject.Verify(o => o.GetDataPresent(DataFormats.FileDrop, true), Times.Once()); 126.Setup(o => o.GetDataPresent(DataFormats.Bitmap, true)) 130mockDataObject.Verify(o => o.GetDataPresent(DataFormats.Bitmap, true), Times.Once()); 188.Setup(o => o.GetDataPresent(expectedFormat, false)) 192mockDataObject.Verify(o => o.GetDataPresent(expectedFormat, false), Times.Once()); 544.Setup(o => o.GetDataPresent(format, true)) 548mockDataObject.Verify(o => o.GetDataPresent(format, true), Times.Once()); 592dataObject.GetDataPresent(format, autoConvert).Should().Be(result); 979dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: true).Should().BeTrue(); 980dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: false).Should().BeTrue(); 1037dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: true).Should().BeTrue(); 1038dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: false).Should().BeTrue(); 1093dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1094dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1110dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1111dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1128dataObject.GetDataPresent(DataFormats.Serializable, autoConvert: false).Should().BeTrue(); 1129dataObject.GetDataPresent(DataFormats.Serializable, autoConvert: true).Should().BeTrue(); 1130dataObject.GetDataPresent(data2.GetType().FullName, autoConvert: false).Should().BeTrue(); 1131dataObject.GetDataPresent(data2.GetType().FullName, autoConvert: true).Should().BeTrue(); 1194dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1195dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1223dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1224dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1268dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1269dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1270dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: true).Should().BeTrue(); 1271dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: false).Should().BeFalse(); 1272dataObject.GetDataPresent(DataFormats.Dib, autoConvert: true).Should().BeFalse(); 1273dataObject.GetDataPresent(DataFormats.Dib, autoConvert: false).Should().BeFalse(); 1347dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1348dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1391dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1392dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1421dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1422dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1423dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: true).Should().BeTrue(); 1424dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: false).Should().BeFalse(); 1425dataObject.GetDataPresent(DataFormats.Dib, autoConvert: true).Should().BeFalse(); 1426dataObject.GetDataPresent(DataFormats.Dib, autoConvert: false).Should().BeFalse(); 1542dataObject.GetDataPresent(DataFormats.FileDrop, autoConvert: true).Should().BeTrue(); 1543dataObject.GetDataPresent(DataFormats.FileDrop, autoConvert: false).Should().BeTrue(); 1544dataObject.GetDataPresent("FileName", autoConvert: true).Should().BeTrue(); 1545dataObject.GetDataPresent("FileName", autoConvert: false).Should().BeFalse(); 1546dataObject.GetDataPresent("FileNameW", autoConvert: true).Should().BeTrue(); 1547dataObject.GetDataPresent("FileNameW", autoConvert: false).Should().BeFalse(); 1602dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1603dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1604dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: true).Should().BeTrue(); 1605dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: false).Should().BeFalse(); 1606dataObject.GetDataPresent(DataFormats.Dib, autoConvert: true).Should().BeFalse(); 1607dataObject.GetDataPresent(DataFormats.Dib, autoConvert: false).Should().BeFalse(); 1676dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: true).Should().BeTrue(); 1677dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: false).Should().BeTrue(); 1678dataObject.GetDataPresent(DataFormats.Text, autoConvert: true).Should().BeFalse(); 1679dataObject.GetDataPresent(DataFormats.Text, autoConvert: false).Should().BeFalse(); 1680dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: true).Should().BeFalse(); 1681dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: false).Should().BeFalse(); 1682dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: true).Should().BeFalse(); 1683dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: false).Should().BeFalse(); 1684dataObject.GetDataPresent(DataFormats.Html, autoConvert: true).Should().BeFalse(); 1685dataObject.GetDataPresent(DataFormats.Html, autoConvert: false).Should().BeFalse(); 1686dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: true).Should().BeFalse(); 1687dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: false).Should().BeFalse(); 1755dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: true).Should().Be(expectedUnicodeText is not null); 1756dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: false).Should().Be(expectedUnicodeText is not null); 1757dataObject.GetDataPresent(DataFormats.Text, autoConvert: true).Should().BeFalse(); 1758dataObject.GetDataPresent(DataFormats.Text, autoConvert: false).Should().BeFalse(); 1759dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: true).Should().BeFalse(); 1760dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: false).Should().BeFalse(); 1761dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: true).Should().Be(expectedRtfText is not null); 1762dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: false).Should().Be(expectedRtfText is not null); 1763dataObject.GetDataPresent(DataFormats.Html, autoConvert: true).Should().Be(expectedHtmlText is not null); 1764dataObject.GetDataPresent(DataFormats.Html, autoConvert: false).Should().Be(expectedHtmlText is not null); 1765dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: true).Should().Be(expectedCsvText is not null); 1766dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: false).Should().Be(expectedCsvText is not null);