Example #1
0
        public path(string path, string type) : this(path)
        {
            int       num   = -1;
            path_type value = path_type.filename;

            if (int.TryParse(type, out num))
            {
                this.type = (path_type)num;
            }
            else
            {
                if (Enum.TryParse(type, out value))
                {
                    this.type = value;
                }
                else
                {
                    throw new KScriptExceptions.KScriptException(this, "Incorrect path type.");
                }
            }
        }
Example #2
0
 public path(string path)
 {
     type  = path_type.filename;
     _path = path;
 }