Ejemplo n.º 1
0
        public void Fill(Database database, string connectionString)
        {
            //TODO XML_SCHEMA_NAMESPACE function not supported in Azure, is there a workaround?
            //not supported in azure yet
            if (database.Info.Version == DatabaseInfo.VersionTypeEnum.SQLServerAzure10) return;

            if (database.Options.Ignore.FilterXMLSchema)
            {
                root.RaiseOnReading(new ProgressEventArgs("Reading XML Schema...", Constants.READING_XMLSCHEMAS));
                using (SqlConnection conn = new SqlConnection(connectionString))
                {
                    using (SqlCommand command = new SqlCommand(GetSQLXMLSchema(), conn))
                    {
                        conn.Open();
                        command.CommandTimeout = 0;
                        using (SqlDataReader reader = command.ExecuteReader())
                        {
                            while (reader.Read())
                            {
                                root.RaiseOnReadingOne(reader["name"]);
                                XMLSchema item = new XMLSchema(database);
                                item.Id = (int)reader["ID"];
                                item.Name = reader["name"].ToString();
                                item.Owner = reader["owner"].ToString();
                                item.Text = reader["Text"].ToString();
                                database.XmlSchemas.Add(item);

                            }
                        }
                    }
                }
                if (database.Options.Ignore.FilterTable)
                    FillColumnsDependencies(database.XmlSchemas, connectionString);
            }
        }
Ejemplo n.º 2
0
        public void Fill(Database database, string connectionString)
        {
            if (database.Info.Version == DatabaseInfo.VersionNumber.SQLServer2000) return;
            if (database.Options.Ignore.FilterXMLSchema)
            {
                using (SqlConnection conn = new SqlConnection(connectionString))
                {
                    using (SqlCommand command = new SqlCommand(GetSQLXMLSchema(), conn))
                    {
                        conn.Open();
                        command.CommandTimeout = 0;
                        using (SqlDataReader reader = command.ExecuteReader())
                        {
                            while (reader.Read())
                            {
                                XMLSchema item = new XMLSchema(database);
                                item.Id = (int)reader["ID"];
                                item.Name = reader["name"].ToString();
                                item.Owner = reader["owner"].ToString();
                                item.Text = reader["Text"].ToString();
                                database.XmlSchemas.Add(item);
                                root.RaiseOnReading(new ProgressEventArgs("Reading XML Schema " + item.Name + "...", Constants.READING_XMLSCHEMAS));

                            }
                        }
                    }
                }
                if (database.Options.Ignore.FilterTable)
                    FillColumnsDependencies(database.XmlSchemas, connectionString);
            }
        }
Ejemplo n.º 3
0
 public bool Compare(XMLSchema obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("obj");
     }
     if (!this.Text.Equals(obj.Text))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Clona el objeto en una nueva instancia.
 /// </summary>
 public XMLSchema Clone(ISchemaBase parent)
 {
     XMLSchema item = new XMLSchema(parent);
     item.Text = this.Text;
     item.Status = this.Status;
     item.Name = this.Name;
     item.Id = this.Id;
     item.Owner = this.Owner;
     item.Guid = this.Guid;
     item.Dependencys = this.Dependencys;
     return item;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Clona el objeto en una nueva instancia.
        /// </summary>
        public XMLSchema Clone(ISchemaBase parent)
        {
            XMLSchema item = new XMLSchema(parent);

            item.Text        = this.Text;
            item.Status      = this.Status;
            item.Name        = this.Name;
            item.Id          = this.Id;
            item.Owner       = this.Owner;
            item.Guid        = this.Guid;
            item.Dependencys = this.Dependencys;
            return(item);
        }
Ejemplo n.º 6
0
 public bool Compare(XMLSchema obj)
 {
     if (obj == null) throw new ArgumentNullException("obj");
     if (!this.Text.Equals(obj.Text)) return false;
     return true;
 }