Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JunTaoLuo committed Mar 10, 2016
1 parent 8dabab9 commit dcd2035
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Microsoft.AspNetCore.Hosting/WebHostBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,18 @@ private string ResolveApplicationBasePath(string applicationBasePath, string bas
{
if (_startup != null)
{
var startupAssemblyLocation = Path.GetDirectoryName(_startup.ConfigureDelegate.Target.GetType().GetTypeInfo().Assembly.Location);
if (startupAssemblyLocation != null) {
return startupAssemblyLocation;
var startupAssemblyLocation = _startup.ConfigureDelegate.Target.GetType().GetTypeInfo().Assembly.Location;
if (!string.IsNullOrEmpty(startupAssemblyLocation))
{
return Path.GetDirectoryName(startupAssemblyLocation);
}
}
else if (_startupType != null)
{
var startupAssemblyLocation = Path.GetDirectoryName(_startupType.GetTypeInfo().Assembly.Location);
if (startupAssemblyLocation != null) {
return startupAssemblyLocation;
var startupAssemblyLocation = _startupType.GetTypeInfo().Assembly.Location;
if (!string.IsNullOrEmpty(startupAssemblyLocation))
{
return Path.GetDirectoryName(startupAssemblyLocation);
}
}

Expand Down

0 comments on commit dcd2035

Please sign in to comment.