BExIS.IO.Transform.Input.AsciiFileReaderInfo.GetTextMarker C# (CSharp) Метод

GetTextMarker() публичный статический Метод

Get a Textmarker based on the textmarker string name input
public static GetTextMarker ( string textMarker ) : TextMarker
textMarker string name from textmarker
Результат TextMarker
        public static TextMarker GetTextMarker(string textMarker)
        {
            switch (textMarker)
            {
                case "quotes":
                    return TextMarker.quotes;
                case "doubleQuotes":
                    return TextMarker.doubleQuotes;
                default: return TextMarker.quotes;
            }
        }

Same methods

AsciiFileReaderInfo::GetTextMarker ( TextMarker tmarker ) : char

Usage Example

Пример #1
0
        /// <summary>
        /// Convert a row as a string to a list of strings
        /// </summary>
        /// <remarks></remarks>
        /// <seealso cref=""/>
        /// <param name="line">Row as a string</param>
        /// <param name="seperator">Character used as TextSeparator</param>
        /// <returns>List of values</returns>
        public List <string> rowToList(string line, char seperator)
        {
            if (this.Info != null)
            {
                if (fileReaderInfo == null)
                {
                    fileReaderInfo = (AsciiFileReaderInfo)this.Info;
                }

                if (fileReaderInfo != null)
                {
                    tempRow = new List <string>();
                    tempRow = TextMarkerHandling(line, seperator, AsciiFileReaderInfo.GetTextMarker(fileReaderInfo.TextMarker));
                    return(tempRow);
                }
                else
                {
                    return(line.Split(seperator).ToList());
                }
            }

            return(line.Split(seperator).ToList());
        }