Adding a new parser

Dec 10, 2013 at 7:53 AM
I have a non-standard server that serves ftp like data. So I wrote a custom parser and added it to the static collection of parsers like in the code below.
     FtpListItem.AddParser(new FtpListItem.Parser(ParseCustomList));

     foreach (FtpListItem item in conn.EndGetListing(ar))
          Console.WriteLine("{1} {0}", item.Name, item.SpecialPermissions);
Inside foreach loop item object has only my parser, as expected, but it is not being used apparently. What am I doing wrong?
Dec 10, 2013 at 12:34 PM
Can you post your parser and the transaction log? It's hard to make any guess with the information you provided.
Dec 11, 2013 at 5:54 AM
I realized that I set .ClearParsers() and .AddParser() to late in code, after the result was parsed. My parser is just a simple modification of the LIST parser, FYI it parses output of the Avid iNews ftp server. Thank for the response.
Marked as answer by Marudny on 12/10/2013 at 10:54 PM
Dec 11, 2013 at 12:46 PM
Ah great, yeah I see that now in your code above.