Singleton
(Replacing message template with parser tag) |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Edited|July|12|2025}} | |||
<message>Write the content here to display this box</message> | <message>Write the content here to display this box</message> | ||
The name of a design pattern that establishes a Class that will only have one object instance. | The name of a design pattern that establishes a Class that will only have one object instance. | ||
In code you can go like this | |||
this.ServiceProvider().GetEcoService<IExtentService>().AllInstances(typeof(YourClass))[0].GetValue<YourClass>() | |||
In ocl/eal go like this: | |||
YourClass.oclSingleton or YourClass.allinstances->first |
Latest revision as of 08:49, 24 February 2025
This page was created by Stephanie on 2024-05-28. Last edited by Hans.karlsen on 2025-02-24.
The name of a design pattern that establishes a Class that will only have one object instance.
In code you can go like this
this.ServiceProvider().GetEcoService<IExtentService>().AllInstances(typeof(YourClass))[0].GetValue<YourClass>()
In ocl/eal go like this:
YourClass.oclSingleton or YourClass.allinstances->first