YAXLib.YAXSerializer.DeserializeCollectionMember C# (CSharp) Method

DeserializeCollectionMember() private method

Deserializes the collection member.
private DeserializeCollectionMember ( object o, MemberWrapper member, Type colType, string elemValue, System.Xml.Linq.XElement xelemValue ) : void
o object The object to store the retrieved value at.
member MemberWrapper The member of the specified object whose value we intent to retreive.
colType System.Type Type of the collection to be retrieved.
elemValue string The value of the element stored as string.
xelemValue System.Xml.Linq.XElement The XML element value to be retreived. If the value to be retreived /// has been stored in an XML attribute, this reference is null.
return void
        private void DeserializeCollectionMember(object o, MemberWrapper member, Type colType, string elemValue, XElement xelemValue)
        {
            object colObject;

            if (member.CollectionAttributeInstance != null && member.CollectionAttributeInstance.SerializationType == YAXCollectionSerializationTypes.Serially &&
                (member.IsSerializedAsAttribute || member.IsSerializedAsValue))
            {
                colObject = DeserializeCollectionValue(colType, new XElement("temp", elemValue), "temp", member.CollectionAttributeInstance);
            }
            else
            {
                XName memberAlias = member.Alias.OverrideNsIfEmpty(TypeNamespace);
                colObject = DeserializeCollectionValue(colType, xelemValue, memberAlias, member.CollectionAttributeInstance);
            }

            try
            {
                member.SetValue(o, colObject);
            }
            catch
            {
                OnExceptionOccurred(new YAXPropertyCannotBeAssignedTo(member.Alias.LocalName), m_defaultExceptionType);
            }
        }