// Token: 0x06006E27 RID: 28199 RVA: 0x001FB688 File Offset: 0x001F9888
 internal string GetStringComment(BamlStartElementNode node, string localName)
 {
     InternalBamlLocalizabilityResolver.ElementComments elementComments = this.LookupCommentForElement(node);
     for (int i = 0; i < elementComments.LocalizationComments.Length; i++)
     {
         if (elementComments.LocalizationComments[i].PropertyName == localName)
         {
             return((string)elementComments.LocalizationComments[i].Value);
         }
     }
     return(null);
 }
 // Token: 0x06006E2E RID: 28206 RVA: 0x001FB950 File Offset: 0x001F9B50
 private InternalBamlLocalizabilityResolver.ElementComments LookupCommentForElement(BamlStartElementNode node)
 {
     if (node.Uid == null)
     {
         return(new InternalBamlLocalizabilityResolver.ElementComments());
     }
     for (int i = 0; i < this._comments.Length; i++)
     {
         if (this._comments[i] != null && this._comments[i].ElementId == node.Uid)
         {
             return(this._comments[i]);
         }
     }
     InternalBamlLocalizabilityResolver.ElementComments elementComments = new InternalBamlLocalizabilityResolver.ElementComments();
     elementComments.ElementId = node.Uid;
     if (this._commentsDocument != null)
     {
         XmlElement xmlElement = InternalBamlLocalizabilityResolver.FindElementByID(this._commentsDocument, node.Uid);
         if (xmlElement != null)
         {
             string attribute = xmlElement.GetAttribute("Attributes");
             this.SetLocalizationAttributes(node, elementComments, attribute);
             attribute = xmlElement.GetAttribute("Comments");
             this.SetLocalizationComments(node, elementComments, attribute);
         }
     }
     if (node.Children != null)
     {
         int num = 0;
         while (num < node.Children.Count && (elementComments.LocalizationComments.Length == 0 || elementComments.LocalizationAttributes.Length == 0))
         {
             BamlTreeNode bamlTreeNode = node.Children[num];
             if (bamlTreeNode.NodeType == BamlNodeType.Property)
             {
                 BamlPropertyNode bamlPropertyNode = (BamlPropertyNode)bamlTreeNode;
                 if (LocComments.IsLocCommentsProperty(bamlPropertyNode.OwnerTypeFullName, bamlPropertyNode.PropertyName) && elementComments.LocalizationComments.Length == 0)
                 {
                     this.SetLocalizationComments(node, elementComments, bamlPropertyNode.Value);
                 }
                 else if (LocComments.IsLocLocalizabilityProperty(bamlPropertyNode.OwnerTypeFullName, bamlPropertyNode.PropertyName) && elementComments.LocalizationAttributes.Length == 0)
                 {
                     this.SetLocalizationAttributes(node, elementComments, bamlPropertyNode.Value);
                 }
             }
             num++;
         }
     }
     this._comments[this._commentsIndex] = elementComments;
     this._commentsIndex = (this._commentsIndex + 1) % this._comments.Length;
     return(elementComments);
 }
 // Token: 0x06006E31 RID: 28209 RVA: 0x001FBBD4 File Offset: 0x001F9DD4
 private void SetLocalizationComments(BamlStartElementNode node, InternalBamlLocalizabilityResolver.ElementComments comments, string stringComment)
 {
     if (!string.IsNullOrEmpty(stringComment))
     {
         try
         {
             comments.LocalizationComments = LocComments.ParsePropertyComments(stringComment);
         }
         catch (FormatException)
         {
             this.RaiseErrorNotifyEvent(new BamlLocalizerErrorNotifyEventArgs(BamlTreeMap.GetKey(node), BamlLocalizerError.InvalidLocalizationComments));
         }
     }
 }