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