Example #1
0
        // Token: 0x06001224 RID: 4644 RVA: 0x000628D0 File Offset: 0x00060AD0
        public static ForwardEventParameters ParseForward(XmlNode xmlNode)
        {
            ForwardEventParameters forwardEventParameters = new ForwardEventParameters();

            foreach (object obj in xmlNode.ChildNodes)
            {
                XmlNode xmlNode2 = (XmlNode)obj;
                string  localName;
                switch (localName = xmlNode2.LocalName)
                {
                case "Forwardees":
                    forwardEventParameters.Forwardees = EventParametersParser.ParseForwardees(xmlNode2);
                    continue;

                case "Importance":
                    forwardEventParameters.Importance = EventParametersParser.ParseImportance(xmlNode2);
                    continue;

                case "Body":
                    forwardEventParameters.Notes = EventParametersParser.ParseBody(xmlNode2);
                    continue;

                case "Source":
                case "ClientId":
                case "AccountId":
                    continue;
                }
                throw new RequestParsingException("BadForwardEventNode:" + xmlNode2.LocalName);
            }
            if (forwardEventParameters.Forwardees == null || forwardEventParameters.Forwardees.Count == 0)
            {
                throw new RequestParsingException("MissingForwardees");
            }
            return(forwardEventParameters);
        }
Example #2
0
        // Token: 0x06001223 RID: 4643 RVA: 0x0006281C File Offset: 0x00060A1C
        public static CancelEventParameters ParseCancel(XmlNode xmlNode)
        {
            CancelEventParameters cancelEventParameters = new CancelEventParameters();

            foreach (object obj in xmlNode.ChildNodes)
            {
                XmlNode xmlNode2 = (XmlNode)obj;
                string  localName;
                if ((localName = xmlNode2.LocalName) != null)
                {
                    if (localName == "Importance")
                    {
                        cancelEventParameters.Importance = EventParametersParser.ParseImportance(xmlNode2);
                        continue;
                    }
                    if (localName == "Body")
                    {
                        cancelEventParameters.Notes = EventParametersParser.ParseBody(xmlNode2);
                        continue;
                    }
                }
                throw new RequestParsingException("BadCancelEventNode:" + xmlNode2.LocalName);
            }
            return(cancelEventParameters);
        }