private void PopulateSchema(IDataSourceSchema schema)
 {
     if (schema != null)
     {
         IDictionary             duplicates = new Hashtable();
         IDataSourceViewSchema[] views      = schema.GetViews();
         if (views != null)
         {
             for (int i = 0; i < views.Length; i++)
             {
                 this.PopulateSchemaRecursive(this._schemaTreeView.Nodes, views[i], 0, duplicates);
             }
         }
     }
 }
 public static bool SchemasEquivalent(IDataSourceSchema schema1, IDataSourceSchema schema2)
 {
     if ((schema1 == null) ^ (schema2 == null))
     {
         return(false);
     }
     if ((schema1 != null) || (schema2 != null))
     {
         IDataSourceViewSchema[] views        = schema1.GetViews();
         IDataSourceViewSchema[] schemaArray2 = schema2.GetViews();
         if ((views == null) ^ (schemaArray2 == null))
         {
             return(false);
         }
         if ((views == null) && (schemaArray2 == null))
         {
             return(true);
         }
         int length = views.Length;
         int num2   = schemaArray2.Length;
         if (length != num2)
         {
             return(false);
         }
         foreach (IDataSourceViewSchema schema in views)
         {
             bool   flag = false;
             string name = schema.Name;
             foreach (IDataSourceViewSchema schema3 in schemaArray2)
             {
                 if ((name == schema3.Name) && ViewSchemasEquivalent(schema, schema3))
                 {
                     flag = true;
                     break;
                 }
             }
             if (!flag)
             {
                 return(false);
             }
         }
     }
     return(true);
 }
 public static bool SchemasEquivalent(IDataSourceSchema schema1, IDataSourceSchema schema2)
 {
     if ((schema1 == null) ^ (schema2 == null))
     {
         return false;
     }
     if ((schema1 != null) || (schema2 != null))
     {
         IDataSourceViewSchema[] views = schema1.GetViews();
         IDataSourceViewSchema[] schemaArray2 = schema2.GetViews();
         if ((views == null) ^ (schemaArray2 == null))
         {
             return false;
         }
         if ((views == null) && (schemaArray2 == null))
         {
             return true;
         }
         int length = views.Length;
         int num2 = schemaArray2.Length;
         if (length != num2)
         {
             return false;
         }
         foreach (IDataSourceViewSchema schema in views)
         {
             bool flag = false;
             string name = schema.Name;
             foreach (IDataSourceViewSchema schema3 in schemaArray2)
             {
                 if ((name == schema3.Name) && ViewSchemasEquivalent(schema, schema3))
                 {
                     flag = true;
                     break;
                 }
             }
             if (!flag)
             {
                 return false;
             }
         }
     }
     return true;
 }
 private void PopulateSchema(IDataSourceSchema schema)
 {
     if (schema != null)
     {
         IDictionary duplicates = new Hashtable();
         IDataSourceViewSchema[] views = schema.GetViews();
         if (views != null)
         {
             for (int i = 0; i < views.Length; i++)
             {
                 this.PopulateSchemaRecursive(this._schemaTreeView.Nodes, views[i], 0, duplicates);
             }
         }
     }
 }