QuoteEscape() public static method

public static QuoteEscape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
strs IEnumerable
fullEscape bool
escapePercent bool
return List
Exemplo n.º 1
0
        public override string ForgeRawLine()
        {
            StringBuilder b = new StringBuilder();

            for (int i = 0; i < Items.Count; i++)
            {
                b.Append(StringEscaper.QuoteEscape(Items[i]));
                b.Append(",");
            }
            b.Append(Selected);
            if (SectionName != null)
            {
                b.Append(",_");
                b.Append(SectionName);
                b.Append("_,");
                if (HideProgress)
                {
                    b.Append("True");
                }
                else
                {
                    b.Append("False");
                }
            }
            b.Append(base.ForgeRawLine());
            return(b.ToString());
        }
Exemplo n.º 2
0
        public string ForgeRawLine(bool includeKey)
        {
            StringBuilder b = new StringBuilder();

            if (includeKey)
            {
                b.Append(StringEscaper.QuoteEscape(Key));
                b.Append("=");
            }

            b.Append(StringEscaper.QuoteEscape(Text));
            b.Append(",");
            if (Visibility)
            {
                b.Append("1,");
            }
            else
            {
                b.Append("0,");
            }
            b.Append((int)Type);
            b.Append(",");
            b.Append(Rect.Left);
            b.Append(",");
            b.Append(Rect.Top);
            b.Append(",");
            b.Append(Rect.Width);
            b.Append(",");
            b.Append(Rect.Height);
            b.Append(",");
            b.Append(Info.ForgeRawLine());
            return(b.ToString());
        }
Exemplo n.º 3
0
        public override string ForgeRawLine()
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(StringEscaper.QuoteEscape(Value));
            builder.Append(base.ForgeRawLine());
            return(builder.ToString());
        }
Exemplo n.º 4
0
 /// <summary>
 /// This function should only be called from child class
 /// Note : this function includes first ','
 /// </summary>
 /// <returns></returns>
 public virtual string ForgeRawLine()
 {
     if (ToolTip != null)
     {
         return("," + StringEscaper.QuoteEscape($"__{ToolTip}"));
     }
     return(string.Empty);
 }
Exemplo n.º 5
0
        public override string ForgeRawLine()
        {
            StringBuilder b = new StringBuilder();

            b.Append(",");
            b.Append(StringEscaper.DoubleQuote(SectionName));
            b.Append(",");
            b.Append(Picture == null ? "0" : StringEscaper.QuoteEscape(Picture));
            b.Append(HideProgress ? ",True" : ",False");
            b.Append(ForgeToolTip());
            return(b.ToString());
        }
Exemplo n.º 6
0
        public string ForgeRawLine(bool includeKey)
        {
            StringBuilder b = new StringBuilder();

            if (includeKey)
            {
                b.Append(StringEscaper.QuoteEscape(Key));
                b.Append("=");
            }

            b.Append(StringEscaper.QuoteEscape(Text));
            b.Append(",");
            if (Visibility)
            {
                b.Append("1,");
            }
            else
            {
                b.Append("0,");
            }
            b.Append((int)Type);
            b.Append(",");
            b.Append(Rect.Left);
            b.Append(",");
            b.Append(Rect.Top);
            b.Append(",");
            b.Append(Rect.Width);
            b.Append(",");
            b.Append(Rect.Height);

            b.Append(Info.ForgeRawLine());

            /*
             * string optionalArgs = Info.ForgeRawLine();
             * if (0 < optionalArgs.Length) // Only if optionalArgs is not empty
             * {
             *  b.Append(",");
             *  b.Append(optionalArgs);
             * }
             */

            return(b.ToString());
        }
Exemplo n.º 7
0
        public string ForgeRawLine(bool includeKey)
        {
            StringBuilder b = new StringBuilder();

            if (includeKey)
            {
                b.Append(Key);
                b.Append("=");
            }
            b.Append(StringEscaper.QuoteEscape(Text));
            b.Append(",");
            b.Append(Visibility ? "1," : "0,");
            b.Append((int)Type);
            b.Append(",");
            b.Append(X);
            b.Append(",");
            b.Append(Y);
            b.Append(",");
            b.Append(Width);
            b.Append(",");
            b.Append(Height);
            b.Append(Info.ForgeRawLine());
            return(b.ToString());
        }