Base:
property
Site
System.Windows.Forms.Control.Site
25 writes to Site
System.Windows.Forms.Tests (25)
System\Windows\Forms\AxHostTests.cs (25)
269
Site
= mockSite.Object
612
Site
= mockSite1.Object
621
control.
Site
= mockSite1.Object;
643
control.
Site
= mockSite2.Object;
649
control.
Site
= null;
676
Site
= mockSite1.Object
683
control.
Site
= mockSite1.Object;
705
control.
Site
= mockSite2.Object;
713
control.
Site
= null;
740
Site
= mockSite1.Object
747
control.
Site
= mockSite1.Object;
769
control.
Site
= mockSite2.Object;
775
control.
Site
= null;
818
control.
Site
= mockSite1.Object;
827
control.
Site
= mockSite1.Object;
855
control.
Site
= mockSite2.Object;
864
control.
Site
= null;
1795
Site
= mockSite.Object
1859
Site
= mockSite.Object
1912
control.
Site
= mockSite.Object;
1967
control.
Site
= mockSite.Object;
2024
control.
Site
= mockSite.Object;
2088
Site
= mockSite.Object
2154
Site
= mockSite.Object
2225
control.
Site
= mockSite.Object;
29 references to Site
System.Windows.Forms (11)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (2)
138
if (control.
Site
is { } site)
396
if (control.
Site
is { } site && site.Container is { } container)
System\Windows\Forms\ActiveX\AxHost.cs (8)
825
if (
Site
.TryGetService(out ISelectionService? selectionService))
853
if (
Site
.TryGetService(out ISelectionService? selectionService))
968
if (IsUserMode() || !
Site
.TryGetService(out ISelectionService? selectionService))
1989
if (
Site
.TryGetService(out IDesignerHost? host) && host.RootComponent is ContainerControl rootControl)
2071
ISite? site =
Site
;
2391
if (
Site
.TryGetService(out ISelectionService? selectionService) && selectionService.GetComponentSelected(this))
2987
if (
Site
.TryGetService(out IComponentChangeService? changeService))
3018
Site
.TryGetService(out IDesignerHost? host);
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
509
if (_host.
Site
.TryGetService(out IComponentChangeService? changeService))
System.Windows.Forms.Tests (18)
System\Windows\Forms\AxHostTests.cs (18)
105
Assert.Null(control.
Site
);
199
Assert.Null(control.
Site
);
614
Assert.Same(mockSite1.Object, control.
Site
);
622
Assert.Same(mockSite1.Object, control.
Site
);
644
Assert.Same(mockSite2.Object, control.
Site
);
650
Assert.Null(control.
Site
);
678
Assert.Same(mockSite1.Object, control.
Site
);
684
Assert.Same(mockSite1.Object, control.
Site
);
706
Assert.Same(mockSite2.Object, control.
Site
);
714
Assert.Null(control.
Site
);
742
Assert.Same(mockSite1.Object, control.
Site
);
748
Assert.Same(mockSite1.Object, control.
Site
);
770
Assert.Same(mockSite2.Object, control.
Site
);
776
Assert.Null(control.
Site
);
819
Assert.Same(mockSite1.Object, control.
Site
);
828
Assert.Same(mockSite1.Object, control.
Site
);
856
Assert.Same(mockSite2.Object, control.
Site
);
865
Assert.Null(control.
Site
);