+++ /dev/null
-2006-11-01 Atsushi Enomoto <atsushi@ximian.com>
-
- * SchemaImporterExtensionCollection.cs,
- SchemaImporterExtension.cs : moved from S.X.Serialization.
+++ /dev/null
-//
-// System.Xml.Serialization.SchemaImporterExtension.cs
-//
-// Author:
-// Lluis Sanchez Gual (lluis@novell.com)
-//
-// Copyright (C) Novell, Inc., 2004
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Xml.Schema;
-
-namespace System.Xml.Serialization.Advanced
-{
- public abstract class SchemaImporterExtension
- {
- protected SchemaImporterExtension ()
- {
- }
-
- public virtual string ImportAnyElement (
- XmlSchemaAny any,
- bool mixed,
- XmlSchemas schemas,
- XmlSchemaImporter importer,
- CodeCompileUnit compileUnit,
- CodeNamespace mainNamespace,
- CodeGenerationOptions options,
- CodeDomProvider codeProvider
- )
- {
- return null;
- }
-
- public virtual CodeExpression ImportDefaultValue (string value, string type)
- {
- return null;
- }
-
- public virtual string ImportSchemaType (
- XmlSchemaType type,
- XmlSchemaObject context,
- XmlSchemas schemas,
- XmlSchemaImporter importer,
- CodeCompileUnit compileUnit,
- CodeNamespace mainNamespace,
- CodeGenerationOptions options,
- CodeDomProvider codeProvider
- )
- {
- return null;
- }
-
- public virtual string ImportSchemaType (
- string name,
- string ns,
- XmlSchemaObject context,
- XmlSchemas schemas,
- XmlSchemaImporter importer,
- CodeCompileUnit compileUnit,
- CodeNamespace mainNamespace,
- CodeGenerationOptions options,
- CodeDomProvider codeProvider
- )
- {
- return null;
- }
- }
-}
-
+++ /dev/null
-//
-// System.Xml.Serialization.SchemaImporterExtensionCollection.cs
-//
-// Author:
-// Lluis Sanchez Gual (lluis@novell.com)
-// Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (C) Novell, Inc., 2004, 2006
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace System.Xml.Serialization.Advanced
-{
- public class SchemaImporterExtensionCollection : CollectionBase
- {
- Dictionary<string,SchemaImporterExtension> named_items =
- new Dictionary<string,SchemaImporterExtension> ();
-
- public SchemaImporterExtensionCollection ()
- {
- }
-
- public int Add (SchemaImporterExtension extension)
- {
- if (extension == null)
- throw new ArgumentNullException ("extension");
- return List.Add (extension);
- }
-
- public int Add (string name, Type type)
- {
- if (name == null)
- throw new ArgumentNullException ("name");
- if (type == null)
- throw new ArgumentNullException ("type");
- if (!type.IsSubclassOf (typeof (SchemaImporterExtension)))
- throw new ArgumentException ("The type argument must be subclass of SchemaImporterExtension.");
-
- SchemaImporterExtension e = (SchemaImporterExtension) Activator.CreateInstance (type);
- if (named_items.ContainsKey (name))
- throw new InvalidOperationException (String.Format ("A SchemaImporterExtension keyed by '{0}' already exists.", name));
- int ret = Add (e);
- named_items.Add (name, e);
- return ret;
- }
-
- public new void Clear ()
- {
- named_items.Clear ();
- List.Clear ();
- }
-
- public bool Contains (SchemaImporterExtension extension)
- {
- if (extension == null)
- throw new ArgumentNullException ("extension");
- foreach (SchemaImporterExtension e in List)
- if (extension.Equals (e))
- return true;
- return false;
- }
-
- public void CopyTo (SchemaImporterExtension [] array, int index)
- {
- List.CopyTo (array, index);
- }
-
- public int IndexOf (SchemaImporterExtension extension)
- {
- if (extension == null)
- throw new ArgumentNullException ("extension");
- int i = 0;
- foreach (SchemaImporterExtension e in List) {
- if (extension.Equals (e)) {
- return i;
- }
- i++;
- }
- return -1;
- }
-
- public void Insert (int index, SchemaImporterExtension extension)
- {
- if (extension == null)
- throw new ArgumentNullException ("extension");
- List.Insert (index, extension);
- }
-
- public void Remove (SchemaImporterExtension extension)
- {
- int idx = IndexOf (extension);
- if (idx >= 0)
- List.RemoveAt (idx);
- }
-
- public void Remove (string name)
- {
- if (name == null)
- throw new ArgumentNullException ("name");
- if (!named_items.ContainsKey (name))
- return;
- SchemaImporterExtension e = named_items [name];
- Remove (e);
- named_items.Remove (name);
- }
-
- public SchemaImporterExtension this [int index]
- {
- get { return (SchemaImporterExtension) List [index]; }
- set { List [index] = value; }
- }
- }
-}
-
+++ /dev/null
-//
-// System.Xml.Serialization.CodeGenerationOptions
-//
-// Author:
-// Lluis Sanchez Gual (lluis@ximian.com)
-//
-// Copyright (C) Novell, Inc., 2004
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Xml.Serialization
-{
- [Flags]
- public
- enum CodeGenerationOptions
- {
- [XmlIgnore]
- None = 0,
- [XmlEnum ("properties")]
- GenerateProperties = 1,
- [XmlEnum ("newAsync")]
- GenerateNewAsync = 2,
- [XmlEnum ("oldAsync")]
- GenerateOldAsync = 4,
- [XmlEnum ("order")]
- GenerateOrder = 8,
- [XmlEnum ("enableDataBinding")]
- EnableDataBinding = 16,
-
- }
-}
+++ /dev/null
-//
-// System.Xml.Serialization.CodeIdentifier.cs
-//
-// Author:
-// Tim Coleman (tim@timcoleman.com)
-//
-// Copyright (C) Tim Coleman, 2002
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Globalization;
-
-namespace System.Xml.Serialization {
- public class CodeIdentifier {
-
- [Obsolete ("Design mistake. It only contains static methods.")]
- public
- CodeIdentifier ()
- {
- }
-
- public static string MakeCamel (string identifier)
- {
- string validIdentifier = MakeValid (identifier);
- return (Char.ToLower (validIdentifier[0], CultureInfo.InvariantCulture) + validIdentifier.Substring (1));
- }
-
- public static string MakePascal (string identifier)
- {
- string validIdentifier = MakeValid (identifier);
- return (Char.ToUpper (validIdentifier[0], CultureInfo.InvariantCulture) + validIdentifier.Substring (1));
- }
-
- public static string MakeValid (string identifier)
- {
- if (identifier == null)
- throw new NullReferenceException ();
- if (identifier.Length == 0)
- return "Item";
-
- string output = "";
-
- if (!Char.IsLetter (identifier[0]) && (identifier[0]!='_') )
- output = "Item";
-
- foreach (char c in identifier)
- if (Char.IsLetterOrDigit (c) || c == '_')
- output += c;
-
- if (output.Length > 400)
- output = output.Substring (0,400);
-
- return output;
- }
- }
-}
+++ /dev/null
-//
-// System.Xml.Serialization.CodeIdentifiers
-//
-// Author:
-// Tim Coleman (tim@timcoleman.com)
-//
-// Copyright (C) Tim Coleman, 2002
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.Globalization;
-
-namespace System.Xml.Serialization {
- public class CodeIdentifiers {
-
- #region Fields
-
- bool useCamelCasing;
- Hashtable table;
- Hashtable reserved;
-
- #endregion
-
- #region Constructors
-
- public CodeIdentifiers ()
- : this (true)
- {
- }
-
- public
- CodeIdentifiers (bool caseSensitive)
- {
- StringComparer c = caseSensitive ?
- StringComparer.Ordinal :
- StringComparer.OrdinalIgnoreCase;
- table = new Hashtable (c);
- reserved = new Hashtable (c);
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public bool UseCamelCasing {
- get { return useCamelCasing; }
- set { useCamelCasing = value; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public void Add (string identifier, object value)
- {
- table.Add (identifier, value);
- }
-
- public void AddReserved (string identifier)
- {
- reserved.Add (identifier, identifier);
- }
-
- public string AddUnique (string identifier, object value)
- {
- string unique = MakeUnique (identifier);
- Add (unique, value);
- return unique;
- }
-
- public void Clear ()
- {
- table.Clear ();
- }
-
- public bool IsInUse (string identifier)
- {
- return (table.ContainsKey (identifier) || reserved.ContainsKey (identifier));
- }
-
- public string MakeRightCase (string identifier)
- {
- if (UseCamelCasing)
- return CodeIdentifier.MakeCamel (identifier);
- else
- return CodeIdentifier.MakePascal (identifier);
- }
-
- public string MakeUnique (string identifier)
- {
- string uniqueIdentifier = identifier;
- int i = 1;
-
- while (IsInUse (uniqueIdentifier)) {
- uniqueIdentifier = String.Format (CultureInfo.InvariantCulture, "{0}{1}", identifier, i);
- i += 1;
- }
-
- return uniqueIdentifier;
- }
-
- public void Remove (string identifier)
- {
- table.Remove (identifier);
- }
-
- public void RemoveReserved (string identifier)
- {
- reserved.Remove (identifier);
- }
-
- public object ToArray (Type type)
- {
- Array list = Array.CreateInstance (type, table.Count);
- table.CopyTo (list, 0);
- return list;
- }
-
- #endregion // Methods
- }
-}
../../../external/referencesource/System.Xml/System/Xml/Schema/XsdValidator.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/_Events.cs
+../../../external/referencesource/System.Xml/System/Xml/Serialization/CodeGenerationoptions.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/CodeIdentifier.cs
+../../../external/referencesource/System.Xml/System/Xml/Serialization/CodeIdentifiers.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/ImportContext.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/SchemaObjectWriter.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/XmlSchemas.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/XmlSerializerNamespaces.cs
+../../../external/referencesource/System.Xml/System/Xml/Serialization/Advanced/SchemaImporterExtension.cs
+
../../../external/referencesource/System.Xml/System/Xml/Serialization/Configuration/ConfigurationStrings.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/Configuration/DateTimeSerializationSection.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/Configuration/SchemaImporterExtensionElement.cs
../../../external/referencesource/System.Xml/System/Xml/Xslt/XsltException.cs
../../../external/referencesource/System.Xml/System/Xml/Xslt/XslTransform.cs
../../../external/referencesource/System.Xml/System/Xml/Xslt/XsltSettings.cs
-System.Xml.Serialization.Advanced/SchemaImporterExtensionCollection.cs
-System.Xml.Serialization.Advanced/SchemaImporterExtension.cs
System.Xml.Serialization/CodeExporter.cs
-System.Xml.Serialization/CodeGenerationOptions.cs
-System.Xml.Serialization/CodeIdentifiers.cs
System.Xml.Serialization/ImportContext.cs
System.Xml.Serialization/IXmlSerializable.cs
System.Xml.Serialization/IXmlTextParser.cs
../../../external/referencesource/System.Xml/System/Xml/Schema/XsdDateTime.cs
../../../external/referencesource/System.Xml/System/Xml/Schema/XsdDuration.cs
../../../external/referencesource/System.Xml/System/Xml/Schema/XsdValidator.cs
+
../../../external/referencesource/System.Xml/System/Xml/Serialization/_Events.cs
+../../../external/referencesource/System.Xml/System/Xml/Serialization/CodeGenerationoptions.cs
+../../../external/referencesource/System.Xml/System/Xml/Serialization/CodeIdentifier.cs
+../../../external/referencesource/System.Xml/System/Xml/Serialization/CodeIdentifiers.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/ImportContext.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/SchemaObjectWriter.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/XmlSchemas.cs
../../../external/referencesource/System.Xml/System/Xml/Serialization/XmlSerializerNamespaces.cs
+
+../../../external/referencesource/System.Xml/System/Xml/Serialization/Advanced/SchemaImporterExtension.cs
+
../../../external/referencesource/System.Xml/System/Xml/ValidateNames.cs
../../../external/referencesource/System.Xml/System/Xml/XmlCharType.cs
../../../external/referencesource/System.Xml/System/Xml/XmlComplianceUtil.cs
../../../external/referencesource/System.Xml/System/Xml/Xslt/XsltException.cs
../../../external/referencesource/System.Xml/System/Xml/Xslt/XslTransform.cs
../../../external/referencesource/System.Xml/System/Xml/Xslt/XsltSettings.cs
-System.Xml.Serialization/CodeGenerationOptions.cs
-System.Xml.Serialization/CodeIdentifier.cs
-System.Xml.Serialization/CodeIdentifiers.cs
System.Xml.Serialization/ImportContext.cs
System.Xml.Serialization/IXmlSerializable.cs
System.Xml.Serialization/IXmlTextParser.cs