138 references to ImportGlobals
System.Runtime.Serialization.Schema (138)
System\Runtime\Serialization\Schema\CodeExporter.cs (107)
206
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
259
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
304
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
324
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
359
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
371
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
377
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
384
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
390
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
407
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
429
typeName = GetClrIdentifier(typeName,
ImportGlobals
.DefaultTypeName);
468
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
482
nestedTypeName = GetClrIdentifier(nestedTypeName,
ImportGlobals
.DefaultTypeName);
534
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
596
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
628
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
639
if (isDictionary && (keyName !=
ImportGlobals
.KeyLocalName || valueName !=
ImportGlobals
.ValueLocalName))
646
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
680
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
697
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
710
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
777
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
799
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NameProperty, new CodePrimitiveExpression(dataContractName)));
800
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NamespaceProperty, new CodePrimitiveExpression(classDataContract.XmlName.Namespace)));
801
if (classDataContract.IsReference !=
ImportGlobals
.DefaultIsReference)
802
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.IsReferenceProperty, new CodePrimitiveExpression(classDataContract.IsReference)));
851
string fieldName = GetMemberName(AppendToValidClrIdentifier(propertyName,
ImportGlobals
.DefaultFieldSuffix), contractCodeDomInfo);
865
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NameProperty, new CodePrimitiveExpression(dataMemberName)));
866
if (dataMember.IsRequired !=
ImportGlobals
.DefaultIsRequired)
867
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.IsRequiredProperty, new CodePrimitiveExpression(dataMember.IsRequired)));
868
if (dataMember.EmitDefaultValue !=
ImportGlobals
.DefaultEmitDefaultValue)
869
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.EmitDefaultValueProperty, new CodePrimitiveExpression(dataMember.EmitDefaultValue)));
870
if (dataMember.Order !=
ImportGlobals
.DefaultOrder)
871
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.OrderProperty, new CodePrimitiveExpression(dataMember.Order)));
895
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
914
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
932
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
965
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
982
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1057
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1082
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NameProperty, new CodePrimitiveExpression(dataContractName)));
1083
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NamespaceProperty, new CodePrimitiveExpression(enumDataContract.XmlName.Namespace)));
1100
enumMemberAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.ValueProperty, new CodePrimitiveExpression(stringValue)));
1106
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1166
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1188
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1227
string expectedTypeName =
ImportGlobals
.ArrayPrefix + itemContract.XmlName.Name;
1242
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NameProperty, new CodePrimitiveExpression(dataContractName)));
1243
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.NamespaceProperty, new CodePrimitiveExpression(collectionContract.XmlName.Namespace)));
1244
if (collectionContract.IsReference !=
ImportGlobals
.DefaultIsReference)
1245
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.IsReferenceProperty, new CodePrimitiveExpression(collectionContract.IsReference)));
1246
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.ItemNameProperty, new CodePrimitiveExpression(GetNameForAttribute(itemName!)))); // ItemName is never null for Collection contracts.
1252
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.KeyNameProperty, new CodePrimitiveExpression(GetNameForAttribute(keyName))));
1253
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.ValueNameProperty, new CodePrimitiveExpression(GetNameForAttribute(valueName))));
1260
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1292
GetClrTypeFullName(
ImportGlobals
.TypeOfXmlSchemaProviderAttribute),
1294
new CodeAttributeArgument(
ImportGlobals
.IsAnyProperty, new CodePrimitiveExpression(true)))
1300
GetClrTypeFullName(
ImportGlobals
.TypeOfXmlSchemaProviderAttribute),
1301
new CodeAttributeArgument(new CodePrimitiveExpression(
ImportGlobals
.ExportSchemaMethod)))
1304
CodeMemberField typeNameField = new CodeMemberField(
ImportGlobals
.TypeOfXmlQualifiedName, TypeNameFieldName);
1309
typeNameField.InitExpression = new CodeObjectCreateExpression(
ImportGlobals
.TypeOfXmlQualifiedName, new CodePrimitiveExpression(typeName.Name), new CodePrimitiveExpression(typeName.Namespace));
1362
namespaceAttribute.Arguments.Add(new CodeAttributeArgument(
ImportGlobals
.ClrNamespaceProperty, new CodePrimitiveExpression(clrNamespace)));
1371
memberName = GetClrIdentifier(memberName,
ImportGlobals
.DefaultGeneratedMember);
1377
memberName = AppendToValidClrIdentifier(memberName,
ImportGlobals
.DefaultMemberSuffix);
1469
uniqueNamespace = ((clrNamespace.Length == 0) ?
ImportGlobals
.DefaultClrNamespace : clrNamespace) + i.ToString(NumberFormatInfo.InvariantInfo);
1525
if (uriString.StartsWith(
ImportGlobals
.DataContractXsdBaseNamespace, StringComparison.Ordinal))
1526
AddToNamespace(builder, uriString.Substring(
ImportGlobals
.DataContractXsdBaseNamespace.Length), fragments);
1609
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
1680
get { return new CodeParameterDeclarationExpression(GetCodeTypeReference(typeof(SerializationInfo)),
ImportGlobals
.SerializationInfoFieldName); }
1685
get { return new CodeParameterDeclarationExpression(GetCodeTypeReference(typeof(StreamingContext)),
ImportGlobals
.ContextFieldName); }
1697
return CreateProperty(GetCodeTypeReference(
ImportGlobals
.TypeOfXmlNodeArray),
ImportGlobals
.NodeArrayPropertyName,
ImportGlobals
.NodeArrayFieldName, false/*isValueType*/);
1706
nodeArrayField.Type = GetCodeTypeReference(
ImportGlobals
.TypeOfXmlNodeArray);
1707
nodeArrayField.Name =
ImportGlobals
.NodeArrayFieldName;
1724
setNode.Left = new CodeFieldReferenceExpression(ThisReference,
ImportGlobals
.NodeArrayFieldName);
1750
new CodePropertyReferenceExpression(ThisReference,
ImportGlobals
.NodeArrayPropertyName)
1776
getSchemaStaticMethod.Name =
ImportGlobals
.ExportSchemaMethod;
1777
getSchemaStaticMethod.ReturnType = GetCodeTypeReference(
ImportGlobals
.TypeOfXmlQualifiedName);
1807
setObjectData.Left = new CodePropertyReferenceExpression(ThisReference,
ImportGlobals
.SerializationInfoFieldName);
1808
setObjectData.Right = new CodeArgumentReferenceExpression(
ImportGlobals
.SerializationInfoFieldName);
1827
derivedConstructor.BaseConstructorArgs.Add(new CodeVariableReferenceExpression(
ImportGlobals
.SerializationInfoFieldName));
1828
derivedConstructor.BaseConstructorArgs.Add(new CodeVariableReferenceExpression(
ImportGlobals
.ContextFieldName));
1839
serializationInfoField.Name =
ImportGlobals
.SerializationInfoFieldName;
1849
return CreateProperty(GetCodeTypeReference(typeof(SerializationInfo)),
ImportGlobals
.SerializationInfoPropertyName,
ImportGlobals
.SerializationInfoFieldName, false/*isValueType*/);
1858
getObjectDataMethod.Name =
ImportGlobals
.GetObjectDataMethodName;
1867
new CodePropertyReferenceExpression(ThisReference,
ImportGlobals
.SerializationInfoPropertyName),
1875
getEnumerator.Name =
ImportGlobals
.EnumeratorFieldName;
1877
new CodePropertyReferenceExpression(ThisReference,
ImportGlobals
.SerializationInfoPropertyName),
1878
ImportGlobals
.GetEnumeratorMethodName);
1883
getCurrent.Name =
ImportGlobals
.SerializationEntryFieldName;
1885
new CodeVariableReferenceExpression(
ImportGlobals
.EnumeratorFieldName),
1886
ImportGlobals
.CurrentPropertyName);
1891
new CodeVariableReferenceExpression(
ImportGlobals
.SerializationEntryFieldName),
1892
ImportGlobals
.NameProperty);
1894
new CodeVariableReferenceExpression(
ImportGlobals
.SerializationEntryFieldName),
1895
ImportGlobals
.ValueProperty);
1897
new CodeArgumentReferenceExpression(
ImportGlobals
.SerializationInfoFieldName),
1898
ImportGlobals
.AddValueMethodName,
1904
new CodeVariableReferenceExpression(
ImportGlobals
.EnumeratorFieldName),
1905
ImportGlobals
.MoveNextMethodName);
1924
extensionDataObjectField.Name =
ImportGlobals
.ExtensionDataObjectFieldName;
1936
extensionDataObjectProperty.Name =
ImportGlobals
.ExtensionDataObjectPropertyName;
1941
propertyGet.Expression = new CodeFieldReferenceExpression(ThisReference,
ImportGlobals
.ExtensionDataObjectFieldName);
1945
propertySet.Left = new CodeFieldReferenceExpression(ThisReference,
ImportGlobals
.ExtensionDataObjectFieldName);
System\Runtime\Serialization\Schema\ImportGlobals.cs (4)
91
internal static XmlQualifiedName IdQualifiedName => s_idQualifiedName ??= new XmlQualifiedName(
ImportGlobals
.IdLocalName,
ImportGlobals
.SerializationNamespace);
94
internal static XmlQualifiedName RefQualifiedName => s_refQualifiedName ??= new XmlQualifiedName(
ImportGlobals
.RefLocalName,
ImportGlobals
.SerializationNamespace);
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (7)
44
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
68
return IsBuiltInNamespace(elementNs) ?
ImportGlobals
.CollectionsNamespace : elementNs;
73
return uriString.StartsWith(
ImportGlobals
.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(
ImportGlobals
.DataContractXsdBaseNamespace.Length) : uriString;
78
return new Uri(
ImportGlobals
.DataContractXsdBaseNamespaceUri, clrNs ?? string.Empty).AbsoluteUri;
83
return (ns ==
ImportGlobals
.SchemaNamespace || ns ==
ImportGlobals
.SerializationNamespace);
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (20)
78
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
92
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
109
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
129
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
149
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
164
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
182
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
200
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
218
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
232
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
244
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
265
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
299
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
334
[RequiresUnreferencedCode(
ImportGlobals
.SerializerTrimmerWarning)]
362
internal static XmlQualifiedName ActualTypeAnnotationName => s_actualTypeAnnotationName ??= new XmlQualifiedName(
ImportGlobals
.ActualTypeLocalName,
ImportGlobals
.SerializationNamespace);
370
XmlNode? nameAttribute = actualTypeElement.Attributes.GetNamedItem(
ImportGlobals
.ActualTypeNameAttribute);
372
throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace,
ImportGlobals
.ActualTypeNameAttribute)));
373
XmlNode? nsAttribute = actualTypeElement.Attributes.GetNamedItem(
ImportGlobals
.ActualTypeNamespaceAttribute);
375
throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace,
ImportGlobals
.ActualTypeNamespaceAttribute)));