/// <summary> /// /// </summary> /// <param name="xmlDoc"></param> public static XmlDocument SetSecsToLeader(XmlDocument xmlDoc) { List <XmlDocument> xmlDocList = new List <XmlDocument>(); XmlDocument result = null; DataOpContext dataOpContext = InitEventContexts(); dataOpContext.OnBeforeSetSecsToLeader(xmlDoc); using (TransactionScope scope = TransactionScopeFactory.Create()) { xmlDocList = dataOpContext.OnSetSecsToLeader(xmlDoc); scope.Complete(); } if (xmlDocList.Count == 1) { result = xmlDocList[0]; } return(result); }