Skip to content

GenerateInterfaceAttribute class

namespace: Serenity.ComponentModel   assembly: Serenity.Net.Core

Marks a class so that its accompanying interface is generated by Serenity.Pro.Coder InterfaceSourceGenerator.

[AttributeUsage(AttributeTargets.Class)]
public class GenerateInterfaceAttribute : Attribute

Public Members

name description
GenerateInterfaceAttribute() The default constructor.
RequestHandler { get; set; } Whether the interface derives from the request handler interface that fits the class, so AddServiceHandlers registers it in every application. Set it to false for a class that only its own Add method should register, e.g. as it needs services that other applications don't have. The class should not implement a request handler interface otherwise.
RequireFeatures { get; set; } Set of features that will be added via the RequiresFeature attribute to the interface.

See Also