| File: System\ServiceProcess\ServiceProcessDescriptionAttribute.cs | Web Access |
| Project: src\runtime\src\libraries\System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj (System.ServiceProcess.ServiceController) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; namespace System.ServiceProcess { /// <summary> /// DescriptionAttribute marks a property, event, or extender with a /// description. Visual designers can display this description when referencing /// the member. /// </summary> [AttributeUsage(AttributeTargets.All)] public class ServiceProcessDescriptionAttribute : DescriptionAttribute { private bool _replaced; /// <summary> /// Constructs a new sys description /// </summary> public ServiceProcessDescriptionAttribute(string description) : base(description) { } /// <summary> /// Retrieves the description text. /// </summary> public override string Description { get { if (!_replaced) { _replaced = true; DescriptionValue = base.Description; } return base.Description; } } } }