PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms 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
 1// <copyright>
 2//   Copyright (c) Microsoft Corporation.  All rights reserved.
 3// </copyright>
 4
 5namespace Microsoft.ServiceModel.Configuration
 6{
 7    using System;
 8    using System.Configuration;
 9
10    [AttributeUsage(AttributeTargets.Property)]
11    internal sealed class ServiceModelEnumValidatorAttribute : ConfigurationValidatorAttribute
12    {
13        public ServiceModelEnumValidatorAttribute(Type enumHelperType)
14        {
15            this.EnumHelperType = enumHelperType;
16        }
17
18        public Type EnumHelperType { get; private set; }
19
20        public override ConfigurationValidatorBase ValidatorInstance
21        {
22            get 
23            { 
24                return new ServiceModelEnumValidator(this.EnumHelperType); 
25            }
26        }
27    }
28}