41 references to ExceptionUtility
System.Runtime.Serialization.Schema (41)
System\Runtime\Serialization\Schema\CodeExporter.cs (15)
22
using ExceptionUtil = System.Runtime.Serialization.DiagnosticUtility.
ExceptionUtility
;
81
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CLRNamespaceMappedMultipleTimes, currentDataContractNamespace, dataContractNamespace, clrNamespace)));
238
throw
ExceptionUtil
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, GetClrTypeFullName(dataContract.GetType()), GetClrTypeFullName(dataContract.UnderlyingType))));
265
throw DiagnosticUtility.
ExceptionUtility
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.TypeCannotBeImported, typeName.Name, typeName.Namespace, SR.Format(SR.CircularTypeReference, classContract.XmlName.Name, classContract.XmlName.Namespace))));
441
throw DiagnosticUtility.
ExceptionUtility
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.CannotComputeUniqueName, typeName)));
551
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace)));
560
throw
ExceptionUtil
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.TypeMustBeIXmlSerializable, GetClrTypeFullName(type), GetClrTypeFullName(typeof(IXmlSerializable)), dataContract.XmlName.Name, dataContract.XmlName.Namespace)));
569
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace)));
579
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch,
1054
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotDeriveFromSealedReferenceType, dataContract.XmlName.Name, dataContract.XmlName.Namespace, GetClrTypeFullName(baseType))));
1116
throw
ExceptionUtil
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.InvalidClrNamespaceGeneratedForISerializable, classDataContract.XmlName.Name, classDataContract.XmlName.Namespace, SchemaImportHelper.GetDataContractNamespaceFromUri(classDataContract.XmlName.Namespace), contractCodeDomInfo.ClrNamespace)));
1126
throw
ExceptionUtil
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.InvalidClrNameGeneratedForISerializable, classDataContract.XmlName.Name, classDataContract.XmlName.Namespace, contractCodeDomInfo.TypeDeclaration.Name)));
1201
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(
1229
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedBaseTypeDoesNotExist,
1603
throw DiagnosticUtility.
ExceptionUtility
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.CannotComputeUniqueName, nsFragment)));
System\Runtime\Serialization\Schema\ContractCodeDomInfo.cs (3)
11
using ExceptionUtil = System.Runtime.Serialization.DiagnosticUtility.
ExceptionUtility
;
29
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotSetNamespaceForReferencedType, TypeReference?.BaseType)));
50
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotSetMembersForReferencedType, TypeReference?.BaseType)));
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (23)
13
using ExceptionUtil = System.Runtime.Serialization.DiagnosticUtility.
ExceptionUtility
;
82
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
96
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
99
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeNames)));
113
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
116
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeName)));
133
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
136
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(element)));
153
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
168
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
171
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeNames)));
186
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
189
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeName)));
204
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(schemas)));
207
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(element)));
236
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(element)));
238
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeName)));
248
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeName)));
255
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.TypeHasNotBeenImported, typeName.Name, typeName.Namespace)));
269
throw
ExceptionUtil
.ThrowHelperError(new ArgumentNullException(nameof(typeName)));
276
throw
ExceptionUtil
.ThrowHelperError(new InvalidOperationException(SR.Format(SR.TypeHasNotBeenImported, typeName.Name, typeName.Namespace)));
372
throw
ExceptionUtil
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, ImportGlobals.ActualTypeNameAttribute)));
375
throw
ExceptionUtil
.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, ImportGlobals.ActualTypeNamespaceAttribute)));