Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

228 total results found

Docker Space Full

System Administration

Here are some things to check on when the disk on a docker host gets full. sudo docker system prune -a -f This will cleanup other resource types: docker system prune -a This command will remove older logs from the container logs folder: sudo find /project...

Linux
docker
Administration

Consuming Services Inside Startup

.NET

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 ...

service
programming
dotnet
.net

NET Core Background Services

.NET

NOTE: Refer to this page for how to register and consume a background service: Consuming NET Core Background Service with DI General Lots of the ceremony of a background service has been wrapped up and tested, in this class: BackgroundService_Base NOTE: As ...

programming
service
dotnet
.net

Consuming NET Core Background Service with DI

.NET

To properly consumes a background service from a controller or another service, it must be registered with DI. As well, since it’s a background service… it must be running… and probably a singleton. NOTE: If you are looking for how to generate an instance of...

service
dotnet
.net
programming

C# Disposed in Derived Types

.NET

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...

programming
dotnet
.net

Duplicating .NET Core DI

.NET

NOTE: If you are looking for how to access DI services, see this: HowTo Access DI Services Here are the steps to duplicating the .NET Dependency Injection process, to create a ServiceProvider instance. This is especially useful in unit testing, for classes an...

programming
dotnet
IServiceProvider
unittests
testing
DI
.net

Unit Testing with IServiceProvider

.NET

When you create unit tests for class types that directly use DI to retrieve dependencies, you will need a way to give them a reference to a service provider (IServiceProvider). This is transparently done by the runtime.But, we have to mimic it for unit testin...

testing
DI
unittests
.net
dotnet
programming

Unit Testing Conventions

.NET

Suppress Async Warning Project-Wide Since we have several calls to base classes for diagnostics and such that are async, it's a good idea to standardize on all Test methods be async. The problem is that not every test method contains an awaited call. so, we ...

unittests
programming
testing
dotnet
.net

VS IDE Suppress Compiler Warnings Project Wide

.NET

There are some cases where it is necessary to suppress IDE compiler warnings that apply to the entire project. This can be warnings that occur several times across the source files. Or, it can be for a compiler warning that the project’s framework target is ...

programming
.net
dotnet

#nullable Warning

.NET

If the compiler is giving you warnings about nullable reference types, then you may need to enable nullables in the csproj file. This can happen when you declare a public class property, like this: public TaskConfigBase? ConfigBase { get; set; } Sin...

.net
dotnet
programming

WYSIWYG Numbered List Resetting Issue

TODO-InBox

Some list number text, starting a numbered list. More list number text, continuing the same numbered list. More list number text, continuing the same numbered list. More list number text, continuing the same numbered list. Callout NOTE entered here. ...

Long Numbered List Randomly Changes

TODO-InBox

Documentation Open the Network VLANs listing, and add a new entry for the VLAN. Main Switch Config The main switch will need to be updated, so VMs in the new VLAN can reach the router. Log into the main switch at: 192.168.1.20. From the ma...

Administration
Networking
infrastructure

.NET Framework Unit Testing Issues

.NET

Since we have some libraries that still output to NET Framework targets, some workarounds are required because of some design choices that have been made in the MSTest library and Test Explorer. MSTest Project Styles (SDK vs Non-SDK) NOTE: This only applies ...

.net
testing
programming
dotnet
unittests

Unit Testing for an Exception

.NET

Sometimes, a unit test needs to ensure a particular exception type occurs. Here’s how to check that a particular exception and message occurs. The catch is that, when executing code inside a unit test framework, such as MSUnit, any exception thrown by code i...

dotnet
.net
programming
unittests
testing

Unit Test Cheat Sheet

.NET

Here’s a list of elements for unit testing in Visual Studio using MSTest. Documentation for Visual Studio Testing is here: GitHub - microsoft/vstest-docs: Documentation for the Visual Studio Test Platform. Necessary Packages The following packages are neces...

.net
programming
dotnet
unittests
testing

C# Unit Test Template Classes

.NET

If you are using MSTest as your testing framework, and want to leverage the test functionality from OGA.Testing.Lib, here are the minimal classes and structure you will need. For a cheat-sheet on MSTest framework usage, see this: Unit Test Cheat Sheet Depend...

testing
unittests
dotnet
.net
programming

.NET iOS Runtime Limitations

.NET Xamarin

Here’s some notes on the limitations imposed by IOS for Xamarin and MAUI applications. These apply to both Xamarin and MAUI apps written for iOS. Basically, the iOS kernel prevents any application from generating dynamic code at runtime. So, any usage of JI...

.net
Xamarin
dotnet
programming

Ubuntu Host Setup

System Administration Ubuntu Server Setup

Here are the minimal steps to setup a clean Ubuntu VM. Note: These instructions are tested on on Ubuntu v22 through v24.They may require updates for other versions. Spawn VM Clone The first step is to spawn a clone of the template VM. Be sure to do the fol...

Linux
deployment
Administration
ubuntu

Validating AD Machine Account

System Administration Windows

Here's a couple ways to validate the machine account of a PC in an Active Directory domain: dsregcmd /status If successful, it will output a device state of DomainJoined: yes. NOTE: It outputs several blocks of info. So, you may have to scroll up to see t...

Postgres Setup

PostgreSQL

Remote Access For accessing the postgres database from outside the host or from a docker container on the host, you must setup the Postgres instance to listen on a network adapter other than localhost. To do this, locate the postgresql.conf file in: /etc/pos...

database
postgres
Administration