Esempio n. 1
0
        protected override string StartAndGetRootUri()
        {
            if (_buildWebHostMethod == null)
            {
                // Use Blazor's dev host server
                var underlying = new DevHostServerFixture <TClientProgram>();
                underlying.PathBase = "/subdir";
                _serverToDispose    = underlying;
                var uri = underlying.RootUri.AbsoluteUri; // As a side-effect, this starts the server

                Host = underlying.Host;

                return(uri);
            }
            else
            {
                // Use specified ASP.NET host server
                var underlying = new AspNetSiteServerFixture();
                underlying.AdditionalArguments.AddRange(AspNetFixtureAdditionalArguments);
                underlying.BuildWebHostMethod = _buildWebHostMethod;
                _serverToDispose = underlying;
                var uri = underlying.RootUri.AbsoluteUri; // As a side-effect, this starts the server

                Host = underlying.Host;

                return(uri);
            }
        }
 protected override string StartAndGetRootUri()
 {
     if (_buildWebHostMethod == null)
     {
         // Use Blazor's dev host server
         var underlying = new DevHostServerFixture <TClientProgram>();
         underlying.PathBase = PathBase;
         _serverToDispose    = underlying;
         return(underlying.RootUri.AbsoluteUri);
     }
     else
     {
         // Use specified ASP.NET host server
         var underlying = new AspNetSiteServerFixture();
         underlying.BuildWebHostMethod = _buildWebHostMethod;
         _serverToDispose = underlying;
         return(underlying.RootUri.AbsoluteUri);
     }
 }