Search Results for

    Show / Hide Table of Contents

    Class MessageBusBase<TMessage>

    • 공통 메시지 버스 기반 클래스.
    • 타입별 핸들러 관리 및 스냅샷 캐싱.
    • 클래스 체인 + 인터페이스 순회 지원.
    • 스레드 안전성 보장 (lock).
    Inheritance
    object
    MessageBusBase<TMessage>
    CommandBus
    EventBus
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9
    Assembly: Glitch9.dll
    Syntax
    public abstract class MessageBusBase<TMessage>
    Type Parameters
    Name Description
    TMessage

    메시지 타입 (ICommand 또는 IEvent)

    Constructors

    | Edit this page View Source

    MessageBusBase(string)

    Declaration
    protected MessageBusBase(string debugName = null)
    Parameters
    Type Name Description
    string debugName

    Methods

    | Edit this page View Source

    Dispatch<T>(T)

    메시지 발송 (핸들러가 없으면 예외).

    Declaration
    public virtual void Dispatch<T>(T message) where T : TMessage
    Parameters
    Type Name Description
    T message
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    IsRegistered<T>()

    핸들러가 등록되어 있는지 확인.

    Declaration
    public virtual bool IsRegistered<T>() where T : TMessage
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Register<T>(Action<T>)

    핸들러 등록 (래핑 방식).

    Declaration
    public virtual IDisposable Register<T>(Action<T> handler) where T : TMessage
    Parameters
    Type Name Description
    Action<T> handler
    Returns
    Type Description
    IDisposable
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    TryDispatch<T>(T)

    메시지 발송 시도 (핸들러가 없으면 false 반환).

    Declaration
    public virtual bool TryDispatch<T>(T message) where T : TMessage
    Parameters
    Type Name Description
    T message
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Unregister<T>(Action<T>)

    핸들러 등록 해제.

    Declaration
    public virtual void Unregister<T>(Action<T> handler) where T : TMessage
    Parameters
    Type Name Description
    Action<T> handler
    Type Parameters
    Name Description
    T

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation