private string ComposeFieldXTag(ArrayList xTags) { if (xTags == null || xTags.Count == 0) { return(String.Empty); } StringBuilder output = new StringBuilder(); ArrayList properties = new ArrayList(); int size = xTags.Count; for (int i = 0; i < size; i++) { XTag xtagObj = (XTag)xTags[i]; Property xtag = xtagObj.Tag; string value = xtag.Value; properties.Clear(); properties.Add(xtag); output.Append(ComposevCardComponent(xtag.Value, properties, xtagObj.TagValue)); } return(output.ToString()); }
// X-PROP: private StringBuilder ComposeFieldXTag(XTagCollection xTags) { StringBuilder output = new StringBuilder(); if (xTags == null || xTags.Count == 0) { return(output); } Property xtag = null; string value; int size = xTags.Count; for (int i = 0; i < size; i++) { XTag xtagObj = xTags[i]; xtag = xtagObj.Tag; value = xtag.Value; output.Append(ComposeiCalTextComponent(xtag, xtagObj.TagValue)); } return(output); }
public void Add(XTag value) { int index = IndexOf(value.Tag.Tag); if (index == -1) { list.Add(value); } else { list[index] = value; } }
private int IndexOf(string tag) { for (int i = 0; i < list.Count; i++) { XTag xtag = list[i] as XTag; //ISSUE: should be case-sensitive? if (String.Compare(xtag.Tag.Tag, tag, true) == 0) { return(i); } } return(-1); }
public void AddXTag(XTag tag) { if (tag == null) { return; } if (xTags == null) { xTags = new ArrayList(); } int pos = xTags.IndexOf(tag); if (pos < 0) { xTags.Add(tag); } else { xTags[pos] = tag; } }
public void AddXTag(XTag tag) { if (tag == null) return; if (xTags == null) xTags = new ArrayList(); int pos = xTags.IndexOf(tag); if (pos < 0) { xTags.Add(tag); } else { xTags[pos] = tag; } }