The Labs \ Source Viewer \ SSCLI \ System.Xml.Serialization.Configuration \ SchemaImporterExtensionsSection

  1. //------------------------------------------------------------------------------
  2. // <copyright file="SchemaImporterExtensionsSection.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. // <owner current="true" primary="true">ElenaK</owner>
  15. //------------------------------------------------------------------------------
  16. namespace System.Xml.Serialization.Configuration
  17. {
  18.     using System.Configuration;
  19.     using System.Collections;
  20.     using System.Globalization;
  21.     using System.Reflection;
  22.     using System.Threading;
  23.     using System.Xml.Serialization.Advanced;
  24.    
  25.     public sealed class SchemaImporterExtensionsSection : ConfigurationSection
  26.     {
  27.         public SchemaImporterExtensionsSection()
  28.         {
  29.             this.properties.Add(this.schemaImporterExtensions);
  30.         }
  31.        
  32.        
  33.         protected override void InitializeDefault()
  34.         {
  35.         }
  36.        
  37.         protected override ConfigurationPropertyCollection Properties {
  38.             get { return this.properties; }
  39.         }
  40.        
  41.         [ConfigurationProperty("", IsDefaultCollection = true)]
  42.         public SchemaImporterExtensionElementCollection SchemaImporterExtensions {
  43.             get { return (SchemaImporterExtensionElementCollection)this[this.schemaImporterExtensions]; }
  44.         }
  45.        
  46.         internal SchemaImporterExtensionCollection SchemaImporterExtensionsInternal {
  47.             get {
  48.                 SchemaImporterExtensionCollection extensions = new SchemaImporterExtensionCollection();
  49.                 foreach (SchemaImporterExtensionElement elem in this.SchemaImporterExtensions) {
  50.                     extensions.Add(elem.Name, elem.Type);
  51.                 }
  52.                
  53.                 return extensions;
  54.             }
  55.         }
  56.        
  57.         ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
  58.        
  59.         readonly ConfigurationProperty schemaImporterExtensions = new ConfigurationProperty(null, typeof(SchemaImporterExtensionElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
  60.     }
  61. }

Developer Fusion