4 writes to _instance
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (4)
2265
_instance
= ComHelpers.GetObjectForIUnknown(unknown);
2287
_instance
= ComHelpers.GetObjectForIUnknown(unknown);
2303
_instance
= CreateInstanceCore(_clsid);
3436
_instance
= null;
34 references to _instance
System.Windows.Forms (34)
System\Windows\Forms\ActiveX\AxHost.cs (34)
1881
using var persistStream = ComHelpers.GetComScope<IPersistStream>(
_instance
);
1886
using var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(
_instance
);
1899
using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(
_instance
);
1907
using (var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(
_instance
))
2031
using (var persistStream = ComHelpers.GetComScope<IPersistStream>(
_instance
))
2038
using (var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(
_instance
))
2045
using (var persistStorage = ComHelpers.GetComScope<IPersistStorage>(
_instance
))
2291
if (
_instance
is null)
2297
[MemberNotNull(nameof(
_instance
))]
2300
Debug.Assert(
_instance
is null, "instance must be null");
2304
Debug.Assert(
_instance
is not null, "w/o an exception being thrown we must have an object...");
2335
return
_instance
;
2340
using var categorizeProperties = ComHelpers.TryGetComScope<ICategorizeProperties>(
_instance
, out HRESULT hr);
2742
using var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(
_instance
, out HRESULT hr);
2750
if (ComHelpers.SupportsInterface<IPersistStream>(
_instance
))
2756
using var persistStoragePtr = ComHelpers.TryGetComScope<IPersistStorage>(
_instance
, out hr);
2766
using var persistPropBag = ComHelpers.TryGetComScope<IPersistPropertyBag>(
_instance
, out hr);
2785
using var persistStream = ComHelpers.GetComScope<IPersistStream>(
_instance
);
2791
using (var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(
_instance
, out HRESULT hr))
2821
using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(
_instance
);
2834
using var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(
_instance
);
2852
return
_instance
;
2857
if (
_instance
is null)
2865
return
_instance
;
2922
using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(
_instance
, out HRESULT hr);
2933
using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(
_instance
, out HRESULT hr);
2956
using ComScope<IUnknown> unknown = ComHelpers.TryGetComScope<IUnknown>(
_instance
, out HRESULT hr);
3009
using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(
_instance
, out HRESULT hr);
3024
using var unknown = ComHelpers.GetComScope<IUnknown>(
_instance
);
3302
if (
_instance
is not IQuickActivate.Interface iqa)
3433
if (
_instance
is not null)
3435
Marshal.ReleaseComObject(
_instance
);
3517
=> ComHelpers.GetComScope<T>(
_instance
);
3520
=> ComHelpers.TryGetComScope<T>(
_instance
, out hr);