forked from rubberduck-vba/Rubberduck
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for prioritized project references (ref. rubberduck-vba…
- Loading branch information
1 parent
ad79a9d
commit 9508e47
Showing
7 changed files
with
101 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.Vbe.Interop; | ||
|
||
namespace Rubberduck.Parsing.VBA | ||
{ | ||
/// <summary> | ||
/// A <c>Dictionary</c> keyed with a <see cref="VBProject"/>'s ID and valued with an <see cref="int"/> representing a <see cref="Reference"/>'s priority for that project. | ||
/// </summary> | ||
public class ReferencePriorityMap : Dictionary<string, int> | ||
{ | ||
private readonly string _referenceId; | ||
|
||
public ReferencePriorityMap(string referenceId) | ||
{ | ||
_referenceId = referenceId; | ||
} | ||
|
||
public string ReferenceId | ||
{ | ||
get { return _referenceId; } | ||
} | ||
|
||
public bool IsLoaded { get; set; } | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
var other = obj as ReferencePriorityMap; | ||
if (other == null) return false; | ||
|
||
return other.ReferenceId == ReferenceId; | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
return _referenceId.GetHashCode(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters