예제 #1
0
 public ConflictLocationInfo(RelatedLocation location)
 {
     Debug.Assert(location.ComplexifiedTargetSpan.Contains(location.ConflictCheckSpan) || location.Type == RelatedLocationType.UnresolvableConflict);
     this.ComplexifiedSpan       = location.ComplexifiedTargetSpan;
     this.DocumentId             = location.DocumentId;
     this.OriginalIdentifierSpan = location.ConflictCheckSpan;
 }
예제 #2
0
 public ConflictLocationInfo(RelatedLocation location)
 {
     Debug.Assert(location.ComplexifiedTargetSpan.Contains(location.ConflictCheckSpan) || location.Type == RelatedLocationType.UnresolvableConflict);
     this.ComplexifiedSpan = location.ComplexifiedTargetSpan;
     this.DocumentId = location.DocumentId;
     this.OriginalIdentifierSpan = location.ConflictCheckSpan;
 }
예제 #3
0
        internal void AddOrReplaceRelatedLocation(RelatedLocation location)
        {
            var existingRelatedLocation = _relatedLocations.Where(rl => rl.ConflictCheckSpan == location.ConflictCheckSpan && rl.DocumentId == location.DocumentId).FirstOrDefault();

            if (existingRelatedLocation != null)
            {
                _relatedLocations.Remove(existingRelatedLocation);
            }

            AddRelatedLocation(location);
        }
 private static InlineRenameReplacementKind GetReplacementKind(RelatedLocation location)
 {
     switch (location.Type)
     {
         case RelatedLocationType.NoConflict:
             return InlineRenameReplacementKind.NoConflict;
         case RelatedLocationType.ResolvedReferenceConflict:
             return InlineRenameReplacementKind.ResolvedReferenceConflict;
         case RelatedLocationType.ResolvedNonReferenceConflict:
             return InlineRenameReplacementKind.ResolvedNonReferenceConflict;
         case RelatedLocationType.UnresolvableConflict:
         case RelatedLocationType.UnresolvedConflict:
             return InlineRenameReplacementKind.UnresolvedConflict;
         default:
         case RelatedLocationType.PossibilyResolvableConflict:
             throw ExceptionUtilities.Unreachable;
     }
 }
예제 #5
0
        internal void AddOrReplaceRelatedLocation(RelatedLocation location)
        {
            var existingRelatedLocation = _relatedLocations.Where(rl => rl.ConflictCheckSpan == location.ConflictCheckSpan && rl.DocumentId == location.DocumentId).FirstOrDefault();
            if (existingRelatedLocation != null)
            {
                _relatedLocations.Remove(existingRelatedLocation);
            }

            AddRelatedLocation(location);
        }
예제 #6
0
 internal void AddRelatedLocation(RelatedLocation location)
 {
     _relatedLocations.Add(location);
 }
예제 #7
0
 internal void AddRelatedLocation(RelatedLocation location)
 {
     _relatedLocations.Add(location);
 }
 internal InlineRenameReplacement(RelatedLocation location, TextSpan newSpan)
     : this(GetReplacementKind(location), location.ConflictCheckSpan, newSpan)
 {
 }