refactor: use null propagation operator

This commit is contained in:
Paul Pacheco 2019-04-14 07:58:53 -05:00
parent fea09a6b74
commit 2598389036

View File

@ -38,7 +38,7 @@ public void AddSearchDirectory(string directory)
public static string UnityEngineDLLDirectoryName()
{
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
return directoryName != null ? directoryName.Replace(@"file:\", "") : null;
return directoryName?.Replace(@"file:\", "");
}
public static ISymbolReaderProvider GetSymbolReaderProvider(string inputFile)