Пример #1
0
        public ApiModule(NetworkService networkService)
            : base("/api")
        {
            _networkService = networkService;

            Get["/getmac/{ip}"] = GetMacAddress;
        }
Пример #2
0
        public MachineModule(WakeyCatalog catalog, NetworkService networkService)
            : base("/machines")
        {
            _catalog = catalog;
            _networkService = networkService;

            Get["/"] = ListMachines;

            Get["/{id}"] = GetMachine;
            Get["/new"] = NewMachine;
            Post["/new"] = CreateNewMachine;
            //Get["/{id}/edit"] = EditMachine;
            //Post["/{id}/edit"] = DoEditMachine;
            Delete["/{id}"] = DeleteMachine;
            Post["/{id}/wake"] = DoWakeMachine;
            Post["/{id}/ping"] = DoPingMachine;
        }