Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            HttpRequest     request          = context.Request;
            HttpResponse    response         = context.Response;
            IProcessRequest requestProcessor = null;

            switch (request.QueryString["rp"])
            {
            //case "GzipModule":
            //    requestProcessor = new Moxiecode.TinyMCE.Compression.GzipModule();
            //    break;

            case "spellchecker":
                // we don't want anonymous requests to initiate server side web requests
                // lots of requests could generate significant load
                if (WebUser.IsInRoles(WebConfigSettings.RolesAllowedToUseTinyMCESpellChecker))    // "Authenticated Users" by default
                {
                    requestProcessor = new SpellCheckerRequestProcessor();
                }

                break;
            }

            if (requestProcessor != null)
            {
                requestProcessor.ProcessRequest(context);
            }
        }
Esempio n. 2
0
        public DialogflowModule(IMessageGenerator messageGenerator, ILogWriter logWriter, IProcessRequest processRequest)
        {
            _messageGenerator = messageGenerator;
            _logWriter        = logWriter;
            _processRequest   = processRequest;

            _logWriter.LogMessage("Initialised Dialogflow");
            // Authentication Check
            Before += ctx => {
                return((this.Context.CurrentUser == null) ? new HtmlResponse(HttpStatusCode.Unauthorized) : null);
            };

            // Routes
            Post["/dialogflow", true] = async(requestObject, cancellationToken) =>
            {
                switch (Version)
                {
                case 1:
                    return(HandleV1Request());

                case 2:
                    return(HandleV2Request());

                default:
                    throw new Exception($"Unrecognised Version - {Version}");
                }
            };

            Get["/GoogleHome"] = parameters => ("Hello to Google Home");
        }
 // NOTE: The object is instantiated using DI container, so registered dependencies are injects well
 public GeneralHandlers(
     IProcessRequest processRequest,
     IHealthService healthService,
     ILog log)
 {
     _processRequest = processRequest;
     _healthService  = healthService;
     _log            = log;
 }
        public void ProcessRequest(HttpContext context)
        {
            HttpRequest     request          = context.Request;
            HttpResponse    response         = context.Response;
            IProcessRequest requestProcessor = null;

            switch (request.QueryString["rp"])
            {
            //case "GzipModule":
            //    requestProcessor = new Moxiecode.TinyMCE.Compression.GzipModule();
            //    break;

            case "spellchecker":
                requestProcessor = new SpellCheckerRequestProcessor();
                break;
            }

            if (requestProcessor != null)
            {
                requestProcessor.ProcessRequest(context);
            }
        }
Esempio n. 5
0
 public XMLProcess(IProcessRequest next)
 {
     this.Next = next;
 }
Esempio n. 6
0
 public SelectSurround(Zone z, IProcessRequest processor) : base(z)
 {
 }
Esempio n. 7
0
 public SystemInfoParser(IProcessRequest reqProccessor, IParseZone zoneParser)
 {
     _reqProcessor = reqProccessor;
     ZoneParser    = zoneParser;
 }
 public PercentProcess(IProcessRequest next)
 {
     this.Next = next;
 }
 public VehiclesModel(IMakeRequest makeRequest, IProcessRequest processRequest)
 {
     MakeRequest    = makeRequest;
     ProcessRequest = processRequest;
 }
 public StarShipsModel(IMakeRequest makeRequest, IProcessRequest processRequest)
 {
     MakeRequest    = makeRequest;
     ProcessRequest = processRequest;
 }
Esempio n. 11
0
 public HttpAsyncListener(IProcessRequest processRequest)
 {
     _iprocessRequest = processRequest;
 }
Esempio n. 12
0
 public FilmsModel(IMakeRequest makeRequest, IProcessRequest processRequest)
 {
     MakeRequest    = makeRequest;
     ProcessRequest = processRequest;
 }
Esempio n. 13
0
 public HttpAsyncListener(IProcessRequest processRequest, ILogOutput logOutput)
 {
     _iprocessRequest = processRequest;
     ServerComms      = logOutput;
 }
Esempio n. 14
0
 public SpeciesModel(IMakeRequest makeRequest, IProcessRequest processRequest)
 {
     MakeRequest    = makeRequest;
     ProcessRequest = processRequest;
 }
 public CSVProcess(IProcessRequest next)
 {
     this.Next = next;
 }
Esempio n. 16
0
 public CharactersModel(IMakeRequest makeRequest, IProcessRequest processRequest)
 {
     MakeRequest    = makeRequest;
     ProcessRequest = processRequest;
 }
Esempio n. 17
0
 private RunMe(IUserInteraction ux, ITextBlobs textBlobs, IProcessRequest processRequest)
 {
     _ux             = ux;
     _textBlobs      = textBlobs;
     _processRequest = processRequest;
 }
Esempio n. 18
0
 public GetPartyMode(Zone z, IProcessRequest processor)
 {
 }
Esempio n. 19
0
 public UserController(IProcessRequest service)
 {
     this._service = service;
 }
 public PlanetsModel(IMakeRequest makeRequest, IProcessRequest processRequest)
 {
     MakeRequest    = makeRequest;
     ProcessRequest = processRequest;
 }