// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Dtf.WindowsInstaller { using System; using System.Reflection; /// /// Marks a method as a custom action entry point. /// ///

/// A custom action method must be defined as public and static, /// take a single object as a parameter, /// and return an enumeration value. ///

[Serializable, AttributeUsage(AttributeTargets.Method)] public sealed class CustomActionAttribute : Attribute { /// /// Name of the custom action entrypoint, or null if the same as the method name. /// private string name; /// /// Marks a method as a custom action entry point. /// public CustomActionAttribute() : this(null) { } /// /// Marks a method as a custom action entry point. /// /// Name of the function to be exported, /// defaults to the name of this method public CustomActionAttribute(string name) { this.name = name; } /// /// Gets or sets the name of the custom action entrypoint. A null /// value defaults to the name of the method. /// /// name of the custom action entrypoint, or null if none was specified public string Name { get { return this.name; } } } }