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