Table of Contents

Class HandlerServiceTypeImplementationDelegatesModel

Namespace
Savvyio
Assembly
Savvyio.Core.dll

Represents a model for handler service type implementation delegates.

public record HandlerServiceTypeImplementationDelegatesModel : IEquatable<HandlerServiceTypeImplementationDelegatesModel>
Inheritance
HandlerServiceTypeImplementationDelegatesModel
Implements

Examples

HandlerServiceTypeImplementationDelegatesModel represents one delegate entry in handler discovery output — the request type handled and the name of the registered method delegate.

using System;
using Savvyio;

namespace ExampleApp;

public sealed class HandlerDelegateInspection
{
    public static void PrintDelegates()
    {
        var entry = new HandlerServiceTypeImplementationDelegatesModel(
            typeof(CreateOrderCommand).Name,
            "HandleCreateOrderAsync");

        Console.WriteLine($"Request: {entry.Type}, Handler method: {entry.Handler}");
    }
}

public sealed record CreateOrderCommand(string OrderId);

Constructors

HandlerServiceTypeImplementationDelegatesModel(string, string)

Initializes a new instance of the HandlerServiceTypeImplementationDelegatesModel class.

public HandlerServiceTypeImplementationDelegatesModel(string type, string handler)

Parameters

type string
handler string

Properties

Handler

Gets the name of the delegate method.

public string Handler { get; init; }

Property Value

string

Type

Gets the name of the delegate model.

public string Type { get; init; }

Property Value

string