예제 #1
0
        IEnumerable <ModelApplicationBase> GetModulesDifferences(ModelNode node)
        {
            var modelApplicationBases = new List <ModelApplicationBase>();

            foreach (var moduleBase in ((IModelSources)node.Application).Modules)
            {
                var modelApplicationBase = node.CreatorInstance.CreateModelApplication();
                modelApplicationBase.Id = moduleBase.Name;
                var resourcesModelStore = new ResourcesModelStore(moduleBase.GetType().Assembly);
                resourcesModelStore.Load(modelApplicationBase);
                var modelBoModel = ((IModelApplication)modelApplicationBase).BOModel;
                if (modelBoModel != null && modelBoModel.Any(HasReminderMember))
                {
                    modelApplicationBases.Add(modelApplicationBase);
                }
            }
            return(modelApplicationBases);
        }
예제 #2
0
        public static List <ModelApplicationBase> GetModuleDifferences(this IModelApplication modelApplication)
        {
            var modelSources          = ((IModelSources)modelApplication);
            var modelApplicationBases = new List <ModelApplicationBase>();
            var node = (ModelNode)modelApplication;

            foreach (var moduleBase in modelSources.Modules)
            {
                ModelApplicationCreator modelApplicationCreator = node.CreatorInstance;
                var modelApplicationBase = modelApplicationCreator.CreateModelApplication();
                modelApplicationBase.Id = moduleBase.Name;
                InitializeModelSources(modelApplicationBase, node);
                var resourcesModelStore = new ResourcesModelStore(moduleBase.GetType().Assembly);
                resourcesModelStore.Load(modelApplicationBase);
                var modelViews = ((IModelApplication)modelApplicationBase).Views;
                if (modelViews != null)
                {
                    modelApplicationBases.Add(modelApplicationBase);
                }
            }
            ReadFromOtherLayers(modelApplicationBases, node);
            return(modelApplicationBases);
        }