/// <summary> /// This is only called if the spans for the tags were the same. However, even if we /// have the same span as the previous tag (taking into account span mapping) that /// doesn't mean we can use the old block tag. Specifically, the editor will look at /// other fields in the tags So we need to make sure that these values have not changed /// if we want to reuse the old block tag. For example, perhaps the item's type changed /// (i.e. from class to struct). It will have the same span, but might have a new /// presentation as the 'Type' will be different. /// </summary> public bool Equals(RoslynBlockTag tag) { return(tag != null && this.Level == tag.Level && this.Type == tag.Type && EqualityComparer <object> .Default.Equals(this.CollapsedForm, tag.CollapsedForm) && this.StatementSpan == tag.StatementSpan && this.Span == tag.Span); }
/// <summary> /// This is only called if the spans for the tags were the same. However, even if we /// have the same span as the previous tag (taking into account span mapping) that /// doesn't mean we can use the old block tag. Specifically, the editor will look at /// other fields in the tags So we need to make sure that these values have not changed /// if we want to reuse the old block tag. For example, perhaps the item's type changed /// (i.e. from class to struct). It will have the same span, but might have a new /// presentation as the 'Type' will be different. /// </summary> public bool Equals(RoslynBlockTag tag) { return(_state.Equals(tag._state) && IsCollapsible == tag.IsCollapsible && Level == tag.Level && Type == tag.Type && StatementSpan == tag.StatementSpan && Span == tag.Span); }
/// <summary> /// This is only called if the spans for the tags were the same. However, even if we /// have the same span as the previous tag (taking into account span mapping) that /// doesn't mean we can use the old block tag. Specifically, the editor will look at /// other fields in the tags So we need to make sure that these values have not changed /// if we want to reuse the old block tag. For example, perhaps the item's type changed /// (i.e. from class to struct). It will have the same span, but might have a new /// presentation as the 'Type' will be different. /// </summary> public bool Equals(RoslynBlockTag tag) { return _state.Equals(tag._state) && IsCollapsible == tag.IsCollapsible && Level == tag.Level && Type == tag.Type && StatementSpan == tag.StatementSpan && Span == tag.Span; }