mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Fix label conflicts.
C#: Remove unnecessary code from Property.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user