ServiceProvider
A ServiceProvider is an abstract class, which stores, and provides certain singleton classes, depending on what inherited class you are using its members with.
Memory category | Instances |
---|
Member index 8
Description
A ServiceProvider is an abstract class, which stores, and provides certain singleton classes, depending on what inherited class you are using its members with.
History 26
- 553 Change PreferredDescriptor of service from to GetService
- 553 Change PreferredDescriptor of getService from to GetService
- 497 Change ThreadSafety of FindService from Unsafe to Safe
- 494 Change ThreadSafety of GetService from Safe to Unsafe
- 494 Change ThreadSafety of FindService from Safe to Unsafe
- 486 Change ThreadSafety of GetService from Unsafe to Safe
- 486 Change ThreadSafety of FindService from Unsafe to Safe
- 462 Change ThreadSafety of ServiceRemoving from to Unsafe
- 462 Change ThreadSafety of ServiceAdded from to Unsafe
- 462 Change ThreadSafety of CloseLate from to Unsafe
- 462 Change ThreadSafety of Close from to Unsafe
- 462 Change ThreadSafety of service from to Unsafe
- 462 Change ThreadSafety of getService from to Unsafe
- 462 Change ThreadSafety of GetService from to Unsafe
- 462 Change ThreadSafety of FindService from to Unsafe
- 59 Add FindService
- 49 Add getService
- 48 Change Parameters of service from (name: string) to (className: string)
- 48 Change Parameters of GetService from (name: string) to (className: string)
- 47 Add ServiceRemoving
- 47 Add ServiceAdded
- 47 Add CloseLate
- 47 Add Close
- 47 Add service
- 47 Add GetService
- 47 Add ServiceProvider
Members 8
Close
Parameters (0) | ||
---|---|---|
No parameters. |
Fires when the current place is exited.
Thread safety | Unsafe |
---|
CloseLate
Parameters (0) | ||
---|---|---|
No parameters. |
Security | LocalUserSecurity |
---|---|
Thread safety | Unsafe |
FindService
Parameters (1) | ||
---|---|---|
className | string | |
Returns (1) | ||
Instance |
Returns the service specified by the given className if it's already created, errors for an invalid name.
Thread safety | Safe |
---|
History 5
- 497 Change ThreadSafety of FindService from Unsafe to Safe
- 494 Change ThreadSafety of FindService from Safe to Unsafe
- 486 Change ThreadSafety of FindService from Unsafe to Safe
- 462 Change ThreadSafety of FindService from to Unsafe
- 59 Add FindService
GetService
Parameters (1) | ||
---|---|---|
className | string | |
Returns (1) | ||
Instance |
Returns a service with the class name requested. When called with the name of a service (such as Debris) it will return the instance of that service. If the service does not yet exist it will be created and the new service is returned. This is the only way to create some services, and can also be used for services that have unusual names, e.g. RunService's name is "Run Service".
Note:
- This function will return nil if the className parameter is an existing class, but the class is not a service.
- If you attempt to fetch a service that is present under another Object, an error will be thrown stating that the "singleton serviceName already exists".
Thread safety | Unsafe |
---|
History 5
- 494 Change ThreadSafety of GetService from Safe to Unsafe
- 486 Change ThreadSafety of GetService from Unsafe to Safe
- 462 Change ThreadSafety of GetService from to Unsafe
- 48 Change Parameters of GetService from (name: string) to (className: string)
- 47 Add GetService
ServiceAdded
Parameters (1) | |
---|---|
service | Instance |
Fired when a service is created.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of ServiceAdded from to Unsafe
- 47 Add ServiceAdded
ServiceRemoving
Parameters (1) | |
---|---|
service | Instance |
Fired when a service is about to be removed.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of ServiceRemoving from to Unsafe
- 47 Add ServiceRemoving
getService
Parameters (1) | ||
---|---|---|
className | string | |
Returns (1) | ||
Instance |
Thread safety | Unsafe |
---|
History 3
- 553 Change PreferredDescriptor of getService from to GetService
- 462 Change ThreadSafety of getService from to Unsafe
- 49 Add getService
service
Parameters (1) | ||
---|---|---|
className | string | |
Returns (1) | ||
Instance |
Thread safety | Unsafe |
---|