DataContractFormatAttribute.cs 839 B

123456789101112131415161718192021222324
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //-----------------------------------------------------------------------------
  4. namespace System.ServiceModel
  5. {
  6. using System;
  7. using System.Runtime.Serialization;
  8. [AttributeUsage(ServiceModelAttributeTargets.ServiceContract | ServiceModelAttributeTargets.OperationContract, Inherited = false, AllowMultiple = false)]
  9. public sealed class DataContractFormatAttribute : Attribute
  10. {
  11. OperationFormatStyle style;
  12. public OperationFormatStyle Style
  13. {
  14. get { return style; }
  15. set
  16. {
  17. XmlSerializerFormatAttribute.ValidateOperationFormatStyle(style);
  18. style = value;
  19. }
  20. }
  21. }
  22. }