2 writes to ChoiceIdentifier
System.Xml (2)
System\Xml\Serialization\XmlReflectionImporter.cs (1)
1349
accessor.
ChoiceIdentifier
= new ChoiceIdentifierAccessor();
System\Xml\Serialization\XmlSchemaImporter.cs (1)
823
member.
ChoiceIdentifier
= new ChoiceIdentifierAccessor();
79 references to ChoiceIdentifier
System.Xml (79)
System\Xml\Serialization\Types.cs (3)
998
if (mappings[i].
ChoiceIdentifier
!= null)
999
memberInfos[mappings[i].
ChoiceIdentifier
.MemberName] = mappings[i].
ChoiceIdentifier
.MemberInfo;
System\Xml\Serialization\XmlCodeExporter.cs (2)
692
if (member.
ChoiceIdentifier
!= null) {
694
attribute.Arguments.Add(new CodeAttributeArgument(new CodePrimitiveExpression(member.
ChoiceIdentifier
.MemberName)));
System\Xml\Serialization\XmlReflectionImporter.cs (11)
1350
accessor.
ChoiceIdentifier
.MemberName = a.XmlChoiceIdentifier.MemberName;
1351
accessor.
ChoiceIdentifier
.MemberInfo = a.XmlChoiceIdentifier.MemberInfo;
1352
accessor.
ChoiceIdentifier
.Mapping = ImportTypeMapping(modelScope.GetTypeModel(choiceIdentifierType), ns, ImportContext.Element, String.Empty, null, limiter);
1353
CheckChoiceIdentifierMapping((EnumMapping)accessor.
ChoiceIdentifier
.Mapping);
1727
if (accessor.
ChoiceIdentifier
!= null) {
1729
accessor.
ChoiceIdentifier
.MemberIds = new string[accessor.Elements.Length];
1733
EnumMapping choiceMapping = (EnumMapping)accessor.
ChoiceIdentifier
.Mapping;
1740
accessor.
ChoiceIdentifier
.MemberIds[i] = choiceMapping.Constants[j].Name;
1752
accessor.
ChoiceIdentifier
.MemberIds[i] = choiceMapping.Constants[j].Name;
1761
throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingAnyValue, accessor.
ChoiceIdentifier
.Mapping.TypeDesc.FullName));
1766
throw new InvalidOperationException(Res.GetString(Res.XmlChoiceMissingValue, accessor.
ChoiceIdentifier
.Mapping.TypeDesc.FullName, id, element.Name, element.Namespace));
System\Xml\Serialization\XmlSchemaImporter.cs (12)
824
member.
ChoiceIdentifier
.MemberName = member.Name + "ElementName";
826
member.
ChoiceIdentifier
.Mapping = ImportEnumeratedChoice(member.Elements, ns, member.Name + "ChoiceType");
827
member.
ChoiceIdentifier
.MemberIds = new string[member.Elements.Length];
828
ConstantMapping[] constants = ((EnumMapping)member.
ChoiceIdentifier
.Mapping).Constants;
830
member.
ChoiceIdentifier
.MemberIds[i] = constants[i].Name;
834
choiceIdentifier.Name = member.
ChoiceIdentifier
.MemberName;
836
choiceIdentifier.TypeDesc = member.
ChoiceIdentifier
.Mapping.TypeDesc.CreateArrayTypeDesc();
839
choiceIdentifier.TypeDesc = member.
ChoiceIdentifier
.Mapping.TypeDesc;
847
choiceAccessor.Mapping = member.
ChoiceIdentifier
.Mapping;
851
choiceAccessor.Name = choiceIdentifier.Name = member.
ChoiceIdentifier
.MemberName = membersScope.AddUnique(member.
ChoiceIdentifier
.MemberName, choiceIdentifier);
1211
if (choiceMember.
ChoiceIdentifier
!= null) return null;
System\Xml\Serialization\XmlSerializationReader.cs (17)
2031
if (mapping.
ChoiceIdentifier
!= null) {
2036
bool choiceUseReflection = mapping.
ChoiceIdentifier
.Mapping.TypeDesc.UseReflection;
2037
string choiceTypeFullName = mapping.
ChoiceIdentifier
.Mapping.TypeDesc.CSharpName;
2042
this.choiceArraySource = init + outerClass.RaCodeGen.GetStringForArrayMember(a, c + "++", mapping.
ChoiceIdentifier
.Mapping.TypeDesc);
2308
if (member.
ChoiceIdentifier
!= null) {
2310
if (mappings[j].Name == member.
ChoiceIdentifier
.MemberName) {
2325
if (mapping.
ChoiceIdentifier
== null) return "";
2326
CodeIdentifier.CheckValidIdentifier(mapping.
ChoiceIdentifier
.MemberName);
2327
return RaCodeGen.GetStringForMember(parent, mapping.
ChoiceIdentifier
.MemberName, parentTypeDesc);
3650
if (member.Mapping.
ChoiceIdentifier
!= null) {
3651
WriteArrayLocalDecl(member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.CSharpName+"[]",
3653
member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc);
3863
WriteElement(anyElement.ArraySource, anyElement.ArrayName, anyElement.ChoiceArraySource, element, anyElement.Mapping.
ChoiceIdentifier
, anyElement.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? anyElement.CheckSpecifiedSource : null, false, false, -1, i);
3901
ChoiceIdentifierAccessor choice = member.Mapping.
ChoiceIdentifier
;
4097
if (member.Mapping.
ChoiceIdentifier
!= null) {
4102
bool choiceUseReflection = member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.UseReflection;
4103
string choiceTypeName = member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.CSharpName;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (17)
99
if (mapping.
ChoiceIdentifier
!= null) {
104
string choiceTypeFullName = mapping.
ChoiceIdentifier
.Mapping.TypeDesc.CSharpName;
109
this.choiceArraySource = init + outerClass.RaCodeGen.GetStringForArrayMember(a, c + "++", mapping.
ChoiceIdentifier
.Mapping.TypeDesc);
378
if (member.
ChoiceIdentifier
!= null) {
380
if (mappings[j].Name == member.
ChoiceIdentifier
.MemberName) {
395
if (mapping.
ChoiceIdentifier
== null) return "";
396
CodeIdentifier.CheckValidIdentifier(mapping.
ChoiceIdentifier
.MemberName);
397
return RaCodeGen.GetStringForMember(parent, mapping.
ChoiceIdentifier
.MemberName, parentTypeDesc);
2197
if (member.Mapping.
ChoiceIdentifier
!= null) {
2198
WriteArrayLocalDecl(member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.CSharpName + "[]",
2200
member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc);
2487
WriteElement(anyElement.ArraySource, anyElement.ArrayName, anyElement.ChoiceArraySource, element, anyElement.Mapping.
ChoiceIdentifier
, anyElement.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? anyElement.CheckSpecifiedSource : null, false, false, -1, i);
2520
ChoiceIdentifierAccessor choice = member.Mapping.
ChoiceIdentifier
;
2686
if (member.Mapping.
ChoiceIdentifier
!= null) {
2694
ilg.Ldc(member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.Type);
2697
ilg.ConvertValue(XmlSerializationReader_ShrinkArray.ReturnType, member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.Type.MakeArrayType());
2698
WriteSourceEnd(member.ChoiceSource, member.Mapping.
ChoiceIdentifier
.Mapping.TypeDesc.Type.MakeArrayType());
System\Xml\Serialization\XmlSerializationWriter.cs (10)
1727
if (member.
ChoiceIdentifier
!= null) {
1729
if (mapping.Members[j].Name == member.
ChoiceIdentifier
.MemberName) {
1730
if (member.
ChoiceIdentifier
.Mapping.TypeDesc.UseReflection)
1754
WriteMember(source, enumSource, member.ElementsSortedByDerivation, member.Text, member.
ChoiceIdentifier
, member.TypeDesc, writeAccessors || hasWrapperElement);
2178
if (m.
ChoiceIdentifier
!= null){
2179
CodeIdentifier.CheckValidIdentifier(m.
ChoiceIdentifier
.MemberName);
2180
choiceSource = RaCodeGen.GetStringForMember("o", m.
ChoiceIdentifier
.MemberName, mapping.TypeDesc);
2182
WriteMember(RaCodeGen.GetStringForMember("o", m.Name, mapping.TypeDesc), choiceSource, m.ElementsSortedByDerivation, m.Text, m.
ChoiceIdentifier
, m.TypeDesc, true);
3443
if (member.
ChoiceIdentifier
!= null){
3444
string memberName = member.
ChoiceIdentifier
.MemberName;
System\Xml\Serialization\XmlSerializationWriterILGen.cs (7)
468
if (member.
ChoiceIdentifier
!= null) {
470
if (mapping.Members[j].Name == member.
ChoiceIdentifier
.MemberName) {
484
WriteMember(new SourceInfo(source, source, null, null, ilg), enumSource, member.ElementsSortedByDerivation, member.Text, member.
ChoiceIdentifier
, member.TypeDesc, writeAccessors || hasWrapperElement);
1081
if (m.
ChoiceIdentifier
!= null) {
1082
CodeIdentifier.CheckValidIdentifier(m.
ChoiceIdentifier
.MemberName);
1083
choiceSource = RaCodeGen.GetStringForMember("o", m.
ChoiceIdentifier
.MemberName, mapping.TypeDesc);
1086
WriteMember(RaCodeGen.GetSourceForMember("o", m, m.MemberInfo, mapping.TypeDesc, ilg), choiceSource, m.ElementsSortedByDerivation, m.Text, m.
ChoiceIdentifier
, m.TypeDesc, true);