Exemplo n.º 1
0
 internal EnumDomain GetEnumDomain(Type t)
 {
     if (domainMap.ContainsKey(t))
     {
         return(domainMap[t]);
     }
     else
     {
         EnumDomain d = new EnumDomain(t);
         domainMap[t] = d;
         return(d);
     }
 }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 internal InputParameterDomain(EnumDomain domain, bool useAny)
 {
     if (domain.Values.Length <= 1)
     {
         //it does not matter if useAny == true
         //because the domain has at most one element
         values = domain.Values;
     }
     else if (useAny)
     {
         //only use Any.Value that denotes an arbitrary element
         values = new object[] { Any.Value }
     }
     ;
     else
     {
         values = domain.Values;
     }
 }
Exemplo n.º 4
0
 internal InputParameterDomain(EnumDomain domain, bool useAny)
 {
     if (domain.Values.Length <= 1)
         //it does not matter if useAny == true
         //because the domain has at most one element
         values = domain.Values;
     else if (useAny)
         //only use Any.Value that denotes an arbitrary element
         values = new object[] { Any.Value };
     else
         values = domain.Values;
 }
Exemplo n.º 5
0
 internal EnumDomain GetEnumDomain(Type t)
 {
     if (domainMap.ContainsKey(t))
         return domainMap[t];
     else
     {
         EnumDomain d = new EnumDomain(t);
         domainMap[t] = d;
         return d;
     }
 }