PolicyVersion.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. using System;
  5. using System.Globalization;
  6. namespace System.ServiceModel.Description
  7. {
  8. public sealed class PolicyVersion
  9. {
  10. string policyNamespace;
  11. static PolicyVersion policyVersion12;
  12. static PolicyVersion policyVersion15;
  13. static PolicyVersion()
  14. {
  15. policyVersion12 = new PolicyVersion(MetadataStrings.WSPolicy.NamespaceUri);
  16. policyVersion15 = new PolicyVersion(MetadataStrings.WSPolicy.NamespaceUri15);
  17. }
  18. PolicyVersion(string policyNamespace)
  19. {
  20. this.policyNamespace = policyNamespace;
  21. }
  22. public static PolicyVersion Policy12 { get { return policyVersion12; } }
  23. public static PolicyVersion Policy15 { get { return policyVersion15; } }
  24. public static PolicyVersion Default { get { return policyVersion12; } }
  25. public string Namespace { get { return policyNamespace; } }
  26. public override string ToString()
  27. {
  28. return policyNamespace;
  29. }
  30. }
  31. }