Created
August 29, 2012 17:45
-
-
Save yreynhout/3516121 to your computer and use it in GitHub Desktop.
Sample 2 - Collector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SqlStatementCollector : IObserver<ISqlStatement> { | |
List<ISqlStatement> _statements; | |
public SqlStatementCollector() { | |
_statements = new List<ISqlStatement>(); | |
} | |
public ISqlStatement[] CollectedStatements { | |
get { | |
return _statements.ToArray(); | |
} | |
} | |
public void OnNext(ISqlStatement value) { | |
_statements.Add(value); | |
} | |
public void OnError(Exception error) { } | |
public void OnCompleted() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment