private void OnOptionOptimize(object sender, ActionEventArgs args) { Debug.Assert(_currentCharacterSet != null); var element = IcuDataObject.CreateElement("optimize"); element.AppendChild(IcuDataObject.CreateText(_currentCharacterSet)); _optionElements.Add(element); _currentCharacterSet = null; }
private IcuDataObject CreateOptimizedNode(List <IcuDataObject> nodeGroup) { Debug.Assert(nodeGroup != null); Debug.Assert(nodeGroup.Count > 0); // one node is already optimized if (nodeGroup.Count == 1) { return(nodeGroup[0]); } // luckily the optimized names are the same as the unoptimized with 'c' appended // so <p> becomes <pc>, <s> to <sc>, et al. IcuDataObject optimizedNode = IcuDataObject.CreateElement(nodeGroup[0].Name + "c"); foreach (IcuDataObject node in nodeGroup) { optimizedNode.AppendChild(IcuDataObject.CreateText(node.InnerText)); } return(optimizedNode); }
private void OnDataString(object sender, ActionEventArgs args) { _currentDataObjects.Push(IcuDataObject.CreateText(_currentDataString.ToString())); _currentDataString = new StringBuilder(); }