예제 #1
0
 /// <summary>
 /// Write the elements for this field to the XML
 /// </summary>
 /// <param name="writer"></param>
 internal override void WriteExtraElements(XmlHelper writer)
 {
     writer.WriteElement("FieldQuoted", FieldQuoted);
     writer.WriteElement("QuoteChar", QuoteChar.ToString(), "\"");
     writer.WriteElement("QuoteMode", QuoteMode.ToString(), "OptionalForRead");
     writer.WriteElement("QuoteMultiline", QuoteMultiline.ToString(), "AllowForRead");
 }
예제 #2
0
        internal override void AddAttributesCode(AttributesBuilder attbs, NetLanguage leng)
        {
            if (mFieldQuoted == true)
            {
                if (leng == NetLanguage.CSharp)
                {
                    string quoteStr = mQuoteChar.ToString();
                    if (mQuoteChar == '\'')
                    {
                        quoteStr = @"\'";
                    }

                    attbs.AddAttribute("FieldQuoted('" + quoteStr + "', QuoteMode." + mQuoteMode.ToString() + ", MultilineMode." + mQuoteMultiline.ToString() + ")");
                }
                else if (leng == NetLanguage.VbNet)
                {
                    string quoteStr = mQuoteChar.ToString();
                    if (mQuoteChar == '"')
                    {
                        quoteStr = "\"\"";
                    }

                    attbs.AddAttribute("FieldQuoted(\"" + quoteStr + "\"c, QuoteMode." + mQuoteMode.ToString() + ", MultilineMode." + mQuoteMultiline.ToString() + ")");
                }
            }
        }