/// <summary> /// Check whether two Property sets are equal /// </summary> /// <param name="other">property to compare</param> /// <returns></returns> public override bool Equals(object other) { if (other == null) { return(false); } if (this.GetType() != other.GetType()) { return(false); } TypographyProperties genericOther = (TypographyProperties)other; return //This will cover all boolean properties (_idPropertySetFlags == genericOther._idPropertySetFlags && //And this will cover the rest _variant == genericOther._variant && _capitals == genericOther._capitals && _fraction == genericOther._fraction && _numeralStyle == genericOther._numeralStyle && _numeralAlignment == genericOther._numeralAlignment && _eastAsianWidths == genericOther._eastAsianWidths && _eastAsianLanguage == genericOther._eastAsianLanguage && _standardSwashes == genericOther._standardSwashes && _contextualSwashes == genericOther._contextualSwashes && _stylisticAlternates == genericOther._stylisticAlternates && _annotationAlternates == genericOther._annotationAlternates); }
// Token: 0x06006704 RID: 26372 RVA: 0x001CD394 File Offset: 0x001CB594 public override bool Equals(object other) { if (other == null) { return(false); } if (base.GetType() != other.GetType()) { return(false); } TypographyProperties typographyProperties = (TypographyProperties)other; return(this._idPropertySetFlags == typographyProperties._idPropertySetFlags && this._variant == typographyProperties._variant && this._capitals == typographyProperties._capitals && this._fraction == typographyProperties._fraction && this._numeralStyle == typographyProperties._numeralStyle && this._numeralAlignment == typographyProperties._numeralAlignment && this._eastAsianWidths == typographyProperties._eastAsianWidths && this._eastAsianLanguage == typographyProperties._eastAsianLanguage && this._standardSwashes == typographyProperties._standardSwashes && this._contextualSwashes == typographyProperties._contextualSwashes && this._stylisticAlternates == typographyProperties._stylisticAlternates && this._annotationAlternates == typographyProperties._annotationAlternates); }
//------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal static TypographyProperties GetTypographyProperties(DependencyObject element) { TypographyProperties group = new TypographyProperties(); group.SetStandardLigatures((bool) element.GetValue(Typography.StandardLigaturesProperty)); group.SetContextualLigatures((bool) element.GetValue(Typography.ContextualLigaturesProperty)); group.SetDiscretionaryLigatures((bool) element.GetValue(Typography.DiscretionaryLigaturesProperty)); group.SetHistoricalLigatures((bool) element.GetValue(Typography.HistoricalLigaturesProperty)); group.SetAnnotationAlternates((int) element.GetValue(Typography.AnnotationAlternatesProperty)); group.SetContextualAlternates((bool) element.GetValue(Typography.ContextualAlternatesProperty)); group.SetHistoricalForms((bool) element.GetValue(Typography.HistoricalFormsProperty)); group.SetKerning((bool) element.GetValue(Typography.KerningProperty)); group.SetCapitalSpacing((bool) element.GetValue(Typography.CapitalSpacingProperty)); group.SetCaseSensitiveForms((bool) element.GetValue(Typography.CaseSensitiveFormsProperty)); group.SetStylisticSet1((bool) element.GetValue(Typography.StylisticSet1Property)); group.SetStylisticSet2((bool) element.GetValue(Typography.StylisticSet2Property)); group.SetStylisticSet3((bool) element.GetValue(Typography.StylisticSet3Property)); group.SetStylisticSet4((bool) element.GetValue(Typography.StylisticSet4Property)); group.SetStylisticSet5((bool) element.GetValue(Typography.StylisticSet5Property)); group.SetStylisticSet6((bool) element.GetValue(Typography.StylisticSet6Property)); group.SetStylisticSet7((bool) element.GetValue(Typography.StylisticSet7Property)); group.SetStylisticSet8((bool) element.GetValue(Typography.StylisticSet8Property)); group.SetStylisticSet9((bool) element.GetValue(Typography.StylisticSet9Property)); group.SetStylisticSet10((bool) element.GetValue(Typography.StylisticSet10Property)); group.SetStylisticSet11((bool) element.GetValue(Typography.StylisticSet11Property)); group.SetStylisticSet12((bool) element.GetValue(Typography.StylisticSet12Property)); group.SetStylisticSet13((bool) element.GetValue(Typography.StylisticSet13Property)); group.SetStylisticSet14((bool) element.GetValue(Typography.StylisticSet14Property)); group.SetStylisticSet15((bool) element.GetValue(Typography.StylisticSet15Property)); group.SetStylisticSet16((bool) element.GetValue(Typography.StylisticSet16Property)); group.SetStylisticSet17((bool) element.GetValue(Typography.StylisticSet17Property)); group.SetStylisticSet18((bool) element.GetValue(Typography.StylisticSet18Property)); group.SetStylisticSet19((bool) element.GetValue(Typography.StylisticSet19Property)); group.SetStylisticSet20((bool) element.GetValue(Typography.StylisticSet20Property)); group.SetFraction((FontFraction) element.GetValue(Typography.FractionProperty)); group.SetSlashedZero((bool) element.GetValue(Typography.SlashedZeroProperty)); group.SetMathematicalGreek((bool) element.GetValue(Typography.MathematicalGreekProperty)); group.SetEastAsianExpertForms((bool) element.GetValue(Typography.EastAsianExpertFormsProperty)); group.SetVariants((FontVariants) element.GetValue(Typography.VariantsProperty)); group.SetCapitals((FontCapitals) element.GetValue(Typography.CapitalsProperty)); group.SetNumeralStyle((FontNumeralStyle) element.GetValue(Typography.NumeralStyleProperty)); group.SetNumeralAlignment((FontNumeralAlignment) element.GetValue(Typography.NumeralAlignmentProperty)); group.SetEastAsianWidths((FontEastAsianWidths) element.GetValue(Typography.EastAsianWidthsProperty)); group.SetEastAsianLanguage((FontEastAsianLanguage) element.GetValue(Typography.EastAsianLanguageProperty)); group.SetStandardSwashes((int) element.GetValue(Typography.StandardSwashesProperty)); group.SetContextualSwashes((int) element.GetValue(Typography.ContextualSwashesProperty)); group.SetStylisticAlternates((int) element.GetValue(Typography.StylisticAlternatesProperty)); return group; }