boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

Get Windows Service Dependencies using C#

Updated on     Kisan Patel

To Get the services that depend on the current service, you need to use DependentServices property of ServiceController class.

class Program
{
    static void Main(string[] args)
    {
        ServiceController scStateService = new ServiceController("Telephony");
        Console.WriteLine("The Event Log Service status is currently set to {0}",
                                        scStateService.Status.ToString());

        foreach (ServiceController sc in scStateService.DependentServices)
        {
            Console.WriteLine(scStateService.DisplayName + " is depended on by: " + sc.DisplayName);
        }

        Console.ReadKey();
    }

}

Output of the above program…

dependent-services

If you want to get the services that the current service does depend on, use below line of code:

foreach (ServiceController sc in scStateService.ServicesDependedOn)
{
      Console.WriteLine(scStateService.DisplayName + " depends on: " + sc.DisplayName);
}

Output of the above program…

dependent-services


C#

Leave a Reply