public override void Add(object key, object value) { if (!(key is string)) { throw new ArgumentException("XmlRpcStruct key must be a string."); } if (XmlRpcServiceInfo.GetXmlRpcType(value.GetType()) == XmlRpcType.tInvalid) { throw new ArgumentException(String.Format( "Type {0} cannot be mapped to an XML-RPC type", value.GetType())); } base.Add(key, value); }
public override object this[object key] { get { return(base[key]); } set { if (!(key is string)) { throw new ArgumentException("XmlRpcStruct key must be a string."); } if (XmlRpcServiceInfo.GetXmlRpcType(value.GetType()) == XmlRpcType.tInvalid) { throw new ArgumentException(String.Format( "Type {0} cannot be mapped to an XML-RPC type", value.GetType())); } base[key] = value; } }