This repository has been archived by the owner on Apr 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Following CR feedback, reintroduce ISpaBuilder concept
- Loading branch information
1 parent
29e97bf
commit 87eb919
Showing
12 changed files
with
111 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/Microsoft.AspNetCore.SpaServices.Extensions/DefaultSpaBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.AspNetCore.Builder; | ||
|
||
namespace Microsoft.AspNetCore.SpaServices | ||
{ | ||
internal class DefaultSpaBuilder : ISpaBuilder | ||
{ | ||
public IApplicationBuilder ApplicationBuilder { get; } | ||
|
||
public SpaOptions Options { get; } | ||
|
||
public DefaultSpaBuilder(IApplicationBuilder applicationBuilder, string sourcePath, string urlPrefix) | ||
{ | ||
ApplicationBuilder = applicationBuilder | ||
?? throw new System.ArgumentNullException(nameof(applicationBuilder)); | ||
|
||
Options = new SpaOptions(sourcePath, urlPrefix); | ||
} | ||
} | ||
} |
51 changes: 0 additions & 51 deletions
51
src/Microsoft.AspNetCore.SpaServices.Extensions/DefaultSpaOptions.cs
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
src/Microsoft.AspNetCore.SpaServices.Extensions/ISpaBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.AspNetCore.Builder; | ||
|
||
namespace Microsoft.AspNetCore.SpaServices | ||
{ | ||
/// <summary> | ||
/// Defines a class that provides mechanisms for configuring the hosting | ||
/// of a Single Page Application (SPA) and attaching middleware. | ||
/// </summary> | ||
public interface ISpaBuilder | ||
{ | ||
/// <summary> | ||
/// The <see cref="IApplicationBuilder"/> representing the middleware pipeline | ||
/// in which the SPA is being hosted. | ||
/// </summary> | ||
IApplicationBuilder ApplicationBuilder { get; } | ||
|
||
/// <summary> | ||
/// Describes configuration options for hosting a SPA. | ||
/// </summary> | ||
SpaOptions Options { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.