Amazon.KinesisTap.Core/Parsers/DelimitedLogParserBase.cs
/// <summary>
/// Get field index map from the #Fields line
/// </summary>
/// <param name="fieldsLine"></param>
/// <returns></returns>
Get field index map from the #Fields line
Get field index map from the #Fields line
protected virtual IDictionary<string, int> GetFieldIndexMap(string fieldsLine)
        {
            string[] fields = GetFields(fieldsLine);
            IDictionary<string, int> fieldIndexMap = new Dictionary<string, int>();
            for (int i = 0; i < fields.Length; i++)
            {
                if (!string.IsNullOrWhiteSpace(fields[i]))
                {
                    fieldIndexMap[fields[i].Trim()] = i;
                }
            }
            return fieldIndexMap;
        }
protected virtual IDictionary < string , int > GetFieldIndexMap ( string fieldsLine ) { string [ ] fields = GetFields ( fieldsLine ) ; IDictionary < string , int > fieldIndexMap = new Dictionary < string , int > ( ) ; for ( int i = 0 ; i < fields . Length ; i ++ ) { if ( ! string . IsNullOrWhiteSpace ( fields [ i ] ) ) { fieldIndexMap [ fields [ i ] . Trim ( ) ] = i ; } } return fieldIndexMap ; }
Get field index map from the #Fields line
Get field index map from the #Fields line
None
fieldsLine
string
None