Beispiel #1
0
        public static ArrayList getVector(string str, char delim, bool removeEsc)
        {
            ArrayList list = new ArrayList(10);

            if (str != null)
            {
                ArgToken token = new ArgToken(str, delim);
                while (token.hasMoreTokens())
                {
                    string str2 = token.nextToken();
                    if (removeEsc)
                    {
                        str2 = Escape.removeEscAndQuote(str2);
                    }
                    if (!isValidString(str2))
                    {
                        list.Add("");
                    }
                    else
                    {
                        list.Add(str2);
                    }
                }
            }
            return(list);
        }
Beispiel #2
0
        public static string getRealPath(HttpRequest Request, string sourPath)
        {
            if (sourPath == null)
            {
                return("");
            }
            string rootPath = FileAction.rootPath;

            if (Request != null)
            {
                rootPath = Request.PhysicalApplicationPath;
            }
            return(rootPath.Substring(0, rootPath.Length - 1) + Escape.unescape(sourPath));
        }
Beispiel #3
0
        public Arg(string segStr)
        {
            ArgToken token = new ArgToken(segStr, ',');

            while (token.hasNext())
            {
                string str = token.next();
                if (str.StartsWith("en="))
                {
                    this.enName = Escape.removeEscAndQuote(str.Substring(3));
                }
                else
                {
                    if (!str.StartsWith("ch="))
                    {
                        if (str.StartsWith("tp="))
                        {
                            this.type = str.Substring(3);
                        }
                        else if (!str.StartsWith("w="))
                        {
                            if (!str.StartsWith("fmt="))
                            {
                                if (str.StartsWith("val="))
                                {
                                    this.value_Renamed = Escape.removeEscAndQuote(str.Substring(4));
                                }
                            }
                            else
                            {
                                this.fmt = Escape.removeEscAndQuote(str.Substring(4));
                            }
                        }
                        else
                        {
                            this.width = str.Substring(2);
                        }
                        continue;
                    }
                    this.chName = Escape.removeEscAndQuote(str.Substring(3));
                }
            }
        }
Beispiel #4
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder(128);

            builder.Append("en=");
            if (this.enName != null)
            {
                builder.Append(Escape.addEscAndQuote(this.enName));
            }
            builder.Append(",ch=");
            if (this.chName != null)
            {
                builder.Append(Escape.addEscAndQuote(this.chName));
            }
            builder.Append(",tp=");
            if (this.type != null)
            {
                builder.Append(this.type);
            }
            builder.Append(",w=");
            if (this.width != null)
            {
                builder.Append(this.width);
            }
            builder.Append(",fmt=");
            if (this.fmt != null)
            {
                builder.Append(Escape.addEscAndQuote(this.fmt));
            }
            builder.Append(",val=");
            if (this.value_Renamed != null)
            {
                builder.Append(Escape.addEscAndQuote(this.value_Renamed));
            }
            return(builder.ToString());
        }