Skip to content

Commit 75e4788

Browse files
committed
Revert partial Guid change I missed earlier...
1 parent fbc3345 commit 75e4788

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

Rubberduck.VBEEditor/QualifiedModuleName.cs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ namespace Rubberduck.VBEditor
1010
/// </summary>
1111
public struct QualifiedModuleName
1212
{
13-
public static Guid GetProjectId(IVBProject project)
13+
public static string GetProjectId(IVBProject project)
1414
{
1515
if (project.IsWrappingNullReference)
1616
{
17-
return Guid.Empty;
17+
return string.Empty;
1818
}
1919

2020
if (string.IsNullOrEmpty(project.HelpFile))
2121
{
22-
project.HelpFile = GetGuidFromHashCode(project.GetHashCode()).ToString();
22+
project.HelpFile = project.GetHashCode().ToString();
2323
}
2424

25-
return new Guid(project.HelpFile);
25+
return project.HelpFile;
2626
}
2727

28-
public static Guid GetProjectId(IReference reference)
28+
public static string GetProjectId(IReference reference)
2929
{
3030
var projectName = reference.Name;
3131
return new QualifiedModuleName(projectName, reference.FullPath, projectName).ProjectId;
@@ -90,7 +90,7 @@ public QualifiedModuleName(string projectName, string projectPath, string compon
9090
_projectName = projectName;
9191
_projectDisplayName = null;
9292
_projectPath = projectPath;
93-
_projectId = GetGuidFromHashCode(string.Format("{0};{1}", _projectName, _projectPath).GetHashCode());
93+
_projectId = string.Format("{0};{1}", _projectName, _projectPath).GetHashCode().ToString();
9494
_componentName = componentName;
9595
_component = null;
9696
_componentType = ComponentType.ComComponent;
@@ -114,14 +114,14 @@ public QualifiedMemberName QualifyMemberName(string member)
114114
private readonly int _contentHashCode;
115115
public int ContentHashCode { get { return _contentHashCode; } }
116116

117-
private readonly Guid _projectId;
118-
public Guid ProjectId { get { return _projectId; } }
117+
private readonly string _projectId;
118+
public string ProjectId { get { return _projectId; } }
119119

120120
private readonly string _componentName;
121121
public string ComponentName { get { return _componentName ?? string.Empty; } }
122122

123123
public string Name { get { return ToString(); } }
124-
124+
125125
private readonly string _projectName;
126126
public string ProjectName { get { return _projectName; } }
127127

@@ -209,12 +209,5 @@ public override bool Equals(object obj)
209209
{
210210
return !a.Equals(b);
211211
}
212-
213-
// Start all project IDs with the Rubberduck GUID as defined in AssemblyInfo.cs, add hashcode as last 12 bytes.
214-
private const string ProjectGuidFormat = "E07C841C-14B4-4890-83E9-{0}";
215-
public static Guid GetGuidFromHashCode(int hash)
216-
{
217-
return new Guid(string.Format(ProjectGuidFormat, hash.ToString("X12")));
218-
}
219212
}
220213
}

0 commit comments

Comments
 (0)