33 instantiations of SafeArrayScope
System.Windows.Forms (5)
System\Windows\Forms\Accessibility\AccessibleObject.cs (4)
642
UIA_PROPERTY_ID.UIA_RuntimeIdPropertyId => (VARIANT)new
SafeArrayScope
<int>(RuntimeId),
945
*pRetVal = new
SafeArrayScope
<int>(RuntimeId);
1046
*pRetVal = new
SafeArrayScope
<int>(RuntimeId);
3029
*pRetVal = result is null ? SAFEARRAY.CreateEmpty(VARENUM.VT_I4) : new
SafeArrayScope
<int>(result);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
415
using SafeArrayScope<object> scope =
new
(1);
System.Windows.Forms.Primitives (6)
System\Windows\Forms\Automation\UiaTextProvider.cs (3)
85
return
new
(SAFEARRAY.CreateEmpty(VARENUM.VT_R8));
88
SafeArrayScope<double> result =
new
((uint)(rectArray.Count * 4));
109
SafeArrayScope<double> result =
new
(4);
System\Windows\Forms\Automation\UiaTextRange.cs (1)
345
SafeArrayScope<double> ownerBounds =
new
(result.data.parray);
Windows\Win32\System\Com\ComSafeArrayScope.cs (2)
30
_value =
new
(value);
41
_value =
new
(PInvokeCore.SafeArrayCreate(VARENUM.VT_UNKNOWN, 1, &saBound));
System.Windows.Forms.Primitives.Tests (22)
System\Windows\Forms\Automation\UiaTextRangeTests.cs (12)
546
SafeArrayScope<double> array =
new
(4);
564
using SafeArrayScope<double> actual =
new
((SAFEARRAY*)null);
576
SafeArrayScope<double> array =
new
(4);
594
using SafeArrayScope<double> actual =
new
((SAFEARRAY*)null);
602
SafeArrayScope<double> array =
new
(4);
623
using SafeArrayScope<double> safeArrayScope =
new
((SAFEARRAY*)null);
641
SafeArrayScope<double> array =
new
(4);
664
using SafeArrayScope<double> actual =
new
((SAFEARRAY*)null);
690
SafeArrayScope<double> array =
new
(4);
747
using SafeArrayScope<double> actual =
new
((SAFEARRAY*)null);
772
SafeArrayScope<double> array =
new
(4);
829
using SafeArrayScope<double> actual =
new
((SAFEARRAY*)null);
Windows\Win32\System\Com\SafeArrayScopeTests.cs (10)
12
using SafeArrayScope<int> scope =
new
(intArray);
23
using SafeArrayScope<string> scope =
new
(size: 1);
24
using SafeArrayScope<int> scope2 =
new
(size: 0);
32
Assert.Throws<ArgumentException>(() => new
SafeArrayScope
<short>(size: 1));
38
using SafeArrayScope<string> scope =
new
(size: 2);
51
using SafeArrayScope<int> scope =
new
(size: 2);
62
SafeArrayScope<string> scope =
new
(size: 1);
73
ArgumentException e = Assert.Throws<ArgumentException>(() => new
SafeArrayScope
<IUnknown>(size: 1));
78
e = Assert.Throws<ArgumentException>(() => new
SafeArrayScope
<IUnknown>(array));
93
ArgumentException e = Assert.Throws<ArgumentException>(() => new
SafeArrayScope
<string>(array));
34 references to SafeArrayScope
System.Private.Windows.Core (5)
Windows\Win32\System\Com\SafeArrayScope.cs (5)
250
public static explicit operator VARIANT(in
SafeArrayScope
<T> scope) => new() { vt = VARENUM.VT_ARRAY | scope.Value->VarType, data = new() { parray = (SAFEARRAY*)scope._value } };
252
public static implicit operator SAFEARRAY*(in
SafeArrayScope
<T> scope) => (SAFEARRAY*)scope._value;
254
public static implicit operator nint(in
SafeArrayScope
<T> scope) => scope._value;
257
public static implicit operator SAFEARRAY**(in
SafeArrayScope
<T> scope) => (SAFEARRAY**)Unsafe.AsPointer(ref Unsafe.AsRef(in scope._value));
260
public static implicit operator void**(in
SafeArrayScope
<T> scope) => (void**)Unsafe.AsPointer(ref Unsafe.AsRef(in scope._value));
System.Windows.Forms (1)
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
415
using
SafeArrayScope
<object> scope = new(1);
System.Windows.Forms.Primitives (6)
System\Windows\Forms\Automation\UiaTextProvider.cs (4)
81
public static
SafeArrayScope
<double> RectListToDoubleArray(List<Rectangle> rectArray)
88
SafeArrayScope
<double> result = new((uint)(rectArray.Count * 4));
107
internal static
SafeArrayScope
<double> BoundingRectangleAsArray(Rectangle bounds)
109
SafeArrayScope
<double> result = new(4);
System\Windows\Forms\Automation\UiaTextRange.cs (1)
345
SafeArrayScope
<double> ownerBounds = new(result.data.parray);
Windows\Win32\System\Com\ComSafeArrayScope.cs (1)
21
private readonly
SafeArrayScope
<nint> _value;
System.Windows.Forms.Primitives.Tests (22)
System\Windows\Forms\Automation\UiaTextProviderTests.cs (3)
69
using
SafeArrayScope
<double> actual = UiaTextProvider.RectListToDoubleArray(
86
using
SafeArrayScope
<double> actual = UiaTextProvider.RectListToDoubleArray(null!);
93
using
SafeArrayScope
<double> actual = UiaTextProvider.RectListToDoubleArray([]);
System\Windows\Forms\Automation\UiaTextRangeTests.cs (13)
546
SafeArrayScope
<double> array = new(4);
564
using
SafeArrayScope
<double> actual = new((SAFEARRAY*)null);
566
using
SafeArrayScope
<double> expectedRectArray = UiaTextProvider.BoundingRectangleAsArray(expected);
576
SafeArrayScope
<double> array = new(4);
594
using
SafeArrayScope
<double> actual = new((SAFEARRAY*)null);
602
SafeArrayScope
<double> array = new(4);
623
using
SafeArrayScope
<double> safeArrayScope = new((SAFEARRAY*)null);
641
SafeArrayScope
<double> array = new(4);
664
using
SafeArrayScope
<double> actual = new((SAFEARRAY*)null);
690
SafeArrayScope
<double> array = new(4);
747
using
SafeArrayScope
<double> actual = new((SAFEARRAY*)null);
772
SafeArrayScope
<double> array = new(4);
829
using
SafeArrayScope
<double> actual = new((SAFEARRAY*)null);
Windows\Win32\System\Com\SafeArrayScopeTests.cs (6)
12
using
SafeArrayScope
<int> scope = new(intArray);
23
using
SafeArrayScope
<string> scope = new(size: 1);
24
using
SafeArrayScope
<int> scope2 = new(size: 0);
38
using
SafeArrayScope
<string> scope = new(size: 2);
51
using
SafeArrayScope
<int> scope = new(size: 2);
62
SafeArrayScope
<string> scope = new(size: 1);