コード例 #1
0
        public void Respond()
        {
            ResponseFormatInternal format = Format;
            bool responded = ControllerBridge.IsFormatDefined && format.RespondWith(ControllerBridge.GetFormat(), ControllerBridge);

            if (!responded)
            {
                foreach (var mime in AcceptedMimes)
                {
                    if (format.RespondWith(mime.Symbol, ControllerBridge))
                    {
                        break;
                    }
                }
            }
        }
コード例 #2
0
        public void Respond()
        {
            ResponseFormatInternal format = (ResponseFormatInternal)Format;

            if (ControllerBridge.IsFormatDefined)
            {
                format.RespondWith(ControllerBridge.GetFormat(), ControllerBridge);
            }
            else
            {
                bool responded = false;
                foreach (var mime in AcceptedMimes)
                {
                    if (format.RespondWith(mime.Symbol, ControllerBridge))
                    {
                        responded = true;
                        break;
                    }
                }
            }
        }