Пример #1
0
 public void RegisterApp(IApplicationProvider app)
 {
     if (app == null)
     {
         throw new AppServiceException("Given app cannot be null.");
     }
     if (_appInstances.ContainsKey(app.GetInfo().ID))
     {
         app.Dispose();
         throw new AppServiceException("Another instance of this app is already registered.");
     }
     app.Init(_api.OpenAPI, new AppDataService(app.GetInfo().ID));
     _appInstances.Add(app.GetInfo().ID, app);
 }