Table of Contents

Class ServiceAttribute

Namespace
IceRpc
Assembly
IceRpc.dll

Instructs the IceRPC Service Generator (IceRpc.ServiceGenerator) to implement IDispatcher by generating an implementation of DispatchAsync(IncomingRequest, CancellationToken) in the class on which this attribute is applied.

[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ServiceAttribute : Attribute
Inheritance
ServiceAttribute
Inherited Members

Remarks

Make sure to mark your class as partial when you apply this attribute. Your class should also implement one or more interfaces I{Name}Service generated from Ice or Slice interfaces, or from Protobuf services. The generated implementation of DispatchAsync routes requests to the appropriate method based on the operation name carried by the incoming request.