C#: Fix label conflicts.

C#: Remove unnecessary code from Property.
This commit is contained in:
calum
2018-12-18 11:34:56 +00:00
parent a7cdf528dd
commit 88734f1f8a
13 changed files with 70 additions and 67 deletions

View File

@@ -69,8 +69,8 @@ namespace Semmle.Extraction.Entities
get
{
return assemblyPath == null
? new Key(assembly, ";assembly")
: new Key(assembly, "#file:///", assemblyPath.Replace("\\", "/"), ";assembly");
? new Key(assembly, ";sourcefile")
: new Key(assembly, "#file:///", assemblyPath.Replace("\\", "/"), ";sourcefile");
}
}
}

View File

@@ -2,7 +2,7 @@ using System.IO;
namespace Semmle.Extraction.Entities
{
class Folder : CachedEntity<DirectoryInfo>
sealed class Folder : CachedEntity<DirectoryInfo>
{
Folder(Context cx, DirectoryInfo init)
: base(cx, init)
@@ -51,5 +51,12 @@ namespace Semmle.Extraction.Entities
}
public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
public override int GetHashCode() => Path.GetHashCode();
public override bool Equals(object obj)
{
return obj is Folder folder && folder.Path == Path;
}
}
}