private static void BuildRoutes(IRouterBuilder routeBuilder)
        {
            var convention = routeBuilder.GetTemplateConvention("{vm}");

            typeof(RoutingConfiguration).GetTypesFromSameAssembly()
            .InNamespace("Neutronium.ReactiveTrader.Client.ViewModel.Pages")
            .Register(convention);
            routeBuilder.Register <IShellViewModel>("main");
            routeBuilder.Register <IShellViewModel>("blot");
        }
Example #2
0
        public IConventionRouter Register(Type type, string id = null)
        {
            var typeName = type.Name;

            if (typeName.EndsWith(_PostFix))
            {
                typeName = typeName.Substring(0, typeName.Length - _PostFix.Length);
            }

            var route = string.Format(_Format, typeName, type.Namespace, id).ToLower();

            _RouterBuilder.Register(type, route);

            return(this);
        }
Example #3
0
 /// <summary>
 /// Add the corresponding type to the convention, using option id
 /// </summary>
 /// <param name="type">type to register</param>
 /// <param name="id"></param>
 /// <returns></returns>
 public IConventionRouter Register(Type type, string id = null)
 {
     var(route, routeDestination) = _RouteInformationGetter(type, id);
     _RouterBuilder.Register(route, routeDestination);
     return(this);
 }