static DataContract ProcessClassDataContract(ClassDataContract contract, ExportContext context, MemberInfo memberNode) { string prefix = context.SetNamespace(contract.Namespace.Value); foreach (DataMember member in GetDataMembers(contract)) { if (member.MemberInfo.Name == memberNode.Name && member.MemberInfo.DeclaringType.IsAssignableFrom(memberNode.DeclaringType)) { context.WriteChildToContext(member, prefix); return member.MemberTypeContract; } } throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.QueryGeneratorPathToMemberNotFound))); }
private static DataContract ProcessClassDataContract(ClassDataContract contract, ExportContext context, MemberInfo memberNode) { string prefix = context.SetNamespace(contract.Namespace !.Value); foreach (DataMember member in GetDataMembers(contract)) { if (member.MemberInfo.Name == memberNode.Name && member.MemberInfo.DeclaringType !.IsAssignableFrom(memberNode.DeclaringType)) { context.WriteChildToContext(member, prefix); return(member.MemberTypeContract); } } throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.QueryGeneratorPathToMemberNotFound)); }
private static DataContract ProcessClassDataContract(ClassDataContract contract, ExportContext context, MemberInfo memberNode) { string prefix = context.SetNamespace(contract.Namespace.Value); if (contract.Members != null) { foreach (DataMember member in contract.Members) { if (member.MemberInfo == memberNode) { context.WriteChildToContext(member, prefix); return member.MemberTypeContract; } } } throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(System.Runtime.Serialization.SR.GetString("QueryGeneratorPathToMemberNotFound"))); }
private static DataContract ProcessClassDataContract(ClassDataContract contract, ExportContext context, MemberInfo memberNode) { string prefix = context.SetNamespace(contract.Namespace.Value); if (contract.Members != null) { foreach (DataMember member in contract.Members) { if (member.MemberInfo == memberNode) { context.WriteChildToContext(member, prefix); return(member.MemberTypeContract); } } } throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(System.Runtime.Serialization.SR.GetString("QueryGeneratorPathToMemberNotFound"))); }