6 types derived from DataObject
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.BehaviorDataObject.cs (1)
14
internal class BehaviorDataObject :
DataObject
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObjectWrapper.cs (1)
9
protected class ComponentDataObjectWrapper :
DataObject
System\Windows\Forms\Design\ToolStripItemDataObject.cs (1)
9
internal class ToolStripItemDataObject :
DataObject
System.Windows.Forms.Tests (3)
System\Windows\Forms\ClipboardTests.cs (1)
1165
private class DerivedDataObject :
DataObject
{ }
System\Windows\Forms\DataObjectTests.cs (2)
375
internal class DataObjectOverridesTryGetDataCore :
DataObject
2667
private class DerivedDataObject :
DataObject
{ }
206 instantiations of DataObject
ComDisabled.Tests (2)
ClipboardComTests.cs (1)
45
DataObject dataObject =
new
();
DataObjectComTests.cs (1)
22
DataObject data =
new
();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
StringCopyPaste\WpfStringCopyPasteService.cs (1)
38
var copy = new
DataObject
();
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\MyServices\ClipboardProxyTests.cs (1)
57
clipboard.SetDataObject(new System.Windows.Forms.
DataObject
(data));
System.Windows.Forms (17)
System\Windows\Forms\Control.cs (2)
4820
DataObject dataObject =
new
();
4899
data is DataObject dataObject ? dataObject : new
DataObject
(data);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
7142
DataObject dataObject =
new
();
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (1)
122
_lastDataObject = new
DataObject
(lpdataobj);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
2167
iwdata = new
DataObject
(idataObject);
2177
iwdata = new
DataObject
();
2182
iwdata = new
DataObject
();
System\Windows\Forms\OLE\Clipboard.cs (7)
40
/// See remarks for <see cref="
DataObject
(object)"/> for recommendations on how to implement custom <paramref name="data"/>.
57
: new
DataObject
(data) { IsWrappedForClipboard = true };
503
/// See remarks for <see cref="
DataObject
(object)"/> for recommendations on how to implement custom <paramref name="data"/>.
514
SetDataObject(new
DataObject
(format, data), copy: true);
567
DataObject dataObject =
new
();
595
SetDataObject(new
DataObject
(DataFormats.FileDropConstant, autoConvert: true, filePathsArray), copy: true);
617
SetDataObject(new
DataObject
(ConvertToDataFormats(format), text), copy: true);
System\Windows\Forms\OLE\DataObject.cs (2)
36
/// <inheritdoc cref="
DataObject
(object)"/>
42
/// <inheritdoc cref="
DataObject
(object)"/>
System\Windows\Forms\OLE\DropTarget.cs (1)
58
return new
DataObject
(nativeDataObject);
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\CommandSet.cs (2)
1415
IDataObject dataObj = new
DataObject
(CF_DESIGNER, bytes);
1460
IDataObject dataObj = new
DataObject
(CF_DESIGNER, bytes);
System.Windows.Forms.Tests (174)
System\Windows\Forms\ClipboardTests.cs (6)
284
DataObject dataObject =
new
(data);
313
DataObject dataObject =
new
(data);
557
DataObject data =
new
();
897
Action action = () => Clipboard.SetDataAsJson(format, new
DataObject
());
977
DataObject dataObject =
new
();
993
DataObject data =
new
();
System\Windows\Forms\ControlTests.Methods.cs (2)
1817
yield return new object[] { new
DataObject
(), allowedEffects };
1818
yield return new object[] { new
DataObject
("data"), allowedEffects };
System\Windows\Forms\DataObjectExtensionsTests.cs (4)
75
DataObject dataObject =
new
();
83
DataObject dataObject =
new
();
92
DataObject dataObject =
new
();
101
DataObject dataObject =
new
();
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (4)
48
DataObject dataObject =
new
();
75
DataObject dataObject =
new
();
109
DataObject dataObject =
new
();
171
DataObject dataObject =
new
();
System\Windows\Forms\DataObjectTests.cs (109)
67
DataObject dataObject =
new
();
90
DataObject dataObject =
new
();
113
DataObject dataObject =
new
();
136
DataObject dataObject =
new
();
160
DataObject dataObject =
new
();
199
DataObject dataObject =
new
();
206
DataObject dataObject =
new
();
227
DataObject dataObject =
new
();
257
DataObject dataObject =
new
();
300
DataObject dataObject =
new
(mockDataObject.Object);
331
DataObject dataObject =
new
(mockDataObject.Object);
341
DataObject dataObject =
new
();
517
DataObject dataObject =
new
();
560
DataObject dataObject =
new
(mockDataObject.Object);
591
DataObject dataObject =
new
(mockDataObject.Object);
601
DataObject dataObject =
new
();
636
DataObject dataObject =
new
();
655
DataObject dataObject =
new
();
679
DataObject dataObject =
new
();
686
DataObject dataObject =
new
();
742
DataObject dataObject =
new
(mockDataObject.Object);
751
DataObject dataObject =
new
();
758
DataObject dataObject =
new
();
797
DataObject dataObject =
new
(mockDataObject.Object);
805
DataObject dataObject =
new
();
825
DataObject dataObject =
new
();
849
DataObject dataObject =
new
();
865
DataObject dataObject =
new
();
890
DataObject dataObject =
new
();
931
DataObject dataObject =
new
();
956
DataObject dataObject =
new
();
971
DataObject dataObject =
new
();
1006
DataObject dataObject =
new
(mockDataObject.Object);
1014
DataObject dataObject =
new
();
1029
DataObject dataObject =
new
();
1064
DataObject dataObject =
new
(mockDataObject.Object);
1072
DataObject dataObject =
new
();
1088
DataObject dataObject =
new
();
1102
DataObject dataObject =
new
();
1119
DataObject dataObject =
new
();
1148
DataObject dataObject =
new
(mockDataObject.Object);
1156
DataObject dataObject =
new
();
1190
DataObject dataObject =
new
();
1219
DataObject dataObject =
new
();
1256
DataObject dataObject =
new
();
1296
DataObject dataObject =
new
(mockDataObject.Object);
1341
DataObject dataObject =
new
();
1372
DataObject dataObject =
new
();
1409
DataObject dataObject =
new
();
1452
DataObject dataObject =
new
(mockDataObject.Object);
1477
DataObject dataObject =
new
(mockDataObject.Object);
1485
DataObject dataObject =
new
();
1501
DataObject dataObject =
new
();
1515
DataObject dataObject =
new
();
1530
DataObject dataObject =
new
();
1573
DataObject dataObject =
new
(mockDataObject.Object);
1581
DataObject dataObject =
new
();
1590
DataObject dataObject =
new
();
1635
DataObject dataObject =
new
(mockDataObject.Object);
1643
DataObject dataObject =
new
();
1658
DataObject dataObject =
new
();
1713
DataObject dataObject =
new
(mockDataObject.Object);
1737
DataObject dataObject =
new
();
1807
DataObject dataObject =
new
(mockDataObject.Object);
1816
DataObject dataObject =
new
();
1827
DataObject dataObject =
new
();
1835
DataObject data =
new
(new DataObjectIgnoringStorageMediumForEnhancedMetafile());
1893
DataObject dataObject =
new
();
1915
DataObject dataObject =
new
(mockComDataObject.Object);
1929
DataObject dataObject =
new
();
1944
DataObject dataObject =
new
(mockComDataObject.Object);
1953
DataObject dataObject =
new
();
1983
DataObject dataObject =
new
(mockComDataObject.Object);
2002
DataObject dataObject =
new
();
2057
DataObject dataObject =
new
(mockDataObject.Object);
2119
DataObject dataObject =
new
(mockDataObject.Object);
2144
DataObject dataObject =
new
();
2167
DataObject dataObject =
new
(mockDataObject.Object);
2217
DataObject dataObject =
new
();
2246
DataObject dataObject =
new
(mockDataObject.Object);
2309
DataObject dataObject =
new
(mockDataObject.Object);
2336
DataObject dataObject =
new
();
2363
DataObject dataObject =
new
(mockComDataObject.Object);
2379
DataObject dataObject =
new
();
2422
DataObject dataObject =
new
();
2459
DataObject dataObject =
new
();
2481
DataObject dataObject =
new
();
2502
DataObject dataObject =
new
();
2543
DataObject dataObject =
new
();
2582
DataObject dataObject =
new
();
2601
DataObject dataObject =
new
();
2625
DataObject dataObject =
new
();
2650
DataObject dataObject =
new
();
2696
yield return new object[] { new
DataObject
() };
2725
yield return new object[] { new
DataObject
() };
2801
DataObject native =
new
();
2821
DataObject native =
new
(DataFormats.Locale, value);
2841
DataObject dataObject =
new
();
2842
Action action = () => dataObject.SetDataAsJson(format, new
DataObject
());
2853
DataObject dataObject =
new
();
2865
DataObject dataObject =
new
();
2868
DataObject wrapped =
new
(dataObject);
2879
DataObject data =
new
();
2906
DataObject dataObject =
new
();
2994
DataObject dataObject =
new
();
3005
DataObject dataObject =
new
();
3016
DataObject data =
new
();
3027
DataObject data =
new
();
3044
DataObject dataObject =
new
();
System\Windows\Forms\DragDropHelperTests.cs (29)
18
yield return new object[] { new
DataObject
(), new Bitmap(1, 1), new Point(1, 1), false };
19
yield return new object[] { new
DataObject
(), null, new Point(1, 1), false };
20
yield return new object[] { new
DataObject
(), new Bitmap(1, 1), new Point(1, 1), true };
25
yield return new object[] { new
DataObject
(), new GiveFeedbackEventArgs(DragDropEffects.All, false, new Bitmap(1, 1), new Point(0, 0), false) };
26
yield return new object[] { new
DataObject
(), new GiveFeedbackEventArgs(DragDropEffects.All, false, null, new Point(0, 0), false) };
27
yield return new object[] { new
DataObject
(), new GiveFeedbackEventArgs(DragDropEffects.All, false, new Bitmap(1, 1), new Point(0, 0), true) };
32
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Invalid, string.Empty, string.Empty) };
33
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.None, string.Empty, string.Empty) };
34
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Copy, "Copy to %1", "Documents") };
35
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Move, "Move to %1", "Documents") };
36
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Link, "Create link in %1", "Documents") };
37
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Label, "Update metadata in %1", "Document") };
38
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Warning, "A problem has been encountered", string.Empty) };
39
yield return new object[] { new DragEventArgs(new
DataObject
(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.NoImage, "Copy to %1", "Documents") };
44
yield return new object[] { new
DataObject
(), DropImageType.Invalid, string.Empty, string.Empty };
45
yield return new object[] { new
DataObject
(), DropImageType.None, string.Empty, string.Empty };
46
yield return new object[] { new
DataObject
(), DropImageType.Copy, "Copy to %1", "Documents" };
47
yield return new object[] { new
DataObject
(), DropImageType.Move, "Move to %1", "Documents" };
48
yield return new object[] { new
DataObject
(), DropImageType.Link, "Create link in %1", "Documents" };
49
yield return new object[] { new
DataObject
(), DropImageType.Label, "Update metadata in %1", "Document" };
50
yield return new object[] { new
DataObject
(), DropImageType.Warning, "A problem has been encountered", string.Empty };
51
yield return new object[] { new
DataObject
(), DropImageType.NoImage, "Copy to %1", "Documents" };
56
yield return new object[] { new
DataObject
(), DropImageType.Copy, new string('*', (int)PInvokeCore.MAX_PATH), string.Empty };
57
yield return new object[] { new
DataObject
(), DropImageType.Copy, string.Empty, new string('*', (int)PInvokeCore.MAX_PATH) };
62
yield return new object[] { new
DataObject
(), true };
63
yield return new object[] { new
DataObject
(), false };
161
Assert.Throws<InvalidOperationException>(() => DragDropHelper.SetDragImage(new
DataObject
(), bitmap, new Point(0, 0), false));
177
Assert.Throws<ArgumentNullException>(nameof(e), () => DragDropHelper.SetDragImage(new
DataObject
(), e));
212
() => DragDropHelper.SetDropDescription(new
DataObject
(), dropImageType, string.Empty, string.Empty));
System\Windows\Forms\NativeToWinFormsAdapterTests.cs (12)
31
DataObject native =
new
();
47
DataObject native =
new
();
66
DataObject native =
new
();
78
DataObject native =
new
();
152
DataObject native =
new
();
165
DataObject native =
new
();
181
DataObject native =
new
();
196
DataObject native =
new
();
210
DataObject native =
new
();
418
DataObject native =
new
();
436
DataObject native =
new
();
455
DataObject native =
new
();
System\Windows\Forms\ToolStripItemTests.cs (2)
10152
yield return new object[] { new
DataObject
(), allowedEffects };
10153
yield return new object[] { new
DataObject
("data"), allowedEffects };
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (6)
26
DataObject dataObject =
new
();
38
DataObject dataObject =
new
();
50
DataObject dataObject =
new
();
62
DataObject dataObject =
new
();
74
DataObject dataObject =
new
();
86
DataObject dataObject =
new
();
System.Windows.Forms.UI.IntegrationTests (5)
DesignBehaviorsTests.cs (1)
274
return new
DataObject
(toolboxItem);
DragDropTests.cs (4)
88
DataObject data =
new
();
304
DataObject data =
new
();
1089
DataObject data =
new
(DataFormats.FileDrop, dropFiles);
1149
DataObject data =
new
(DataFormats.FileDrop, dropFiles);
WinFormsControlsTest (4)
DragDrop.cs (4)
179
DataObject data =
new
(nameof(_nyanCatAscii), _nyanCatAscii);
537
DataObject data =
new
(DataFormats.FileDrop,
555
DataObject data =
new
(nameof(_nyanCatBmp), _nyanCatBmp);
567
DataObject data =
new
(nameof(_nyanCatAscii), _nyanCatAscii);
307 references to DataObject
ComDisabled.Tests (5)
ClipboardComTests.cs (1)
45
DataObject
dataObject = new();
DataObjectComTests.cs (4)
22
DataObject
data = new();
25
DataObject
inData = controlAccessor.CreateRuntimeDataObjectForDrag(data);
43
DataObject
inData = accessor.CreateRuntimeDataObjectForDrag(data);
61
DataObject
inData = accessor.CreateRuntimeDataObjectForDrag(data);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
StringCopyPaste\WpfStringCopyPasteService.cs (1)
38
var
copy = new DataObject();
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\MyServices\ClipboardProxy.vb (2)
178
''' Saves a <see cref="
DataObject
"/> to the clipboard.
183
Public Sub SetDataObject(data As
DataObject
)
System.Windows.Forms (39)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
1142
if (!
DataObject
.Composition.EnableUnsafeBinaryFormatterInNativeObjectSerialization)
1532
if (!
DataObject
.Composition.EnableUnsafeBinaryFormatterInNativeObjectSerialization)
System\Windows\Forms\Control.cs (9)
4797
/// If <paramref name="data"/> is a non derived <see cref="
DataObject
"/>. This is for better error reporting as <see cref="
DataObject
"/> will serialize empty. If <see cref="
DataObject
"/>
4798
/// needs to be used to start a drag operation, use <see cref="
DataObject
.SetDataAsJson{T}(T)"/> to JSON serialize the data being held within the <paramref name="data"/>,
4815
if (typeof(T) == typeof(
DataObject
))
4820
DataObject
dataObject = new();
4895
/// Creates <see cref="
DataObject
"/> for drag operation.
4898
private static
DataObject
CreateRuntimeDataObjectForDrag(object data) =>
4899
data is
DataObject
dataObject ? dataObject : new DataObject(data);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
7122
public virtual
DataObject
? GetClipboardContent()
7142
DataObject
dataObject = new();
21872
DataObject
? dataObject = GetClipboardContent();
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2164
DataObject
? iwdata;
System\Windows\Forms\OLE\Clipboard.cs (10)
55
DataObject
wrappedData = data is
DataObject
{ IsWrappedForClipboard: true } alreadyWrapped
148
if (dataObject is
DataObject
{ IsWrappedForClipboard: true } wrappedData)
415
if (!
DataObject
.IsValidFormatAndType<T>(format)
525
/// If <paramref name="data"/> is a non derived <see cref="
DataObject
"/>. This is for better error reporting as <see cref="
DataObject
"/> will serialize as empty.
526
/// If <see cref="
DataObject
"/> needs to be placed on the clipboard, use <see cref="
DataObject
.SetDataAsJson{T}(string, T)"/>
562
if (typeof(T) == typeof(
DataObject
))
567
DataObject
dataObject = new();
System\Windows\Forms\OLE\DataObject.Composition.Binder.cs (1)
18
/// contained in our <see cref="
DataObject
"/> class using the typed consumption side APIs, such as
System\Windows\Forms\OLE\DataObject.cs (11)
33
/// Initializes a new instance of the <see cref="
DataObject
"/> class, with the raw <see cref="Com.IDataObject"/>
40
/// Initializes a new instance of the <see cref="
DataObject
"/> class, which can store arbitrary data.
46
/// Initializes a new instance of the <see cref="
DataObject
"/> class, containing the specified data.
59
if (data is
DataObject
dataObject)
79
/// Initializes a new instance of the <see cref="
DataObject
"/> class, containing the specified data and its
92
/// Returns the inner data that the <see cref="
DataObject
"/> was created with if the original data implemented
94
/// This method should only be used if the <see cref="
DataObject
"/> was created for clipboard purposes.
121
/// If <paramref name="data"/> is a non derived <see cref="
DataObject
"/>. This is for better error reporting as <see cref="
DataObject
"/> will serialize as empty.
122
/// If <see cref="
DataObject
"/> needs to be set, JSON serialize the data held in <paramref name="data"/> using this method, then use <see cref="SetData(object?)"/>
166
if (typeof(T) == typeof(
DataObject
))
System\Windows\Forms\OLE\DropTarget.cs (2)
45
/// <see cref="IDataObject"/> to be passed out as is. Otherwise, the data will be wrapped in a <see cref="
DataObject
"/>.
53
return dataObject is
DataObject
winFormsDataObject && winFormsDataObject.OriginalIDataObject is { } originalDataObject
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
131
internal
DataObject
DataObject
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
262
else if (e.Data is
DataObject
&& components is null)
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
485
DataObject
data = new ComponentDataObjectWrapper(new ComponentDataObject(_serviceProvider, components));
System.Windows.Forms.Tests (245)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
28
ITypeResolver resolver = new
DataObject
.Composition.Binder(typeof(SimpleTestData), resolver: null, legacyMode: false);
48
ITypeResolver resolver = new
DataObject
.Composition.Binder(typeof(SimpleTestData), resolver: null, legacyMode: false);
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (1)
10
using Utilities = System.Windows.Forms.
DataObject
.Composition.BinaryFormatUtilities;
System\Windows\Forms\ClipboardTests.cs (28)
122
DataObject
result1 = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
123
DataObject
result2 = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
274
DataObject
dataObject = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
284
DataObject
dataObject = new(data);
287
DataObject
actual = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
301
DataObject
dataObject = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
313
DataObject
dataObject = new(data);
316
DataObject
actual = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
330
DataObject
dataObject = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
557
DataObject
data = new();
583
var
dataObject = clipboardDataObject.Should().BeOfType<
DataObject
>().Subject;
665
DataObject
dataObject = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
910
DataObject
dataObject = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
932
dataObject = Clipboard.GetDataObject().Should().BeOfType<
DataObject
>().Subject;
977
DataObject
dataObject = new();
993
DataObject
data = new();
1082
DataObject
dataObject = Clipboard.GetDataObject().Should().BeAssignableTo<
DataObject
>().Subject;
System\Windows\Forms\DataObjectComTests.cs (2)
22
inData.Should().BeAssignableTo<
DataObject
>();
40
DataObject
inData = accessor.CreateRuntimeDataObjectForDrag(data);
System\Windows\Forms\DataObjectExtensionsTests.cs (4)
75
DataObject
dataObject = new();
83
DataObject
dataObject = new();
92
DataObject
dataObject = new();
101
DataObject
dataObject = new();
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (4)
48
DataObject
dataObject = new();
75
DataObject
dataObject = new();
109
DataObject
dataObject = new();
171
DataObject
dataObject = new();
System\Windows\Forms\DataObjectTests.cs (137)
67
DataObject
dataObject = new();
75
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
90
DataObject
dataObject = new();
98
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
113
DataObject
dataObject = new();
121
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
136
DataObject
dataObject = new();
144
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
160
DataObject
dataObject = new();
183
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
199
DataObject
dataObject = new();
206
DataObject
dataObject = new();
227
DataObject
dataObject = new();
236
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
257
DataObject
dataObject = new();
279
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
300
DataObject
dataObject = new(mockDataObject.Object);
331
DataObject
dataObject = new(mockDataObject.Object);
341
DataObject
dataObject = new();
361
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
517
DataObject
dataObject = new();
539
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
560
DataObject
dataObject = new(mockDataObject.Object);
591
DataObject
dataObject = new(mockDataObject.Object);
601
DataObject
dataObject = new();
621
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
636
DataObject
dataObject = new();
655
DataObject
dataObject = new();
664
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
679
DataObject
dataObject = new();
686
DataObject
dataObject = new();
713
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
742
DataObject
dataObject = new(mockDataObject.Object);
751
DataObject
dataObject = new();
758
DataObject
dataObject = new();
797
DataObject
dataObject = new(mockDataObject.Object);
805
DataObject
dataObject = new();
825
DataObject
dataObject = new();
834
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
849
DataObject
dataObject = new();
865
DataObject
dataObject = new();
874
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
890
DataObject
dataObject = new();
931
DataObject
dataObject = new();
940
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
956
DataObject
dataObject = new();
971
DataObject
dataObject = new();
987
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
1006
DataObject
dataObject = new(mockDataObject.Object);
1014
DataObject
dataObject = new();
1029
DataObject
dataObject = new();
1045
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
1064
DataObject
dataObject = new(mockDataObject.Object);
1072
DataObject
dataObject = new();
1088
DataObject
dataObject = new();
1102
DataObject
dataObject = new();
1119
DataObject
dataObject = new();
1148
DataObject
dataObject = new(mockDataObject.Object);
1156
DataObject
dataObject = new();
1190
DataObject
dataObject = new();
1219
DataObject
dataObject = new();
1256
DataObject
dataObject = new();
1296
DataObject
dataObject = new(mockDataObject.Object);
1341
DataObject
dataObject = new();
1372
DataObject
dataObject = new();
1409
DataObject
dataObject = new();
1452
DataObject
dataObject = new(mockDataObject.Object);
1477
DataObject
dataObject = new(mockDataObject.Object);
1485
DataObject
dataObject = new();
1501
DataObject
dataObject = new();
1515
DataObject
dataObject = new();
1530
DataObject
dataObject = new();
1554
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
1573
DataObject
dataObject = new(mockDataObject.Object);
1581
DataObject
dataObject = new();
1590
DataObject
dataObject = new();
1615
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
1635
DataObject
dataObject = new(mockDataObject.Object);
1643
DataObject
dataObject = new();
1658
DataObject
dataObject = new();
1694
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
1713
DataObject
dataObject = new(mockDataObject.Object);
1737
DataObject
dataObject = new();
1788
Mock<
DataObject
> mockDataObject = new(MockBehavior.Strict);
1807
DataObject
dataObject = new(mockDataObject.Object);
1816
DataObject
dataObject = new();
1827
DataObject
dataObject = new();
1835
DataObject
data = new(new DataObjectIgnoringStorageMediumForEnhancedMetafile());
1893
DataObject
dataObject = new();
1915
DataObject
dataObject = new(mockComDataObject.Object);
1929
DataObject
dataObject = new();
1944
DataObject
dataObject = new(mockComDataObject.Object);
1953
DataObject
dataObject = new();
1983
DataObject
dataObject = new(mockComDataObject.Object);
2002
DataObject
dataObject = new();
2057
DataObject
dataObject = new(mockDataObject.Object);
2119
DataObject
dataObject = new(mockDataObject.Object);
2144
DataObject
dataObject = new();
2167
DataObject
dataObject = new(mockDataObject.Object);
2217
DataObject
dataObject = new();
2246
DataObject
dataObject = new(mockDataObject.Object);
2309
DataObject
dataObject = new(mockDataObject.Object);
2336
DataObject
dataObject = new();
2363
DataObject
dataObject = new(mockComDataObject.Object);
2379
DataObject
dataObject = new();
2422
DataObject
dataObject = new();
2459
DataObject
dataObject = new();
2481
DataObject
dataObject = new();
2502
DataObject
dataObject = new();
2543
DataObject
dataObject = new();
2582
DataObject
dataObject = new();
2601
DataObject
dataObject = new();
2625
DataObject
dataObject = new();
2650
DataObject
dataObject = new();
2708
DataObject
inData = controlAccessor.CreateRuntimeDataObjectForDrag(data);
2731
public unsafe void DataObject_WithJson_MockRoundTrip_OutData_IsSame(
DataObject
data)
2738
DataObject
inData = controlAccessor.CreateRuntimeDataObjectForDrag(data);
2757
DataObject
inData = accessor.CreateRuntimeDataObjectForDrag(testString);
2758
inData.Should().BeAssignableTo<
DataObject
>();
2773
DataObject
inData = accessor.CreateRuntimeDataObjectForDrag(data);
2774
inData.Should().BeAssignableTo<
DataObject
>();
2789
DataObject
inData = accessor.CreateRuntimeDataObjectForDrag(data);
2791
inData.Should().BeAssignableTo<
DataObject
>();
2801
DataObject
native = new();
2807
DataObject
data = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
2821
DataObject
native = new(DataFormats.Locale, value);
2841
DataObject
dataObject = new();
2853
DataObject
dataObject = new();
2865
DataObject
dataObject = new();
2868
DataObject
wrapped = new(dataObject);
2879
DataObject
data = new();
2906
DataObject
dataObject = new();
2994
DataObject
dataObject = new();
3005
DataObject
dataObject = new();
3016
DataObject
data = new();
3027
DataObject
data = new();
3044
DataObject
dataObject = new();
System\Windows\Forms\DragDropHelperTests.cs (11)
106
public unsafe void SetDragImage_DataObject_Bitmap_Point_bool_ReturnsExpected(
DataObject
dataObject, Bitmap dragImage, Point cursorOffset, bool useDefaultDragImage)
132
public unsafe void SetDragImage_DataObject_GiveFeedbackEventArgs_ReturnsExpected(
DataObject
dataObject, GiveFeedbackEventArgs e)
167
DataObject
dataObject = null;
182
public unsafe void SetDropDescription_ClearDropDescription_ReturnsExpected(
DataObject
dataObject, DropImageType dropImageType, string message, string messageReplacementToken)
217
public void SetDropDescription_IsInDragLoop_ReturnsExpected(
DataObject
dataObject, DropImageType dropImageType, string message, string messageReplacementToken)
233
public void SetDropDescription_LengthExceedsMaxPath_ThrowsArgumentOutOfRangeException(
DataObject
dataObject, DropImageType dropImageType, string message, string messageReplacementToken)
241
DataObject
dataObject = null;
248
public unsafe void SetDropDescription_ReleaseDragDropFormats_ReturnsExpected(
DataObject
dataObject, DropImageType dropImageType, string message, string messageReplacementToken)
293
public unsafe void SetDropDescription_DataObject_DropImageType_string_string_ReturnsExpected(
DataObject
dataObject, DropImageType dropImageType, string message, string messageReplacementToken)
318
DataObject
dataObject = null;
324
public unsafe void SetInDragLoop_ReturnsExpected(
DataObject
dataObject, bool inDragLoop)
System\Windows\Forms\NativeToWinFormsAdapterTests.cs (45)
31
DataObject
native = new();
34
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
47
DataObject
native = new();
50
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
66
DataObject
native = new();
68
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
76
private static (
DataObject
dataObject, TestData value) SetDataObject(string format)
78
DataObject
native = new();
82
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
91
(
DataObject
dataObject, TestData _) = SetDataObject(format);
101
(
DataObject
dataObject, TestData _) = SetDataObject(format);
115
(
DataObject
dataObject, TestData _) = SetDataObject(format);
127
(
DataObject
dataObject, TestData _) = SetDataObject(format);
139
(
DataObject
dataObject, TestData _) = SetDataObject(format);
152
DataObject
native = new();
155
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
165
DataObject
native = new();
168
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
181
DataObject
native = new();
184
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
196
DataObject
native = new();
199
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
210
DataObject
native = new();
213
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
224
(
DataObject
dataObject, TestData _) = SetDataObject(format);
237
(
DataObject
dataObject, TestData _) = SetDataObject(format);
251
(
DataObject
dataObject, TestData _) = SetDataObject(format);
264
(
DataObject
dataObject, TestData _) = SetDataObject(format);
275
(
DataObject
dataObject, TestData value) = SetDataObject(format);
289
(
DataObject
dataObject, TestData _) = SetDataObject(format);
301
(
DataObject
dataObject, TestData _) = SetDataObject(format);
315
(
DataObject
dataObject, TestData _) = SetDataObject(format);
326
(
DataObject
dataObject, TestData _) = SetDataObject(format);
341
(
DataObject
dataObject, TestData _) = SetDataObject(format);
352
(
DataObject
dataObject, TestData _) = SetDataObject(format);
365
(
DataObject
dataObject, TestData _) = SetDataObject(format);
378
(
DataObject
dataObject, TestData _) = SetDataObject(format);
392
(
DataObject
dataObject, TestData value) = SetDataObject(format);
406
(
DataObject
dataObject, TestData _) = SetDataObject(format);
418
DataObject
native = new();
421
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
436
DataObject
native = new();
439
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
455
DataObject
native = new();
458
DataObject
dataObject = new(ComHelpers.GetComPointer<Com.IDataObject>(native));
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (6)
26
DataObject
dataObject = new();
38
DataObject
dataObject = new();
50
DataObject
dataObject = new();
62
DataObject
dataObject = new();
74
DataObject
dataObject = new();
86
DataObject
dataObject = new();
System\Windows\Forms\TypeNameComparerTests.cs (5)
30
Dictionary<TypeName, Type> types = new(
DataObject
.Composition.TypeNameComparer.Default)
55
Dictionary<TypeName, Type> types = new(
DataObject
.Composition.TypeNameComparer.Default)
69
Dictionary<TypeName, Type> types = new(
DataObject
.Composition.TypeNameComparer.Default)
87
var comparer =
DataObject
.Composition.TypeNameComparer.Default;
100
var comparer =
DataObject
.Composition.TypeNameComparer.Default;
System.Windows.Forms.TestUtilities (1)
DataObjectTestHelpers.cs (1)
9
/// Test utilities relating to <see cref="
DataObject
"/>.
System.Windows.Forms.UI.IntegrationTests (7)
DesignBehaviorsTests.cs (3)
116
var
dataObject = toolboxService.SerializeToolboxItem(toolboxItem) as
DataObject
;
187
ToolboxItem? item = ((
DataObject
)serializedObject)?.GetData(typeof(ToolboxItem)) as ToolboxItem;
DragDropTests.cs (4)
88
DataObject
data = new();
304
DataObject
data = new();
1089
DataObject
data = new(DataFormats.FileDrop, dropFiles);
1149
DataObject
data = new(DataFormats.FileDrop, dropFiles);
WinFormsControlsTest (4)
DragDrop.cs (4)
179
DataObject
data = new(nameof(_nyanCatAscii), _nyanCatAscii);
537
DataObject
data = new(DataFormats.FileDrop,
555
DataObject
data = new(nameof(_nyanCatBmp), _nyanCatBmp);
567
DataObject
data = new(nameof(_nyanCatAscii), _nyanCatAscii);