112 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
241 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
292 internal XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate
328 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
393 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
401 if (
type.GetArrayRank() > 1)
409 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
427 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
450 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
457 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
502 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2060:MakeGenericMethod", Justification =
"The call to MakeGenericMethod is safe due to the fact that CollectionDataContractCriticalHelper.BuildIncrementCollectionCountDelegate<T> is not annotated.")]
509 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2060:MakeGenericMethod", Justification =
"The call to MakeGenericMethod is safe due to the fact that CollectionDataContractCriticalHelper.BuildIncrementCollectionCountDelegate<T> is not annotated.")]
541 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2060:MakeGenericMethod", Justification =
"The call to MakeGenericMethod is safe due to the fact that CollectionDataContractCriticalHelper.BuildCreateGenericDictionaryEnumerator<K,V> is not annotated.")]
548 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
564 if (
type.IsInterface)
687 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
753 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
808 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
827 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
851 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
877 internal XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate
879 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
913 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
920 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
927 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
934 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
941 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
950 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
962 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
968 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
974 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
990 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
996 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1012 if (
type.IsGenericType)
1014 type =
type.GetGenericTypeDefinition();
1019 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1026 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1032 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1039 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1051 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1058 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1070 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1092 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2075:GetMethod", Justification =
"The DynamicallyAccessedMembers declarations will ensure the interface methods will be preserved.")]
1097 select
it).FirstOrDefault()?.GetMethod(name);
1109 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1137 if (
type.IsInterface)
1148 if (
type.IsGenericType)
1192 if (!
type.IsValueType)
1197 if (
type.IsSerializable)
1248 if (
type.IsSerializable)
1257 dataContract = (flag ?
new CollectionDataContract(
type,
collectionKind,
itemType,
method,
deserializationExceptionMessage) :
new CollectionDataContract(
type,
collectionKind,
itemType,
method,
addMethod,
constructorInfo, !
constructorRequired));
1297 dataContract = (flag ?
new CollectionDataContract(
type,
collectionKind,
itemType,
method,
deserializationExceptionMessage) :
new CollectionDataContract(
type,
collectionKind,
itemType,
method,
addMethod,
constructorInfo, !
constructorRequired));
1310 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1346 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2075:GetMethod", Justification =
"The DynamicallyAccessedMembers declarations will ensure the interface methods will be preserved.")]
1359 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1400 where t.FullName.StartsWith(
"System.Collections.Generic.IEnumerable")
1519 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1526 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
1530 object result =
null;
static void Sort(Array array)
Enumerator GetEnumerator()
void Add(TKey key, TValue value)
static void SuppressFinalize(object obj)
static XmlDictionaryString GetChildNamespaceToDeclare(DataContract dataContract, Type childType, XmlDictionary dictionary)
static ClassDataContract CreateClassDataContractForKeyValue(Type type, XmlDictionaryString ns, string[] memberNames)
static CreateGenericDictionaryEnumeratorDelegate BuildCreateGenericDictionaryEnumerator< K, V >()
static MethodInfo BuildIncrementCollectionCountDelegateMethod
readonly MethodInfo _getEnumeratorMethod
static IncrementCollectionCountDelegate BuildIncrementCollectionCountDelegate< T >()
bool IsConstructorCheckRequired
static MethodInfo GetBuildCreateGenericDictionaryEnumeratorMethodInfo
void Init(CollectionKind kind, Type itemType, CollectionDataContractAttribute collectionContractAttribute)
XmlDictionaryString _childElementNamespace
XmlDictionaryString CollectionItemName
static Type[] KnownInterfaces
XmlDictionaryString _collectionItemName
readonly string _invalidCollectionInSharedContractMessage
override Dictionary< XmlQualifiedName, DataContract > KnownDataContracts
static void DummyIncrementCollectionCount(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired)
delegate IEnumerator CreateGenericDictionaryEnumeratorDelegate(IEnumerator enumerator)
CollectionDataContractCriticalHelper([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors|DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods|DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicProperties)] Type type)
bool _isKnownTypeAttributeChecked
XmlFormatCollectionReaderDelegate _xmlFormatReaderDelegate
XmlFormatCollectionWriterDelegate XmlFormatWriterDelegate
DataContract _sharedTypeContract
readonly MethodInfo _addMethod
void IncrementCollectionCount(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
XmlFormatCollectionWriterDelegate _xmlFormatWriterDelegate
DataContract SharedTypeContract
string InvalidCollectionInSharedContractMessage
CollectionDataContractCriticalHelper([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors|DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods|DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicProperties)] Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor)
static Type[] s_knownInterfaces
CreateGenericDictionaryEnumeratorDelegate _createGenericDictionaryEnumeratorDelegate
static MethodInfo s_buildCreateGenericDictionaryEnumerator
DataContract ItemContract
static MethodInfo s_buildIncrementCollectionCountDelegateMethod
XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate
XmlFormatCollectionReaderDelegate XmlFormatReaderDelegate
DataContract _itemContract
MethodInfo GetEnumeratorMethod
readonly string _deserializationExceptionMessage
bool _isConstructorCheckRequired
Type GetCollectionElementType()
MethodInfo GetBuildIncrementCollectionCountGenericDelegate(Type type)
IEnumerator GetEnumeratorForCollection(object obj)
string DeserializationExceptionMessage
XmlDictionaryString ChildElementNamespace
readonly ConstructorInfo _constructor
XmlFormatGetOnlyCollectionReaderDelegate _xmlFormatGetOnlyCollectionReaderDelegate
bool _itemNameSetExplicit
ConstructorInfo Constructor
IncrementCollectionCountDelegate _incrementCollectionCountDelegate
Dictionary< XmlQualifiedName, DataContract > _knownDataContracts
delegate void IncrementCollectionCountDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
CollectionDataContractCriticalHelper([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors|DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods|DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicProperties)] Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, string deserializationExceptionMessage)
CollectionDataContractCriticalHelper([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors|DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods|DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicProperties)] Type type, string invalidCollectionInSharedContractMessage)
DictionaryEnumerator(IDictionaryEnumerator enumerator)
KeyValue< object, object > Current
object IEnumerator. Current
readonly IDictionaryEnumerator _enumerator
readonly IEnumerator< KeyValuePair< K, V > > _enumerator
GenericDictionaryEnumerator(IEnumerator< KeyValuePair< K, V > > enumerator)
object IEnumerator. Current
static bool IsCollection(Type type, [NotNullWhen(true)] out Type itemType)
static bool IsCollection(Type type, bool constructorRequired)
static void GetCollectionMethods([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type interfaceType, Type[] addMethodTypeArray, bool addMethodOnInterface, out MethodInfo getEnumeratorMethod, out MethodInfo addMethod)
static bool IsArraySegment(Type t)
string DeserializationExceptionMessage
DataContract SharedTypeContract
XmlDictionaryString CollectionItemName
CollectionDataContract(Type type, string invalidCollectionInSharedContractMessage)
void IncrementCollectionCount(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
XmlDictionaryString ChildElementNamespace
static bool IsCollectionHelper(Type type, [NotNullWhen(true)] out Type itemType, bool constructorRequired)
override bool IsValidContract(SerializationMode mode)
bool RequiresMemberAccessForRead(SecurityException securityException)
static void FindCollectionMethodsOnInterface([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type interfaceType, ref MethodInfo addMethod, ref MethodInfo getEnumeratorMethod)
CollectionDataContract(Type type)
string InvalidCollectionInSharedContractMessage
static Type[] KnownInterfaces
DataContract GetSharedTypeContract(Type type)
XmlDictionaryString _childElementNamespace
static MethodInfo GetIEnumerableGetEnumeratorMethod([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type ienumerableInterface)
XmlFormatCollectionReaderDelegate CreateXmlFormatReaderDelegate()
XmlFormatCollectionReaderDelegate XmlFormatReaderDelegate
CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, string deserializationExceptionMessage)
bool IsConstructorCheckRequired
XmlFormatGetOnlyCollectionReaderDelegate CreateXmlFormatGetOnlyCollectionReaderDelegate()
static MethodInfo GetTargetMethodWithName(string name, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type interfaceType)
static bool CreateGetOnlyCollectionDataContract(Type type, [NotNullWhen(true)] out DataContract dataContract)
static bool TryCreate(Type type, [NotNullWhen(true)] out DataContract dataContract)
static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataContract dataContract, out Type itemType, bool constructorRequired)
DataContract ItemContract
override Dictionary< XmlQualifiedName, DataContract > KnownDataContracts
DataContract _itemContract
static string GetInvalidCollectionMessage(string message, string nestedMessage, string param)
XmlFormatCollectionWriterDelegate CreateXmlFormatWriterDelegate()
override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
bool RequiresMemberAccessForWrite(SecurityException securityException)
IEnumerator GetEnumeratorForCollection(object obj)
ConstructorInfo Constructor
override DataContract GetValidContract()
MethodInfo GetEnumeratorMethod
static bool IsKnownInterface(Type type)
XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate
XmlFormatCollectionWriterDelegate XmlFormatWriterDelegate
XmlDictionaryString _collectionItemName
void InitCollectionDataContract(DataContract sharedTypeContract)
CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor)
CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired)
Type GetCollectionElementType()
static void GetReadOnlyCollectionExceptionMessages(Type type, string message, string param, out string deserializationExceptionMessage)
override DataContract GetValidContract(SerializationMode mode)
static bool IsCollectionInterface(Type type)
CollectionDataContractCriticalHelper _helper
static bool IsCollectionDataContract(Type type)
static bool IsCollection(Type type)
static bool TryCreateGetOnlyCollectionDataContract(Type type, [NotNullWhen(true)] out DataContract dataContract)
static bool HandleIfInvalidCollection(Type type, bool tryCreate, bool hasCollectionDataContract, bool createContractWithException, string message, string param, ref DataContract dataContract)
override object ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
static string EncodeLocalName(string localName)
static Dictionary< XmlQualifiedName, DataContract > ImportKnownTypeAttributes(Type type)
static DataContract GetBuiltInDataContract(Type type)
static bool IsTypeNullable(Type type)
static XmlQualifiedName GetCollectionStableName(Type type, Type itemType, out CollectionDataContractAttribute collectionContractAttribute)
static string GetClrTypeFullName(Type type)
static bool ConstructorRequiresMemberAccess(ConstructorInfo ctor)
static bool IsTypeVisible(Type t)
static DataContract GetDataContract(Type type)
static bool MethodRequiresMemberAccess(MethodInfo method)
virtual XmlDictionaryString Namespace
static XmlQualifiedName GetStableName(Type type)
static Type UnwrapNullableType(Type type)
static void ThrowInvalidDataContractException(string message, Type type)
static DataContract GetDataContractFromGeneratedAssembly(Type type)
static Exception ThrowHelperError(Exception e)
static Type TypeOfIEnumerableGeneric
static Type TypeOfObjectArray
static Type TypeOfIEnumerator
static Type TypeOfKeyValuePair
static Type TypeOfIDictionary
static Type TypeOfIEnumerable
static Type TypeOfICollection
static Type TypeOfDictionaryEnumerator
static Type TypeOfKeyValue
static Type TypeOfICollectionGeneric
static Type TypeOfDataContractAttribute
static Type TypeOfIXmlSerializable
static Type TypeOfGenericDictionaryEnumerator
static Type TypeOfCollectionDataContractAttribute
static Type TypeOfIDictionaryGeneric
static Type TypeOfIListGeneric
override bool IsGetOnlyCollection
void IncrementCollectionCount(XmlWriterDelegator xmlWriter, ICollection collection)
static string InvalidCollectionDataContract
static string CollectionTypeDoesNotHaveDefaultCtor
static string CollectionTypeCannotHaveDataContract
static string InvalidCollectionContractKeyNoDictionary
static string GetOnlyCollectionMustHaveAddMethod
static string CollectionTypeHasMultipleDefinitionsOfInterface
static string DupKeyValueName
static string CollectionTypeDoesNotHaveAddMethod
static string CollectionTypeCannotBeBuiltIn
static string InvalidCollectionContractValueName
static string PartialTrustCollectionContractAddMethodNotPublic
static string Format(string resourceFormat, object p1)
static string InvalidCollectionContractKeyName
static string CollectionMustHaveItemType
static string InvalidCollectionType
static string InvalidCollectionContractItemName
static string ReadOnlyCollectionDeserialization
static string SupportForMultidimensionalArraysNotPresent
static string CollectionMustHaveAddMethod
static string PartialTrustCollectionContractNoPublicConstructor
static string CollectionMustHaveGetEnumeratorMethod
static string PartialTrustCollectionContractTypeNotPublic
static string CollectionTypeIsNotIEnumerable
static string InvalidCollectionContractValueNoDictionary
static void MemoryBarrier()
virtual bool IsGenericType
static readonly Type[] EmptyTypes
virtual Type GetGenericTypeDefinition()
DynamicallyAccessedMemberTypes