PageRenderTime 54ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/WCFWebApi/src/Microsoft.ServiceModel.Internal/Microsoft/ServiceModel/Configuration/ServiceModelEnumValidatorAttribute.cs

#
C# | 28 lines | 21 code | 4 blank | 3 comment | 0 complexity | 8e447fe7586de55edeac0a84d72ce11b MD5 | raw file
Possible License(s): CC-BY-SA-3.0, Apache-2.0
  1. // <copyright>
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. // </copyright>
  4. namespace Microsoft.ServiceModel.Configuration
  5. {
  6. using System;
  7. using System.Configuration;
  8. [AttributeUsage(AttributeTargets.Property)]
  9. internal sealed class ServiceModelEnumValidatorAttribute : ConfigurationValidatorAttribute
  10. {
  11. public ServiceModelEnumValidatorAttribute(Type enumHelperType)
  12. {
  13. this.EnumHelperType = enumHelperType;
  14. }
  15. public Type EnumHelperType { get; private set; }
  16. public override ConfigurationValidatorBase ValidatorInstance
  17. {
  18. get
  19. {
  20. return new ServiceModelEnumValidator(this.EnumHelperType);
  21. }
  22. }
  23. }
  24. }