Advanced Search
Search Results
39 total results found
Spawning Processes into Interactive Sessions
Starting a Windows process using .NET is normally an easy thing.You call Process.Start() with a little setup, and the process runs. But, that starts a process in the same Windows session as the thread that calls Process.Start(). This, of course, doesn’t work...
When Two Referenced Assemblies Have Overlapping Namespace
You will come across a problem at some point, where you will use a class, that exists in two libraries that your project references. This problem is identified by the CS0433 compiler error, “The type exists in both…”. To workaround this, without updating one...
C# Equality Operator Overloading
Here’s a good example for how to implement operator for equality (==, !=, .Equals()). This is taken from the Version3 type in OGA.SharedKernel.Lib. NOTE: These overrides include method signatures for older and newer NET Framework versions. Equal / Not Equal...
Net Deep Copy/Cloning
Below are some references for different methods of accomplishing deep copies of object types. NOTE: You will need to evaluate which technique is better for your use case, as there is no single solution for all. This is because of several factors: Time-co...
DotNet Startup Remote Debugging Hook
When performing remote debugging of an application or service, it may be necessary to see what is happening during early startup. Adapted from this article: I Wish I Knew About Debugger.Launch Earlier Normally. By the time you have started the remote process...
DotNet Assembly Searching
Here are notes about the Assembly Helper classes that are part of OGA.SharedKernel.Lib and OGA.Common.Lib. Use Cases There are several use cases for searching loaded and referenced assemblies for classes and types.Here are some examples: Identify top-le...
Install DotNet 6 on Ubuntu 24.04
The process of installing DotNet on Ubuntu has evolved a bit.It was especially rocky on Ubuntu v22, where the OS package manager had conflicts with the official Microsoft packages, rendering the installation broken. But, it appears that in Ubuntu 24.04, it wo...
Jenkins Notes and Links
Here are links to Jenkins references. Jenkins User Manual: Jenkins User Handbook Dealing with the Jenkins System Account: Jenkins: Home Profile
Angular: Add Query Parameters without Router
Sometimes it is necessary to add query parameters to a REST API url without going through the Angular router logic, such as when doing paginated lists on large tables. To make this easy to do, just use the HttpParams module. Import it with: import { HttpPar...
Good Article on Net Core With or Without IIS
Publishing and Running ASP.NET Core Applications with IIS - Rick Strahl's Web Log (west-wind.com)
Raspberry Pi - DotNet Setup
Here’s a short article for setting up a Raspberry PI to run DotNet. Reference Articles We are following this article series: Page #1: RP #01: Setup your Raspberry Pi with Raspberry Pi OS Page 2: RP #02: Install .NET and develop your first .NET application ...
NET Core Func Variables
Here are some use cases for a Func. Func as Method Callback If you want to have a lambda that you pass to a method, like a callback or completion handler, here is an example. Declare the Func, like this: Func<int, int, Task<int>> sigcallback = async (callb...
Process Logging Behavior
Here’s my current conventions for logging in application processes. Logging features, here are implemented by the Logging class in OGA.Common.Lib. Logging Phases We use three distinct logging phases for an application, each with a distinct purpose. Ear...
Dotnet Dev on Linux
To create a new project at the current folder: dotnet new console --framework net6.0 --use-program-main To run the app: dotnet run
NET Core Error Responses
Here’s a decent mechanism for returning useful errors from a WEB API. Aside: We have a standing test API (OGA.RESTAPI_Testing.Service) that will return examples of this, here: http://192.168.1.201:4250/swagger/index.html We can compose an instance of the Pro...
Six Ways to Multi-Thread
Six ways to initiate tasks on another thread in .NET
Return Multiple Values from Async Method
Async method cannot have Ref or an Out parameters. So, we cannot pass back data from them through typical syntax. This requires us to be a little creative. One way around this CLR limitation is to use tuples.Specifically, we can use an implicit tuple, that wi...
PostGreSQL .NET DateTime Usage
.NET EF Core 6 made a breaking change to how DateTime is stored in PostGreSQL. This article explains some of it and the workaround: https://github.com/npgsql/efcore.pg/issues/2000 To enable the workaround, add this to the Configure method of your Startup....
C# Disposed in Derived Types
People make lots of references to Microsoft articles about how to properly handle Dispose in derived class types.But, there is literally no article on the Microsoft that actually shows this use case.So, here’s a collected method, based on a few references, tes...
Consuming Services Inside Startup
During Startup.ConfigureServices During application startup, the Startup.ConfigureServices method is called to register services and configuration with DI.This method allows those services to be consumed across the application. However. During the execution ...