Add() публичный Метод

public Add ( Handler child ) : void
child Handler
Результат void
Пример #1
0
        static void Main(string[] arguments)
        {
            WebServer server = new WebServer("127.0.0.1", 9000);

            Handler container = new Handler("blight");
            server.Add(container);

            Handler markupHandler = new Handler("markup", MarkupTest);
            container.Add(markupHandler);

            Handler exceptionHandler = new Handler("exception", ExceptionTest);
            container.Add(exceptionHandler);

            SubmissionHandler = new Handler("submission", SubmissionTest);
            container.Add(SubmissionHandler);

            Handler chunkedHandler = Handler.ChunkedHandler("chunked", ChunkedTest, ContentType.Markup);
            container.Add(chunkedHandler);

            server.Run();
        }
Пример #2
0
        void InitialiseHandlers()
        {
            Handler apiContainer = new Handler("API");
            Server.Add(apiContainer);

            ApiSearchHandler = new Handler("Search", ApiSearch, ArgumentType.String, ArgumentType.String);
            apiContainer.Add(ApiSearchHandler);

            ApiUpdateHandler = new Handler("Update", ApiUpdateSummoner, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiUpdateHandler);

            ApiSummonerProfileHandler = new Handler("Profile", ApiSummonerProfile, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerProfileHandler);

            ApiSummonerStatisticsHandler = new Handler("Statistics", ApiSummonerStatistics, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerStatisticsHandler);

            ApiSummonerGamesHandler = new Handler("Games", ApiSummonerGames, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerGamesHandler);

            ApiSummonerRunesHandler = new Handler("Runes", ApiSummonerRunes, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerRunesHandler);

            ApiSetAutomaticUpdatesHandler = new Handler("SetAutomaticUpdates", ApiSetAutomaticUpdates, ArgumentType.String, ArgumentType.Integer, ArgumentType.Integer);
            apiContainer.Add(ApiSetAutomaticUpdatesHandler);

            IndexHandler = new Handler(Index);
            Server.Add(IndexHandler);
        }
Пример #3
0
        void InitialiseHandlers()
        {
            Handler apiContainer = new Handler("API");
            Server.Add(apiContainer);

            ApiSearchHandler = new Handler(ApiSearchHandlerName, ApiSearch, ArgumentType.String, ArgumentType.String);
            apiContainer.Add(ApiSearchHandler);

            ApiUpdateHandler = new Handler(ApiUpdateHandlerName, ApiUpdateSummoner, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiUpdateHandler);

            ApiSummonerProfileHandler = new Handler(ApiSummonerProfileHandlerName, ApiSummonerProfile, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerProfileHandler);

            ApiSummonerStatisticsHandler = new Handler(ApiSummonerStatisticsHandlerName, ApiSummonerStatistics, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerStatisticsHandler);

            ApiSummonerGamesHandler = new Handler(ApiSummonerGamesHandlerName, ApiSummonerGames, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerGamesHandler);

            ApiSummonerRunesHandler = new Handler(ApiSummonerRunesHandlerName, ApiSummonerRunes, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiSummonerRunesHandler);

            ApiSetAutomaticUpdatesHandler = new Handler(ApiSetAutomaticUpdatesHandlerName, ApiSetAutomaticUpdates, ArgumentType.String, ArgumentType.Integer, ArgumentType.Integer);
            apiContainer.Add(ApiSetAutomaticUpdatesHandler);

            ApiWriteCommentHandler = new Handler(ApiWriteCommentName, ApiWriteComment, ArgumentType.String, ArgumentType.Integer, ArgumentType.String, ArgumentType.String);
            apiContainer.Add(ApiWriteCommentHandler);

            ApiGetCommentsHandler = new Handler(ApiGetCommentsName, ApiGetComments, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiGetCommentsHandler);

            ApiGetGameTeamHandler = new Handler(ApiGetGameTeamName, ApiGetGameTeam, ArgumentType.String, ArgumentType.Integer);
            apiContainer.Add(ApiGetGameTeamHandler);

            IndexHandler = new Handler(Index);
            Server.Add(IndexHandler);
        }