Exemple #1
0
    int OptionToMask(TypeContainer container, string options)
    {
        int mask = 0;

        foreach (var option in options.Split(new char[] { '|' }, System.StringSplitOptions.RemoveEmptyEntries))
        {
            mask |= (1 << container.ConvertToInt(option));
        }
        return(mask);
    }
Exemple #2
0
    string VerifyStrings(TypeContainer container, string options)
    {
        var list = new List <string>();

        foreach (var option in options.Split(new char[] { '|' }, System.StringSplitOptions.RemoveEmptyEntries))
        {
            if (container.ConvertToInt(option) != -1)
            {
                list.Add(option);
            }
        }
        return(string.Join("|", list));
    }