public static List<string> Get_ExecutionContexts(IModelExecutionContext modelExecutionContext) {
     var modelLogic = modelExecutionContext.Parent;
     while (!(modelLogic is IEnumerable<IModelExecutionContext>)) {
         modelLogic = modelLogic.Parent;
     }
     var logicInstaller = LogicInstallerManager.Instance.LogicInstallers.First(installer =>IdMatch(modelExecutionContext, installer, modelLogic));
     return logicInstaller.ValidExecutionContexts.Select(context => context.ToString()).ToList();
 }
 public static List<string> Get_ExecutionContexts(IModelExecutionContext modelExecutionContext) {
     var modelLogic = modelExecutionContext.Parent;
     while (!(modelLogic is IEnumerable<IModelExecutionContext>)) {
         modelLogic = modelLogic.Parent;
     }
     var first = LogicInstallerManager.Instance.LogicInstallers.First(installer 
         =>Equals(((ModelNode) installer.GetModelLogic(modelExecutionContext.Application).ExecutionContextsGroup).Parent.Id,
                  ((ModelNode) modelLogic.Parent.Parent).Id));
     return first.ExecutionContexts.Select(context => context.ToString()).ToList();
 }
Ejemplo n.º 3
0
        public static List <string> Get_ExecutionContexts(IModelExecutionContext modelExecutionContext)
        {
            var modelLogic = modelExecutionContext.Parent;

            while (!(modelLogic is IEnumerable <IModelExecutionContext>))
            {
                modelLogic = modelLogic.Parent;
            }
            var logicInstaller = LogicInstallerManager.Instance.LogicInstallers.First(installer => IdMatch(modelExecutionContext, installer, modelLogic));

            return(logicInstaller.ValidExecutionContexts.Select(context => context.ToString()).ToList());
        }
Ejemplo n.º 4
0
        public static List <string> Get_ExecutionContexts(IModelExecutionContext modelExecutionContext)
        {
            var modelLogic = modelExecutionContext.Parent;

            while (!(modelLogic is IEnumerable <IModelExecutionContext>))
            {
                modelLogic = modelLogic.Parent;
            }
            var first = LogicInstallerManager.Instance.LogicInstallers.First(installer
                                                                             => Equals(((ModelNode)installer.GetModelLogic(modelExecutionContext.Application).ExecutionContextsGroup).Parent.Id,
                                                                                       ((ModelNode)modelLogic.Parent.Parent).Id));

            return(first.ValidExecutionContexts.Select(context => context.ToString()).ToList());
        }
Ejemplo n.º 5
0
        private static bool IdMatch(IModelExecutionContext modelExecutionContext, ILogicInstaller installer, IModelNode modelLogic)
        {
            var modelNode = (installer.GetModelLogic(modelExecutionContext.Application).ExecutionContextsGroup) as ModelNode;

            return(modelNode != null && Equals(modelNode.Parent.Id, ((ModelNode)modelLogic.Parent.Parent).Id));
        }
 public static List<string> Get_ExecutionContexts(IModelExecutionContext modelExecutionContext) {
     return Enum.GetValues(typeof(ExecutionContext)).OfType<ExecutionContext>().Select(context => context.ToString()).ToList();
 }
Ejemplo n.º 7
0
 public static List <string> Get_ExecutionContexts(IModelExecutionContext modelExecutionContext)
 {
     return(Enum.GetValues(typeof(ExecutionContext)).OfType <ExecutionContext>().Select(context => context.ToString()).ToList());
 }
 private static bool IdMatch(IModelExecutionContext modelExecutionContext, ILogicInstaller installer, IModelNode modelLogic){
     var modelNode = (installer.GetModelLogic(modelExecutionContext.Application).ExecutionContextsGroup) as ModelNode;
     return modelNode != null && Equals(modelNode.Parent.Id,((ModelNode) modelLogic.Parent.Parent).Id);
 }