Version: 10.2.1c and 10.2.1c SP3 |
ArcFM Engine Overview > ArcFM Solution Basics > Singleton CoClasses |
When a singleton object is created, only one instance of the class is created despite the number of times it is created. Singleton objects are not included in ArcFM Solution interop libraries and must be instantiated manually in .NET code using Activator.CreateInstance. There are two exceptions to this rule: MMConfigTopLevel and MMModelNameManager.
MMConfigTopLevel and MMModelNameManager have wrapper classes that allow you to easily create these singleton objects: ConfigTopLevel and ModelNameManager, respectively. The following two code samples depict how you can create these two singleton objects.
Copy Code
|
|
---|---|
IMMConfigTopLevel configTopLevel = ConfigTopLevel.Instance(); |
Copy Code
|
|
---|---|
IMMModelNameManager modelNameManager = ModelNameManager.Instance(); |
All other singleton objects must be instantiated manually using Activator.CreateInstance. Below is a list of the singleton objects available in ArcFM Solution.
Singleton CoClass |
ProgID |
---|---|
MMConfigTopLevel |
mmGeodatabase.MMConfigTopLevel |
MMFeederExt |
mmDesktop.MMFeederExt |
MMGraphicExt |
mmFrameworkUI.MMGraphicExt |
MMModelNameManager |
mmGeodatabase.MMModelNameManager |
MMStoredItemTopLevel | mmFramework.MMStoredItemTopLevel |
ArcFM Server Only:
Shut Down Singletons
To shut down a singleton object in ArcFM Server, you must call the IMMAppInitialize::Shutdown method.