/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
- // <copyright>
- // Copyright (c) Microsoft Corporation. All rights reserved.
- // </copyright>
-
- namespace Microsoft.ServiceModel.Configuration
- {
- using System;
- using System.Configuration;
-
- [AttributeUsage(AttributeTargets.Property)]
- internal sealed class ServiceModelEnumValidatorAttribute : ConfigurationValidatorAttribute
- {
- public ServiceModelEnumValidatorAttribute(Type enumHelperType)
- {
- this.EnumHelperType = enumHelperType;
- }
-
- public Type EnumHelperType { get; private set; }
-
- public override ConfigurationValidatorBase ValidatorInstance
- {
- get
- {
- return new ServiceModelEnumValidator(this.EnumHelperType);
- }
- }
- }
- }