GetSubscriberTimeline() public method

Gets all the events on the subscriber timeline. Optional parameters are since and also how many
public GetSubscriberTimeline ( string userName, System.DateTime since ) : IEnumerable
userName string Gets timeline for user
since System.DateTime Events since this data should be included
return IEnumerable
コード例 #1
0
        public void TestSubscriberTimeline()
        {
            var storeId = Guid.NewGuid().ToString();
            var eventService = new EventFeedService(storeId);

            // create a topic first that can be subscribed to, this topic could have been 'found' by search or be
            // a well known topic.
            eventService.AssertTopic(new Uri("http://www.brightstardb.com/topics/34"), "Topic 34", "A very important topic");
            eventService.AssertSubscriber("domain\\bob", new List<Uri>() { new Uri("http://www.brightstardb.com/topics/34") });
            eventService.RaiseEvent("Bob created document Y", DateTime.UtcNow, new List<string>() { "http://www.brightstardb.com/topics/34" });

            var events = eventService.GetSubscriberTimeline("domain\\bob", DateTime.MinValue);
            Assert.AreEqual(1, events.Count());
        }