1 //------------------------------------------------------------------------------ 2 // <copyright file="AuthenticationModuleElement.cs" company="Microsoft Corporation"> 3 // Copyright (c) Microsoft Corporation. All rights reserved. 4 // </copyright> 5 //------------------------------------------------------------------------------ 6 7 namespace System.Net.Configuration 8 { 9 using System; 10 using System.Configuration; 11 using System.Reflection; 12 using System.Security.Permissions; 13 14 public sealed class AuthenticationModuleElement : ConfigurationElement 15 { AuthenticationModuleElement()16 public AuthenticationModuleElement() 17 { 18 this.properties.Add(this.type); 19 } 20 AuthenticationModuleElement(string typeName)21 public AuthenticationModuleElement(string typeName) : this() 22 { 23 if (typeName != (string)this.type.DefaultValue) 24 { 25 this.Type = typeName; 26 } 27 } 28 29 protected override ConfigurationPropertyCollection Properties 30 { 31 get 32 { 33 return this.properties; 34 } 35 } 36 37 [ConfigurationProperty(ConfigurationStrings.Type, IsRequired=true, IsKey = true)] 38 public string Type 39 { 40 get { return (string)this[this.type]; } 41 set { this[this.type] = value; } 42 } 43 44 internal string Key 45 { 46 get { return this.Type; } 47 } 48 49 ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); 50 51 readonly ConfigurationProperty type = 52 new ConfigurationProperty(ConfigurationStrings.Type, 53 typeof(string), 54 null, 55 ConfigurationPropertyOptions.IsKey); 56 } 57 } 58 59