예제 #1
0
 public void Attach(XpandModuleBase moduleBase)
 {
     _xpandModuleBase = moduleBase;
     if (RuntimeMode && !Executed(ConnectionStringHelperName))
     {
         Application.ObjectSpaceCreated      += ApplicationOnObjectSpaceCreated;
         Application.LoggedOff               += ApplicationOnLoggedOff;
         Application.DatabaseVersionMismatch += ApplicationOnDatabaseVersionMismatch;
     }
 }
예제 #2
0
 void ApplicationOnLoggedOff(object sender, EventArgs eventArgs)
 {
     XpandModuleBase.ObjectSpaceCreated  = false;
     ((XafApplication)sender).LoggedOff -= ApplicationOnLoggedOff;
     if (!XpandModuleBase.IsHosted)
     {
         Application.ObjectSpaceCreated += ApplicationOnObjectSpaceCreated;
     }
     else
     {
         XpandModuleBase.RemoveCall(ConnectionStringHelperName, _xpandModuleBase.ModuleManager);
     }
 }
예제 #3
0
 public void Attach(XpandModuleBase xpandModuleBase, ConnectionStringHelper helper)
 {
     _xpandModuleBase = xpandModuleBase;
     if (!_xpandModuleBase.Executed <ISequenceGeneratorUser>(SequenceGeneratorHelperName))
     {
         if (_xpandModuleBase.RuntimeMode)
         {
             Application.LoggedOff += ApplicationOnLoggedOff;
             AddToAdditionalExportedTypes(new[] { "Xpand.Persistent.BaseImpl.SequenceObject" });
             helper.ConnectionStringUpdated += XpandModuleBaseOnConnectionStringUpdated;
         }
     }
 }
예제 #4
0
 public void Attach(XpandModuleBase xpandModuleBase)
 {
     if (!xpandModuleBase.Executed <ISequenceGeneratorUser>(SequenceGeneratorHelperName))
     {
         if (SequenceObjectType == null)
         {
             SequenceObjectType = xpandModuleBase.LoadFromBaseImpl("Xpand.Persistent.BaseImpl.SequenceObject");
             ModifySequenceObjectWhenMySqlDatalayer(XafTypesInfo.Instance);
         }
         if (xpandModuleBase.RuntimeMode)
         {
             _xpandModuleBase       = xpandModuleBase;
             Application.LoggedOff += ApplicationOnLoggedOff;
         }
     }
 }