public Routes(UriConfiguration uriConfiguration)
        {
            Check.IsNotNull(uriConfiguration, "uriConfiguration");

            baseAddress = uriConfiguration.BaseAddress;

            uriTemplates = new UriTemplateTable(baseAddress);
            uriTemplates.KeyValuePairs.Add(new KeyValuePair<UriTemplate, object>(uriConfiguration.RecentFeedTemplate, GetFeedOfRecentEvents));
            uriTemplates.KeyValuePairs.Add(new KeyValuePair<UriTemplate, object>(uriConfiguration.FeedTemplate, GetFeed));
        }
        private static void Main(string[] args)
        {
            XmlConfigurator.Configure();

            UriConfiguration uriConfiguration = new UriConfiguration(
                new Uri("http://localhost/product-catalog/notifications/"),
                new UriTemplate("/recent"),
                new UriTemplate("/?page={id}"),
                new UriTemplate("/notification/{id}"));

            FileSystemConfiguration fileSystemConfiguration = new FileSystemConfiguration(@"c:\");

            Container container = new Container(uriConfiguration, fileSystemConfiguration);
            container.Timer.Start();

            ITimer publishTimer = StartPublishingTo(container.EventBuffer);

            try
            {
                Console.WriteLine("Starting server...");
                container.ServiceHost.StartHost();
                Console.WriteLine("Server started. Press any key to terminate.");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            finally
            {
                Console.ReadKey();

                publishTimer.Stop();
                publishTimer.Dispose();

                container.Dispose();
            }
        }
 public Links(UriConfiguration config)
 {
     this.config = config;
 }