System.Xml.Serialization.XmlReflectionImporter.GetChoiceIdentifierType C# (CSharp) Method

GetChoiceIdentifierType() private method

private GetChoiceIdentifierType ( XmlChoiceIdentifierAttribute choice, XmlReflectionMember xmlReflectionMembers, bool isArrayLike, string accessorName ) : Type
choice XmlChoiceIdentifierAttribute
xmlReflectionMembers XmlReflectionMember
isArrayLike bool
accessorName string
return System.Type
        private Type GetChoiceIdentifierType(XmlChoiceIdentifierAttribute choice, XmlReflectionMember[] xmlReflectionMembers, bool isArrayLike, string accessorName)
        {
            for (int i = 0; i < xmlReflectionMembers.Length; i++)
            {
                if (choice.MemberName == xmlReflectionMembers[i].MemberName)
                {
                    return CheckChoiceIdentifierType(xmlReflectionMembers[i].MemberType, isArrayLike, choice.MemberName, accessorName);
                }
            }
            // Missing '{0}' needed for serialization of choice '{1}'.
            throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentiferMemberMissing, choice.MemberName, accessorName));
        }

Same methods

XmlReflectionImporter::GetChoiceIdentifierType ( XmlChoiceIdentifierAttribute choice, StructModel structModel, bool isArrayLike, string accessorName ) : Type