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

52 total results found

Angular: Access CSS Variables

Angular Dev

CSS Variables can be defined in css (or SCSS) like this: NOTE: These are defines in the root element, in the styles.scss file of an app. :root { --sidenav-width: 300px; --sidenav-collapsed-width: 50px; --sidenav-background-color: var(--app-bac...

web-dev
programming
angular

Web Push Notifications

Angular Dev

Here’s some initial references for setting up Push Notifications in web pages. Service Worker API - Web APIs | MDN Push API - Web APIs | MDN Push notifications overview  |  Articles  |  web.dev Push notifications are now supported cross-browser  |  Blog  |...

angular
web-dev
programming

Good Article on Net Core With or Without IIS

.NET

Publishing and Running ASP.NET Core Applications with IIS - Rick Strahl's Web Log (west-wind.com)

dotnet
.net
programming

Raspberry Pi - DotNet Setup

Raspberry PI

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

RaspberryPi
programming
.net
dotnet

NET Core Func Variables

.NET

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

dotnet
programming
.net

Regex Notes

Other

Good site for testing Regex matching strings: https://regex101.com/r/iY5hU9/1

programming

Process Logging Behavior

.NET

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
.net
programming
logging

Dotnet Dev on Linux

.NET

To create a new project at the current folder: dotnet new console --framework net6.0 --use-program-main To run the app: dotnet run  

programming
Linux
dotnet
.net

NET Core Error Responses

.NET

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

REST
programming
dotnet
.net

Six Ways to Multi-Thread

.NET

Six ways to initiate tasks on another thread in .NET

programming
.net
dotnet

Return Multiple Values from Async Method

.NET

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

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

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

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

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

unittests
testing
DI
.net
dotnet
programming
IServiceProvider

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

DI
unittests
testing
.net
dotnet
programming

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

service
programming
dotnet
.net

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

testing
unittests
programming
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