public DataSession(DataApplication application, string userAccount)
 {
     this.Application = application;
     this.UserAccount = userAccount;
     this.FStorages   = new DataStorage[application.Metadata.Classes.Count];
     this.FCentralServerConnection      = new CentralServerConnection((Integro.InMeta.Runtime.CentralServer.CentralServer)null, application.CentralServerAddress);
     this.FScriptLibraries              = new ScriptLibraries(this);
     this.FNewObjectsWithoutGeneratedId = new List <DataObject>();
     this.FUpdateLogMode    = application.Settings.UpdateLogMode;
     this.CheckRefIntegrity = application.Settings.CheckRefIntegrity;
     this.RegisterLiveSessions();
 }
 protected void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.FCentralServerConnection != null)
         {
             this.FCentralServerConnection.Dispose();
         }
         if (this.FScriptLibraries != null)
         {
             this.FScriptLibraries.Dispose();
         }
         if (this.FStorages != null)
         {
             for (int index = 0; index < this.FStorages.Length; ++index)
             {
                 DataStorage fstorage = this.FStorages[index];
                 if (fstorage != null)
                 {
                     this.FStorages[index] = (DataStorage)null;
                     fstorage.Dispose();
                 }
             }
         }
         if (this.FDb != null)
         {
             this.FDb.Dispose();
         }
         if (this.Disposed != null)
         {
             this.Disposed((object)this, EventArgs.Empty);
         }
     }
     this.FCentralServerConnection = (CentralServerConnection)null;
     this.FDb = (InDbDatabase)null;
     this.FScriptLibraries = (ScriptLibraries)null;
 }