public override int GetHashCode() { var hashCode = 586867022; hashCode = hashCode * -1521134295 + base.GetHashCode(); hashCode = hashCode * -1521134295 + Direction.GetHashCode(); hashCode = hashCode * -1521134295 + IsSealed.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PropertyName); return(hashCode); }
public override int GetHashCode() { unchecked { var hashCode = Type != null?Type.GetHashCode() : 0; hashCode = (hashCode * 397) ^ IsAbstract.GetHashCode(); hashCode = (hashCode * 397) ^ IsSealed.GetHashCode(); hashCode = (hashCode * 397) ^ IsValueType.GetHashCode(); hashCode = (hashCode * 397) ^ IsEnum.GetHashCode(); return(hashCode); } }
private Tuple <Accessibility, IsSealed, IsAbstract> EmitModifiers(Type type) { Accessibility accessLevel = Accessibility.Private; // check if not default if (type.IsPublic) { accessLevel = Accessibility.Public; } else if (type.IsNestedPublic) { accessLevel = Accessibility.Public; } else if (type.IsNestedFamily) { accessLevel = Accessibility.Protected; } else if (type.IsNestedFamANDAssem) { accessLevel = Accessibility.ProtectedInternal; } IsSealed sealedEnum = IsSealed.NotSealed; if (type.IsSealed) { sealedEnum = IsSealed.Sealed; } IsAbstract abstractEnum = IsAbstract.NotAbstract; if (type.IsAbstract) { abstractEnum = IsAbstract.Abstract; } return(new Tuple <Accessibility, IsSealed, IsAbstract>(accessLevel, sealedEnum, abstractEnum)); }
/// <inheritdoc/> public override int GetHashCode() { return(IsInitialized.GetHashCode() ^ IsSealed.GetHashCode() ^ IsStandby.GetHashCode()); }