public ServiceContext(HttpListenerContext context, ServiceBridge bridge, JsonServiceBase service, IDictionary<string, string> customHeaders)
        {
            Timestamp = DateTime.Now;
            Request = context.Request;
            Bridge = bridge;
            _response = context.Response;
            _service = service;
            _headers = customHeaders ?? new Dictionary<string, string>();

            RequireAuthorization = _service.Authorize && (Bridge == null || !Bridge.Attribute.AllowUnauthorized);
            ResponseType = DetermineResponse();
        }
Beispiel #2
0
        public ServiceContext(HttpListenerContext context, ServiceBridge bridge, JsonServiceBase service, IDictionary <string, string> customHeaders)
        {
            Timestamp = DateTime.Now;
            Request   = context.Request;
            Bridge    = bridge;
            _response = context.Response;
            _service  = service;
            _headers  = customHeaders ?? new Dictionary <string, string>();

            RequireAuthorization = _service.Authorize && (Bridge == null || !Bridge.Attribute.AllowUnauthorized);
            ResponseType         = DetermineResponse();
        }