Esempio n. 1
0
		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);
		}
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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();

            bridge.SetResponseType(usedType);
        }
Esempio n. 4
0
        public static void Serialize(this Responder responder, Object obj)
        {
            XmlSerializer serial = new XmlSerializer(obj.GetType());

            responder.SerializeWith(serial.Serialize, obj);
        }