Author: antonello
Date: 2007-04-02 16:58:29 -0400 (Mon, 02 Apr 2007)
New Revision: 75307

Added:
   trunk/olive/System.Data.Linq.Design/Assembly/
   trunk/olive/System.Data.Linq.Design/Assembly/AssemblyInfo.cs
   trunk/olive/System.Data.Linq.Design/ChangeLog
   trunk/olive/System.Data.Linq.Design/Makefile
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/ChangeLog
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/Database.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbAssociation.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbColumn.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbElement.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbFunction.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbIndex.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbKeyColumn.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbObject.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbParameter.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbPrimaryKey.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRoutine.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRowset.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbSchema.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbStoredProcedure.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbTable.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbType.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbView.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/RelationshipKind.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.sources
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ChangeLog
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbSchemaCodeGeneratorFactory.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbmlExtractorFactory.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractOptions.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractTypes.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GenerateOptions.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GeneratorFactoryOptions.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IDatabaseExtractor.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IMappingCodeGenerator.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/LanguageType.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeId.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeType.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ResultFile.cs
   trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/Severity.cs
   
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ValidationMessage.cs
Modified:
   trunk/olive/System.Data.Linq.Design/
Log:



Property changes on: trunk/olive/System.Data.Linq.Design
___________________________________________________________________
Name: svn:ignore
   + System.Data.Linq.Design.sln
System.Data.Linq.Design.suo
bin
obj
Properties
System.Data.Linq.Design.csproj


