// 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: 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); }