상속: HttpRequestController
        public void MapFolder(string name, string rootFolder)
        {
            if (name == null) throw new ArgumentNullException(nameof(name));
            if (name == null) throw new ArgumentNullException(nameof(rootFolder));

            if (_controllers.ContainsKey(name))
            {
                throw new InvalidOperationException("The controller is already registered");
            }

            var controller = new MappedFolderController(name, rootFolder, _server);
            _controllers.Add(name, controller);
        }
예제 #2
0
        public void MapFolder(string name, string rootFolder)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (name == null)
            {
                throw new ArgumentNullException(nameof(rootFolder));
            }

            if (_controllers.ContainsKey(name))
            {
                throw new InvalidOperationException("The controller is already registered");
            }

            var controller = new MappedFolderController(name, rootFolder, _server);

            _controllers.Add(name, controller);
        }