Added: trunk/olive/System.Data.Linq.Design/Assembly/AssemblyInfo.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/Assembly/AssemblyInfo.cs        
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/Assembly/AssemblyInfo.cs        
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("System.Data.Linq.Design")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("admin")]
+[assembly: AssemblyProduct("System.Data.Linq.Design")]
+[assembly: AssemblyCopyright("Copyright © admin 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed 
to COM
+[assembly: Guid("c36a5183-5807-4a96-a9b2-cb81653a550e")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision 
Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

Added: trunk/olive/System.Data.Linq.Design/ChangeLog
===================================================================
--- trunk/olive/System.Data.Linq.Design/ChangeLog       2007-04-02 20:34:27 UTC 
(rev 75306)
+++ trunk/olive/System.Data.Linq.Design/ChangeLog       2007-04-02 20:58:29 UTC 
(rev 75307)
@@ -0,0 +1,3 @@
+2007-04-02  Antonello Provenzano  <[EMAIL PROTECTED]>
+
+       * Initial commit.
\ No newline at end of file

Added: trunk/olive/System.Data.Linq.Design/Makefile
===================================================================
--- trunk/olive/System.Data.Linq.Design/Makefile        2007-04-02 20:34:27 UTC 
(rev 75306)
+++ trunk/olive/System.Data.Linq.Design/Makefile        2007-04-02 20:58:29 UTC 
(rev 75307)
@@ -0,0 +1,25 @@
+thisdir = class/System.Data.Linq.Design
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Data.Linq.Design.dll
+LIB_MCS_FLAGS = \
+                /r:System.dll \
+                /r:System.Core.dll \
+                /r:System.Data.dll \
+                /r:System.Data.Linq.dll \
+                /r:System.Runtime.Serialization.dll \
+                /r:System.Xml.dll \
+                /langversion:linq
+NO_TEST = yes
+
+# This is a .NET 3.0 only assembly
+VALID_PROFILE := $(filter net_3_0, $(PROFILE))
+ifndef VALID_PROFILE
+LIBRARY_NAME = dummy-System.Data.Linq.Design.dll
+NO_INSTALL = yes
+NO_SIGN_ASSEMBLY = yes
+NO_TEST = yes
+endif
+
+include ../../build/library.make

Added: trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ChangeLog
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ChangeLog       
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ChangeLog       
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,3 @@
+2007-04-02  Antonello Provenzano  <[EMAIL PROTECTED]>
+
+       * Initial commit.
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbSchemaCodeGeneratorFactory.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbSchemaCodeGeneratorFactory.cs
 2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbSchemaCodeGeneratorFactory.cs
 2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,17 @@
+namespace System.Data.Linq.Design
+{
+    public static class DbSchemaCodeGeneratorFactory
+    {
+        #region Public Static Methods
+        public static IMappingCodeGenerator 
CreateCSharpGenerator(GeneratorFactoryOptions flags)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static IMappingCodeGenerator 
CreateVisualBasicGenerator(GeneratorFactoryOptions flags)
+        {
+            throw new NotImplementedException();
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbmlExtractorFactory.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbmlExtractorFactory.cs
 2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/DbmlExtractorFactory.cs
 2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,90 @@
+using System.IO;
+using System.Reflection;
+using System.Text;
+using System.Data.Linq.Design.SchemaObjectModel;
+
+namespace System.Data.Linq.Design
+{
+    public static class DbmlExtractorFactory
+    {
+        public static IDatabaseExtractor CreateExtractor()
+        {
+            return new DbmlExtractor();
+        }
+
+        #region DbmlExtractor
+        private class DbmlExtractor : IDatabaseExtractor
+        {
+            #region Fields
+            private ExtractOptions options;
+            private TextWriter logger;
+            private string dbName;
+            private IDbConnection conn;
+            private Database database;
+            #endregion
+
+            #region Private Methods
+            private void Extract()
+            {
+            }
+            #endregion
+
+            #region Private Static Methods
+            private static IDbConnection CreateConnection(string 
connTypeString, string connString)
+            {
+                Type connType = Type.GetType(connTypeString, false, true);
+                if (connType == null)
+                    throw new InvalidOperationException();
+                if (!typeof(IDbConnection).IsAssignableFrom(connType))
+                    throw new InvalidOperationException();
+
+                // first look for a constructor defining the connection 
string...
+                ConstructorInfo ctor = connType.GetConstructor(new Type[] { 
typeof(string) });
+                if (ctor != null)
+                    return (IDbConnection)ctor.Invoke(new object[] { 
connString });
+                
+                // ... ok, not found: let's look for the default constructor...
+                ctor = connType.GetConstructor(Type.EmptyTypes);
+
+                if (ctor == null)
+                    throw new InvalidOperationException();
+
+                IDbConnection conn = (IDbConnection)ctor.Invoke(null);
+                conn.ConnectionString = connString;
+
+                return conn;
+            }
+            #endregion
+
+            #region Public Methods
+
+            public void ExtractToFile(string connection, string database, 
ExtractOptions options, string resultFile)
+            {
+                string s = ExtractToText(connection, database, options);
+                byte[] bytes = Encoding.UTF8.GetBytes(s);
+
+                FileStream stream = new FileStream(resultFile, 
FileMode.Create, FileAccess.Write, FileShare.None, bytes.Length);
+                stream.Write(bytes, 0, bytes.Length);
+                stream.Close();
+            }
+
+            //[MonoTODO()]
+            public string ExtractToText(string connection, string database, 
ExtractOptions options)
+            {
+                this.options = options;
+                conn = CreateConnection(options.ConnectionTypeString, 
connection);
+                logger = options.Log;
+                dbName = database;
+
+                Extract();
+
+                //TODO:
+
+                throw new NotImplementedException();
+            }
+
+            #endregion
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractOptions.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractOptions.cs   
    2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractOptions.cs   
    2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,63 @@
+using System.IO;
+
+namespace System.Data.Linq.Design
+{
+    public class ExtractOptions
+    {
+        #region Fields
+        private int commandTimeout = 30;
+        private LanguageType language;
+        private TextWriter log;
+        private string nspace;
+        private bool pluralize;
+        private ExtractTypes types;
+        private string connType;
+        #endregion
+
+        #region Properties
+        public int CommandTimeout
+        {
+            get { return commandTimeout; }
+            set { commandTimeout = value; }
+        }
+
+        public LanguageType Language
+        {
+            get { return language; }
+            set { language = value; }
+        }
+
+        public TextWriter Log
+        {
+            get { return log; }
+            set { log = value; }
+        }
+
+        public string Namespace
+        {
+            get { return nspace; }
+            set { nspace = value; }
+        }
+
+        public bool Pluralize
+        {
+            get { return pluralize; }
+            set { pluralize = value; }
+        }
+
+        public ExtractTypes Types
+        {
+            get { return types; }
+            set { types = value; }
+        }
+
+        // This is an addition to the .NET framework for letting
+        // the user providing the Type string of the IDbConnection
+        public string ConnectionTypeString
+        {
+            get { return connType; }
+            set { connType = value; }
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractTypes.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractTypes.cs 
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ExtractTypes.cs 
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,17 @@
+namespace System.Data.Linq.Design
+{
+    [Flags]
+    public enum ExtractTypes
+    {
+        Tables = 1,
+        Views = 2,
+        Functions = 4,
+        System = 8,
+        StoredProcedures = 16,
+        Constraints = 32,
+        Indexes = 64,
+        Relationships = 128,
+        All = Tables | Views | Functions | System | StoredProcedures |
+            Constraints | Indexes | Relationships
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GenerateOptions.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GenerateOptions.cs  
    2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GenerateOptions.cs  
    2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,24 @@
+namespace System.Data.Linq.Design
+{
+    public class GenerateOptions
+    {
+        #region Fields
+        private string nspace;
+        private string resBaseFN;
+        #endregion
+
+        #region Properties
+        public string Namespace
+        {
+            get { return nspace; }
+            set { nspace = value; }
+        }
+
+        public string ResultBaseFileName
+        {
+            get { return resBaseFN; }
+            set { resBaseFN = value; }
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GeneratorFactoryOptions.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GeneratorFactoryOptions.cs
      2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/GeneratorFactoryOptions.cs
      2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,8 @@
+namespace System.Data.Linq.Design
+{
+    public class GeneratorFactoryOptions
+    {
+        public bool CreateMappingFile;
+        public bool EnableSerialization;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IDatabaseExtractor.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IDatabaseExtractor.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IDatabaseExtractor.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,9 @@
+namespace System.Data.Linq.Design
+{
+    public interface IDatabaseExtractor
+    {
+        void ExtractToFile(string connection, string database, ExtractOptions 
options, string resultFile);
+
+        string ExtractToText(string connection, string database, 
ExtractOptions options);
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IMappingCodeGenerator.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IMappingCodeGenerator.cs
        2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/IMappingCodeGenerator.cs
        2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design
+{
+    public interface IMappingCodeGenerator
+    {
+        IEnumerable<ResultFile> GenerateFromFile(string fileName, 
GenerateOptions options);
+
+        IEnumerable<ResultFile> GenerateFromText(string text, GenerateOptions 
options);
+
+        IEnumerable<ValidationMessage> ValidateFileName(string fileName);
+
+        IEnumerable<ValidationMessage> ValidateText(string text);
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/LanguageType.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/LanguageType.cs 
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/LanguageType.cs 
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,8 @@
+namespace System.Data.Linq.Design
+{
+    public enum LanguageType
+    {
+        CSharp,
+        VisualBasic
+    }
+}
\ No newline at end of file

Added: trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeId.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeId.cs       
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeId.cs       
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,24 @@
+namespace System.Data.Linq.Design
+{
+    public class NodeId
+    {
+        #region Fields
+        private string name;
+        private NodeType nodeType;
+        #endregion
+
+        #region Properties
+        public string Name
+        {
+            get { return name; }
+            set { name = value; }
+        }
+
+        public NodeType NodeType
+        {
+            get { return nodeType; }
+            set { nodeType = value; }
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeType.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeType.cs     
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/NodeType.cs     
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,14 @@
+namespace System.Data.Linq.Design
+{
+    public enum NodeType
+    {
+        Database,
+        Table,
+        Adapter,
+        Type,
+        StoreProcedure,
+        ScalarFunction,
+        TableValuedFunction,
+        Column
+    }
+}
\ No newline at end of file

Added: trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ResultFile.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ResultFile.cs   
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ResultFile.cs   
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,47 @@
+using System.Text;
+
+namespace System.Data.Linq.Design
+{
+    public class ResultFile
+    {
+        #region Fields
+        private Encoding encoding;
+        private string fileContent;
+        private string fileName;
+        private bool primary;
+        private bool sourceFile;
+        #endregion
+
+        #region Properties
+        public Encoding Encoding
+        {
+            get { return encoding; }
+            set { encoding = value; }
+        }
+
+        public string FileContent
+        {
+            get { return fileContent; }
+            set { fileContent = value; }
+        }
+
+        public string FileName
+        {
+            get { return fileName; }
+            set { fileName = value; }
+        }
+
+        public bool IsPrimary
+        {
+            get { return primary; }
+            set { primary = value; }
+        }
+
+        public bool IsSourceFile
+        {
+            get { return sourceFile; }
+            set { sourceFile = value; }
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/Severity.cs
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/Severity.cs     
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/Severity.cs     
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,9 @@
+namespace System.Data.Linq.Design
+{
+    public enum Severity
+    {
+        Information,
+        Warning,
+        Error
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ValidationMessage.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ValidationMessage.cs
    2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design/ValidationMessage.cs
    2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,41 @@
+using System.Collections.ObjectModel;
+
+namespace System.Data.Linq.Design
+{
+    public class ValidationMessage
+    {
+        #region .ctor
+        public ValidationMessage(string description, Severity severity, 
ReadOnlyCollection<NodeId> nodePath)
+        {
+            this.description = description;
+            this.severity = severity;
+            this.nodePath = nodePath;
+        }
+        #endregion
+
+        #region Fields
+        private string description;
+        private ReadOnlyCollection<NodeId> nodePath;
+        private Severity severity;
+        #endregion
+
+        #region Properties
+        public ReadOnlyCollection<NodeId> NodePath
+        {
+            get { return nodePath; }
+        }
+
+        public string Description
+        {
+            get { return description; }
+            set { description = value; }
+        }
+
+        public Severity Severity
+        {
+            get { return severity; }
+            set { severity = value; }
+        }
+        #endregion
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/ChangeLog
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/ChangeLog
     2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/ChangeLog
     2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,3 @@
+2007-04-02  Antonello Provenzano  <[EMAIL PROTECTED]>
+
+       * Initial commit.
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/Database.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/Database.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/Database.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class Database : DbElement
+    {
+        public string Class;
+        public List<DbSchema> Schemas = new List<DbSchema>();
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbAssociation.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbAssociation.cs
      2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbAssociation.cs
      2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,14 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbAssociation : DbObject
+    {
+        public List<DbKeyColumn> Columns = new List<DbKeyColumn>();
+        public string DeleteRule;
+        public RelationshipKind Kind;
+        public string Property;
+        public string Target;
+        public string UpdateRule;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbColumn.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbColumn.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbColumn.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,19 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbColumn : DbElement
+    {
+        public string CanBeNull;
+        public string DbType;
+        public string DisplayName;
+        public string Expression;
+        public string IsDBGenerated;
+        public string IsDiscriminator;
+        public string IsPrimaryKey;
+        public string IsReadOnly;
+        public string IsVersion;
+        public string Property;
+        public string StringLength;
+        public string Type;
+        public string UpdateCheck;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbElement.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbElement.cs
  2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbElement.cs
  2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,17 @@
+namespace System.Data.Linq.Design
+{
+    public abstract class DbElement
+    {
+        #region .ctor
+        protected DbElement()
+        {
+        }
+        #endregion
+
+        #region Fields
+        public string Access;
+        public string Hidden;
+        public string Name;
+        #endregion
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbFunction.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbFunction.cs
 2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbFunction.cs
 2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,9 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbFunction : DbRoutine
+    {
+        public string DbType;
+        public bool IsTableValued;
+        public string Type;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbIndex.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbIndex.cs
    2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbIndex.cs
    2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbIndex : DbObject
+    {
+        public List<DbKeyColumn> Columns = new List<DbKeyColumn>();
+        public string IsUnique;
+        public string Style;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbKeyColumn.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbKeyColumn.cs
        2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbKeyColumn.cs
        2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,7 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbKeyColumn
+    {
+        public string Name;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbObject.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbObject.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbObject.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,9 @@
+namespace System.Data.Linq.Design.SchemaObjectModel 
+{
+    public abstract class DbObject : DbElement
+    {
+        protected DbObject()
+        {
+        }
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbParameter.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbParameter.cs
        2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbParameter.cs
        2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,10 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbParameter : DbElement
+    {
+        public string DbType;
+        public ParameterDirection ParameterDirection;
+        public string ParameterName;
+        public string Type;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbPrimaryKey.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbPrimaryKey.cs
       2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbPrimaryKey.cs
       2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbPrimaryKey : DbObject
+    {
+        public List<DbKeyColumn> Columns = new List<DbKeyColumn>();
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRoutine.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRoutine.cs
  2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRoutine.cs
  2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbRoutine : DbObject
+    {
+        public string MethodName;
+        public List<DbParameter> Parameters = new List<DbParameter>();
+        public int ResultSetsReturned;
+        public List<DbRowset> ResultShapes = new List<DbRowset>();
+        public bool SchemaErrors;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRowset.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRowset.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbRowset.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbRowset : DbObject
+    {
+        public string Class;
+        public List<DbColumn> Columns = new List<DbColumn>();
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbSchema.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbSchema.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbSchema.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,14 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbSchema : DbElement
+    {
+        public string Class;
+        public List<DbFunction> Functions = new List<DbFunction>();
+        public string Property;
+        public List<DbStoredProcedure> StoreProcedures = new 
List<DbStoredProcedure>();
+        public List<DbTable> Tables = new List<DbTable>();
+        public List<DbView> Views = new List<DbView>();
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbStoredProcedure.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbStoredProcedure.cs
  2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbStoredProcedure.cs
  2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,6 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbStoredProcedure : DbRoutine
+    {
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbTable.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbTable.cs
    2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbTable.cs
    2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbTable : DbObject
+    {
+        public List<DbAssociation> Associations = new List<DbAssociation>();
+        public string Class;
+        public List<DbColumn> Columns = new List<DbColumn>();
+        public List<DbIndex> Indexes = new List<DbIndex>();
+        public DbPrimaryKey PrimaryKey;
+        public string Property;
+        public DbType Type;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbType.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbType.cs
     2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbType.cs
     2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbType : DbObject
+    {
+        public List<DbAssociation> Associations = new List<DbAssociation>();
+        public List<DbColumn> Columns = new List<DbColumn>();
+        public List<DbType> DerivedTypes = new List<DbType>();
+        public string InheritanceCode;
+        public string IsInheritanceDefault = "false";
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbView.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbView.cs
     2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/DbView.cs
     2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,7 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public class DbView : DbTable
+    {
+        public bool SchemaErrors;
+    }
+}
\ No newline at end of file

Added: 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/RelationshipKind.cs
===================================================================
--- 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/RelationshipKind.cs
   2007-04-02 20:34:27 UTC (rev 75306)
+++ 
trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.SchemaObjectModel/RelationshipKind.cs
   2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,10 @@
+namespace System.Data.Linq.Design.SchemaObjectModel
+{
+    public enum RelationshipKind
+    {
+        OneToOneChild,
+        OneToOneParent,
+        ManyToOneChild,
+        ManyToOneParent
+    }
+}
\ No newline at end of file

Added: trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.sources
===================================================================
--- trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.sources 
2007-04-02 20:34:27 UTC (rev 75306)
+++ trunk/olive/System.Data.Linq.Design/System.Data.Linq.Design.sources 
2007-04-02 20:58:29 UTC (rev 75307)
@@ -0,0 +1,34 @@
+../../build/common/Consts.cs
+Assembly/AssemblyInfo.cs
+System.Data.Linq.Design/DbmlExtractorFactory.cs
+System.Data.Linq.Design/DbSchemaCodeGeneratorFactory.cs
+System.Data.Linq.Design/ExtractOptions.cs
+System.Data.Linq.Design/ExtractTypes.cs
+System.Data.Linq.Design/GenerateOptions.cs
+System.Data.Linq.Design/GeneratorFactoryOptions.cs
+System.Data.Linq.Design/IDatabaseExtractor.cs
+System.Data.Linq.Design/IMappingCodeGenerator.cs
+System.Data.Linq.Design/LanguageType.cs
+System.Data.Linq.Design/NodeId.cs
+System.Data.Linq.Design/NodeType.cs
+System.Data.Linq.Design/ResultFile.cs
+System.Data.Linq.Design/Severity.cs
+System.Data.Linq.Design/ValidationMessage.cs
+System.Data.Linq.Design.SchemaObjectModel/Database.cs
+System.Data.Linq.Design.SchemaObjectModel/DbAssociation.cs
+System.Data.Linq.Design.SchemaObjectModel/DbColumn.cs
+System.Data.Linq.Design.SchemaObjectModel/DbElement.cs
+System.Data.Linq.Design.SchemaObjectModel/DbFunction.cs
+System.Data.Linq.Design.SchemaObjectModel/DbIndex.cs
+System.Data.Linq.Design.SchemaObjectModel/DbKeyColumn.cs
+System.Data.Linq.Design.SchemaObjectModel/DbObject.cs
+System.Data.Linq.Design.SchemaObjectModel/DbParameter.cs
+System.Data.Linq.Design.SchemaObjectModel/DbPrimaryKey.cs
+System.Data.Linq.Design.SchemaObjectModel/DbRoutine.cs
+System.Data.Linq.Design.SchemaObjectModel/DbRowset.cs
+System.Data.Linq.Design.SchemaObjectModel/DbSchema.cs
+System.Data.Linq.Design.SchemaObjectModel/DbStoredProcedure.cs
+System.Data.Linq.Design.SchemaObjectModel/DbTable.cs
+System.Data.Linq.Design.SchemaObjectModel/DbType.cs
+System.Data.Linq.Design.SchemaObjectModel/DbView.cs
+System.Data.Linq.Design.SchemaObjectModel/RelationshipKind.cs
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to