public override int GetHashCode() { if (!IsID_ExtUsed) { return(_id.GetHashCode()); } return(_id.GetHashCode() ^ ID_Ext.GetHashCode()); }
public override bool Equals(object obj) { if (obj == null) { return(false); } var dataId = obj as IDataID; if (dataId == null) { return(false); } if (IsID_ExtUsed != dataId.IsID_ExtUsed) { if (_id.Equals(Guid.Empty) && dataId.Equals(Guid.Empty)) { if (IsID_ExtUsed) { if (ID_Ext.Equals(Guid.Empty)) { return(true); } } else { if (dataId.ID_Ext.Equals(Guid.Empty)) { return(true); } } } return(false); } if (!IsID_ExtUsed) { return(_id.Equals(dataId.ID)); } else { return((_id.Equals(dataId.ID)) && (ID_Ext.Equals(dataId.ID_Ext))); } }
public override string ToString() { return(ID.ToString() + "+" + ID_Ext.ToString()); }