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); } }
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(); }