コード例 #1
0
ファイル: MvcServer.cs プロジェクト: davidsiaw/bunnyblogger
        /// <summary>
        /// Add a controller.
        /// </summary>
        /// <param name="controller"></param>
        public void Add(Controller controller)
        {
            var director = new ControllerDirector(controller);
            director.InvokingAction += OnInvokingAction;
            _directors.Add(director);

            var uris = director.GetRoutes();
            foreach (var route in uris)
            {
                if (!_routes.ContainsKey(route))
                    _routes.Add(route, director);
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ControllerRoute"/> class.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="route">The route.</param>
 public ControllerRoute(ControllerDirector controller, string route)
 {
 }
コード例 #3
0
 public DirectorContext(ControllerDirector director, Controller controller)
 {
     Director   = director;
     Controller = controller;
 }
コード例 #4
0
 public DirectorContext(ControllerDirector director, Controller controller)
 {
     Director = director;
     Controller = controller;
 }