public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } if (!base.Equals(o)) { return(false); } EnumFieldSource that = (EnumFieldSource)o; // LUCENENET TODO: Make an EquatableDictionary so we can use Equatable.Wrap() here ? // LUCENENET specific: must use Collections.Equals() to ensure values // contained within the dictionaries are compared for equality if (!Collections.Equals(enumIntToStringMap, that.enumIntToStringMap)) { return(false); } if (!Collections.Equals(enumStringToIntMap, that.enumStringToIntMap)) { return(false); } if (!parser.Equals(that.parser)) { return(false); } return(true); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } if (!base.Equals(o)) { return(false); } EnumFieldSource that = (EnumFieldSource)o; // LUCENENET specific: must use DictionaryEqualityComparer.Equals() to ensure values // contained within the dictionaries are compared for equality if (!JCG.DictionaryEqualityComparer <int?, string> .Default.Equals(enumIntToStringMap, that.enumIntToStringMap)) { return(false); } if (!JCG.DictionaryEqualityComparer <string, int?> .Default.Equals(enumStringToIntMap, that.enumStringToIntMap)) { return(false); } if (!parser.Equals(that.parser)) { return(false); } return(true); }