Module.IServiceProvider.GetService(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
For a description of this member, see GetService(Type).
virtual System::Object ^ System.IServiceProvider.GetService(Type ^ serviceType) = IServiceProvider::GetService;
object IServiceProvider.GetService (Type serviceType);
Function GetService (serviceType As Type) As Object Implements IServiceProvider.GetService
Parameters
Returns
The requested service object, or null
if the service does not exist.
Implements
Examples
IControlPanel controlPanel =
(IControlPanel)GetService(typeof(IControlPanel));
ModulePageInfo modPgInfo = getModulePage();
controlPanel.RegisterPage(modPgInfo);
controlPanel.RegisterPage(
ControlPanelCategoryInfo.HealthAndDiagnostics, modPgInfo);
Trace.WriteLine("Module.IsPageEnabled: "
+ this.IsPageEnabled(myModPgInfo).ToString());