Skip to content

Commit

Permalink
Infrastructure Preparation 26
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Dec 6, 2022
1 parent a4a5154 commit 9b94e5c
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 2,250 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>preview</AnalysisLevel>
Expand Down Expand Up @@ -85,10 +85,6 @@ Changes are detailed at https://github.com/Taiizor/Taiizor.Essentials.Blazor/rel
<PackageReference Include="Conforyon" Version="2.0.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.JSInterop" Version="5.0.17" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.JSInterop" Version="6.0.11" />
</ItemGroup>
Expand Down
16 changes: 14 additions & 2 deletions src/Taiizor.Essentials.Blazor/Extension/Interop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@ public class Interop

public Interop(IJSRuntime JSR)
{
_ = new Interop(JSR, Internal.JavascriptFiles, Internal.IncldueExecute);
HI.CheckRuntime(JSR);

JS = JSR;
}

public Interop(IJSRuntime JSR, Dictionary<JavascriptEnum, bool> Files)
{
_ = new Interop(JSR, Files, Internal.IncldueExecute);
HI.CheckRuntime(JSR);

JS = JSR;

foreach (KeyValuePair<JavascriptEnum, bool> File in Internal.JavascriptFiles)
{
if (!Files.ContainsKey(File.Key) || Files[File.Key])
{
_ = Call("eval", Javascript.File(File.Key));
}
}
}

public Interop(IJSRuntime JSR, Dictionary<JavascriptEnum, bool> Files, bool Execute)
Expand Down
88 changes: 0 additions & 88 deletions src/Taiizor.Essentials.Blazor/Resources/Raw/AppCenter.Blazor.js

This file was deleted.

Loading

0 comments on commit 9b94e5c

Please sign in to comment.