1 interface inheriting from IDataObject
System.Windows.Forms (1)
System\Windows\Forms\OLE\ITypedDataObject.cs (1)
22public interface ITypedDataObject : IDataObject
9 implementations of IDataObject
ComDisabled.Tests (1)
DataObjectComTests.cs (1)
72private class CustomIDataObject : IDataObject
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
14protected class ComponentDataObject : IDataObject
System.Windows.Forms.Tests (7)
System\Windows\Forms\ClipboardTests.cs (2)
604private class CustomDataObject : IDataObject, ComTypes.IDataObject 1121private class JsonDataObject : IDataObject, ComTypes.IDataObject
System\Windows\Forms\DataObjectComTests.cs (1)
51private class CustomIDataObject : IDataObject
System\Windows\Forms\DataObjectExtensionsTests.cs (1)
140internal class UntypedDataObject : IDataObject
System\Windows\Forms\DataObjectTests.cs (1)
2669private class CustomDataObject : IComDataObject, IDataObject
System\Windows\Forms\DragEventArgsTests.cs (1)
99private class CustomDataObject : IDataObject
System\Windows\Forms\ToolStripItemTests.cs (1)
10238private class CustomDataObject : IDataObject
128 references to IDataObject
ComDisabled.Tests (4)
DataObjectComTests.cs (4)
13private delegate IDataObject CreateWinFormsDataObjectForOutgoingDropData(Com.IDataObject* dataObject); 29IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 49IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 67IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
StringCopyPaste\WpfStringCopyPasteService.cs (2)
36var dataObject = Clipboard.GetDataObject(); 69var dataObject = Clipboard.GetDataObject();
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\MyServices\ClipboardProxy.vb (2)
110''' Gets a <see cref="IDataObject"/> from the clipboard. 115Public Function GetDataObject() As IDataObject
System.Windows.Forms (50)
System\Windows\Forms\Control.cs (1)
4842/// <see cref="object"/> that implements <see cref="IDataObject"/>. <paramref name="dragImage"/> is the bitmap
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
1045IDataObject? dataObj = Clipboard.GetDataObject();
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (1)
19private IDataObject? _lastDataObject;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2139/// <paramref name="data"/> can also be any <see cref="object"/> that implements <see cref="IDataObject"/>. 2165if (data is IDataObject idataObject)
System\Windows\Forms\OLE\Clipboard.cs (7)
90public static unsafe IDataObject? GetDataObject() 157return dataObject is IDataObject ido && !Marshal.IsComObject(dataObject) 200GetDataObject() is IDataObject dataObject && dataObject.GetDataPresent(format, autoConvert: autoConvert); 249GetDataObject() is IDataObject dataObject ? dataObject.GetData(format, autoConvert) : null; 336/// the <see cref="IDataObject"/> on the <see cref="Clipboard"/> does not implement <see cref="ITypedDataObject"/> 473IDataObject? data = GetDataObject(); 479if (data is IDataObject dataObject)
System\Windows\Forms\OLE\DataObject.Composition.cs (6)
14/// Contains the logic to move between <see cref="IDataObject"/>, <see cref="Com.IDataObject.Interface"/>, 33private readonly IDataObject _winFormsDataObject; 45private Composition(IDataObject winFormsDataObject, Com.IDataObject.Interface nativeDataObject, ComTypes.IDataObject runtimeDataObject) 56public static Composition CreateFromWinFormsDataObject(IDataObject winFormsDataObject) 81/// The <see cref="IDataObject"/> the user passed to us, so that it can be passed back out. 83public IDataObject? OriginalIDataObject { get; private set; }
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (1)
18/// Maps native pointer <see cref="Com.IDataObject"/> to <see cref="IDataObject"/>.
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (3)
18/// Maps <see cref="IDataObject"/> to <see cref="Com.IDataObject.Interface"/>. 24private readonly IDataObject _dataObject; 26public WinFormsToNativeAdapter(IDataObject dataObject)
System\Windows\Forms\OLE\DataObject.cs (5)
50/// If <paramref name="data"/> implements an <see cref="IDataObject"/> interface, 63else if (data is IDataObject iDataObject) 93/// <see cref="IDataObject"/>. Otherwise, returns this. 96internal IDataObject TryUnwrapInnerIDataObject() 103internal IDataObject? OriginalIDataObject => _innerData.OriginalIDataObject;
System\Windows\Forms\OLE\DataObject.FormatEnumerator.cs (3)
17private readonly IDataObject _parent; 21public FormatEnumerator(IDataObject parent) : this(parent, parent.GetFormats()) 32public FormatEnumerator(IDataObject parent, string[]? formats)
System\Windows\Forms\OLE\DataObjectExtensions.cs (5)
11private static ITypedDataObject GetTypedDataObjectOrThrow(IDataObject dataObject) 29this IDataObject dataObject, 37this IDataObject dataObject, 46this IDataObject dataObject, 57this IDataObject dataObject,
System\Windows\Forms\OLE\DragDropHelper.cs (3)
61public static void ClearDropDescription(IDataObject? dataObject) 194public static unsafe bool IsInDragLoop(IDataObject dataObject) 244if (comDataObject is not IDataObject dataObject)
System\Windows\Forms\OLE\DragEventArgs.cs (4)
16IDataObject? data, 30IDataObject? data, 52/// The <see cref="IDataObject"/> that contains the data associated 55public IDataObject? Data { get; }
System\Windows\Forms\OLE\DropTarget.cs (6)
14private IDataObject? _lastDataObject; 43/// Creates <see cref="IDataObject"/> to be passed out as data for drag/drop operation 45/// <see cref="IDataObject"/> to be passed out as is. Otherwise, the data will be wrapped in a <see cref="DataObject"/>. 47private static IDataObject? CreateWinFormsDataObjectForOutgoingDropData(Com.IDataObject* nativeDataObject) 50if (ComWrappers.TryGetObject(unknown, out object? obj) && obj is IDataObject dataObject) 63IDataObject? data;
System\Windows\Forms\OLE\IDataObject.cs (1)
11/// When implementing a <see cref="IDataObject"/>, consider implementing <see cref="ITypedDataObject"/>
System\Windows\Forms\OLE\ITypedDataObject.cs (1)
17/// will throw a <see cref="NotSupportedException"/>. This is replacement of <see cref="IDataObject"/>
System.Windows.Forms.Design (16)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
309private static DragDropEffects GetEffect(IDataObject data)
System\Windows\Forms\Design\CommandSet.cs (4)
1415IDataObject dataObj = new DataObject(CF_DESIGNER, bytes); 1460IDataObject dataObj = new DataObject(CF_DESIGNER, bytes); 1846bool clipboardOperationSuccessful = ExecuteSafely(Clipboard.GetDataObject, false, out IDataObject? dataObj); 3095bool clipboardOperationSuccessful = ExecuteSafely(Clipboard.GetDataObject, false, out IDataObject? dataObj);
System\Windows\Forms\Design\ComponentTray.cs (1)
2905protected override bool CanDropDataObject(IDataObject dataObj)
System\Windows\Forms\Design\DocumentDesigner.cs (3)
285private AxToolboxItem CreateAxToolboxItem(IDataObject dataObject) 317private static ToolboxItem CreateCfCodeToolboxItem(IDataObject dataObject) 1045if (serializedData is not IDataObject dataObject)
System\Windows\Forms\Design\OleDragDropHandler.cs (7)
35private static Dictionary<IDataObject, IComponent>? s_currentDrags; 54private static IComponent? GetDragOwnerComponent(IDataObject data) 60private static void AddCurrentDrag(IDataObject data, IComponent component) 68protected virtual bool CanDropDataObject(IDataObject? dataObj) 671IDataObject dataObj = de.Data!; 1019private static object[]? GetDraggingObjects(IDataObject? dataObj, bool topLevelOnly) 1033public static object[]? GetDraggingObjects(IDataObject? dataObj) => GetDraggingObjects(dataObj, topLevelOnly: false);
System.Windows.Forms.Tests (54)
System\Windows\Forms\ClipboardTests.cs (19)
582IDataObject? clipboardDataObject = Clipboard.GetDataObject(); 587IDataObject? clipboardDataObject2 = Clipboard.GetDataObject(); 598IDataObject? clipboardDataObject = Clipboard.GetDataObject(); 628object IDataObject.GetData(string format, bool autoConvert) => format == "Foo" ? "Bar" : null!; 629object IDataObject.GetData(string format) => format == "Foo" ? "Bar" : null!; 630object IDataObject.GetData(Type format) => null!; 633bool IDataObject.GetDataPresent(string format, bool autoConvert) => format == "Foo"; 634bool IDataObject.GetDataPresent(string format) => format == "Foo"; 635bool IDataObject.GetDataPresent(Type format) => false; 636string[] IDataObject.GetFormats(bool autoConvert) => ["Foo"]; 637string[] IDataObject.GetFormats() => ["Foo"]; 639void IDataObject.SetData(string format, bool autoConvert, object? data) => throw new NotImplementedException(); 640void IDataObject.SetData(string format, object? data) => throw new NotImplementedException(); 641void IDataObject.SetData(Type format, object? data) => throw new NotImplementedException(); 642void IDataObject.SetData(object? data) => throw new NotImplementedException(); 947IDataObject dataObject = Clipboard.GetDataObject().Should().BeAssignableTo<IDataObject>().Subject; 1106IDataObject received = Clipboard.GetDataObject().Should().BeAssignableTo<IDataObject>().Subject;
System\Windows\Forms\ControlTests.Methods.cs (1)
1819yield return new object[] { new Mock<IDataObject>(MockBehavior.Strict).Object, allowedEffects };
System\Windows\Forms\DataObjectComTests.cs (3)
12private delegate IDataObject CreateWinFormsDataObjectForOutgoingDropData(Com.IDataObject* dataObject); 28IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 46IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
System\Windows\Forms\DataObjectTests.cs (26)
295Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 326Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 555Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 586Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 737Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 792Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1002Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1060Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1144Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1292Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1448Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1473Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1569Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1631Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1709Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 1803Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 2053Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 2115Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 2163Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 2242Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 2305Mock<IDataObject> mockDataObject = new(MockBehavior.Strict); 2719IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 2742IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 2761IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 2778IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr); 2794IDataObject outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
System\Windows\Forms\DragDropHelperTests.cs (2)
76IDataObject dataObject = null; 223Assert.True(DragDropHelper.IsInDragLoop(dataObject as IDataObject));
System\Windows\Forms\DragEventArgsTests.cs (2)
23public void Ctor_IDataObject_Int_Int_Int_DragDropEffects_DragDropEffects(IDataObject data, int keyState, int x, int y, DragDropEffects allowedEffect, DragDropEffects effect) 36public void Ctor_IDataObject_Int_Int_Int_DragDropEffects_DragDropEffects_DropImageType_string_string(IDataObject data, int keyState, int x,
System\Windows\Forms\ToolStripItemTests.cs (1)
10154yield return new object[] { new Mock<IDataObject>(MockBehavior.Strict).Object, allowedEffects };