[This is preliminary documentation and is subject to change.]
Gets the singleton object for the running Package
in the current Environment with a particular class.
| C# |
public Persistent FindSingleton( ObjectClass singletonClass )
- singletonClass (ObjectClass)
- The class of the singleton.
The retrieved or created singleton object.
This will create the required EntryPoint and Singleton object if they have not
yet been created. This is called by generated The classes when
you access its singleton properties for the first time. You can also use
it to find singletons from any package you have used in your own package.
| Exception | Condition |
|---|---|
| ArgumentNullException | singletonClass is null. |
| ArgumentException | Supplied class is not a singleton
class, or is not available from the running package. |