Пример #1
0
 public FileBasedRoutingFeature()
 {
     Defaults(s =>
     {
         s.SetDefault(RoutingFilePathKey, UriHelper.FilePathToUri("endpoints.xml"));
         s.SetDefault(RouteFileUpdateInterval, TimeSpan.FromSeconds(30));
         s.SetDefault <UnicastSubscriberTable>(new UnicastSubscriberTable());
     });
 }
 /// <summary>
 /// Enables routing configured with the routing configuration file under <paramref name="configurationFilePath"/>
 /// </summary>
 /// <param name="config">The configuration object.</param>
 /// <param name="configurationFilePath">The path to the configuration file.</param>
 /// <param name="updateInterval">The interval the route file should be checked for changes.</param>
 public static void UseFileBasedRouting(this RoutingSettings config, string configurationFilePath, TimeSpan updateInterval)
 {
     config.UseFileBasedRouting(UriHelper.FilePathToUri(configurationFilePath), updateInterval);
 }
 /// <summary>
 /// Enables routing configured with the routing configuration file under <paramref name="configurationFilePath"/>
 /// </summary>
 /// <param name="config">The configuration object.</param>
 /// <param name="configurationFilePath">The path to the configuration file.</param>
 public static void UseFileBasedRouting(this RoutingSettings config, string configurationFilePath)
 {
     config.UseFileBasedRouting(UriHelper.FilePathToUri(configurationFilePath));
 }