public ContactResponse GetResponse(XmlNode requestXml, bool childNode = true) { var obj = new ContactResponse(); var request = childNode ? requestXml.ChildNodes[0] : requestXml; foreach (var property in obj.GetType().GetFields()) { if (request.Attributes != null) foreach (var attribute in request.Attributes) { if (((XmlAttribute)attribute).Name == property.Name) SetValueForProperty(property, obj, ((XmlAttribute)attribute).Value); } } return obj; }
public ContactResponse GetResponse(XmlNode requestXml, bool childNode = true) { var obj = new ContactResponse(); var request = childNode ? requestXml.ChildNodes[0] : requestXml; foreach (var property in obj.GetType().GetFields()) { if (request.Attributes != null) { foreach (var attribute in request.Attributes) { if (((XmlAttribute)attribute).Name == property.Name) { SetValueForProperty(property, obj, ((XmlAttribute)attribute).Value); } } } } return(obj); }
public ParcerNewTrasferEventArgs(Request req, ContactResponse response, ContactTransfer transfer) { Req = req; Response = response; Transfer = transfer; }