SPService class
Represents a farm-wide service.
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.SPPersistedObject
Microsoft.SharePoint.Administration.SPPersistedUpgradableObject
Microsoft.SharePoint.Administration.SPService
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
To return the parent service of a service instance, use the Service property of the SPServiceInstance class. Use the Services property of the SPFarm class to return an SPServiceCollection object that represents the collection of services on the server farm. Use an indexer to return a single service from the collection using the GUID that identifies the service. For example, if the collection is assigned to a variable named myServices, use myServices[index] in C#, or myServices(index) in Visual Basic, where index is the GUID that identifies the service.To retrieve a single service from the collection by name, use the GetValue method. For example, if the collection is assigned to a variable named myServices, use myServices.GetValue<ServiceType>(name) in C#, or myServices.GetValue(ServiceType)(name) in Visual Basic, where ServiceType is the type of the service and name is the name that identifies the service.
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.SPPersistedObject
Microsoft.SharePoint.Administration.SPPersistedUpgradableObject
Microsoft.SharePoint.Administration.SPService
Microsoft.SharePoint.Administration.SPDiagnosticsServiceBase
Microsoft.SharePoint.Administration.SPIisWebService
Microsoft.SharePoint.Administration.SPIncomingEmailService
Microsoft.SharePoint.Administration.SPOutboundMailService
Microsoft.SharePoint.Administration.SPRequestManagementService
Microsoft.SharePoint.Administration.SPUsageService
Microsoft.SharePoint.Administration.SPWebService
Microsoft.SharePoint.Administration.SPWindowsService