Beispiel #1
0
 public void RegisterDemoApp(DocumentsDemoApp app)
 {
     DemoAppRegistryEntry entry = new DemoAppRegistryEntry(app);
         entry.UpdateLastUsageTime();
         AppDictionary.AddOrUpdate(app.Id, entry, (appId, oldEntry) => entry);
         EnsureAppDisposingActivated();
 }
Beispiel #2
0
        public static DocumentsApp GetAppInstance()
        {
            if (Context.Items.Contains(AppInstanceContextKey))
                     return Context.Items[AppInstanceContextKey] as DocumentsDemoApp;

                DocumentsDemoApp app = null;
                lock (instanceGetterLocker)
                {
                     string appId = Context.Session[AppInstanceSessionKey] as string;
                     if (appId != null)
                          app = DemoAppRegistry.GetDemoApp(appId);
                     else
                     {
                          appId = Guid.NewGuid().ToString();
                          app = new DocumentsDemoApp(appId);
                          app.Initialize();
                          app.Start();
                          DemoAppRegistry.RegisterDemoApp(app);
                          Context.Session[AppInstanceSessionKey] = appId;
                     }
                }

                Context.Items[AppInstanceContextKey] = app;
                return app;
        }
Beispiel #3
0
 public DemoThumbnailService(DocumentsDemoApp app)
     : base(app)
 {
 }
Beispiel #4
0
 public DemoImageService(DocumentsDemoApp app)
     : base(app)
 {
     AvatarService = new DemoAvatarService(app);
         ThumbnailService = new DemoThumbnailService(app);
 }
Beispiel #5
0
 public DemoFileSystemService(DocumentsDemoApp app)
     : base(app)
 {
 }
Beispiel #6
0
 public DemoDocumentService(DocumentsDemoApp app)
     : base(app)
 {
 }
Beispiel #7
0
 public DemoDataService(DocumentsDemoApp app, DXDocsMVC.Code.DataService srcDataService)
     : base(app)
 {
     SourceDataService = srcDataService;
 }
Beispiel #8
0
 public DemoAvatarService(DocumentsDemoApp app)
     : base(app)
 {
 }
Beispiel #9
0
 public DemoAppRegistryEntry(DocumentsDemoApp app)
 {
     DemoApp = app;
 }