4 writes to _instance
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (4)
2268
_instance
= ComHelpers.GetObjectForIUnknown(unknown);
2290
_instance
= ComHelpers.GetObjectForIUnknown(unknown);
2306
_instance
= CreateInstanceCore(_clsid);
3439
_instance
= null;
34 references to _instance
System.Windows.Forms (34)
System\Windows\Forms\ActiveX\AxHost.cs (34)
1884
using var persistStream = ComHelpers.GetComScope<IPersistStream>(
_instance
);
1889
using var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(
_instance
);
1902
using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(
_instance
);
1910
using (var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(
_instance
))
2034
using (var persistStream = ComHelpers.GetComScope<IPersistStream>(
_instance
))
2041
using (var persistStreamInit = ComHelpers.GetComScope<IPersistStreamInit>(
_instance
))
2048
using (var persistStorage = ComHelpers.GetComScope<IPersistStorage>(
_instance
))
2294
if (
_instance
is null)
2300
[MemberNotNull(nameof(
_instance
))]
2303
Debug.Assert(
_instance
is null, "instance must be null");
2307
Debug.Assert(
_instance
is not null, "w/o an exception being thrown we must have an object...");
2338
return
_instance
;
2343
using var categorizeProperties = ComHelpers.TryGetComScope<ICategorizeProperties>(
_instance
, out HRESULT hr);
2745
using var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(
_instance
, out HRESULT hr);
2753
if (ComHelpers.SupportsInterface<IPersistStream>(
_instance
))
2759
using var persistStoragePtr = ComHelpers.TryGetComScope<IPersistStorage>(
_instance
, out hr);
2769
using var persistPropBag = ComHelpers.TryGetComScope<IPersistPropertyBag>(
_instance
, out hr);
2788
using var persistStream = ComHelpers.GetComScope<IPersistStream>(
_instance
);
2794
using (var persistStreamInit = ComHelpers.TryGetComScope<IPersistStreamInit>(
_instance
, out HRESULT hr))
2824
using var persistStorage = ComHelpers.GetComScope<IPersistStorage>(
_instance
);
2837
using var persistPropBag = ComHelpers.GetComScope<IPersistPropertyBag>(
_instance
);
2855
return
_instance
;
2860
if (
_instance
is null)
2868
return
_instance
;
2925
using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(
_instance
, out HRESULT hr);
2936
using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(
_instance
, out HRESULT hr);
2959
using ComScope<IUnknown> unknown = ComHelpers.TryGetComScope<IUnknown>(
_instance
, out HRESULT hr);
3012
using var pages = ComHelpers.TryGetComScope<ISpecifyPropertyPages>(
_instance
, out HRESULT hr);
3027
using var unknown = ComHelpers.GetComScope<IUnknown>(
_instance
);
3305
if (
_instance
is not IQuickActivate.Interface iqa)
3436
if (
_instance
is not null)
3438
Marshal.ReleaseComObject(
_instance
);
3520
=> ComHelpers.GetComScope<T>(
_instance
);
3523
=> ComHelpers.TryGetComScope<T>(
_instance
, out hr);