Esempio n. 1
0
        internal static List <AddOnSystemInfo> GetAddOnSystemInfo(string addOnShortName)
        {
            List <AddOnSystemInfo> addOnSystemInfoList = new List <AddOnSystemInfo>();

            CountryConfigFacade countryConfigFacade = CountryAdministrator.GetCountryConfigFacade(addOnShortName);

            foreach (CountryConfig.SystemRow addOnSystemRow in countryConfigFacade.GetSystemRows())
            {
                AddOnSystemInfo addOnSystemInfo = new AddOnSystemInfo(addOnShortName, addOnSystemRow.Name);

                //assess supported/excluded systems from func_AddOn_Applic
                List <CountryConfig.FunctionRow> functionAddOnApplic = countryConfigFacade.GetFunctionRowsBySystemIDAndFunctionName(addOnSystemRow.ID, DefFun.AddOn_Applic);
                if (functionAddOnApplic.Count <= 0)
                {
                    continue; //no AddOn_Applic found - system is in fact not available
                }
                foreach (CountryConfig.ParameterRow parameterRow in functionAddOnApplic.First().GetParameterRows())
                {
                    if (parameterRow.Name.ToLower().StartsWith(DefPar.AddOn_Applic.Sys.ToLower()))
                    {
                        addOnSystemInfo._supportedSystems.Add(parameterRow.Value.ToLower());
                    }
                    if (parameterRow.Name.ToLower().StartsWith(DefPar.AddOn_Applic.SysNA.ToLower()))
                    {
                        addOnSystemInfo._notSupportedSystems.Add(parameterRow.Value.ToLower());
                    }
                }

                addOnSystemInfoList.Add(addOnSystemInfo);
            }

            return(addOnSystemInfoList);
        }
Esempio n. 2
0
        internal static bool IsSystemSupported(string systemName, AddOnSystemInfo addOnSystemInfo)
        {
            bool isSupported = false;

            foreach (string pattern in addOnSystemInfo._supportedSystems)
            {
                if (EM_Helpers.DoesValueMatchPattern(pattern, systemName))
                {
                    isSupported = true;
                    break;
                }
            }
            foreach (string pattern in addOnSystemInfo._notSupportedSystems)
            {
                if (EM_Helpers.DoesValueMatchPattern(pattern, systemName))
                {
                    isSupported = false;
                    break;
                }
            }
            return(isSupported);
        }