7 instantiations of ClassDataContract
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\ClassDataContract.cs (2)
253return new ClassDataContract(type, ns, memberNames); 1362ClassDataContract boundClassContract = new ClassDataContract(boundType);
System\Runtime\Serialization\CollectionDataContract.cs (1)
919return new ClassDataContract(type);
System\Runtime\Serialization\DataContract.cs (2)
480dataContract = new ClassDataContract(type); 483var originalDataContract = new ClassDataContract(originalType);
System\Runtime\Serialization\SchemaImporter.cs (2)
655ClassDataContract dataContract = new ClassDataContract(Globals.TypeOfSchemaDefinedType); 825ClassDataContract dataContract = new ClassDataContract(Globals.TypeOfSchemaDefinedType);
171 references to ClassDataContract
System.Private.DataContractSerialization (171)
System\Runtime\Serialization\ClassDataContract.cs (11)
21internal const string ContractTypeString = nameof(ClassDataContract); 64internal ClassDataContract? BaseClassContract 251internal static ClassDataContract CreateClassDataContractForKeyValue(Type type, XmlDictionaryString ns, string[] memberNames) 591private ClassDataContract? _baseContract; 651BaseClassContract = collectionDC.SharedTypeContract as ClassDataContract; 655BaseClassContract = baseContract as ClassDataContract; 984ClassDataContract? currContract = BaseClassContract; 1144internal ClassDataContract? BaseClassContract 1362ClassDataContract boundClassContract = new ClassDataContract(boundType); 1367boundClassContract.BaseClassContract = (ClassDataContract)BaseClassContract.BindGenericParameters(paramContracts, boundContracts); 1392if (other is ClassDataContract dataContract)
System\Runtime\Serialization\CollectionDataContract.cs (8)
222XmlDictionaryString? tempChildElementNamespace = ClassDataContract.GetChildNamespaceToDeclare(this, ItemType, new XmlDictionary()); 501[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 515[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 527[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 542[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 565[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 589[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 619_itemContract = ClassDataContract.CreateClassDataContractForKeyValue(ItemType, Namespace, new string[] { KeyName, ValueName });
System\Runtime\Serialization\DataContract.cs (11)
90if (dataContract is ClassDataContract) 109internal static int GetIdForInitialization(ClassDataContract classContract) 158[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 317[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 368internal static int GetIdForInitialization(ClassDataContract classContract) 475if (!type.IsSerializable && !type.IsDefined(Globals.TypeOfDataContractAttribute, false) && !ClassDataContract.IsNonAttributedTypeValidForSerialization(type)) 483var originalDataContract = new ClassDataContract(originalType); 941[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 949[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 1120ClassDataContract.IsNonAttributedTypeValidForSerialization(type); 1302if (ClassDataContract.IsNonAttributedTypeValidForSerialization(type))
System\Runtime\Serialization\DataContractSet.cs (5)
124if (dataContract is ClassDataContract classDC) 141private void AddClassDataContract(ClassDataContract classDataContract) 181ClassDataContract keyValueContract = (collectionDataContract.ItemContract as ClassDataContract)!; 419ClassDataContract.IsNonAttributedTypeValidForSerialization(type));
System\Runtime\Serialization\EnumDataContract.cs (3)
125[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 246ClassDataContract.CheckAndAddMember(tempMembers, memberContract, memberValuesTable); 261ClassDataContract.CheckAndAddMember(tempMembers, memberContract, memberValuesTable);
System\Runtime\Serialization\GenericParameterDataContract.cs (1)
33[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)]
System\Runtime\Serialization\Json\JsonClassDataContract.cs (5)
20public JsonClassDataContract(ClassDataContract traditionalDataContract) 92private ClassDataContract TraditionalClassDataContract => _helper.TraditionalClassDataContract; 118private readonly ClassDataContract _traditionalClassDataContract; 123public JsonClassDataContractCriticalHelper(ClassDataContract traditionalDataContract) 148internal ClassDataContract TraditionalClassDataContract
System\Runtime\Serialization\Json\JsonDataContract.cs (2)
249else if (traditionalDataContractType == typeof(ClassDataContract)) 251dataContract = new JsonClassDataContract((ClassDataContract)traditionalDataContract);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (17)
32public JsonFormatClassReaderDelegate GenerateClassReader(ClassDataContract classContract) 64public JsonFormatClassReaderDelegate GenerateClassReader(ClassDataContract classContract) 199private void CreateObject(ClassDataContract classContract) 232private void InvokeOnDeserializing(ClassDataContract classContract) 246private void InvokeOnDeserialized(ClassDataContract classContract) 260private static bool HasFactoryMethod(ClassDataContract classContract) 265private bool InvokeFactoryMethod(ClassDataContract classContract) 283private void ReadClass(ClassDataContract classContract) 292ClassDataContract? currentContract = classContract; 309private void ReadMembers(ClassDataContract classContract, LocalBuilder? extensionDataLocal) 358private int ReadMembers(ClassDataContract classContract, BitFlagsGenerator expectedElements, 422private static int SetRequiredElements(ClassDataContract contract, byte[] requiredElements) 452private void ReadISerializable(ClassDataContract classContract) 740ClassDataContract keyValueDataContract = (ClassDataContract)collectionContract.ItemContract; 990ClassDataContract? keyValuePairContract = DataContract.GetDataContract(value.LocalType) as ClassDataContract;
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (8)
16internal delegate void JsonFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, ClassDataContract dataContract, XmlDictionaryString[]? memberNames); 30internal JsonFormatClassWriterDelegate GenerateClassWriter(ClassDataContract classContract) 57internal JsonFormatClassWriterDelegate GenerateClassWriter(ClassDataContract classContract) 174private void InvokeOnSerializing(ClassDataContract classContract) 187private void InvokeOnSerialized(ClassDataContract classContract) 202private void WriteClass(ClassDataContract classContract) 232private int WriteMembers(ClassDataContract classContract, LocalBuilder? extensionDataLocal, ClassDataContract derivedMostClassContract)
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (6)
20private readonly ClassDataContract _classContract; 23public ReflectionJsonClassReader(ClassDataContract classDataContract) 62protected override void ReflectionReadMembers(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[]? memberNamespaces, ClassDataContract classContract, ref object obj) 100protected override string GetClassContractNamespace(ClassDataContract classContract) 160ClassDataContract keyValueDataContract = (ClassDataContract)collectionContract.ItemContract;
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (3)
24public void ReflectionWriteClass(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, ClassDataContract classContract, XmlDictionaryString[]? memberNames) 202protected override int ReflectionWriteMembers(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract, ClassDataContract derivedMostClassContract, int childElementIndex, XmlDictionaryString[]? memberNames)
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
140return (contract is ClassDataContract);
System\Runtime\Serialization\PrimitiveDataContract.cs (2)
24[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 142[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)]
System\Runtime\Serialization\ReflectionClassWriter.cs (5)
23public void ReflectionWriteClass(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract, XmlDictionaryString[]? memberNames) 111protected abstract int ReflectionWriteMembers(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract, ClassDataContract derivedMostClassContract, int childElementIndex, XmlDictionaryString[]? memberNames); 130private static void InvokeOnSerializing(object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract) 141private static void InvokeOnSerialized(object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract)
System\Runtime\Serialization\ReflectionReader.cs (9)
35public object ReflectionReadClass(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext? context, XmlDictionaryString[]? memberNames, XmlDictionaryString[]? memberNamespaces, ClassDataContract classContract) 195protected abstract void ReflectionReadMembers(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[]? memberNamespaces, ClassDataContract classContract, ref object obj); 202protected abstract string GetClassContractNamespace(ClassDataContract classContract); 211protected static int ReflectionGetMembers(ClassDataContract classContract, DataMember[] members) 225protected void ReflectionReadMember(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, ClassDataContract classContract, ref object obj, int memberIndex, DataMember[] members) 332private static object ReadISerializable(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, ClassDataContract classContract) 398private static void InvokeOnDeserializing(XmlObjectSerializerReadContext context, ClassDataContract classContract, object obj) 409private static void InvokeOnDeserialized(XmlObjectSerializerReadContext context, ClassDataContract classContract, object obj) 427private static object CreateObject(ClassDataContract classContract)
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (6)
20private readonly ClassDataContract _classContract; 23public ReflectionXmlClassReader(ClassDataContract classDataContract) 61protected override void ReflectionReadMembers(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[]? memberNamespaces, ClassDataContract classContract, ref object obj) 107protected override string GetClassContractNamespace(ClassDataContract classContract) 131private static bool[] GetRequiredMembers(ClassDataContract contract, out int firstRequiredMember) 142private static int GetRequiredMembers(ClassDataContract contract, bool[] requiredMembers)
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (6)
21public void ReflectionWriteClass(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract) 137protected override int ReflectionWriteMembers(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract classContract, ClassDataContract derivedMostClassContract, int childElementIndex, XmlDictionaryString[]? emptyStringArray) 230private static bool CheckIfMemberHasConflict(DataMember member, ClassDataContract classContract, ClassDataContract derivedMostClassContract) 239ClassDataContract? currentContract = derivedMostClassContract;
System\Runtime\Serialization\SchemaExporter.cs (5)
88if (dataContract is ClassDataContract classDataContract) 119private void ExportClassDataContract(ClassDataContract classDataContract, XmlSchema schema) 381ClassDataContract keyValueContract = (collectionDataContract.ItemContract as ClassDataContract)!; 464private void ExportISerializableDataContract(ClassDataContract dataContract, XmlSchema schema)
System\Runtime\Serialization\SchemaImporter.cs (15)
526ClassDataContract? oldContract = _dataContractSet.GetDataContract(typeName) as ClassDataContract; 530ClassDataContract? ancestorDataContract = oldContract.BaseClassContract; 653private ClassDataContract ImportClass(XmlQualifiedName typeName, XmlSchemaSequence rootSequence, XmlQualifiedName? baseTypeName, XmlSchemaAnnotation? annotation, bool isReference) 655ClassDataContract dataContract = new ClassDataContract(Globals.TypeOfSchemaDefinedType); 823private ClassDataContract ImportISerializable(XmlQualifiedName typeName, XmlSchemaSequence rootSequence, XmlQualifiedName? baseTypeName, XmlSchemaObjectCollection attributes, XmlSchemaAnnotation? annotation) 825ClassDataContract dataContract = new ClassDataContract(Globals.TypeOfSchemaDefinedType); 899private void ImportBaseContract(XmlQualifiedName baseTypeName, ClassDataContract dataContract) 901ClassDataContract? baseContract = ImportType(baseTypeName) as ClassDataContract; 909ClassDataContract? ancestorDataContract = baseContract; 944private void ImportClassMember(XmlSchemaElement element, ClassDataContract dataContract) 1007int compare = ClassDataContract.DataMemberComparer.Singleton.Compare(prevMember, currentMember); 1104ClassDataContract? keyValueContract = dataContract.ItemContract as ClassDataContract;
System\Runtime\Serialization\SpecialTypeDataContract.cs (2)
14[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)] 26[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)]
System\Runtime\Serialization\XmlDataContract.cs (1)
137[DynamicallyAccessedMembers(ClassDataContract.DataContractPreserveMemberTypes)]
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (4)
894s_contractNamespacesField = typeof(ClassDataContract).GetField("ContractNamespaces", Globals.ScanAllMembers); 908s_memberNamesField = typeof(ClassDataContract).GetField("MemberNames", Globals.ScanAllMembers); 926s_childElementNamespacesProperty = typeof(ClassDataContract).GetProperty("ChildElementNamespaces", Globals.ScanAllMembers); 1081s_classSerializationExceptionMessageProperty = typeof(ClassDataContract).GetProperty("SerializationExceptionMessage", Globals.ScanAllMembers);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (17)
36public XmlFormatClassReaderDelegate GenerateClassReader(ClassDataContract classContract) 73private static XmlFormatClassReaderDelegate CreateReflectionXmlClassReader(ClassDataContract classContract) 80public XmlFormatClassReaderDelegate GenerateClassReader(ClassDataContract classContract) 254private void CreateObject(ClassDataContract classContract) 290private void InvokeOnDeserializing(ClassDataContract classContract) 307private void InvokeOnDeserialized(ClassDataContract classContract) 324private static bool HasFactoryMethod(ClassDataContract classContract) 329private bool InvokeFactoryMethod(ClassDataContract classContract, LocalBuilder? objectId) 349private void ReadClass(ClassDataContract classContract) 358ClassDataContract? currentContract = classContract; 375private void ReadMembers(ClassDataContract classContract, LocalBuilder? extensionDataLocal) 415private int ReadMembers(ClassDataContract classContract, bool[] requiredMembers, Label[] memberLabels, LocalBuilder memberIndexLocal, LocalBuilder? requiredIndexLocal) 465private static bool[] GetRequiredMembers(ClassDataContract contract, out int firstRequiredMember) 476private static int GetRequiredMembers(ClassDataContract contract, bool[] requiredMembers) 488private void ReadISerializable(ClassDataContract classContract) 919ClassDataContract? keyValuePairContract = DataContract.GetDataContract(value.LocalType) as ClassDataContract;
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (11)
20internal delegate void XmlFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract dataContract); 33internal XmlFormatClassWriterDelegate GenerateClassWriter(ClassDataContract classContract) 74internal XmlFormatClassWriterDelegate GenerateClassWriter(ClassDataContract classContract) 207private void InvokeOnSerializing(ClassDataContract classContract) 220private void InvokeOnSerialized(ClassDataContract classContract) 235private void WriteClass(ClassDataContract classContract) 289private int WriteMembers(ClassDataContract classContract, LocalBuilder? extensionDataLocal, ClassDataContract derivedMostClassContract) 790private static bool CheckIfMemberHasConflict(DataMember member, ClassDataContract classContract, ClassDataContract derivedMostClassContract) 799ClassDataContract? currentContract = derivedMostClassContract;
System\Runtime\Serialization\XmlObjectSerializer.cs (2)
415ClassDataContract? classContract = contract as ClassDataContract;
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
689else if (dataContract is ClassDataContract)
System\Runtime\Serialization\XPathQueryGenerator.cs (4)
63if (contract is ClassDataContract) 65return ProcessClassDataContract((ClassDataContract)contract, context, memberNode); 72private static DataContract ProcessClassDataContract(ClassDataContract contract, ExportContext context, MemberInfo memberNode) 86private static IEnumerable<DataMember> GetDataMembers(ClassDataContract contract)