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());
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for