AbstractCreates a new service instance.
Service name for logging
Logger instance for this service
Private_Protected ReadonlyloggerLogger instance for this service
Protected ReadonlynameService name for logging
Gets the current service state.
ProtectedassertDisposes the service and cleans up resources. Ensures disposal only happens once.
Initializes the service. Ensures initialization only happens once and tracks state.
Protected AbstractonImplementation-specific disposal logic. Called once during dispose().
Protected AbstractonImplementation-specific initialization logic. Called once during initialize().
Base class for all services with lifecycle management. Handles initialization, disposal, and state tracking.
Example