Skip to content

Commit c6e0874

Browse files
author
Mackinnon Buck
committed
Some cleanup
1 parent eaa7bd3 commit c6e0874

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

src/Components/WebView/WebView/src/Microsoft.AspNetCore.Components.WebView.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@
7272

7373
<Target Name="_AddEmbeddedBlazorWebView" BeforeTargets="_CalculateEmbeddedFilesManifestInputs" DependsOnTargets="_CheckBlazorWebViewJSPath">
7474
<ItemGroup>
75-
<!--<EmbeddedResource Include="blazor.modules.json" LogicalName="_framework/blazor.modules.json" />-->
76-
<!--<EmbeddedResource Include="$(BlazorWebViewJSFile)" LogicalName="_framework/$(BlazorWebViewJSFilename)" />
77-
<EmbeddedResource Include="$(BlazorWebViewJSFile).map" LogicalName="_framework/$(BlazorWebViewJSFilename).map" Condition="Exists('$(BlazorWebViewJSFile).map')" />-->
7875
<Content Include="$(BlazorWebViewJSFile)" Pack="true" PackagePath="staticwebassets/$(BlazorWebViewJSFilename)" />
7976
<Content Include="blazor.modules.json" Pack="true" PackagePath="staticwebassets/blazor.modules.json" />
8077
</ItemGroup>

src/Components/WebView/WebView/src/StaticContentProvider.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ internal sealed class StaticContentProvider
1212
private readonly Uri _appBaseUri;
1313
private readonly string _hostPageRelativePath;
1414
private static readonly FileExtensionContentTypeProvider ContentTypeProvider = new();
15-
//private static readonly ManifestEmbeddedFileProvider _manifestProvider =
16-
// new ManifestEmbeddedFileProvider(typeof(StaticContentProvider).Assembly);
1715

1816
public StaticContentProvider(IFileProvider fileProvider, Uri appBaseUri, string hostPageRelativePath)
1917
{
@@ -35,7 +33,6 @@ public bool TryGetResponseContent(string requestUri, bool allowFallbackOnHostPag
3533
string contentType;
3634
var found = TryGetFromFileProvider(relativePath, out content, out contentType)
3735
|| (allowFallbackOnHostPage && TryGetFromFileProvider(_hostPageRelativePath, out content, out contentType));
38-
//|| TryGetFrameworkFile(relativePath, out content, out contentType);
3936

4037
if (found)
4138
{
@@ -83,23 +80,6 @@ private bool TryGetFromFileProvider(string relativePath, out Stream content, out
8380
return false;
8481
}
8582

86-
//private static bool TryGetFrameworkFile(string relativePath, out Stream content, out string contentType)
87-
//{
88-
// // We're not trying to simulate everything a real webserver does. We don't need to
89-
// // support querystring parameters, for example. It's enough to require an exact match.
90-
// var file = _manifestProvider.GetFileInfo(relativePath);
91-
// if (file.Exists)
92-
// {
93-
// content = file.CreateReadStream();
94-
// contentType = GetResponseContentTypeOrDefault(relativePath);
95-
// return true;
96-
// }
97-
98-
// content = default;
99-
// contentType = default;
100-
// return false;
101-
//}
102-
10383
private static string GetResponseContentTypeOrDefault(string path)
10484
=> ContentTypeProvider.TryGetContentType(path, out var matchedContentType)
10585
? matchedContentType

src/Components/WebView/WebView/src/build/Microsoft.AspNetCore.Components.WebView.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PropertyGroup>
1515
<_WebViewAssetsBasePath Condition="'$(_WebViewAssetsBasePath)' == ''">$(MSBuildThisFileDirectory)..\staticwebassets\</_WebViewAssetsBasePath>
1616
<_BlazorModulesFilePath Condition="'$(_WebViewAssetsBasePath)' == ''">$(MSBuildThisFileDirectory)..\staticwebassets\blazor.modules.json</_BlazorModulesFilePath>
17-
</PropertyGroup>
17+
</PropertyGroup>
1818
<ItemGroup>
1919
<_WebViewAssetCandidates Include="$(_WebViewAssetsBasePath)blazor.webview.js">
2020
<RelativePath>_framework/blazor.webview.js</RelativePath>

0 commit comments

Comments
 (0)