Provides data for the OnUnknownRequest event.
Inheritance: System.EventArgs
Exemplo n.º 1
0
        /// <summary>
        /// Create response
        /// </summary>        
        public virtual void  GetResponse(
                                NameValueCollection requestParams,
                                Stream responseOutputStream, 
                                out string responseContentType)
        {

            responseContentType = string.Empty;
            #region Проверка параметров запроса

            if (!TestEnvironment(responseOutputStream, ref responseContentType)) return;
            if (!TestCommonParams(requestParams, responseOutputStream, ref responseContentType)) return;        



            #endregion
          
            if (!RequestAction(requestParams, responseOutputStream, ref responseContentType))
            {

                WmsUnknownRequestEventArgs args = new WmsUnknownRequestEventArgs(requestParams,
                                                                                 responseOutputStream);
                OnUnknownRequest(args);
                if (args.IsHandled)
                {
                    responseContentType = args.ResponseContentType;
                    return;
                }

                WmsException(WmsExceptionCode.OperationNotSupported,
                             "Invalid request.",
                             responseOutputStream,
                             ref responseContentType);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Вызвать событие UnknownRequest
 /// </summary>
 /// <param name="args"></param>
 protected void OnUnknownRequest(WmsUnknownRequestEventArgs args)
 {
     if (UnknownRequest != null)
         UnknownRequest(this, args);
 }