public object GetAppInstance(string instanceName) { try { if (AppInstances.TryGetValue(instanceName, out object appObject)) { return(appObject); } else { throw new Exception("App Instance '" + instanceName + "' not found!"); } } catch (Exception ex) { throw ex; } }