using System; using System.Collections.Generic; using System.Text; namespace sharpcomparer { public class View : Table { private string checkOption; private string isUpdatable; public string CheckOption { get { return checkOption; } set { checkOption = value; } } public string IsUpdatable { get { return isUpdatable; } set { isUpdatable = value; } } public View(string tableCatalog, string tableSchema, string tableName, string checkOption, string isUpdatable) : base(tableCatalog, tableSchema, tableName, "VIEW") { this.checkOption = checkOption; this.isUpdatable = isUpdatable; } public static bool operator ==(View a, View b) { if (System.Object.ReferenceEquals(a, b)) { return true; } if (((object)a == null) || ((object)b == null)) { return false; } if ( !(a.TableSchema == b.TableSchema && a.TableName == b.TableName && a.checkOption == b.checkOption && a.isUpdatable == b.isUpdatable) ) { return false; } foreach (ColumnComparison comparison in ColumnComparison.Compare(a.Columns, b.Columns)) { if (comparison.Difference != ColumnComparison.ComparisonDifference.None) { return false; } } return true; } public static bool operator !=(View a, View b) { return !(a == b); } } }