Example #1
0
        public bool ContainsChangable(string name, InterVarType type)
        {
            if (!Contains(name, type))
            {
                return(false);
            }

            InterVar iv = variables.First(v => name.Equals(v.GetName()));

            if (iv.IsChangeable())
            {
                return(true);
            }
            return(false);
        }
Example #2
0
        public bool Contains(string name, InterVarType type)
        {
            if (variables.Where(v => name.Equals(v.GetName())).Count() == 0)
            {
                return(false);
            }

            InterVar iv = variables.First(v => name.Equals(v.GetName()));

            switch (type)
            {
            case InterVarType.Bool:
            {
                return(iv.IsBool() ? true : false);
            }

            case InterVarType.Number:
            {
                return(iv.IsNumber() ? true : false);
            }

            case InterVarType.Time:
            {
                return(iv.IsTime() ? true : false);
            }

            case InterVarType.String:
            {
                return(iv.IsString() ? true : false);
            }

            case InterVarType.List:
            {
                return(iv.IsList() ? true : false);
            }
            }
            return(false);
        }
Example #3
0
        public void TurnToList(string name)
        {
            InterVar iv = variables.First(v => v.GetName().Equals(name));

            iv.TurnToList();
        }
Example #4
0
        public InterVarType GetVarType(string name)
        {
            InterVar result = variables.Where(v => v.GetName().Equals(name)).First();

            return(result.GetVarType());
        }