protected ToContentFormat ( WebMessageFormat src, object result ) : WebContentFormat | ||
src | WebMessageFormat | |
result | object | |
return | WebContentFormat |
protected WebContentFormat ToContentFormat (WebMessageFormat src, object result)
{
if (result is Stream)
return WebContentFormat.Raw;
switch (src) {
case WebMessageFormat.Xml:
return WebContentFormat.Xml;
case WebMessageFormat.Json:
return WebContentFormat.Json;
}
throw new SystemException ("INTERNAL ERROR: should not happen");
}