Source/NFX/DataAccess/CRUD/Schema.cs
/// <summary>
/// Performs logical equivalence testing of two schemas
/// </summary>
Performs logical equivalence testing of two schemas
Performs logical equivalence testing of two schemas
public bool IsEquivalentTo(Schema other, bool compareNames = true)
            {
                if (other==null) return false;
                if (object.ReferenceEquals(this, other)) return true;
                if (compareNames)
                 if (!Name.EqualsIgnoreCase(other.Name)) return false;
                if (this.m_TableAttrs.Count != other.m_TableAttrs.Count ||
                    this.m_FieldDefs.Count != other.m_FieldDefs.Count) return false;
                var cnt = this.m_TableAttrs.Count;
                for(var i=0; i<cnt; i++)
                  if (!this.m_TableAttrs[i].Equals(other.m_TableAttrs[i])) return false;
                cnt = this.m_FieldDefs.Count;
                for(var i=0; i<cnt; i++)
                  if (!this.m_FieldDefs[i].Equals(other.m_FieldDefs[i])) return false;
                return true;
            }
public bool IsEquivalentTo ( Schema other , bool compareNames = true ) { if ( other == null ) return false ; if ( object . ReferenceEquals ( this , other ) ) return true ; if ( compareNames ) if ( ! Name . EqualsIgnoreCase ( other . Name ) ) return false ; if ( this . m_TableAttrs . Count != other . m_TableAttrs . Count || this . m_FieldDefs . Count != other . m_FieldDefs . Count ) return false ; var cnt = this . m_TableAttrs . Count ; for ( var i = 0 ; i < cnt ; i ++ ) if ( ! this . m_TableAttrs [ i ] . Equals ( other . m_TableAttrs [ i ] ) ) return false ; cnt = this . m_FieldDefs . Count ; for ( var i = 0 ; i < cnt ; i ++ ) if ( ! this . m_FieldDefs [ i ] . Equals ( other . m_FieldDefs [ i ] ) ) return false ; return true ; }
Performs logical equivalence testing of two schemas
Performs logical equivalence testing of two schemas
other
Schema
compareNames
bool