skyslide22
skyslide22
CC#
Created by skyslide22 on 3/14/2024 in #help
✅ anyone problems with c# devkit?
the updates to c# and c# devkit from 13th march are fucked up, downgrade to prev month fixed the issue
5 replies
CC#
Created by skyslide22 on 12/11/2023 in #help
Net8 Blazor onclick="js()" Not Working
nvm found fix
<script src="_framework/blazor.web.js" autostart="false"></script>
<script>
Blazor.start({
ssr: { disableDomPreservation: true }
});
</script>
<script src="_framework/blazor.web.js" autostart="false"></script>
<script>
Blazor.start({
ssr: { disableDomPreservation: true }
});
</script>
5 replies
CC#
Created by skyslide22 on 12/11/2023 in #help
Net8 Blazor onclick="js()" Not Working
this is the page header
@page "/"
@attribute [StreamRendering(false)]
<PageTitle>Home</PageTitle>
@page "/"
@attribute [StreamRendering(false)]
<PageTitle>Home</PageTitle>
5 replies
CC#
Created by skyslide22 on 12/11/2023 in #help
Net8 Blazor onclick="js()" Not Working
that does not fix it
5 replies
CC#
Created by skyslide22 on 12/7/2023 in #help
Maui + WebView - FULL Transparent App - Is It Possible?
i cant find that either
7 replies
CC#
Created by skyslide22 on 12/7/2023 in #help
Maui + WebView - FULL Transparent App - Is It Possible?
thanks
7 replies
CC#
Created by skyslide22 on 12/7/2023 in #help
Maui + WebView - FULL Transparent App - Is It Possible?
ok then i will serch for another framework if its not supported in the core yet
7 replies
CC#
Created by skyslide22 on 10/25/2023 in #help
✅ How to register a onNavigate/navigation event callback in Net8 SSR?
fixed:
window.Blazor.addEventListener("enhancedload", initMyStuff)

initMyStuff();

function initMyStuff() {
const blabla = document.querySelectorAll(".mythings");
// do what you want ...
}
window.Blazor.addEventListener("enhancedload", initMyStuff)

initMyStuff();

function initMyStuff() {
const blabla = document.querySelectorAll(".mythings");
// do what you want ...
}
2 replies
CC#
Created by skyslide22 on 8/10/2023 in #help
✅ .csproj – how to generate nodes dynamically by iterating over a string array ?
chatgpt has done it...
<ItemGroup>
<None Include="
Utils\**\*.*;
Settings\**\*.*;
Extensions\**\*.*;
Components\**\*;
Templates\**\*;
">
<Link>@(NoneWithFolders->'%(RecursiveDir)%(Filename)%(Extension)')</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="
Utils\**\*.*;
Settings\**\*.*;
Extensions\**\*.*;
Components\**\*;
Templates\**\*;
">
<Link>@(NoneWithFolders->'%(RecursiveDir)%(Filename)%(Extension)')</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
4 replies
CC#
Created by skyslide22 on 8/10/2023 in #help
✅ .csproj – how to generate nodes dynamically by iterating over a string array ?
<ItemGroup>
<None Include="
Utils\**\*.*;
Settings\**\*.*;
Extensions\**\*.*;
Components\**\*;
Templates\**\*;
">
<Link>%(RecursiveDir)/%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="
Utils\**\*.*;
Settings\**\*.*;
Extensions\**\*.*;
Components\**\*;
Templates\**\*;
">
<Link>%(RecursiveDir)/%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
is actually doing what i want, but it puts the files/folders in the root of the project, i want to have them in their parent folder such as Utils, Settings
4 replies
CC#
Created by skyslide22 on 8/10/2023 in #help
✅ .csproj – how to generate nodes dynamically by iterating over a string array ?
i want to include some folders of the project in the build folder, like Utils/<all files&folders in all subdirectories>
4 replies
CC#
Created by skyslide22 on 7/21/2023 in #help
✅ How to get build date of a asp.net app?
found my solution
<PropertyGroup>
<PreBuildEvent>date +"%Y %m %d" > $(pwd)/Client/wwwroot/BuildDate.txt</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>date +"%Y %m %d" > $(pwd)/Client/wwwroot/BuildDate.txt</PreBuildEvent>
</PropertyGroup>
6 replies
CC#
Created by skyslide22 on 7/21/2023 in #help
✅ How to get build date of a asp.net app?
how do i access Properties then in c#? i have seen mutliple examples with that but nowhere a hint where Properties comes from, no namespace named
6 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
my goal is to get rid of try catch in every method, i was thinking about a wrapper which handles the exceptions and may return null on production, with logging or email sending
63 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
server side api
63 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
blazor wasm api yes
63 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
default(T) is probably not the best solution
63 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
i want to return null to the frontend if an exception is raised in prod
63 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
i think this solves my problem
public async Task<TResult?> ThrowIfNotProduction<TResult, TArg>(Func<TArg, Task<TResult>> func, TArg arg)
{
try
{
return await func(arg);
}
catch
{
if(_env.IsDevelopment())
throw;
}
return default;
}
// and then
public async Task<int?> Rents_PaidInsert(Rents_PaidInsert_InputParams Rents_PaidInsert_InputParams)
{
return await ThrowIfNotProduction(_database.Rents_PaidInsert, Rents_PaidInsert_InputParams);
}
public async Task<TResult?> ThrowIfNotProduction<TResult, TArg>(Func<TArg, Task<TResult>> func, TArg arg)
{
try
{
return await func(arg);
}
catch
{
if(_env.IsDevelopment())
throw;
}
return default;
}
// and then
public async Task<int?> Rents_PaidInsert(Rents_PaidInsert_InputParams Rents_PaidInsert_InputParams)
{
return await ThrowIfNotProduction(_database.Rents_PaidInsert, Rents_PaidInsert_InputParams);
}
63 replies
CC#
Created by skyslide22 on 6/14/2023 in #help
❔ Python Decorators in C# ??? How do i intercept method calls with attributes?
our code generator creates c# classes from mssql database tables based on stored procedures for insert, select, update, delete, selectList
63 replies