Ejemplo n.º 1
0
        private void InitializeInputParameterCombinations(ModelProgramProvider mpp, EnablingCondition stateIndependentCondition)
        {
            List <InputParameterDomain> paramDomains = new List <InputParameterDomain>();

            foreach (ParameterInfo paramInfo in parameterInfos)
            {
                if (!paramInfo.IsOut)
                {
                    EnumDomain D = mpp.GetEnumDomain(paramInfo.ParameterType);
                    paramDomains.Add(new InputParameterDomain(D, IsParmeterPlaceholder(paramInfo)));
                }
            }
            this.inputParameterCombinations = new InputParameterCombinations(mpp.ParameterGenerator(this.actionSymbol), paramDomains.ToArray(), stateIndependentCondition);
        }
Ejemplo n.º 2
0
        internal ActionInfo(object model, MethodInfo method, ActionKind kind, ModelProgramProvider mpp)
        {
            this.actionSymbol                   = new ActionSymbol(GetActionName(method), GetActionArity(method, kind), kind);
            this.model                          = model;
            this.method                         = method;
            this.inputParameterTypes            = GetInputParameterTypes(method);
            this.parameterlessEnablingCondition = new EnablingCondition(this, true, true);
            this.enablingCondition              = new EnablingCondition(this, true, false);
            this.parameterInfos                 = method.GetParameters();

            defaultInputParameters = new object[inputParameterTypes.Length];
            for (int i = 0; i < defaultInputParameters.Length; i++)
            {
                defaultInputParameters[i] =
                    (mpp.GetEnumDomain(inputParameterTypes[i]).Values.Length == 0 ? 0 :
                     mpp.GetEnumDomain(inputParameterTypes[i]).Values[0]);
            }

            //Create input parameter generators
            InitializeInputParameterCombinations(mpp, new EnablingCondition(this, false, false));
        }
Ejemplo n.º 3
0
 internal InputParameterCombinations(IEnumerable<IList>/*?*/ userProvidedParameterGenerator, InputParameterDomain[] domains, EnablingCondition stateIndependentCondition)
 {
     this.userProvidedParameterGenerator = userProvidedParameterGenerator;
     this.domains = domains;
     this.stateIndependentCondition = stateIndependentCondition;
 }
Ejemplo n.º 4
0
 private void InitializeInputParameterCombinations(ModelProgramProvider mpp, EnablingCondition stateIndependentCondition)
 {
     List<InputParameterDomain> paramDomains = new List<InputParameterDomain>();
     foreach (ParameterInfo paramInfo in parameterInfos)
     {
         if (!paramInfo.IsOut)
         {
             EnumDomain D = mpp.GetEnumDomain(paramInfo.ParameterType);
             paramDomains.Add(new InputParameterDomain(D, IsParmeterPlaceholder(paramInfo)));
         }
     }
     this.inputParameterCombinations = new InputParameterCombinations(mpp.ParameterGenerator(this.actionSymbol), paramDomains.ToArray(), stateIndependentCondition);
 }
Ejemplo n.º 5
0
        internal ActionInfo(object model, MethodInfo method, ActionKind kind, ModelProgramProvider mpp)
        {
            this.actionSymbol = new ActionSymbol(GetActionName(method), GetActionArity(method, kind), kind);
            this.model = model;
            this.method = method;
            this.inputParameterTypes = GetInputParameterTypes(method);
            this.parameterlessEnablingCondition = new EnablingCondition(this, true, true);
            this.enablingCondition = new EnablingCondition(this, true, false);
            this.parameterInfos = method.GetParameters();

            defaultInputParameters = new object[inputParameterTypes.Length];
            for (int i = 0; i < defaultInputParameters.Length; i++)
                defaultInputParameters[i] =
                    (mpp.GetEnumDomain(inputParameterTypes[i]).Values.Length == 0 ? 0 :
                     mpp.GetEnumDomain(inputParameterTypes[i]).Values[0]);

            //Create input parameter generators
            InitializeInputParameterCombinations(mpp, new EnablingCondition(this, false, false));
        }
Ejemplo n.º 6
0
 internal InputParameterCombinations(IEnumerable <IList> /*?*/ userProvidedParameterGenerator, InputParameterDomain[] domains, EnablingCondition stateIndependentCondition)
 {
     this.userProvidedParameterGenerator = userProvidedParameterGenerator;
     this.domains = domains;
     this.stateIndependentCondition = stateIndependentCondition;
 }