11 implementations of IDataObject
ComDisabled.Tests (1)
DataObjectComTests.cs (1)
50
private class CustomIDataObject :
IDataObject
System.Windows.Forms (4)
System\Windows\Forms\OLE\DataObject.Composition.cs (1)
16
internal unsafe partial class Composition :
IDataObject
, Com.IDataObject.Interface, ComTypes.IDataObject
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (1)
19
private unsafe class NativeToWinFormsAdapter :
IDataObject
, Com.IDataObject.Interface
System\Windows\Forms\OLE\DataObject.cs (1)
18
IDataObject
,
System\Windows\Forms\OLE\DataObject.DataStore.cs (1)
12
private sealed partial class DataStore :
IDataObject
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
14
protected class ComponentDataObject :
IDataObject
System.Windows.Forms.Tests (5)
System\Windows\Forms\ClipboardTests.cs (1)
582
private class CustomDataObject :
IDataObject
, ComTypes.IDataObject
System\Windows\Forms\DataObjectComTests.cs (1)
51
private class CustomIDataObject :
IDataObject
System\Windows\Forms\DataObjectTests.cs (1)
2387
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
130 references to IDataObject
ComDisabled.Tests (3)
DataObjectComTests.cs (3)
12
private delegate
IDataObject
CreateWinFormsDataObjectForOutgoingDropData(Com.IDataObject* dataObject);
27
IDataObject
outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
45
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)
101
''' Gets a <see cref="
IDataObject
"/> from the clipboard.
106
Public Function GetDataObject() As
IDataObject
System.Windows.Forms (56)
System\Windows\Forms\Control.cs (1)
4801
/// <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)
2147
/// <paramref name="data"/> can also be any <see cref="object"/> that implements <see cref="
IDataObject
"/>.
2173
if (data is
IDataObject
idataObject)
System\Windows\Forms\OLE\Clipboard.cs (4)
79
public static unsafe
IDataObject
? GetDataObject()
146
return dataObject is
IDataObject
ido && !Marshal.IsComObject(dataObject)
189
GetDataObject() is
IDataObject
dataObject && dataObject.GetDataPresent(format, autoConvert: autoConvert);
233
GetDataObject() is
IDataObject
dataObject ? dataObject.GetData(format, autoConvert) : null;
System\Windows\Forms\OLE\DataObject.Composition.cs (6)
13
/// Contains the logic to move between <see cref="
IDataObject
"/>, <see cref="Com.IDataObject.Interface"/>,
32
private readonly
IDataObject
_winFormsDataObject;
44
private Composition(
IDataObject
winFormsDataObject, Com.IDataObject.Interface nativeDataObject, ComTypes.IDataObject runtimeDataObject)
55
public static Composition CreateFromWinFormsDataObject(
IDataObject
winFormsDataObject)
80
/// The <see cref="
IDataObject
"/> the user passed to us, so that it can be passed back out.
82
public
IDataObject
? OriginalIDataObject { get; private set; }
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (11)
17
/// Maps native pointer <see cref="Com.IDataObject"/> to <see cref="
IDataObject
"/>.
398
object?
IDataObject
.GetData(string format, bool autoConvert)
434
object?
IDataObject
.GetData(string format) => ((
IDataObject
)this).GetData(format, autoConvert: true);
436
object?
IDataObject
.GetData(Type format) => ((
IDataObject
)this).GetData(format.FullName!);
438
bool
IDataObject
.GetDataPresent(Type format) => GetDataPresent(format.FullName!);
506
void
IDataObject
.SetData(string format, bool autoConvert, object? data) { }
507
void
IDataObject
.SetData(string format, object? data) { }
508
void
IDataObject
.SetData(Type format, object? data) { }
509
void
IDataObject
.SetData(object? data) { }
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 (11)
52
else if (data is
IDataObject
iDataObject)
82
/// <see cref="
IDataObject
"/>. Otherwise, returns this.
85
internal
IDataObject
TryUnwrapInnerIDataObject()
92
internal
IDataObject
? OriginalIDataObject => _innerData.OriginalIDataObject;
96
((
IDataObject
)_innerData).GetData(format, autoConvert);
103
((
IDataObject
)_innerData).GetDataPresent(format, autoConvert);
109
public virtual string[] GetFormats(bool autoConvert) => ((
IDataObject
)_innerData).GetFormats(autoConvert);
114
=> ((
IDataObject
)_innerData).SetData(format, autoConvert, data);
116
public virtual void SetData(string format, object? data) => ((
IDataObject
)_innerData).SetData(format, data);
118
public virtual void SetData(Type format, object? data) => ((
IDataObject
)_innerData).SetData(format, data);
120
public virtual void SetData(object? data) => ((
IDataObject
)_innerData).SetData(data);
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\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.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)
286
private AxToolboxItem CreateAxToolboxItem(
IDataObject
dataObject)
318
private static ToolboxItem CreateCfCodeToolboxItem(
IDataObject
dataObject)
1060
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 (51)
System\Windows\Forms\ClipboardTests.cs (17)
114
IDataObject
? result = Clipboard.GetDataObject();
264
var
dataObject = Clipboard.GetDataObject();
560
IDataObject
? clipboardDataObject = Clipboard.GetDataObject();
565
IDataObject
? clipboardDataObject2 = Clipboard.GetDataObject();
576
IDataObject
? clipboardDataObject = Clipboard.GetDataObject();
606
object
IDataObject
.GetData(string format, bool autoConvert) => format == "Foo" ? "Bar" : null!;
607
object
IDataObject
.GetData(string format) => format == "Foo" ? "Bar" : null!;
608
object
IDataObject
.GetData(Type format) => null!;
611
bool
IDataObject
.GetDataPresent(string format, bool autoConvert) => format == "Foo";
612
bool
IDataObject
.GetDataPresent(string format) => format == "Foo";
613
bool
IDataObject
.GetDataPresent(Type format) => false;
614
string[]
IDataObject
.GetFormats(bool autoConvert) => ["Foo"];
615
string[]
IDataObject
.GetFormats() => ["Foo"];
617
void
IDataObject
.SetData(string format, bool autoConvert, object? data) => throw new NotImplementedException();
618
void
IDataObject
.SetData(string format, object? data) => throw new NotImplementedException();
619
void
IDataObject
.SetData(Type format, object? data) => throw new NotImplementedException();
620
void
IDataObject
.SetData(object? data) => throw new NotImplementedException();
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 (25)
287
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
318
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
409
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
440
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
591
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
646
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
856
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
914
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
998
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1083
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1166
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1191
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1287
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1349
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1427
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1521
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1771
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1833
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1881
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
1960
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
2023
Mock<
IDataObject
> mockDataObject = new(MockBehavior.Strict);
2437
IDataObject
outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
2452
IDataObject
outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
2469
IDataObject
outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
2485
IDataObject
outData = dropTargetAccessor.CreateDelegate<CreateWinFormsDataObjectForOutgoingDropData>()(inDataPtr);
System\Windows\Forms\DragDropHelperTests.cs (2)
76
IDataObject
dataObject = null;
218
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 };