Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Silly null references
Browse files Browse the repository at this point in the history
  • Loading branch information
citizenmatt committed Nov 20, 2012
1 parent 5151f59 commit 16723b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/resharper-nuget/NuGetApi.cs
Expand Up @@ -58,9 +58,9 @@ private bool IsNuGetAvailable
get { return vsPackageInstallerServices != null && vsPackageInstaller != null; } get { return vsPackageInstallerServices != null && vsPackageInstaller != null; }
} }


public bool AreAnyAssemblyFilesNuGetPackages(IEnumerable<FileSystemPath> fileLocations) public bool AreAnyAssemblyFilesNuGetPackages(IList<FileSystemPath> fileLocations)
{ {
if (!IsNuGetAvailable) if (!IsNuGetAvailable || fileLocations.Count == 0)
return false; return false;


// We're talking to NuGet via COM. Make sure we're on the UI thread // We're talking to NuGet via COM. Make sure we're on the UI thread
Expand All @@ -73,9 +73,9 @@ public bool AreAnyAssemblyFilesNuGetPackages(IEnumerable<FileSystemPath> fileLoc
return hasPackageAssembly; return hasPackageAssembly;
} }


public string InstallNuGetPackageFromAssemblyFiles(IEnumerable<FileSystemPath> assemblyLocations, IProject project) public string InstallNuGetPackageFromAssemblyFiles(IList<FileSystemPath> assemblyLocations, IProject project)
{ {
if (!IsNuGetAvailable) if (!IsNuGetAvailable || assemblyLocations.Count == 0)
return null; return null;


string installedAssembly = null; string installedAssembly = null;
Expand Down
2 changes: 1 addition & 1 deletion src/resharper-nuget/NuGetModuleReferencer.cs
Expand Up @@ -82,7 +82,7 @@ private static IList<FileSystemPath> GetAllAssemblyLocations(IPsiModule psiModul
{ {
var projectModelAssembly = psiModule.ContainingProjectModule as IAssembly; var projectModelAssembly = psiModule.ContainingProjectModule as IAssembly;
if (projectModelAssembly == null) if (projectModelAssembly == null)
return null; return EmptyList<FileSystemPath>.InstanceList;


// ReSharper maintains a list of unique assemblies, and each assembly keeps a track of // ReSharper maintains a list of unique assemblies, and each assembly keeps a track of
// all of the file copies of itself that the solution knows about. This list of file // all of the file copies of itself that the solution knows about. This list of file
Expand Down

0 comments on commit 16723b7

Please sign in to comment.