CallbackDebugElement.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //------------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------------------------
  4. namespace System.ServiceModel.Configuration
  5. {
  6. using System.Configuration;
  7. using System.ServiceModel.Description;
  8. public sealed partial class CallbackDebugElement : BehaviorExtensionElement
  9. {
  10. public CallbackDebugElement()
  11. {
  12. }
  13. [ConfigurationProperty(ConfigurationStrings.IncludeExceptionDetailInFaults, DefaultValue = false)]
  14. public bool IncludeExceptionDetailInFaults
  15. {
  16. get { return (bool)base[ConfigurationStrings.IncludeExceptionDetailInFaults]; }
  17. set { base[ConfigurationStrings.IncludeExceptionDetailInFaults] = value; }
  18. }
  19. public override void CopyFrom(ServiceModelExtensionElement from)
  20. {
  21. base.CopyFrom(from);
  22. CallbackDebugElement source = (CallbackDebugElement)from;
  23. #pragma warning suppress 56506 //[....]; base.CopyFrom() check for 'from' being null
  24. this.IncludeExceptionDetailInFaults = source.IncludeExceptionDetailInFaults;
  25. }
  26. protected internal override object CreateBehavior()
  27. {
  28. return new CallbackDebugBehavior(this.IncludeExceptionDetailInFaults);
  29. }
  30. public override Type BehaviorType
  31. {
  32. get { return typeof(CallbackDebugBehavior); }
  33. }
  34. }
  35. }