private void ReadCollection(XmlReader reader, IList col) { while (true) { reader.Read(); reader.SkipEmptyNodes(); if (reader.NodeType != XmlNodeType.EndElement) { if (reader.NodeType == XmlNodeType.Element && reader.Name == "Item") { object obj = TypeVariableDefinition.TryParse(reader.ReadString(), this.m_collectionType); if (obj != null) { col.Add(obj); } } reader.SkipEmptyNodes(); reader.ReadEndElement(); } else { break; } } }
public bool TrySet(string strValue) { if (this.IsReadOnly) { return(false); } object obj = TypeVariableDefinition.TryParse(strValue, this.VariableType); if (obj == null) { return(false); } this.Value = obj; return(true); }