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