// Token: 0x0600785C RID: 30812 RVA: 0x0022494C File Offset: 0x00222B4C
        private void UpdateAttribute(XmlElement root, XmlToken token, string value)
        {
            string  xmlName       = SNCAnnotation.GetXmlName(token);
            XmlNode attributeNode = root.GetAttributeNode(xmlName, "http://schemas.microsoft.com/windows/annotations/2003/11/base");

            if (attributeNode == null)
            {
                if (value == null)
                {
                    return;
                }
                root.SetAttribute(xmlName, "http://schemas.microsoft.com/windows/annotations/2003/11/base", value);
                return;
            }
            else
            {
                if (value == null)
                {
                    root.RemoveAttribute(xmlName, "http://schemas.microsoft.com/windows/annotations/2003/11/base");
                    return;
                }
                if (attributeNode.Value != value)
                {
                    root.SetAttribute(xmlName, "http://schemas.microsoft.com/windows/annotations/2003/11/base", value);
                }
                return;
            }
        }
        // Token: 0x0600785B RID: 30811 RVA: 0x002248A0 File Offset: 0x00222AA0
        private static void GetCargoAndRoot(SNCAnnotation annotation, XmlToken token, out AnnotationResource cargo, out XmlElement root, out bool newCargo, out bool newRoot)
        {
            Invariant.Assert(annotation != null, "Annotation is null.");
            Invariant.Assert((token & (XmlToken.MetaData | XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height | XmlToken.IsExpanded | XmlToken.Author | XmlToken.Text | XmlToken.Ink | XmlToken.ZOrder)) > (XmlToken)0, "No token specified.");
            string cargoName = SNCAnnotation.GetCargoName(token);

            newRoot  = false;
            newCargo = false;
            cargo    = annotation.FindCargo(cargoName);
            if (cargo != null)
            {
                root = SNCAnnotation.FindRootXmlElement(token, cargo);
                if (root == null)
                {
                    newRoot = true;
                    XmlDocument xmlDocument = new XmlDocument();
                    root = xmlDocument.CreateElement(SNCAnnotation.GetXmlName(token), "http://schemas.microsoft.com/windows/annotations/2003/11/base");
                    return;
                }
            }
            else
            {
                newCargo = true;
                cargo    = new AnnotationResource(cargoName);
                XmlDocument xmlDocument2 = new XmlDocument();
                root = xmlDocument2.CreateElement(SNCAnnotation.GetXmlName(token), "http://schemas.microsoft.com/windows/annotations/2003/11/base");
                cargo.Contents.Add(root);
            }
        }
        // Token: 0x06007860 RID: 30816 RVA: 0x00224AE8 File Offset: 0x00222CE8
        private static XmlElement FindRootXmlElement(XmlToken token, AnnotationResource cargo)
        {
            XmlElement result = null;
            string     value  = string.Empty;

            if (token <= XmlToken.YOffset)
            {
                if (token <= XmlToken.Left)
                {
                    if (token != XmlToken.MetaData && token != XmlToken.Left)
                    {
                        goto IL_77;
                    }
                }
                else if (token != XmlToken.Top && token != XmlToken.XOffset && token != XmlToken.YOffset)
                {
                    goto IL_77;
                }
            }
            else if (token <= XmlToken.IsExpanded)
            {
                if (token != XmlToken.Width && token != XmlToken.Height && token != XmlToken.IsExpanded)
                {
                    goto IL_77;
                }
            }
            else
            {
                if (token == XmlToken.Text || token == XmlToken.Ink)
                {
                    value = SNCAnnotation.GetXmlName(token);
                    goto IL_77;
                }
                if (token != XmlToken.ZOrder)
                {
                    goto IL_77;
                }
            }
            value = SNCAnnotation.GetXmlName(XmlToken.MetaData);
IL_77:
            foreach (XmlElement xmlElement in cargo.Contents)
            {
                if (xmlElement.Name.Equals(value))
                {
                    result = xmlElement;
                    break;
                }
            }
            return(result);
        }
        // Token: 0x06007861 RID: 30817 RVA: 0x00224BB8 File Offset: 0x00222DB8
        private static object FindContent(XmlToken token, AnnotationResource cargo)
        {
            object     result     = null;
            XmlElement xmlElement = SNCAnnotation.FindRootXmlElement(token, cargo);

            if (xmlElement != null)
            {
                if (token <= XmlToken.Width)
                {
                    if (token <= XmlToken.Top)
                    {
                        if (token != XmlToken.Left && token != XmlToken.Top)
                        {
                            return(result);
                        }
                    }
                    else if (token != XmlToken.XOffset && token != XmlToken.YOffset && token != XmlToken.Width)
                    {
                        return(result);
                    }
                }
                else if (token <= XmlToken.IsExpanded)
                {
                    if (token != XmlToken.Height && token != XmlToken.IsExpanded)
                    {
                        return(result);
                    }
                }
                else
                {
                    if (token == XmlToken.Text || token == XmlToken.Ink)
                    {
                        return(xmlElement);
                    }
                    if (token != XmlToken.ZOrder)
                    {
                        return(result);
                    }
                }
                return(xmlElement.GetAttributeNode(SNCAnnotation.GetXmlName(token), "http://schemas.microsoft.com/windows/annotations/2003/11/base"));
            }
            return(result);
        }