RecipientServiceModelSecurityTokenRequirement.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //-----------------------------------------------------------------------------
  4. using System;
  5. using System.ServiceModel.Channels;
  6. using System.ServiceModel;
  7. using System.ServiceModel.Description;
  8. using System.Xml;
  9. using System.Collections.Generic;
  10. using System.IdentityModel.Selectors;
  11. using System.Globalization;
  12. namespace System.ServiceModel.Security.Tokens
  13. {
  14. public sealed class RecipientServiceModelSecurityTokenRequirement : ServiceModelSecurityTokenRequirement
  15. {
  16. public RecipientServiceModelSecurityTokenRequirement()
  17. : base()
  18. {
  19. Properties.Add(IsInitiatorProperty, (object)false);
  20. }
  21. public Uri ListenUri
  22. {
  23. get
  24. {
  25. return GetPropertyOrDefault<Uri>(ListenUriProperty, null);
  26. }
  27. set
  28. {
  29. this.Properties[ListenUriProperty] = value;
  30. }
  31. }
  32. public AuditLogLocation AuditLogLocation
  33. {
  34. get
  35. {
  36. return GetPropertyOrDefault<AuditLogLocation>(AuditLogLocationProperty, ServiceSecurityAuditBehavior.defaultAuditLogLocation);
  37. }
  38. set
  39. {
  40. this.Properties[AuditLogLocationProperty] = value;
  41. }
  42. }
  43. public bool SuppressAuditFailure
  44. {
  45. get
  46. {
  47. return GetPropertyOrDefault<bool>(SuppressAuditFailureProperty, ServiceSecurityAuditBehavior.defaultSuppressAuditFailure);
  48. }
  49. set
  50. {
  51. this.Properties[SuppressAuditFailureProperty] = value;
  52. }
  53. }
  54. public AuditLevel MessageAuthenticationAuditLevel
  55. {
  56. get
  57. {
  58. return GetPropertyOrDefault<AuditLevel>(MessageAuthenticationAuditLevelProperty, ServiceSecurityAuditBehavior.defaultMessageAuthenticationAuditLevel);
  59. }
  60. set
  61. {
  62. this.Properties[MessageAuthenticationAuditLevelProperty] = value;
  63. }
  64. }
  65. public override string ToString()
  66. {
  67. return InternalToString();
  68. }
  69. }
  70. }