System\Runtime\Serialization\ClassDataContract.cs (17)
459if (!IsTypeVisible(UnderlyingType))
466DataContract.GetClrTypeFullName(UnderlyingType)),
482DataContract.GetClrTypeFullName(UnderlyingType)),
496DataContract.GetClrTypeFullName(UnderlyingType)),
510DataContract.GetClrTypeFullName(UnderlyingType),
524DataContract.GetClrTypeFullName(UnderlyingType),
544DataContract.GetClrTypeFullName(UnderlyingType),
553DataContract.GetClrTypeFullName(UnderlyingType),
573if (!IsTypeVisible(UnderlyingType))
580DataContract.GetClrTypeFullName(UnderlyingType)),
596DataContract.GetClrTypeFullName(this.UnderlyingType),
610DataContract.GetClrTypeFullName(UnderlyingType),
630DataContract.GetClrTypeFullName(UnderlyingType),
639DataContract.GetClrTypeFullName(UnderlyingType),
814DataContract.GetClrTypeFullName(this.BaseContract.UnderlyingType),
1398Type type = UnderlyingType;
1432boundClassContract.StableName = CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(stableName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(this.UnderlyingType), genericParams)), stableName.Namespace);
System\Runtime\Serialization\DataContract.cs (8)
85throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SerializationException(SR.GetString(SR.ClassDataContractReturnedForGetOnlyCollection, DataContract.GetClrTypeFullName(dataContract.UnderlyingType))));
218throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType))));
223throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType))));
498return (cachedContract != null && cachedContract.UnderlyingType == contract.UnderlyingType);
2249if (alreadyExistingContract.UnderlyingType != DataContractCriticalHelper.GetDataContractAdapterType(type))
2250throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.StableName.Namespace, dataContract.StableName.Name)));
2306ThrowInvalidDataContractException(message, UnderlyingType);
System\Runtime\Serialization\EnumDataContract.cs (6)
372throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.InvalidEnumValueOnWrite, value, DataContract.GetClrTypeFullName(UnderlyingType))));
378throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.InvalidEnumValueOnWrite, value, DataContract.GetClrTypeFullName(UnderlyingType))));
418throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.InvalidEnumValueOnRead, stringValue, DataContract.GetClrTypeFullName(UnderlyingType))));
423return Enum.ToObject(UnderlyingType, (ulong)longValue);
424return Enum.ToObject(UnderlyingType, longValue);
437throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.InvalidEnumValueOnRead, value.Substring(index, count), DataContract.GetClrTypeFullName(UnderlyingType))));
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (16)
43TD.DCJsonGenReaderStart("Class", classContract.UnderlyingType.FullName);
90TD.DCJsonGenReaderStart("GetOnlyCollection", collectionContract.UnderlyingType.FullName);
148if (Globals.TypeOfIDeserializationCallback.IsAssignableFrom(classContract.UnderlyingType))
158if (classContract.UnderlyingType == Globals.TypeOfDateTimeOffsetAdapter)
264Type type = objectType = classContract.UnderlyingType;
270if (classContract.UnderlyingType == Globals.TypeOfDBNull)
326return Globals.TypeOfIObjectReference.IsAssignableFrom(classContract.UnderlyingType);
371BitFlagsGenerator expectedElements = new BitFlagsGenerator(memberCount, ilg, classContract.UnderlyingType.Name + "_ExpectedElements");
507ConstructorInfo ctor = classContract.UnderlyingType.GetConstructor(Globals.ScanAllMembers, null, JsonFormatGeneratorStatics.SerInfoCtorArgs, null);
509throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.SerializationInfo_ConstructorNotFound, DataContract.GetClrTypeFullName(classContract.UnderlyingType))));
512ilg.Call(contextArg, XmlFormatGeneratorStatics.ReadSerializationInfoMethod, xmlReaderArg, classContract.UnderlyingType);
530if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.IsValueType)
569if (primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject)
643Type type = collectionContract.UnderlyingType;
802DataContract.GetClrTypeFullName(collectionContract.UnderlyingType),
859Type type = collectionContract.UnderlyingType;
System\Runtime\Serialization\PrimitiveDataContract.cs (6)
80if (UnderlyingType.IsValueType)
81helper.XmlFormatWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName, Globals.ScanAllMembers, null, new Type[] { UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
83helper.XmlFormatWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName, Globals.ScanAllMembers, null, new Type[] { typeof(XmlWriterDelegator), UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
98if (UnderlyingType.IsValueType)
99helper.XmlFormatContentWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName, Globals.ScanAllMembers, null, new Type[] { UnderlyingType }, null);
101helper.XmlFormatContentWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName, Globals.ScanAllMembers, null, new Type[] { typeof(XmlWriterDelegator), UnderlyingType }, null);