Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
2009-07-18 Veerapuram Varadhan <vvaradhan@novell.com>
* TypedDataSetGenerator.cs: Implement two of the Generate methods.
2008-01-11 Raja R Harinath <harinath@hurrynot.org>
* TypedDataSetGenerator.cs: Remove mention of NET_3_5 -- the
enclosed methods are part of 2.0 SP1.
* TypedDataSetSchemaImporterExtension.cs: Likewise.
2007-10-09 Atsushi Enomoto <atsushi@ximian.com>
* TypedDataSetGeneratorException.cs : only 2.0.
2007-10-02 Atsushi Enomoto <atsushi@ximian.com>
* TypedDataSetGenerator.cs, MethodSignatureGenerator.cs,
TypedDataSetGeneratorException.cs, ParameterGenerationOption.cs,
TypedDataSetSchemaImporterExtension.cs :
new stubs and implementations.

View File

@@ -0,0 +1,120 @@
//
// MethodSignatureGenerator.cs
//
// Author:
// Atsushi Enomoto (atsushi@ximian.com)
//
// Copyright (C) 2007 Novell, Inc.
//
//
// 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.
//
#if NET_2_0
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel.Design;
namespace System.Data.Design
{
public class MethodSignatureGenerator
{
public MethodSignatureGenerator ()
{
}
[MonoTODO]
public CodeDomProvider CodeProvider {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public Type ContainerParameterType {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public string DataSetClassName {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public bool IsGetMethod {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public bool PagingMethod {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public ParameterGenerationOption ParameterOption {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public string TableClassName {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public CodeMemberMethod GenerateMethod ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GenerateMethodSignature ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public CodeTypeDeclaration GenerateUpdatingMethods ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetDesignTableContent (string designTableContent)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void SetMethodSourceContent (string methodSourceContent)
{
throw new NotImplementedException ();
}
}
}
#endif

View File

@@ -0,0 +1,43 @@
//
// ParameterGenerationOption.cs
//
// Author:
// Atsushi Enomoto (atsushi@ximian.com)
//
// Copyright (C) 2007 Novell, Inc.
//
//
// 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.
//
#if NET_2_0
namespace System.Data.Design
{
public enum ParameterGenerationOption
{
ClrTypes,
SqlTypes,
Objects
}
}
#endif

View File

@@ -0,0 +1,130 @@
//
// TypedDataSetGenerator.cs
//
// Author:
// Atsushi Enomoto (atsushi@ximian.com)
//
// Copyright (C) 2007 Novell, Inc.
//
//
// 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.
//
#if NET_2_0
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Reflection;
using System.IO;
namespace System.Data.Design
{
// It is likely replaced by System.Data.TypedDataSetGenerator-based
// implementation.
public sealed class TypedDataSetGenerator
{
private TypedDataSetGenerator ()
{
}
[Flags]
public enum GenerateOption
{
None = 0,
HierarchicalUpdate = 1,
LinqOverTypedDatasets = 2
}
[MonoTODO]
public static ICollection<Assembly> ReferencedAssemblies {
get { throw new NotImplementedException (); }
}
public static string Generate (DataSet dataSet, CodeNamespace codeNamespace, CodeDomProvider codeProvider)
{
// See CustomDataclassGenerator.cs
CustomDataClassGenerator.CreateDataSetClasses (
dataSet, codeNamespace, codeProvider, null);
return null;
}
public static string Generate (string inputFileContent, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeDomProvider codeProvider)
{
if (inputFileContent == null || inputFileContent.Length < 5)
return null;
DataSet ds = new DataSet ();
StringReader sr = new StringReader (inputFileContent);
ds.ReadXmlSchema (sr as TextReader);
// See CustomDataclassGenerator.cs
CustomDataClassGenerator.CreateDataSetClasses (
ds, compileUnit, mainNamespace, codeProvider, null);
return null;
}
[MonoTODO]
public static void Generate (string inputFileContent, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeDomProvider codeProvider, Hashtable customDBProviders)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static void Generate (string inputFileContent, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeDomProvider codeProvider, DbProviderFactory specifiedFactory)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static string Generate (string inputFileContent, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeDomProvider codeProvider, GenerateOption option)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static void Generate (string inputFileContent, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeDomProvider codeProvider, Hashtable customDBProviders, GenerateOption option)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static string GetProviderName (string inputFileContent)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static string GetProviderName (string inputFileContent, string tableName)
{
throw new NotImplementedException ();
}
}
}
#endif

View File

@@ -0,0 +1,103 @@
//
// System.Data.Design.TypedDataSetGeneratorException.cs
//
// Author: Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// 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.
//
// It is a copy from System.Data.TypedDataSetGeneratorException
#if NET_2_0
using System;
using System.Collections;
using System.Globalization;
using System.Runtime.Serialization;
namespace System.Data.Design {
[Serializable]
public class TypedDataSetGeneratorException : DataException
{
IList errorList;
#region Constructors
public TypedDataSetGeneratorException ()
: base (Locale.GetText ("System error."))
{
}
public TypedDataSetGeneratorException (IList list)
: base (Locale.GetText ("System error."))
{
errorList = list;
}
protected TypedDataSetGeneratorException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
int count = info.GetInt32 ("KEY_ARRAYCOUNT");
errorList = new ArrayList (count);
for (int i=0; i < count; i++)
errorList.Add (info.GetString("KEY_ARRAYVALUES" + i));
}
#if NET_2_0
public TypedDataSetGeneratorException (String error) : base (error)
{
}
public TypedDataSetGeneratorException (String error, Exception inner)
: base (error, inner)
{
}
#endif
#endregion //Constructors
public IList ErrorList {
get { return errorList; }
}
#region Methods
public override void GetObjectData (SerializationInfo si, StreamingContext context)
{
base.GetObjectData (si, context);
int count = (errorList != null) ? ErrorList.Count : 0;
si.AddValue ("KEY_ARRAYCOUNT", count);
for (int i=0; i < count; i++)
si.AddValue("KEY_ARRAYVALUES" + i, ErrorList [i]);
}
#endregion // Methods
}
}
#endif

View File

@@ -0,0 +1,70 @@
//
// TypedDataSetSchemaImporterExtension.cs
//
// Author:
// Atsushi Enomoto (atsushi@ximian.com)
//
// Copyright (C) 2007 Novell, Inc.
//
//
// 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.
//
#if NET_2_0
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel.Design;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Xml.Serialization.Advanced;
namespace System.Data.Design
{
public class TypedDataSetSchemaImporterExtension : SchemaImporterExtension
{
public TypedDataSetSchemaImporterExtension ()
{
throw new NotImplementedException ();
}
protected TypedDataSetSchemaImporterExtension (TypedDataSetGenerator.GenerateOption dataSetGenerateOptions)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override string ImportSchemaType (XmlSchemaType type, XmlSchemaObject context, XmlSchemas schemas, XmlSchemaImporter importer, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeGenerationOptions options, CodeDomProvider codeProvider)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override string ImportSchemaType (string name, string namespaceName, XmlSchemaObject context, XmlSchemas schemas, XmlSchemaImporter importer, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeGenerationOptions options, CodeDomProvider codeProvider)
{
throw new NotImplementedException ();
}
}
}
#endif