Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,28 +290,19 @@ public ServiceController[] InputObject
#region Internal

/// <summary>
/// Retrieve the master list of all services.
/// Gets an array of all services.
/// </summary>
/// <value></value>
/// <value>
/// An array of <see cref="ServiceController"/> components that represents all the service resources.
/// </value>
/// <exception cref="System.Security.SecurityException">
/// MSDN does not document the list of exceptions,
/// but it is reasonable to expect that SecurityException is
/// among them. Errors here will terminate the cmdlet.
/// </exception>
internal ServiceController[] AllServices
{
get
{
if (_allServices == null)
{
_allServices = ServiceController.GetServices();
}

return _allServices;
}
}
internal ServiceController[] AllServices => _allServices ??= ServiceController.GetServices();

private ServiceController[] _allServices = null;
private ServiceController[] _allServices;

internal ServiceController GetOneService(string nameOfService)
{
Expand Down