IDataContractSurrogate.cs 764 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.CodeDom;
  3. using System.Reflection;
  4. namespace System.Runtime.Serialization
  5. {
  6. public interface IDataContractSurrogate
  7. {
  8. object GetCustomDataToExport (MemberInfo memberInfo,
  9. Type dataContractType);
  10. object GetCustomDataToExport (Type clrType,
  11. Type dataContractType);
  12. Type GetDataContractType (Type type);
  13. object GetDeserializedObject (object obj, Type targetType);
  14. void GetKnownCustomDataTypes (
  15. KnownTypeCollection customDataTypes);
  16. object GetObjectToSerialize (object obj, Type targetType);
  17. Type GetReferencedTypeOnImport (string typeName,
  18. string typeNamespace, object customData);
  19. CodeTypeDeclaration ProcessImportedType (
  20. CodeTypeDeclaration typeDeclaration,
  21. CodeCompileUnit compileUnit);
  22. }
  23. }