private void DoResponse(string format, IControllerBridge bridge) { Responder hander = new Responder(bridge, bridge.ControllerAction); hander.Format = format; _renderers[format](hander); MimeType usedType = _mimeTypes.Where(mime => mime.Symbol == format).First(); bridge.SetResponseType(usedType); }
private void DoResponse(string format, IControllerBridge bridge) { Responder hander = new Responder(bridge, bridge.ControllerAction); hander.Format = format; _renderers[format](hander); MimeTypes types = new MimeTypes(); types.RegisterBuiltinTypes(); // MimeType usedType = types.Where(mime => mime.Symbol == format).First(); MimeType usedType = types.FindAll(delegate(MimeType mime) { return mime.Symbol == format; })[0]; bridge.SetResponseType(usedType); }
private void DoResponse(string format, IControllerBridge bridge) { Responder hander = new Responder(bridge, bridge.ControllerAction); hander.Format = format; _renderers[format](hander); MimeTypes types = new MimeTypes(); types.RegisterBuiltinTypes(); // MimeType usedType = types.Where(mime => mime.Symbol == format).First(); MimeType usedType = types.FindAll(delegate(MimeType mime) { return(mime.Symbol == format); })[0]; bridge.SetResponseType(usedType); }