Beispiel #1
0
        /// <summary>
        /// Maps Aika SignalR routes.
        /// </summary>
        /// <param name="hubRouteBuilder">The <see cref="HubRouteBuilder"/> to register the SignalR routes with.</param>
        /// <returns>
        /// The same <paramref name="hubRouteBuilder"/>, to allow method chaining.
        /// </returns>
        public static HubRouteBuilder MapAikaHubs(this HubRouteBuilder hubRouteBuilder)
        {
            if (hubRouteBuilder == null)
            {
                throw new ArgumentNullException(nameof(hubRouteBuilder));
            }

            hubRouteBuilder.MapHub <Hubs.SnapshotHub>("aika/hubs/snapshot");
            hubRouteBuilder.MapHub <Hubs.DataFilterHub>("aika/hubs/datafilter");

            return(hubRouteBuilder);
        }
Beispiel #2
0
 public static void MapTankaServerHub(
     this HubRouteBuilder routes,
     PathString route,
     Action <HttpConnectionDispatcherOptions> configureOptions = null)
 {
     if (configureOptions != null)
     {
         routes.MapHub <ServerHub>(route, configureOptions);
     }
     else
     {
         routes.MapHub <ServerHub>(route);
     }
 }
Beispiel #3
0
        public static HubRouteBuilder MapSignalrRoutes(this HubRouteBuilder hubRouteBuilder)
        {
            IEnumerable <Assembly> assembliesPlugins = Directory.EnumerateFiles(AppDomain.CurrentDomain.BaseDirectory, "MachinaTrader.Plugin.*.dll", SearchOption.TopDirectoryOnly)
                                                       .Select(Assembly.LoadFrom);

            foreach (var assembly in assembliesPlugins)
            {
                IEnumerable <Type> pluginHubTypes = assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(Hub)) && !t.IsAbstract);

                foreach (var pluginHubType in pluginHubTypes)
                {
                    //Console.WriteLine("Assembly Name: " + assembly.GetName().Name);
                    //Console.WriteLine("HubName: " + pluginHubType);
                    string hubRoute = pluginHubType.ToString().Replace(assembly.GetName().Name, "").Replace(".Hubs.", "").Replace("MachinaTrader", "");
                    Global.Logger.Information(assembly.GetName().Name + " - Hub Route " + hubRoute);
                    MapHubMethod.MakeGenericMethod(pluginHubType).Invoke(hubRouteBuilder, new object[] { new PathString("/signalr/" + hubRoute) });
                }
            }
            //Add Global Hubs -> No plugin
            hubRouteBuilder.MapHub <HubMainIndex>("/signalr/HubMainIndex");
            hubRouteBuilder.MapHub <HubTraders>("/signalr/HubTraders");
            hubRouteBuilder.MapHub <HubStatistics>("/signalr/HubStatistics");
            hubRouteBuilder.MapHub <HubBacktest>("/signalr/HubBacktest");
            hubRouteBuilder.MapHub <HubExchangeAccounts>("/signalr/HubExchangeAccounts");
            //Hub Log is located in Globals because we need to wire up with serilog
            hubRouteBuilder.MapHub <HubLogs>("/signalr/HubLogs");
            return(hubRouteBuilder);
        }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <FormDto> >(signalRUrlPrefix + "/forms/form-section-submissions/notifications");
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <CategoryDto> >(signalRUrlPrefix + "/blog/categories/notifications");
 }
Beispiel #6
0
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <FlightSearchHub>(signalRUrlPrefix + "/signalr/flight-search");
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <MailingListDto> >(signalRUrlPrefix + "/cms/mailing-list/notifications");
 }
Beispiel #8
0
 public static void MapHubs(this HubRouteBuilder routeBuilder)
 {
     routeBuilder.MapHub <AuthenticationNotificationHub>(SignalREndpoints.AuthenticationNotificationHubName);
 }
Beispiel #9
0
 private void ConfigureHubRouteBuilder(HubRouteBuilder hubRouteBuilder)
 {
     hubRouteBuilder.MapHub <SignalRHub>("/enigma-signalr-hub");
 }
Beispiel #10
0
 public void MapHub(HubRouteBuilder routes, string hubPathPrefix)
 {
     routes.MapHub <ApiNotificationHub <AuthorDto> >(hubPathPrefix + "/blog/authors/notifications");
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <CarouselItemDto> >(signalRUrlPrefix + "/cms/carousel-items/notifications");
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <BlogPostDto> >(signalRUrlPrefix + "/blog/blog-posts/notifications");
 }
 private static void ConfigureSignalRUsage(HubRouteBuilder routeBuilder)
 {
     routeBuilder.MapHub <RadioHub>(Constants.SIGNALR_PATH);
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <TestimonialDto> >(signalRUrlPrefix + "/cms/testimonials/notifications");
 }
 public static HubRouteBuilder MapDotNetifyHub(this HubRouteBuilder routes)
 {
     routes.MapHub <DotNetifyHub>(HUB_PATH);
     return(routes);
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <TagDto> >(signalRUrlPrefix + "/blog/tags/notifications");
 }
 public static HubRouteBuilder MapDotNetifyHub(this HubRouteBuilder routes, Action <HttpConnectionDispatcherOptions> options)
 {
     routes.MapHub <DotNetifyHub>(HUB_PATH, options);
     return(routes);
 }
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <QuestionDto> >(signalRUrlPrefix + "/forms/questions/notifications");
 }
Beispiel #19
0
 public static HubRouteBuilder MapDotNetifyHub(this HubRouteBuilder routes)
 {
     routes.MapHub <DotNetifyHub>("dotnetify");
     return(routes);
 }
Beispiel #20
0
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <FaqDto> >(signalRUrlPrefix + "/cms/faqs/notifications");
 }
 public static void MapQueryHub(this HubRouteBuilder routes, Action <HttpConnectionDispatcherOptions> configure, string path = "/hubs/query") =>
 routes.MapHub <QueryHub>(path, configure);
Beispiel #22
0
 public static void ConfigureSignalRUsage(HubRouteBuilder routeBuilder)
 {
     routeBuilder.MapHub <CourseChangeHub>("/courseChange");
 }
 public static void MapQueryHub(this HubRouteBuilder routes, string path = "/hubs/query") =>
 routes.MapHub <QueryHub>(path);
Beispiel #24
0
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <ContentTextDto> >(signalRUrlPrefix + "/cms/content-texts/notifications");
 }
Beispiel #25
0
 public void MapHub(HubRouteBuilder routes, string signalRUrlPrefix)
 {
     routes.MapHub <ApiNotificationHub <LookupTableDto> >(signalRUrlPrefix + "/forms/lookup-tables/notifications");
 }
Beispiel #26
0
 public static void Register(HubRouteBuilder route)
 {
     route.MapHub <PaymentRequestHub>("/payment-requests/hub");
 }
Beispiel #27
0
 public static void Register(HubRouteBuilder route)
 {
     route.MapHub <AppHub>("/apps/hub");
 }