ExportOptions.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.Runtime.Serialization
  5. {
  6. using System.Security;
  7. using System.Security.Permissions;
  8. using System.Collections.ObjectModel;
  9. public class ExportOptions
  10. {
  11. Collection<Type> knownTypes;
  12. IDataContractSurrogate dataContractSurrogate;
  13. public IDataContractSurrogate DataContractSurrogate
  14. {
  15. get { return dataContractSurrogate; }
  16. set { dataContractSurrogate = value; }
  17. }
  18. internal IDataContractSurrogate GetSurrogate()
  19. {
  20. return dataContractSurrogate;
  21. }
  22. public Collection<Type> KnownTypes
  23. {
  24. get
  25. {
  26. if (knownTypes == null)
  27. {
  28. knownTypes = new Collection<Type>();
  29. }
  30. return knownTypes;
  31. }
  32. }
  33. }
  34. }