You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@ -389,31 +389,31 @@ namespace System.Xml.Schema {
|
||||
// extract its primitive value to calculate hashcode
|
||||
// decimal is handled differently to enable among different CLR types
|
||||
this.ks[i].SetDecimal();
|
||||
if (this.ks[i].IsDecimal) {
|
||||
for (int j = 0 ; j < this.ks[i].Dim ; j ++) {
|
||||
hashcode += this.ks[i].Dvalue[j].GetHashCode();
|
||||
}
|
||||
}
|
||||
//
|
||||
else {
|
||||
Array arr = this.ks[i].Value as System.Array;
|
||||
if (arr != null) {
|
||||
XmlAtomicValue[] atomicValues = arr as XmlAtomicValue[];
|
||||
if (atomicValues != null) {
|
||||
for (int j = 0 ; j < atomicValues.Length ; j ++) {
|
||||
hashcode += ((XmlAtomicValue)atomicValues.GetValue(j)).TypedValue.GetHashCode();
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int j = 0 ; j < ((Array) this.ks[i].Value).Length ; j ++) {
|
||||
hashcode += ((Array) this.ks[i].Value).GetValue(j).GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
else { //not a list
|
||||
hashcode += this.ks[i].Value.GetHashCode();
|
||||
}
|
||||
}
|
||||
if (this.ks[i].IsDecimal) {
|
||||
for (int j = 0 ; j < this.ks[i].Dim ; j ++) {
|
||||
hashcode += this.ks[i].Dvalue[j].GetHashCode();
|
||||
}
|
||||
}
|
||||
//
|
||||
else {
|
||||
Array arr = this.ks[i].Value as System.Array;
|
||||
if (arr != null) {
|
||||
XmlAtomicValue[] atomicValues = arr as XmlAtomicValue[];
|
||||
if (atomicValues != null) {
|
||||
for (int j = 0 ; j < atomicValues.Length ; j ++) {
|
||||
hashcode += ((XmlAtomicValue)atomicValues.GetValue(j)).TypedValue.GetHashCode();
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int j = 0 ; j < ((Array) this.ks[i].Value).Length ; j ++) {
|
||||
hashcode += ((Array) this.ks[i].Value).GetValue(j).GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
else { //not a list
|
||||
hashcode += this.ks[i].Value.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
@ -422,23 +422,23 @@ namespace System.Xml.Schema {
|
||||
public override bool Equals(object other) {
|
||||
// each key sequence member can have different type
|
||||
KeySequence keySequence = (KeySequence)other;
|
||||
for (int i = 0; i < this.ks.Length; i ++) {
|
||||
if (! this.ks[i].Equals (keySequence.ks[i])) {
|
||||
for (int i = 0; i < this.ks.Length; i++) {
|
||||
if (!this.ks[i].Equals(keySequence.ks[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(this.ks[0].ToString());
|
||||
for (int i = 1; i < this.ks.Length; i ++) {
|
||||
for (int i = 1; i < this.ks.Length; i++) {
|
||||
sb.Append(" ");
|
||||
sb.Append(this.ks[i].ToString());
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user