static AllowHttpRequestHeadersFrom CreateAllowHttpRequestHeadersFrom (XmlReader reader)
{
int n = reader.AttributeCount;
string domain = reader.GetAttribute ("domain");
if (domain != null)
n--;
string secure = reader.GetAttribute ("secure");
if (secure != null)
n--;
string headers = reader.GetAttribute ("headers");
if (headers != null)
n--;
if (n != 0)
throw new XmlException ("unknown/unsupported attributes");
var h = new AllowHttpRequestHeadersFrom () { Domain = domain, Secure = ReadBooleanAttribute (secure) };
h.Headers.SetHeaders (headers);
return h;
}