コード例 #1
0
 void Import()
 {
     if (ObjectSpace.QueryObject <Analysis>(analysis => analysis.Name == "Controlling Grid Settings") == null)
     {
         var    importEngine = new ImportEngine();
         Stream stream       = GetType().Assembly.GetManifestResourceStream(GetType(), "AnalysisObjects.xml");
         importEngine.ImportObjects(stream, info => ObjectSpace);
         stream = GetType().Assembly.GetManifestResourceStream(GetType(), "AnalysisObjectsConfiguration.xml");
         importEngine.ImportObjects(stream, info => ObjectSpace);
     }
 }
コード例 #2
0
ファイル: Updater.cs プロジェクト: xwagner2/eXpand
        void Import()
        {
            var session = ((XPObjectSpace)ObjectSpace).Session;

            if (session.FindObject <Analysis>(analysis => analysis.Name == "Controlling Grid Settings") == null)
            {
                var    importEngine = new ImportEngine();
                Stream stream       = GetType().Assembly.GetManifestResourceStream(GetType(), "AnalysisObjects.xml");
                importEngine.ImportObjects(stream, new UnitOfWork(session.DataLayer));
                stream = GetType().Assembly.GetManifestResourceStream(GetType(), "AnalysisObjectsConfiguration.xml");
                importEngine.ImportObjects(stream, new UnitOfWork(session.DataLayer));
            }
        }
コード例 #3
0
ファイル: Updater.cs プロジェクト: xwagner2/eXpand
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();
            var session = ((XPObjectSpace)ObjectSpace).Session;

            if (session.FindObject <SerializationConfigurationGroup>(@group => @group.Name == "Dynamic Assembly Master Detail") == null)
            {
                var importEngine = new ImportEngine();
                importEngine.ImportObjects(new UnitOfWork(session.DataLayer), GetType(), "DynamicAssemblyMasterDetailGroup.xml");
                importEngine.ImportObjects(new UnitOfWork(session.DataLayer), GetType(), "DynamicAssemblyMasterDetailModel.xml");
                importEngine.ImportObjects(new UnitOfWork(session.DataLayer), GetType(), "DynamicAssemblyMasterDetailModelGroup.xml");
            }
        }
コード例 #4
0
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();
            var session = ((XPObjectSpace)ObjectSpace).Session;

            if (session.FindObject <SerializationConfigurationGroup>(@group => @group.Name == "Dynamic Assembly Master Detail") == null)
            {
                var importEngine      = new ImportEngine();
                var xpoTypeInfoSource = XpandModuleBase.XpoTypeInfoSource;
                importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, xpoTypeInfoSource, () => new UnitOfWork(session.DataLayer)), GetType(), "DynamicAssemblyMasterDetailGroup.xml");
                importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, xpoTypeInfoSource, () => new UnitOfWork(session.DataLayer)), GetType(), "DynamicAssemblyMasterDetailModel.xml");
                importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, xpoTypeInfoSource, () => new UnitOfWork(session.DataLayer)), GetType(), "DynamicAssemblyMasterDetailModelGroup.xml");
            }
        }
コード例 #5
0
 public override void Update()
 {
     if (Session.FindObject <PersistentAssemblyInfo>(info => info.Name == MasterDetailDynamicAssembly) == null)
     {
         var importEngine = new ImportEngine();
         importEngine.ImportObjects(new UnitOfWork(Session.DataLayer), GetType(), "DynamicAssemblyMasterDetail.xml");
     }
 }
コード例 #6
0
 public override void Update()
 {
     if (Session.FindObject <PersistentAssemblyInfo>(info => info.Name == MasterDetailDynamicAssembly) == null)
     {
         var importEngine = new ImportEngine();
         importEngine.ImportObjects(new XPObjectSpace(XafTypesInfo.Instance, XpandModuleBase.XpoTypeInfoSource, () => new UnitOfWork(Session.DataLayer)), GetType(), "DynamicAssemblyMasterDetail.xml");
     }
 }
コード例 #7
0
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();

            if (ObjectSpace.QueryObject <PersistentAssemblyInfo>(info => info.Name == MasterDetailDynamicAssembly) == null)
            {
                var importEngine = new ImportEngine();
                importEngine.ImportObjects(info => ObjectSpace, GetType(), "DynamicAssemblyMasterDetail.xml");
            }
        }