Пример #1
0
 public static void Assign(CreateCustomModelSynchronizerEventArgs e, IModelSynchronizable modelSynchronizer) {
     var modelSynchronizerList = e.ModelSynchronizer as ModelSynchronizerList;
     if (modelSynchronizerList == null) {
         e.ModelSynchronizer = new ModelSynchronizerList();
     }
     var synchronizerList = ((ModelSynchronizerList)e.ModelSynchronizer);
     synchronizerList.Add(modelSynchronizer);
 }
Пример #2
0
        public static void Assign(CreateCustomModelSynchronizerEventArgs e, IModelSynchronizable modelSynchronizer)
        {
            var modelSynchronizerList = e.ModelSynchronizer as ModelSynchronizerList;

            if (modelSynchronizerList == null)
            {
                e.ModelSynchronizer = new ModelSynchronizerList();
            }
            var synchronizerList = ((ModelSynchronizerList)e.ModelSynchronizer);

            synchronizerList.Add(modelSynchronizer);
        }
Пример #3
0
        public static void Assign <TModelAdaptorRule, TModelModelAdaptorRule>(CreateCustomModelSynchronizerEventArgs e, IModelSynchronizable modelSynchronizer, Frame frame, Func <TModelModelAdaptorRule, IModelSynchronizable> func)
            where TModelAdaptorRule : IModelAdaptorRule
            where TModelModelAdaptorRule : IModelNode
        {
            var modelAdaptorRuleController = frame.Controllers.ToList <Controller>().OfType <IModelAdaptorRuleController>().FirstOrDefault();

            if (modelAdaptorRuleController != null)
            {
                modelAdaptorRuleController.ExecuteLogic(typeof(TModelAdaptorRule), typeof(TModelModelAdaptorRule), rule => Assign(e, func.Invoke((TModelModelAdaptorRule)rule)));
            }
            Assign(e, modelSynchronizer);
        }