Implemented interface member:
method
GetDataPresent
System.Windows.Forms.IDataObject.GetDataPresent(System.String, System.Boolean)
85 references to GetDataPresent
System.Windows.Forms (5)
System\Windows\Forms\OLE\DataObject.cs (5)
105public virtual bool GetDataPresent(string format) => GetDataPresent(format, autoConvert: true); 123public virtual bool ContainsAudio() => GetDataPresent(DataFormats.WaveAudioConstant, autoConvert: false); 125public virtual bool ContainsFileDropList() => GetDataPresent(DataFormats.FileDropConstant, autoConvert: true); 127public virtual bool ContainsImage() => GetDataPresent(DataFormats.BitmapConstant, autoConvert: true); 135return GetDataPresent(ConvertToDataFormats(format), autoConvert: false);
System.Windows.Forms.Tests (80)
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (5)
74dataObject.GetDataPresent(format, autoConvert).Should().BeFalse(); 111dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 112dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 175dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 176dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue();
System\Windows\Forms\DataObjectTests.cs (75)
72.Setup(o => o.GetDataPresent(DataFormats.WaveAudio, false)) 76mockDataObject.Verify(o => o.GetDataPresent(DataFormats.WaveAudio, false), Times.Once()); 95.Setup(o => o.GetDataPresent(DataFormats.FileDrop, true)) 99mockDataObject.Verify(o => o.GetDataPresent(DataFormats.FileDrop, true), Times.Once()); 118.Setup(o => o.GetDataPresent(DataFormats.Bitmap, true)) 122mockDataObject.Verify(o => o.GetDataPresent(DataFormats.Bitmap, true), Times.Once()); 180.Setup(o => o.GetDataPresent(expectedFormat, false)) 184mockDataObject.Verify(o => o.GetDataPresent(expectedFormat, false), Times.Once()); 398.Setup(o => o.GetDataPresent(format, true)) 402mockDataObject.Verify(o => o.GetDataPresent(format, true), Times.Once()); 446dataObject.GetDataPresent(format, autoConvert).Should().Be(result); 833dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: true).Should().BeTrue(); 834dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: false).Should().BeTrue(); 891dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: true).Should().BeTrue(); 892dataObject.GetDataPresent(DataFormats.WaveAudio, autoConvert: false).Should().BeTrue(); 947dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 948dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 964dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 965dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 982dataObject.GetDataPresent(DataFormats.Serializable, autoConvert: false).Should().BeTrue(); 983dataObject.GetDataPresent(DataFormats.Serializable, autoConvert: true).Should().BeTrue(); 984dataObject.GetDataPresent(data2.GetType().FullName, autoConvert: false).Should().BeTrue(); 985dataObject.GetDataPresent(data2.GetType().FullName, autoConvert: true).Should().BeTrue(); 1025dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1026dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1059dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1060dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1061dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: true).Should().BeTrue(); 1062dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: false).Should().BeFalse(); 1063dataObject.GetDataPresent(DataFormats.Dib, autoConvert: true).Should().BeFalse(); 1064dataObject.GetDataPresent(DataFormats.Dib, autoConvert: false).Should().BeFalse(); 1109dataObject.GetDataPresent(format, autoConvert: true).Should().BeTrue(); 1110dataObject.GetDataPresent(format, autoConvert: false).Should().BeTrue(); 1139dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1140dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1141dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: true).Should().BeTrue(); 1142dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: false).Should().BeFalse(); 1143dataObject.GetDataPresent(DataFormats.Dib, autoConvert: true).Should().BeFalse(); 1144dataObject.GetDataPresent(DataFormats.Dib, autoConvert: false).Should().BeFalse(); 1260dataObject.GetDataPresent(DataFormats.FileDrop, autoConvert: true).Should().BeTrue(); 1261dataObject.GetDataPresent(DataFormats.FileDrop, autoConvert: false).Should().BeTrue(); 1262dataObject.GetDataPresent("FileName", autoConvert: true).Should().BeTrue(); 1263dataObject.GetDataPresent("FileName", autoConvert: false).Should().BeFalse(); 1264dataObject.GetDataPresent("FileNameW", autoConvert: true).Should().BeTrue(); 1265dataObject.GetDataPresent("FileNameW", autoConvert: false).Should().BeFalse(); 1320dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1321dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1322dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: true).Should().BeTrue(); 1323dataObject.GetDataPresent(typeof(Bitmap).FullName, autoConvert: false).Should().BeFalse(); 1324dataObject.GetDataPresent(DataFormats.Dib, autoConvert: true).Should().BeFalse(); 1325dataObject.GetDataPresent(DataFormats.Dib, autoConvert: false).Should().BeFalse(); 1394dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: true).Should().BeTrue(); 1395dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: false).Should().BeTrue(); 1396dataObject.GetDataPresent(DataFormats.Text, autoConvert: true).Should().BeFalse(); 1397dataObject.GetDataPresent(DataFormats.Text, autoConvert: false).Should().BeFalse(); 1398dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: true).Should().BeFalse(); 1399dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: false).Should().BeFalse(); 1400dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: true).Should().BeFalse(); 1401dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: false).Should().BeFalse(); 1402dataObject.GetDataPresent(DataFormats.Html, autoConvert: true).Should().BeFalse(); 1403dataObject.GetDataPresent(DataFormats.Html, autoConvert: false).Should().BeFalse(); 1404dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: true).Should().BeFalse(); 1405dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: false).Should().BeFalse(); 1473dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: true).Should().Be(expectedUnicodeText is not null); 1474dataObject.GetDataPresent(DataFormats.UnicodeText, autoConvert: false).Should().Be(expectedUnicodeText is not null); 1475dataObject.GetDataPresent(DataFormats.Text, autoConvert: true).Should().BeFalse(); 1476dataObject.GetDataPresent(DataFormats.Text, autoConvert: false).Should().BeFalse(); 1477dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: true).Should().BeFalse(); 1478dataObject.GetDataPresent(DataFormats.StringFormat, autoConvert: false).Should().BeFalse(); 1479dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: true).Should().Be(expectedRtfText is not null); 1480dataObject.GetDataPresent(DataFormats.Rtf, autoConvert: false).Should().Be(expectedRtfText is not null); 1481dataObject.GetDataPresent(DataFormats.Html, autoConvert: true).Should().Be(expectedHtmlText is not null); 1482dataObject.GetDataPresent(DataFormats.Html, autoConvert: false).Should().Be(expectedHtmlText is not null); 1483dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: true).Should().Be(expectedCsvText is not null); 1484dataObject.GetDataPresent(DataFormats.CommaSeparatedValue, autoConvert: false).Should().Be(expectedCsvText is not null);