private void parseSingleDimensionalArrayProperty(SingleDimensionalArrayProperty property) { // ElementType property.ElementType = property.Type != null?TypeInfo.GetTypeInfo(property.Type).ElementType : null; // LowerBound property.LowerBound = _reader.GetAttributeAsInt(Attributes.LowerBound); // Items foreach (string subElement in _reader.ReadSubElements()) { if (subElement == SubElements.Items) { readItems(property.Items, property.ElementType); } } }
private void parseMultiDimensionalArrayProperty(MultiDimensionalArrayProperty property) { property.ElementType = property.Type != null?TypeInfo.GetTypeInfo(property.Type).ElementType : null; foreach (string subElement in _reader.ReadSubElements()) { if (subElement == SubElements.Dimensions) { // Read dimensions readDimensionInfos(property.DimensionInfos); } if (subElement == SubElements.Items) { // Read items readMultiDimensionalArrayItems(property.Items, property.ElementType); } } }
private void parseCollectionProperty(CollectionProperty property) { // ElementType property.ElementType = property.Type != null?TypeInfo.GetTypeInfo(property.Type).ElementType : null; foreach (string subElement in _reader.ReadSubElements()) { if (subElement == SubElements.Properties) { // Properties readProperties(property.Properties, property.Type); continue; } if (subElement == SubElements.Items) { // Items readItems(property.Items, property.ElementType); } } }
private void parseDictionaryProperty(DictionaryProperty property) { if (property.Type != null) { var typeInfo = TypeInfo.GetTypeInfo(property.Type); property.KeyType = typeInfo.KeyType; property.ValueType = typeInfo.ElementType; } foreach (string subElement in _reader.ReadSubElements()) { if (subElement == SubElements.Properties) { // Properties readProperties(property.Properties, property.Type); continue; } if (subElement == SubElements.Items) { // Items readDictionaryItems(property.Items, property.KeyType, property.ValueType); } } }