Category: projects
-
NetPackageAnalyzer- idea –part 1
I wanted to have a tool that can analyze a C# solution with all the dependencies ( project relations,packages,commits) It generates a graph of the dependencies for the packages of your solution ( and see when the major version of a package differs between projects) the projects of your solution. the project dependencies of each…
-
Comparing EFCore Database Providers part 3
I did not have the opportunity to migrate from a database from another . But seems to me that,when using EF,the principal problem will be the stored procedures,not the code that EF ( and providers) are generating automatically. Yes,there are some problems ( see part 1 and part 2),but those seems not so important and…
-
Comparing EFCore Database Providers-part-1
I wanted to see if there are any differences in EFCore database providers listed at https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli I want to test the capabilities for each one within a standard choice of tables,in order to know the capabilities I choose only those that have a version for current STS / LTS,whatever it is current. ( I am…
-
NetCoreUsefullEndpoints-part 8- adding start date
In my NuGet NetCoreUsefullEndpoints package I have had already registered the actual date as var rh = route.MapGet(“api/usefull/dateUTC”,(HttpContext httpContext) => { return Results.Ok(DateTime.UtcNow); }); Now I want to register also the start date – the date where the application has been started. 1. How to do this ? 2. What will be the route ? For…
-
NetCoreUsefullEndpoints–part 7–restart application
In order to do the shutdown,I have added the following extension public static CancellationTokenSource cts=new (); public static void MapShutdown(this IEndpointRouteBuilder route,string? corsPolicy = null,string[]? authorization = null) { ArgumentNullException.ThrowIfNull(route); var rh = route.MapPost(“api/usefull/shutdown/”, (HttpContext httpContext) => { var h= cts.Token.GetHashCode(); cts?.Cancel(); return h; }); rh.AddDefault(corsPolicy,authorization); } This code defines a…
-
DIForFunctions – Improving constructor–part 5
I have received a suggestion : what if we just put into constructor what we need,and everything else ( such as ILogger ) are into fields ? The Roslyn Source Code Generator will generate a constructor that calls the this constructor and will assign fields needed. Let’s give an example : We wrote public partial…
-
Record visitors- work on issues–part 7
Now it is time to solve some issues There were 12 issues written by me – you can see here: https://github.com/ignatandrei/RecordVisitors/issues?q=is%3Aissue+is%3Aclosed Between the most important: Improve readme.md with more links and explanations for potential programmer and contributors Write version in static constructor – to know about the version,if some issue occurs Added custom link lastvisitors/minutes/{time:int}…
-
SideCARCLI–Finish process after some time
One of the feature is to let the original process execute just a limited amount of time. For this,I have defined an option var maxSeconds = app.Option(“-mS|–maxSeconds”,”max seconds for the StartApp to run”,CommandOptionType.SingleOrNoValue); and the code for waiting is Process p = new Process() { StartInfo = pi }; //code var res=p.WaitForExit(this.MaxSeconds); //code if (res)…
-
SideCarCLI – Line interceptors
For the SideCarCLI I have the concept of Line Interceptors. That means for each line from the original program another program will be start . The json looks like this “LineInterceptors”: [ { “Name”: “WindowsStandardWindowsOutputInterceptor”, “Arguments”: “/c echo \”{site} {line}\””, “FullPath”: “cmd.exe”, “FolderToExecute”: null, “InterceptOutput”: true }, { “Name”: “NextInterceptor”, “Arguments”: “/c echo {line}”, “FullPath”:…
-
SideCarCLI | Command Line – description –part 1
There are those days a great deal of command line applications that performs a variety of things. The problem is that you cannot control them . The command line performs their duty well – but,from time to time,you need something else integrated with this. The pattern for this is https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar – it is applied to…