The Labs \ Source Viewer \ SSCLI \ System.Net.Configuration \ AuthenticationModuleElement

  1. //------------------------------------------------------------------------------
  2. // <copyright file="AuthenticationModuleElement.cs" company="Microsoft Corporation">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Net.Configuration
  16. {
  17.     using System;
  18.     using System.Configuration;
  19.     using System.Reflection;
  20.     using System.Security.Permissions;
  21.    
  22.     public sealed class AuthenticationModuleElement : ConfigurationElement
  23.     {
  24.         public AuthenticationModuleElement()
  25.         {
  26.             this.properties.Add(this.type);
  27.         }
  28.        
  29.         public AuthenticationModuleElement(string typeName) : this()
  30.         {
  31.             if (typeName != (string)this.type.DefaultValue) {
  32.                 this.Type = typeName;
  33.             }
  34.         }
  35.        
  36.         protected override ConfigurationPropertyCollection Properties {
  37.             get { return this.properties; }
  38.         }
  39.        
  40.         [ConfigurationProperty(ConfigurationStrings.Type, IsRequired = true, IsKey = true)]
  41.         public string Type {
  42.             get { return (string)this[this.type]; }
  43.             set { this[this.type] = value; }
  44.         }
  45.        
  46.         internal string Key {
  47.             get { return this.Type; }
  48.         }
  49.        
  50.         ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
  51.        
  52.         readonly ConfigurationProperty type = new ConfigurationProperty(ConfigurationStrings.Type, typeof(string), null, ConfigurationPropertyOptions.IsKey);
  53.     }
  54. }

Developer Fusion