Class SliceServiceAttribute
Instructs the Slice Service source generator to implement IDispatcher by generating an
implementation of DispatchAsync(IncomingRequest, CancellationToken) in the class on which this attribute is applied. Make sure
to mark your class as partial when you apply this attribute. Your class should also implement one
or more interface INameService (generated by the Slice compiler). The DispatchAsync produced by the
source generator dispatches to the appropriate method based on the operation name carried by the incoming request.
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class SliceServiceAttribute : Attribute
- Inheritance
-
SliceServiceAttribute
- Inherited Members
Remarks
You must apply this attribute to any class for which you want the Slice Service source generator to
generate a DispatchAsync method. This attribute is not inherited by derived classes.