internal static IEnumerable<XElement> GetNotificationValues(XElement notification)
{
// Add the notification ID
XElement id = notification.Element(Outbound + "Id");
XName notificationIdName = Outbound + "_NotificationId";
XElement notificationId = new XElement(notificationIdName) { Value = id.Value };
yield return notificationId;
// Add the notification type
XElement salesForceObject = notification.Element(Outbound + "sObject");
XAttribute type = salesForceObject.Attribute(Xsi + "type");
XName notificationTypeName = Outbound + "_NotificationType";
XElement notificationType = new XElement(notificationTypeName) { Value = GetLocalName(type.Value) };
yield return notificationType;
// Add notification properties
foreach (XElement e in salesForceObject.Elements())
{
yield return e;
}
}