Esempio n. 1
0
        public static void Main(string[] args)
        {
            var file = new RepoApacheLogLine().LogLines.ToObservable();
            var ipCmp = IPAddress.Parse("80.101.212.178");

            var count = 0;

            var res = file;

            using (res.Subscribe(
                logs => {
                    Console.WriteLine(logs);
                    count++;
                },
                error => {

                }, () => {Console.WriteLine(count++);}
            ))

            Console.ReadLine();
        }
 public void TestParseLine()
 {
     var repo = new RepoApacheLogLine();
     var parsed = repo.ParseLine(LogLineString);
     Assert.AreEqual(LogLine, parsed);
 }
 public void TestGetObservable()
 {
     Debug.WriteLine("Started reading apache loglines");
     var repo = new RepoApacheLogLine();
     var observable = repo.GetObservableLogLines(1);
     observable.Subscribe(o => Debug.WriteLine(o));
     Thread.Sleep(100000);
 }