コード例 #1
0
        private void AddResponseHeaders(Action <IDictionary <string, string> > addHeaders)
        {
            Dictionary <string, string> headers = new Dictionary <string, string>();

            if (addHeaders != null)
            {
                addHeaders(headers);
            }

            foreach (KeyValuePair <string, string> pair in headers)
            {
                _controllerBridge.AppendResponseHeader(pair.Key, pair.Value);
            }
        }
コード例 #2
0
        public void Empty(int statusCode, Action <IDictionary <string, string> > addHeaders)
        {
            Dictionary <string, string> headers = new Dictionary <string, string>();

            if (addHeaders != null)
            {
                addHeaders(headers);
            }
            _controllerBridge.SetResponseCode(statusCode);

            foreach (KeyValuePair <string, string> pair in headers)
            {
                _controllerBridge.AppendResponseHeader(pair.Key, pair.Value);
            }
            _controllerBridge.SendCancelLayoutAndView();
        }