The dotNetDave “Rage for Code” T-Shirt Contest

I want to see some of the geek graphic arts talents to design a new Rock The World tour t-shirt for 2018. I will wear the winning design at every event I speak at in 2018, including India! Here is the info on the contest. The Winner Will Receive... 2018 Rage for Code t-shirt. Your [...]

Advertisements

Retrieve The Status of a Windows Service

Here is an easy way to get the status of a Windows service. Public Function ServiceStatus(serviceName As String) As  ServiceControllerStatus Dim service As ServiceController = LoadService(serviceName) If service IsNot Nothing Then Return service.Status Else Throw New InvalidOperationException("Service not  found.") End If End Function Private Function LoadService(serviceName As String) As ServiceController      Return ServiceController.GetServices().Where(Function(p) p.ServiceName = serviceName).FirstOrDefault() End Function Here are the values for service status: ContinuePending Paused PausePending Running StartPending Stopped StopPending This and lost  more code can be found in the [...]

Properly Implementing the Singleton Pattern

One of the popular coding patterns is called Singleton. I use it currently in my dotNetTips Dev Utility for the configuration object. The pattern is defined: In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is [...]

dotNetDave Rocks Azure BootCamp – 2017

For the first time I will speaking at the Azure BootCamp in Southern California on Saturday April 22nd. I hope to see you there. I will be doing the session below. Rock Your Development With A Real World Example This session will demonstrate concepts in the first four parts of my series titled "Improving Code [...]