Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CanExport() [2/3]

bool System.Runtime.Serialization.XsdDataContractExporter.CanExport ( ICollection< Type > types)
inline

Definition at line 306 of file XsdDataContractExporter.cs.

307 {
308 if (types == null)
309 {
310 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("types"));
311 }
313 try
314 {
315 foreach (Type type in types)
316 {
317 if (type == null)
318 {
319 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(System.SR.Format(System.SR.CannotExportNullType, "types")));
320 }
321 AddType(type);
322 }
324 return true;
325 }
326 catch (InvalidDataContractException)
327 {
329 return false;
330 }
331 catch (Exception exception)
332 {
335 throw;
336 }
337 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string CannotExportNullType
Definition SR.cs:650
Definition SR.cs:7

References System.Runtime.Serialization.XsdDataContractExporter._dataContractSet, System.Runtime.Serialization.XsdDataContractExporter.AddKnownTypes(), System.Runtime.Serialization.XsdDataContractExporter.AddType(), System.Xml.ArgumentException, System.SR.CannotExportNullType, System.Runtime.Serialization.XsdDataContractExporter.DataContractSet, System.Runtime.Serialization.Dictionary, System.exception, System.SR.Format(), System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.Runtime.Serialization.XsdDataContractExporter.TraceExportError(), and System.type.